[coreboot-gerrit] New patch to review for coreboot: 3361211 lenovo/x60t: Support digitizer.

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Fri Feb 14 03:09:21 CET 2014


Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5220

-gerrit

commit 3361211d381eccd79347915c83dc8cc3122424bd
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Fri Feb 14 03:07:58 2014 +0100

    lenovo/x60t: Support digitizer.
    
    Change-Id: I2d5670698a8f8014cecc2fe556b0634e1d37a624
    Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
 src/mainboard/lenovo/x60/acpi/superio.asl | 34 +++++++++++++++++++++++++++++++
 src/mainboard/lenovo/x60/devicetree.cb    |  7 +++++--
 src/mainboard/lenovo/x60/mainboard.c      |  5 +++++
 3 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/src/mainboard/lenovo/x60/acpi/superio.asl b/src/mainboard/lenovo/x60/acpi/superio.asl
index e69de29..6786da7 100644
--- a/src/mainboard/lenovo/x60/acpi/superio.asl
+++ b/src/mainboard/lenovo/x60/acpi/superio.asl
@@ -0,0 +1,34 @@
+#if IS_ENABLED(CONFIG_BOARD_LENOVO_X60T)
+	Device (DTR)		// Digitizer
+	{
+		Name(_HID, EISAID("WACF004"))
+
+		Name(_CRS, ResourceTemplate()
+		{
+			IO (Decode16, 0x200, 0x200, 0x01, 0x08)
+                        IRQNoFlags () {5}
+		})
+
+		Method (_STA, 0)
+		{
+			Return (0xf)
+		}
+	}
+#endif
+
+	Device (COMA)		// Serial
+	{
+		Name(_HID, EISAID("PNP0501"))
+		Name(_UID, 2)
+
+		Name(_CRS, ResourceTemplate()
+		{
+			IO (Decode16, 0x3f8, 0x3f8, 0x01, 0x08)
+                        IRQNoFlags () {4}
+		})
+
+		Method (_STA, 0)
+		{
+			Return (0xf)
+		}
+	}
diff --git a/src/mainboard/lenovo/x60/devicetree.cb b/src/mainboard/lenovo/x60/devicetree.cb
index 3880f18..5b4e37f 100644
--- a/src/mainboard/lenovo/x60/devicetree.cb
+++ b/src/mainboard/lenovo/x60/devicetree.cb
@@ -127,8 +127,11 @@ chip northbridge/intel/i945
 						io 0x60 = 0x2f8
 					end
 
-					device pnp 164e.3 off # Serial Port
-						io 0x60 = 0x3f8
+					device pnp 164e.3 on # Digitizer
+						io 0x60 = 0x200
+						irq 0x29 = 0xb0
+						irq 0x70 = 0x5
+						irq 0xf0 = 0x82
 					end
 
 					device pnp 164e.7 on # GPIO
diff --git a/src/mainboard/lenovo/x60/mainboard.c b/src/mainboard/lenovo/x60/mainboard.c
index d1fcb7b..be39674 100644
--- a/src/mainboard/lenovo/x60/mainboard.c
+++ b/src/mainboard/lenovo/x60/mainboard.c
@@ -150,8 +150,13 @@ static int mainboard_smbios_data(device_t dev, int *handle, unsigned long *curre
 
 static void mainboard_enable(device_t dev)
 {
+	device_t devwacom;
 	dev->ops->init = mainboard_init;
 	dev->ops->get_smbios_data = mainboard_smbios_data;
+
+	devwacom = dev_find_slot_pnp (0x164e, 3);
+	if (devwacom)
+		devwacom->enabled = IS_ENABLED(CONFIG_BOARD_LENOVO_X60T);
 }
 
 struct chip_operations mainboard_ops = {



More information about the coreboot-gerrit mailing list