]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2DeviceRefCodePkg/AcpiTablesPCAT/IoTVirtualDevice.asl
Vlv2DeviceRefCodePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / Vlv2DeviceRefCodePkg / AcpiTablesPCAT / IoTVirtualDevice.asl
1 /** @file
2 Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
3 SPDX-License-Identifier: BSD-2-Clause-Patent
4
5 **/
6
7 Device(IOTD) {
8 Name(_HID, "MSFT8000")
9 Name(_CID, "MSFT8000")
10
11 Name(_CRS, ResourceTemplate() {
12 // Index 0
13 SPISerialBus( // Pin 5, 7, 9 , 11 of JP1 for SIO_SPI
14 1, // Device selection
15 PolarityLow, // Device selection polarity
16 FourWireMode, // wiremode
17 8, // databit len
18 ControllerInitiated, // slave mode
19 8000000, // Connection speed
20 ClockPolarityLow, // Clock polarity
21 ClockPhaseSecond, // clock phase
22 "\\_SB.SPI1", // ResourceSource: SPI bus controller name
23 0, // ResourceSourceIndex
24 ResourceConsumer, // Resource usage
25 JSPI, // DescriptorName: creates name for offset of resource descriptor
26 ) // Vendor Data
27
28 // Index 1
29 I2CSerialBus( // Pin 13, 15 of JP1, for SIO_I2C5 (signal)
30 0x00, // SlaveAddress: bus address (TBD)
31 , // SlaveMode: default to ControllerInitiated
32 400000, // ConnectionSpeed: in Hz
33 , // Addressing Mode: default to 7 bit
34 "\\_SB.I2C6", // ResourceSource: I2C bus controller name (For MinnowBoard Max, hardware I2C5(0-based) is reported as ACPI I2C6(1-based))
35 ,
36 ,
37 JI2C, // Descriptor Name: creates name for offset of resource descriptor
38 ) // VendorData
39
40 // Index 2
41 UARTSerialBus( // Pin 17, 19 of JP1, for SIO_UART2
42 115200, // InitialBaudRate: in bits ber second
43 , // BitsPerByte: default to 8 bits
44 , // StopBits: Defaults to one bit
45 0xfc, // LinesInUse: 8 1-bit flags to declare line enabled
46 , // IsBigEndian: default to LittleEndian
47 , // Parity: Defaults to no parity
48 , // FlowControl: Defaults to no flow control
49 32, // ReceiveBufferSize
50 32, // TransmitBufferSize
51 "\\_SB.URT2", // ResourceSource: UART bus controller name
52 ,
53 ,
54 UAR2, // DescriptorName: creates name for offset of resource descriptor
55 )
56
57 // Index 3
58 GpioIo (Shared, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.GPO2",) {0} // Pin 21 of JP1 (GPIO_S5[00])
59 // Index 4
60 GpioInt(Edge, ActiveBoth, SharedAndWake, PullNone, 0,"\\_SB.GPO2",) {0}
61
62 // Index 5
63 GpioIo (Shared, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.GPO2",) {1} // Pin 23 of JP1 (GPIO_S5[01])
64 // Index 6
65 GpioInt(Edge, ActiveBoth, SharedAndWake, PullNone, 0,"\\_SB.GPO2",) {1}
66
67 // Index 7
68 GpioIo (Shared, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.GPO2",) {2} // Pin 25 of JP1 (GPIO_S5[02])
69 // Index 8
70 GpioInt(Edge, ActiveBoth, SharedAndWake, PullNone, 0,"\\_SB.GPO2",) {2}
71
72 // Index 9
73 UARTSerialBus( // Pin 6, 8, 10, 12 of JP1, for SIO_UART1
74 115200, // InitialBaudRate: in bits ber second
75 , // BitsPerByte: default to 8 bits
76 , // StopBits: Defaults to one bit
77 0xfc, // LinesInUse: 8 1-bit flags to declare line enabled
78 , // IsBigEndian: default to LittleEndian
79 , // Parity: Defaults to no parity
80 FlowControlHardware, // FlowControl: Defaults to no flow control
81 32, // ReceiveBufferSize
82 32, // TransmitBufferSize
83 "\\_SB.URT1", // ResourceSource: UART bus controller name
84 ,
85 ,
86 UAR1, // DescriptorName: creates name for offset of resource descriptor
87 )
88
89 // Index 10
90 GpioIo (Shared, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.GPO0",) {62} // Pin 14 of JP1 (GPIO_SC[62])
91 // Index 11
92 GpioInt(Edge, ActiveBoth, SharedAndWake, PullNone, 0,"\\_SB.GPO0",) {62}
93
94 // Index 12
95 GpioIo (Shared, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.GPO0",) {63} // Pin 16 of JP1 (GPIO_SC[63])
96 // Index 13
97 GpioInt(Edge, ActiveBoth, SharedAndWake, PullNone, 0,"\\_SB.GPO0",) {63}
98
99 // Index 14
100 GpioIo (Shared, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.GPO0",) {65} // Pin 18 of JP1 (GPIO_SC[65])
101 // Index 15
102 GpioInt(Edge, ActiveBoth, SharedAndWake, PullNone, 0,"\\_SB.GPO0",) {65}
103
104 // Index 16
105 GpioIo (Shared, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.GPO0",) {64} // Pin 20 of JP1 (GPIO_SC[64])
106 // Index 17
107 GpioInt(Edge, ActiveBoth, SharedAndWake, PullNone, 0,"\\_SB.GPO0",) {64}
108
109 // Index 18
110 GpioIo (Shared, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.GPO0",) {94} // Pin 22 of JP1 (GPIO_SC[94])
111 // Index 19
112 GpioInt(Edge, ActiveBoth, SharedAndWake, PullNone, 0,"\\_SB.GPO0",) {94}
113
114 // Index 20
115 GpioIo (Shared, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.GPO0",) {95} // Pin 24 of JP1 (GPIO_SC[95])
116 // Index 21
117 GpioInt(Edge, ActiveBoth, SharedAndWake, PullNone, 0,"\\_SB.GPO0",) {95}
118
119 // Index 22
120 GpioIo (Shared, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.GPO0",) {54} // Pin 26 of JP1 (GPIO_SC[54])
121 // Index 23
122 GpioInt(Edge, ActiveBoth, SharedAndWake, PullNone, 0,"\\_SB.GPO0",) {54}
123 })
124
125 Name(_DSD, Package() {
126 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
127 Package(1) { // Just one Property for IOT (at this time)
128 Package(2) { //The \93symbolic-identifiers\94 property
129 "symbolic-identifiers",
130 Package() { //Contains all the <resource index, symbolic-identifier> pairs
131 0, "SPI0",
132 1, "I2C5",
133 2, "UART2",
134 3, 21, // Pin 21 of JP1 (GPIO_S5[00])
135 4, 21, // Pin 21 for separate resource.
136 5, 23, // Pin 23 of JP1 (GPIO_S5[01])
137 6, 23,
138 7, 25, // Pin 25 of JP1 (GPIO_S5[02])
139 8, 25,
140 9, "UART1",
141 10, 14, // Pin 14 of JP1 (GPIO_SC[62])
142 11, 14,
143 12, 16, // Pin 16 of JP1 (GPIO_SC[63])
144 13, 16,
145 14, 18, // Pin 18 of JP1 (GPIO_SC[65])
146 15, 18,
147 16, 20, // Pin 20 of JP1 (GPIO_SC[64])
148 17, 20,
149 18, 22, // Pin 22 of JP1 (GPIO_SC[94])
150 19, 22,
151 20, 24, // Pin 24 of JP1 (GPIO_SC[95])
152 21, 24,
153 22, 26, // Pin 26 of JP1 (GPIO_SC[54])
154 23, 26
155 }
156 }
157 }
158 })
159
160 Method(_STA,0,Serialized) {
161
162 //
163 // Only report IoT virtual device when all pins' configuration follows MSFT's datasheet.
164 //
165 If (LEqual(IOT, 1)) {
166 Return (0xF)
167 }
168
169 Return (0x0)
170 }
171 }