1/* SPDX-License-Identifier: GPL-2.0-only */ 2 3#include "onboard.h" 4 5Scope (\_SB) 6{ 7 Device (PWRB) 8 { 9 Name (_HID, EisaId ("PNP0C0C")) 10 Name (_UID, 1) 11 } 12} 13 14Scope (\_SB.PCI0.I2C1) 15{ 16 Device (ATSB) 17 { 18 Name (_HID, "ATML0001") 19 Name (_DDN, "Atmel Touchscreen Bootloader") 20 Name (_UID, 4) 21 Name (ISTP, 0) /* TouchScreen */ 22 23 Method(_CRS, 0x0, Serialized) 24 { 25 Name (BUF0, ResourceTemplate () 26 { 27 I2cSerialBus( 28 0x26, /* SlaveAddress */ 29 ControllerInitiated, /* SlaveMode */ 30 400000, /* ConnectionSpeed */ 31 AddressingMode7Bit, /* AddressingMode */ 32 "\\_SB.PCI0.I2C1", /* ResourceSource */ 33 ) 34 Interrupt (ResourceConsumer, Edge, ActiveLow) 35 { 36 BOARD_TOUCH_IRQ 37 } 38 }) 39 Return (BUF0) 40 } 41 42 Method (_STA) 43 { 44 If (\S1EN == 1) { 45 Return (0xF) 46 } Else { 47 Return (0x0) 48 } 49 } 50 51 /* Allow device to power off in S0 */ 52 Name (_S0W, 4) 53 } 54 55 Device (ATSA) 56 { 57 Name (_HID, "ATML0001") 58 Name (_DDN, "Atmel Touchscreen") 59 Name (_UID, 5) 60 Name (ISTP, 0) /* TouchScreen */ 61 62 Method(_CRS, 0x0, Serialized) 63 { 64 Name (BUF0, ResourceTemplate () 65 { 66 I2cSerialBus( 67 0x4b, /* SlaveAddress */ 68 ControllerInitiated, /* SlaveMode */ 69 400000, /* ConnectionSpeed */ 70 AddressingMode7Bit, /* AddressingMode */ 71 "\\_SB.PCI0.I2C1", /* ResourceSource */ 72 ) 73 Interrupt (ResourceConsumer, Edge, ActiveLow) 74 { 75 BOARD_TOUCH_IRQ 76 } 77 }) 78 Return (BUF0) 79 } 80 81 Method (_STA) 82 { 83 If (\S1EN == 1) { 84 Return (0xF) 85 } Else { 86 Return (0x0) 87 } 88 } 89 90 Name (_PRW, Package() { BOARD_TOUCHSCREEN_WAKE_GPIO, 0x3 }) 91 92 /* Allow device to power off in S0 */ 93 Name (_S0W, 4) 94 } 95} 96 97Scope (\_SB.PCI0.I2C5) 98{ 99 /* Realtek Audio Codec */ 100 Device (RTEK) /* Audio Codec driver I2C */ 101 { 102 103 Name (_HID, AUDIO_CODEC_HID) 104 Name (_CID, AUDIO_CODEC_CID) 105 Name (_DDN, AUDIO_CODEC_DDN) 106 Name (_UID, 1) 107 108 Method(_CRS, 0x0, Serialized) 109 { 110 Name(SBUF,ResourceTemplate () 111 { 112 I2CSerialBus( 113 AUDIO_CODEC_I2C_ADDR, /* SlaveAddress: bus address */ 114 ControllerInitiated, /* SlaveMode: default to ControllerInitiated */ 115 400000, /* ConnectionSpeed: in Hz */ 116 AddressingMode7Bit, /* Addressing Mode: default to 7 bit */ 117 "\\_SB.PCI0.I2C5" /* ResourceSource: I2C bus controller name */ 118 ) 119 120 /* Jack Detect (index 0) */ 121 GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,, 122 "\\_SB.GPSW") { JACK_DETECT_GPIO_INDEX } 123 } ) 124 Return (SBUF) 125 } 126 127 Method (_STA) 128 { 129 Return (0xF) 130 } 131 } 132} 133 134Scope (\_SB.PCI0.I2C6) 135{ 136 Device (ETPA) 137 { 138 Name (_HID, "ELAN0000") 139 Name (_DDN, "Elan Touchpad") 140 Name (_UID, 3) 141 Name (ISTP, 1) /* Touchpad */ 142 143 Name (_CRS, ResourceTemplate() 144 { 145 I2cSerialBus ( 146 0x15, /* SlaveAddress */ 147 ControllerInitiated, /* SlaveMode */ 148 400000, /* ConnectionSpeed */ 149 AddressingMode7Bit, /* AddressingMode */ 150 "\\_SB.PCI0.I2C6", /* ResourceSource */ 151 ) 152 GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,, 153 "\\_SB.GPNC") { BOARD_TRACKPAD_GPIO_INDEX } 154 }) 155 156 Method (_STA) 157 { 158 If (\S6EN == 1) { 159 Return (0xF) 160 } Else { 161 Return (0x0) 162 } 163 } 164 165 Name (_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x3 }) 166 /* Allow device to power off in S0 */ 167 Name (_S0W, 4) 168 } 169} 170 171Scope (\_SB.PCI0.LPEA) 172{ 173 Name (GBUF, ResourceTemplate () 174 { 175 /* Jack Detect (index 0) */ 176 GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,, 177 "\\_SB.GPSW") { JACK_DETECT_GPIO_INDEX } 178 }) 179} 180 181Scope (\_SB.GPNC) 182{ 183 Method (_AEI, 0, Serialized) 184 { 185 Name (RBUF, ResourceTemplate () 186 { 187 GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,, 188 "\\_SB.GPNC") { BOARD_SCI_GPIO_INDEX } 189 }) 190 Return (RBUF) 191 } 192 193 Method (_E0F, 0, NotSerialized) // _Exx: Edge-Triggered GPE 194 { 195 } 196} 197