aboutsummaryrefslogtreecommitdiff
path: root/src/southbridge/intel/lynxpoint/acpi/serialio.asl
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2013-05-06 14:02:27 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-11-25 23:14:17 +0100
commit92e1f15175b3ab6fc50e3614c735d5e9cb3f3a22 (patch)
tree6ca3345d454317c1b167c9d79bbb4e36d6c2f54d /src/southbridge/intel/lynxpoint/acpi/serialio.asl
parentf8b36501fd3f70569b15cc8dcaa9bcd8f76870af (diff)
lynxpoint: Expose ACPI Device for LP GPIO controller
In order to probe the gpio-lynxpoint kernel driver the LP GPIO controller needs to be exposed as a specific ACPI device. This also allows the resources to be exposed to the OS via this device instead of the catch-all LPC device. Ensure the driver loads at boot: gpiochip_find_base: found new base at 162 gpiochip_add: registered GPIOs 162 to 255 on device: INT33C7:00 Also ensure the driver is visible in sysfs: $ cat /sys/devices/platform/INT33C7:00/gpio/gpiochip162/label INT33C7:00 Change-Id: I9f79c008f88da9b67ed1cdfdb9d3a581ce8f05ff Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/50215 Reviewed-on: http://review.coreboot.org/4158 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/southbridge/intel/lynxpoint/acpi/serialio.asl')
-rw-r--r--src/southbridge/intel/lynxpoint/acpi/serialio.asl50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/southbridge/intel/lynxpoint/acpi/serialio.asl b/src/southbridge/intel/lynxpoint/acpi/serialio.asl
index 6ea23c69ea..03f6974a38 100644
--- a/src/southbridge/intel/lynxpoint/acpi/serialio.asl
+++ b/src/southbridge/intel/lynxpoint/acpi/serialio.asl
@@ -468,3 +468,53 @@ Device (SDIO)
}
}
}
+
+Device (GPIO)
+{
+ // GPIO Controller
+ Name (_HID, "INT33C7")
+ Name (_CID, "INT33C7")
+ Name (_UID, 1)
+
+ Name (RBUF, ResourceTemplate()
+ {
+ DWordIo (ResourceProducer,
+ MinFixed, // IsMinFixed
+ MaxFixed, // IsMaxFixed
+ PosDecode, // Decode
+ EntireRange, // ISARanges
+ 0x00000000, // AddressGranularity
+ 0x00000000, // AddressMinimum
+ 0x00000000, // AddressMaximum
+ 0x00000000, // AddressTranslation
+ 0x00000000, // RangeLength
+ , // ResourceSourceIndex
+ , // ResourceSource
+ BAR0)
+ })
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ If (\ISLP ()) {
+ CreateDwordField (^RBUF, ^BAR0._MIN, BMIN)
+ CreateDwordField (^RBUF, ^BAR0._MAX, BMAX)
+ CreateDwordField (^RBUF, ^BAR0._LEN, BLEN)
+
+ Store (DEFAULT_GPIOSIZE, BLEN)
+ Store (DEFAULT_GPIOBASE, BMIN)
+ Store (Subtract (Add (DEFAULT_GPIOBASE,
+ DEFAULT_GPIOSIZE), 1), BMAX)
+ }
+
+ Return (RBUF)
+ }
+
+ Method (_STA, 0, NotSerialized)
+ {
+ If (\ISLP ()) {
+ Return (0xF)
+ } Else {
+ Return (0x0)
+ }
+ }
+}