rambi: Add ACPI table support for I2C devices

Hardware / Coreboot - Duncan Laurie [chromium.org] - 14 May 2014 22:05 UTC

In order to support probing I2C devices when the controller is in ACPI mode the mainboard needs to decalre them in the proper scope with the address/interrupt information. The touchpad devices are ATML0000/ELAN0000 and the touchscreen is ATML0001 so they can be distinguished in userland scripts based on ID. There is also a special "ISTP" node that indicates whether the devices is a touchpad (=1) or touchscreen (=0) in case this is useful to drivers.

These names may not be final but they are a starting point and can be easily changed.

Atmel devices also have a bootloader mode which needs to be declared as a separate device. Unfortunately it does not work as expected to have multiple I2cSerialBus() resources declared in a single device and have it select properly, even with the use of StartDependentFn(), so bootloader devices are declared separately.

The original devices are left in \_SB scope and are only enabled if the I2C controllers are in PCI mode. The new devices are only enabled if the I2C controllers are in ACPI mode.

BUG=chrome-os-partner:24380 BRANCH=baytrail TEST=manual

1) Ensure there is no change in functionality by default and that the devices are still probed by chromeos_laptop in the kernel. 2) Enable lpss_acpi_mode=1 in devicetree.cb and kernel changes to add _HID entries for devices in appropriate drivers. Ensure that the devices are probed successfully. Further changes are needed to the chromeos-touch-firmware scripts to load config and update firmware based on the new ACPI _HID entries. 3) Put touchpad in bootloader mode (by flashing bad firmware) and ensure that it is detected at address 0x25 and the firmware is able to be updated.

Change-Id: I5b9b47ddc94474a677497271e963f62cb09438e0

5a45c95 rambi: Add ACPI table support for I2C devices
src/mainboard/google/rambi/acpi/mainboard.asl | 226 ++++++++++++++++++++++---
src/mainboard/google/rambi/dsdt.asl | 5 +-
2 files changed, 202 insertions(+), 29 deletions(-)

Upstream: review.coreboot.org


  • Share