pcengines/apu1: Add ACPI led, button and GPIO devices

Hardware / Coreboot - Tobias Diedrich [tdiedrich.de] - 17 June 2015 05:00 UTC

Provide ACPI devices with devicetree-compatible annotations for the three leds and the button of the APU1, as well as the GPIO driver.

This will cause the Linux kernel to automatically load the following modules: leds_gpio (CONFIG_LEDS_GPIO) gpio_keys_polled (CONFIG_KEYBOARD_GPIO_POLLED) gpio_sb8xx (CONFIG_GPIO_SB8XX)

See http://events.linuxfoundation.org/sites/events/files/slides/ACPI_vs_DT.pdf and https://lwn.net/Articles/612062/ for some more information on how the PRP0001 HID works.

To make this usable a Linux GPIO driver for the AMD chipset is also required, which I am currently working on, but have not submitted upstream yet.

Leds have been named after the convention in Documentation/leds/leds-class.txt: LED Device Naming

Is currently of the form: "devicename:colour:function"

For comparison, on an OpenWRT device: GPIOs 0-21, ath79: gpio-1 (tp-link:green:usb ) out hi gpio-2 (tp-link:green:system) out lo gpio-3 (reset ) in hi gpio-5 (tp-link:green:qss ) out lo gpio-7 (qss ) in hi gpio-9 (tp-link:green:wlan ) out lo gpio-18 (rtl8366rb ) in hi gpio-19 (rtl8366rb ) in hi

On the apu1: GPIOs 288-511, platform/PRP0001:00, AMD SB8XX/SB9XX/A5X/A8X GPIO driver: gpio-475 (switch1 ) in hi gpio-477 (apu1:green:led1 ) out hi gpio-478 (apu1:green:led2 ) out hi gpio-479 (apu1:green:led3 ) out hi

Change-Id: I956ee92d9d98ef27a83ccb30d314543bd8634f2c

2a38551 pcengines/apu1: Add ACPI led, button and GPIO devices.
src/mainboard/pcengines/apu1/acpi/buttons.asl | 57 ++++++++++++++++++
src/mainboard/pcengines/apu1/acpi/gpio.asl | 40 +++++++++++++
src/mainboard/pcengines/apu1/acpi/leds.asl | 80 +++++++++++++++++++++++++
src/mainboard/pcengines/apu1/dsdt.asl | 6 ++
4 files changed, 183 insertions(+)

Upstream: review.coreboot.org


  • Share