From 67f0cc81afc5f8eae21850e6f05c22e15109d4ec Mon Sep 17 00:00:00 2001 From: Wenkai Du Date: Tue, 23 Sep 2014 17:00:14 -0700 Subject: [PATCH] auron: add isl29018 i2c ALS to the ACPI resources Copied dlaurie's entry from Rambi board. On Auron/Peppy board, IRQ is hooked to GPIO 51. Based on table 5-36, this is PIRQT. Then based on table 5-12, this is IRQ #35. Thanks to Duncan for the pointer! BUG=chrome-os-partner:32237 TEST=check if ALS is found by the kernel Change-Id: I97bd932b48a6512632ee747715926a5761a7aeca Signed-off-by: Wenkai Du Reviewed-on: https://chromium-review.googlesource.com/219631 Reviewed-by: Shawn Nematbakhsh --- src/mainboard/google/auron/acpi/mainboard.asl | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/mainboard/google/auron/acpi/mainboard.asl b/src/mainboard/google/auron/acpi/mainboard.asl index 2fcb4de0b5..ebd0f92bdf 100644 --- a/src/mainboard/google/auron/acpi/mainboard.asl +++ b/src/mainboard/google/auron/acpi/mainboard.asl @@ -195,4 +195,45 @@ Scope (\_SB.PCI0.I2C1) } } } + + Device (ALSI) + { + /* + * TODO(dlaurie): Need official HID. + * + * The current HID is created from the Intersil PNP + * Vendor ID "LSD" and a shortened device identifier. + */ + Name (_HID, EisaId ("LSD2918")) + Name (_DDN, "Intersil 29018 Ambient Light Sensor") + Name (_UID, 6) + + Name (_CRS, ResourceTemplate() + { + I2cSerialBus ( + 0x44, // SlaveAddress + ControllerInitiated, // SlaveMode + 400000, // ConnectionSpeed + AddressingMode7Bit, // AddressingMode + "\\_SB.I2C1", // ResourceSource + ) + + // On Auron/Peppy board, IRQ is hooked to GPIO 51. + // Based on table 5-36, this is PIRQT. Then based on + // table 5-12, this is IRQ #35. + Interrupt (ResourceConsumer, Edge, ActiveLow) + { + 35 + } + }) + + Method (_STA) + { + If (LEqual (\S2EN, 1)) { + Return (0xF) + } Else { + Return (0x0) + } + } + } }