1/* SPDX-License-Identifier: GPL-2.0-only */ 2 3#include <mainboard/google/parrot/onboard.h> 4 5Scope (\_GPE) { 6 Method(_L1F, 0x0, NotSerialized) 7 { 8 /* 9 * Invert the interrupt level bit for the lid GPIO 10 * so we don't get another _SB.LID0 until the state 11 * changes again. GIV1 is the interrupt level control 12 * register for GPIO bits 15:8 13 */ 14 GIV1 ^= 0x80 15 Notify(\_SB.LID0,0x80) 16 } 17} 18 19Scope (\_SB) { 20 Device (LID0) 21 { 22 Name(_HID, EisaId("PNP0C0D")) 23 Method(_LID, 0) 24 { 25 \LIDS = GP15 26 Return (\LIDS) 27 } 28 } 29 30 Device (TPAD) 31 { 32 33 Name(_HID, "CYSM0000") 34 Name(_UID, 1) 35 Name(_HRV, 2) 36 37 // Trackpad Wake is GPIO12, wake from S3 38 Name(_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x03 }) 39 40 Name (DCRS, ResourceTemplate () 41 { 42 // PIRQA -> GSI16 43 Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, ) 44 { 45 BOARD_TRACKPAD_IRQ_DVT, 46 } 47 // SMBUS Address 0x67 48 VendorShort (ADDR) { BOARD_TRACKPAD_I2C_ADDR } 49 }) 50 51 Name (PCRS, ResourceTemplate () 52 { 53 // PIRQE -> GSI20 54 Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, ) 55 { 56 BOARD_TRACKPAD_IRQ_PVT, 57 } 58 // SMBUS Address 0x67 59 VendorShort (ADDR) { BOARD_TRACKPAD_I2C_ADDR } 60 }) 61 62 Method (_CRS, 0, NotSerialized) 63 { 64 If (\TPIQ == BOARD_TRACKPAD_IRQ_DVT){ 65 Return (DCRS) 66 } Else { 67 Return (PCRS) 68 } 69 } 70 } 71 72 Device (MB) { 73 Name(_HID, EisaId("PNP0C01")) // System Board 74 75 /* Lid open */ 76 Method (LIDO) { /* Not needed on this board */ } 77 /* Lid closed */ 78 Method (LIDC) { /* Not needed on this board */ } 79 /* Increase brightness */ 80 Method (BRTU) { /* Not needed on this board */ } 81 /* Decrease brightness */ 82 Method (BRTD) { /* Not needed on this board */ } 83 /* Switch display */ 84 Method (DSPS) { /* Not needed on this board */ } 85 /* Toggle wireless */ 86 Method (WLTG) { /* Not needed on this board */ } 87 /* Return lid state */ 88 Method (LIDS) 89 { 90 Return (GP15) 91 } 92 } 93 94} 95 96/* USB port entries */ 97#include "acpi/usb.asl" 98