Nicolò has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37994 )
Change subject: mb/google/peppy: Add ALS as ACPI device Some of models of the C720 can have an ISL29018 ambient light sensor on the mainboard, probably all the C720P have it. ......................................................................
mb/google/peppy: Add ALS as ACPI device Some of models of the C720 can have an ISL29018 ambient light sensor on the mainboard, probably all the C720P have it.
This patch will provide a way for the kernel to access the ALS sensor even after the chromeos_laptop driver broke.
Please note that this patch advertise the ALS as an ISL29023, this is due to the fact that the proximity function of the ISL2018 is available only if a properly IR LED is present with the sensor. The C720 doesn't have the IR LED circuit.
More work will be required to properly set the _STA to help the kernel driver on probing of the device itself.
Tested on 4.15+
Change-Id: I8ed5583afb2f866c1b21eb44f5188526cfb7ebd9 Signed-off-by: Nicolò Veronese nicveronese@gmail.com --- M src/mainboard/google/slippy/variants/peppy/include/variant/acpi/mainboard.asl 1 file changed, 33 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/37994/1
diff --git a/src/mainboard/google/slippy/variants/peppy/include/variant/acpi/mainboard.asl b/src/mainboard/google/slippy/variants/peppy/include/variant/acpi/mainboard.asl index cc3e063..c3dfe5f 100644 --- a/src/mainboard/google/slippy/variants/peppy/include/variant/acpi/mainboard.asl +++ b/src/mainboard/google/slippy/variants/peppy/include/variant/acpi/mainboard.asl @@ -149,4 +149,37 @@ } } } + + Device (ALSD) + { + Name (_HID, "ISL29023") + Name (_DDN, "Renesas ALS") + Name (_UID, 6) + Name (_CRS, ResourceTemplate() + { + I2cSerialBus ( + 0x44, // SlaveAddress + ControllerInitiated, // SlaveMode + 400000, // ConnectionSpeed + AddressingMode7Bit, // AddressingMode + "\_SB.PCI0.I2C1" // ResourceSource + ) + + // GPIO51 (ball R5) is PIRQT: PIRQL_GSI + PIRQL - PIRQT = PIRQW_GSI + // 27 + 3 - 11 = 35 + Interrupt (ResourceConsumer, Edge, ActiveLow) + { + BOARD_LIGHTSENSOR_IRQ + } + }) + + Method (_STA) + { + If (LEqual (\S2EN, 1)) { + Return (0xF) + } Else { + Return (0x0) + } + } + } }