coreboot-kgpe-d16/src/mainboard/pcengines/apu1/dsdt.asl
Tobias Diedrich 2a38551bb7 pcengines/apu1: Add ACPI led, button and GPIO devices.
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
Signed-off-by: Tobias Diedrich <ranma+coreboot@tdiedrich.de>
Reviewed-on: http://review.coreboot.org/10540
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2015-06-17 12:00:20 +02:00

75 lines
2.1 KiB
Text

/*
* This file is part of the coreboot project.
*
* Copyright (C) 2011 Advanced Micro Devices, Inc.
* Copyright (C) 2013-2014 Sage Electronic Engineering, LLC
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc.
*/
/* DefinitionBlock Statement */
DefinitionBlock (
"DSDT.AML", /* Output filename */
"DSDT", /* Signature */
0x02, /* DSDT Revision, needs to be 2 for 64bit */
"PCENG ", /* OEMID */
"COREBOOT", /* TABLE ID */
0x00010001 /* OEM Revision */
)
{ /* Start of ASL file */
/* #include <arch/x86/acpi/debug.asl> */ /* Include global debug methods if needed */
#include "acpi/mainboard.asl"
#include <cpu/amd/agesa/family14/acpi/cpu.asl>
#include "acpi/routing.asl"
Scope(\_SB) {
/* global utility methods expected within the \_SB scope */
#include <arch/x86/acpi/globutil.asl>
Device(PCI0) {
/* Describe the AMD Northbridge */
#include <northbridge/amd/agesa/family14/acpi/northbridge.asl>
/* Describe the AMD Fusion Controller Hub Southbridge */
#include <southbridge/amd/cimx/sb800/acpi/fch.asl>
/* Primary (and only) IDE channel */
Device(IDEC) {
Name(_ADR, 0x00140001)
#include "acpi/ide.asl"
} /* end IDEC */
}
} /* End Scope(_SB) */
/* Contains the supported sleep states for this chipset */
#include <southbridge/amd/cimx/sb800/acpi/sleepstates.asl>
/* Contains the Sleep methods (WAK, PTS, GTS, etc.) */
#include "acpi/sleep.asl"
#include "acpi/gpe.asl"
/* Contains the GPIO led and button setup for this board */
#include "acpi/buttons.asl"
#include "acpi/gpio.asl"
#include "acpi/leds.asl"
#include "acpi/thermal.asl"
}
/* End of ASL file */