summaryrefslogtreecommitdiff
path: root/src/mainboard/starlabs/lite/acpi
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2022-01-10 21:58:04 +0000
committerFelix Held <felix-coreboot@felixheld.de>2022-03-01 11:56:26 +0000
commit5da05b6e35f49a83f5b3610d2b41931f7d703da5 (patch)
treeffa69e665f368ea19adc1089eb70377d156e0f34 /src/mainboard/starlabs/lite/acpi
parentc64626c9d90b4b2eb0a6c959f5af5303bf048d78 (diff)
mb/starlabs/lite: Add StarLite Mk III
Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Iddbf2022d03735d6a0e6d098c21643f5fdc875f6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/60980 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/mainboard/starlabs/lite/acpi')
-rw-r--r--src/mainboard/starlabs/lite/acpi/mainboard.asl7
-rw-r--r--src/mainboard/starlabs/lite/acpi/sleep.asl15
-rw-r--r--src/mainboard/starlabs/lite/acpi/touchpad.asl83
3 files changed, 105 insertions, 0 deletions
diff --git a/src/mainboard/starlabs/lite/acpi/mainboard.asl b/src/mainboard/starlabs/lite/acpi/mainboard.asl
new file mode 100644
index 0000000000..2336634ac9
--- /dev/null
+++ b/src/mainboard/starlabs/lite/acpi/mainboard.asl
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+Scope (\_SB) {
+ #include "sleep.asl"
+}
+
+#include "touchpad.asl"
diff --git a/src/mainboard/starlabs/lite/acpi/sleep.asl b/src/mainboard/starlabs/lite/acpi/sleep.asl
new file mode 100644
index 0000000000..9dc818d04d
--- /dev/null
+++ b/src/mainboard/starlabs/lite/acpi/sleep.asl
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+Method (MPTS, 1, NotSerialized)
+{
+ If (Arg0)
+ {
+ RPTS (Arg0)
+ }
+}
+
+Method (MWAK, 1, NotSerialized)
+{
+ RWAK (Arg0)
+ Return (0x00)
+}
diff --git a/src/mainboard/starlabs/lite/acpi/touchpad.asl b/src/mainboard/starlabs/lite/acpi/touchpad.asl
new file mode 100644
index 0000000000..f73847c35d
--- /dev/null
+++ b/src/mainboard/starlabs/lite/acpi/touchpad.asl
@@ -0,0 +1,83 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+Scope (\_SB.PCI0.I2C7)
+{
+ Device (H02C)
+ {
+ Name (_HID, "STAR0001") // _HID: Hardware ID
+ Name (_CID, "PNP0C50" /* HID Protocol Device (I2C bus) */) // _CID: Compatible ID
+ Name (_UID, 0x01) // _UID: Unique ID
+ Name (_DDN, "Touchpad") // _DDN: DOS Device Name
+ Name (_DEP, Package (0x02) // _DEP: Dependencies
+ {
+ GPO3,
+ I2C7
+ })
+
+ Method (_STA, 0, NotSerialized) // _STA: Status
+ {
+ Return (0x0F)
+ }
+
+ Name (_CRS, ResourceTemplate ()
+ {
+ I2cSerialBusV2 (0x002C, ControllerInitiated, 0x000186A0,
+ AddressingMode7Bit, "\\_SB.PCI0.I2C7",
+ 0x00, ResourceConsumer, , Exclusive,)
+ GpioInt (Level, ActiveLow, ExclusiveAndWake, PullDefault, 0x0000,
+ "\\_SB.GPO3", 0x00, ResourceConsumer, ,)
+ {
+ CONFIG_TRACKPAD_INTERRUPT
+ }
+ })
+
+ Name (_DSD, Package (0x02) // _DSD: Device-Specific Data
+ {
+ ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
+ Package (0x01)
+ {
+ Package (0x02)
+ {
+ "linux,probed",
+ One
+ }
+ }
+ })
+ Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method
+ {
+ ToBuffer (Arg0, Local0)
+ If ((Local0 == ToUUID ("3cdff6f7-4267-4555-ad05-b30a3d8938de") /* HID I2C Device */))
+ {
+ ToInteger (Arg2, Local1)
+ If (Local1 == 0x00)
+ {
+ ToInteger (Arg1, Local2)
+ If (Local2 == 0x01)
+ {
+ Return (Buffer (0x01)
+ {
+ 0x03
+ })
+ } Else {
+ Return (Buffer (0x01)
+ {
+ 0x00
+ })
+ }
+ }
+ If ((Local1 == 0x01))
+ {
+ Return (0x20)
+ }
+ Return (Buffer (0x01)
+ {
+ 0x00
+ })
+ }
+ Return (Buffer (0x01)
+ {
+ 0x00
+ })
+ }
+ }
+}