[coreboot-gerrit] Patch set updated for coreboot: google/pyro: Add WCOM50C1 I2C touchscreen support to ACPI

Kevin Chiu (Kevin.Chiu@quantatw.com) gerrit at coreboot.org
Fri Oct 14 12:36:46 CEST 2016


Kevin Chiu (Kevin.Chiu at quantatw.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17026

-gerrit

commit aa68d865c1aa28c7a8f8d1f7a116700a21f88201
Author: Kevin Chiu <Kevin.Chiu at quantatw.com>
Date:   Fri Oct 14 17:42:22 2016 +0800

    google/pyro: Add WCOM50C1 I2C touchscreen support to ACPI
    
    Add WCOM50C1 HID I2C touchscreen support in ACPI
    kernel generic I2C HID driver (i2c-hid/hid-multitouch)
    will be loaded base on WCOM50C1 CID: PNP0C50.
    
    BRANCH=master
    BUG=chrome-os-partner:58093
    TEST=emerge-pyro vboot_reference coreboot chromeos-bootimage
    Signed-off-by: Kevin Chiu <Kevin.Chiu at quantatw.com>
    Change-Id: I15ac6cb100ad25e4baf7a950db2f6096e2496504
---
 src/mainboard/google/reef/dsdt.asl                 |  2 +
 .../variants/pyro/include/variant/acpi/dsdt.asl    | 76 ++++++++++++++++++++++
 2 files changed, 78 insertions(+)

diff --git a/src/mainboard/google/reef/dsdt.asl b/src/mainboard/google/reef/dsdt.asl
index dc63436..0935296 100644
--- a/src/mainboard/google/reef/dsdt.asl
+++ b/src/mainboard/google/reef/dsdt.asl
@@ -58,6 +58,8 @@ DefinitionBlock(
 	/* Dynamic Platform Thermal Framework */
 	Scope (\_SB)
 	{
+		/* Per board variant DSDT specific definitions. */
+		#include <variant/acpi/dsdt.asl>
 		/* Per board variant specific definitions. */
 		#include <variant/acpi/dptf.asl>
 		/* Include soc specific DPTF changes */
diff --git a/src/mainboard/google/reef/variants/pyro/include/variant/acpi/dsdt.asl b/src/mainboard/google/reef/variants/pyro/include/variant/acpi/dsdt.asl
new file mode 100644
index 0000000..bef02e7
--- /dev/null
+++ b/src/mainboard/google/reef/variants/pyro/include/variant/acpi/dsdt.asl
@@ -0,0 +1,76 @@
+Scope (\_SB.PCI0.I2C3)
+{
+	Name(HIDG, ToUUID("3CDFF6F7-4267-4555-AD05-B30A3D8938DE"))	/* GUID for HID-over-I2C */
+
+	Device (WCO1)
+	{
+		Name (_HID, "WCOM50C1")	/* _HID: Hardware ID */
+		Name (_CID, "PNP0C50")	/* _CID: compatible ID */
+		Name (_UID, Zero)	/* _UID: Unique ID */
+		Name (_DDN, "WCOM Touchscreen")	/* _DDN: DOS Device Name */
+
+		Method (_STA, 0, NotSerialized)	/* _STA: Status */
+		{
+			Return (0x0F)
+		}
+
+		Name (_CRS, ResourceTemplate ()	/* _CRS: Current Resource Settings */
+		{
+			I2cSerialBus (0x000A, ControllerInitiated, 0x00061A80,
+				AddressingMode7Bit, "\\_SB.PCI0.I2C3",
+				0x00, ResourceConsumer, ,
+			)
+
+			Interrupt (ResourceConsumer, Edge, ActiveLow, Exclusive, ,, )
+			{
+				0x00000032,
+			}
+		})
+
+		Method (_DSM, 4)
+		{
+			If (LEqual (Arg0, HIDG))
+			{
+				/* DSM Function */
+				switch (ToInteger(Arg2))
+				{
+					/* Function#0: Query function, return based on revision */
+					case(0)
+					{
+						/* DSM Revision */
+						switch(ToInteger(Arg1))
+						{
+							/* revision 0: functions 1-4 are supported */
+							case(0) {return (Buffer() {0x1F})}
+
+							/* revision 1: functions 1-5 are supported */
+							case(1) {return (Buffer() {0x3F})}
+
+							default
+							{
+								Return(Buffer(One) { 0x00 })
+							}
+						}
+					}
+
+		                        /* Function#1: HID Function */
+		                        case(1)
+		                        {
+						Store ("Method _DSM Function HID", Debug)
+						/* HID Descriptor Address */
+						Return(0x0001)
+					}
+					default
+					{
+						Return(Buffer(One) { 0x00 })
+					}
+				}
+			}
+			Else
+			{
+				/* No other GUIDs supported */
+				Return(Buffer(One) { 0x00 })
+			}
+		}
+	}
+}



More information about the coreboot-gerrit mailing list