summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/acpi
diff options
context:
space:
mode:
authorHannah Williams <hannah.williams@intel.com>2017-05-26 20:31:15 -0700
committerMartin Roth <martinroth@google.com>2017-07-03 23:29:49 +0000
commit12bed18951d8fce1985ed2c92aed05682ab24ec4 (patch)
tree1ed04cc5a4659ee780df8345a07a0bbbd50db945 /src/soc/intel/apollolake/acpi
parent5b2954e62dc4492acaad3107db3a0675eabd6250 (diff)
downloadcoreboot-12bed18951d8fce1985ed2c92aed05682ab24ec4.tar.xz
soc/intel/apollolake: Use common gpio for apollolake
No regression observed on a APL platform Change-Id: I0fcc22df5eaec014f3b89755415f051b05aa554a Signed-off-by: Hannah Williams <hannah.williams@intel.com> Reviewed-on: https://review.coreboot.org/19949 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/apollolake/acpi')
-rw-r--r--src/soc/intel/apollolake/acpi/gpio.asl35
-rw-r--r--src/soc/intel/apollolake/acpi/gpiolib.asl2
2 files changed, 19 insertions, 18 deletions
diff --git a/src/soc/intel/apollolake/acpi/gpio.asl b/src/soc/intel/apollolake/acpi/gpio.asl
index ceba72b559..b9a2cf1b97 100644
--- a/src/soc/intel/apollolake/acpi/gpio.asl
+++ b/src/soc/intel/apollolake/acpi/gpio.asl
@@ -14,7 +14,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
-#include <soc/gpio_defs.h>
+#include <soc/gpio.h>
+#include <intelblocks/pcr.h>
#include <soc/pcr_ids.h>
#include "gpiolib.asl"
@@ -23,9 +24,9 @@ scope (\_SB) {
Device (GPO0)
{
Name (_ADR, 0)
- Name (_HID, "INT3452")
- Name (_CID, "INT3452")
- Name (_DDN, "General Purpose Input/Output (GPIO) Controller - North" )
+ Name (_HID, GPIO_COMM_NAME)
+ Name (_CID, GPIO_COMM_NAME)
+ Name (_DDN, GPIO_COMM_0_DESC)
Name (_UID, 1)
Name (RBUF, ResourceTemplate ()
@@ -40,7 +41,7 @@ scope (\_SB) {
Method (_CRS, 0x0, NotSerialized)
{
CreateDwordField (^RBUF, ^RMEM._BAS, RBAS)
- ShiftLeft (PID_GPIO_N, PCR_PORTID_SHIFT, Local0)
+ ShiftLeft (GPIO_COMM0_PID, PCR_PORTID_SHIFT, Local0)
Or (CONFIG_PCR_BASE_ADDRESS, Local0, RBAS)
Return (^RBUF)
}
@@ -54,9 +55,9 @@ scope (\_SB) {
Device (GPO1)
{
Name (_ADR, 0)
- Name (_HID, "INT3452")
- Name (_CID, "INT3452")
- Name (_DDN, "General Purpose Input/Output (GPIO) Controller - Northwest" )
+ Name (_HID, GPIO_COMM_NAME)
+ Name (_CID, GPIO_COMM_NAME)
+ Name (_DDN, GPIO_COMM_1_DESC)
Name (_UID, 2)
Name (RBUF, ResourceTemplate ()
@@ -71,7 +72,7 @@ scope (\_SB) {
Method (_CRS, 0x0, NotSerialized)
{
CreateDwordField (^RBUF, ^RMEM._BAS, RBAS)
- ShiftLeft (PID_GPIO_NW, PCR_PORTID_SHIFT, Local0)
+ ShiftLeft (GPIO_COMM1_PID, PCR_PORTID_SHIFT, Local0)
Or (CONFIG_PCR_BASE_ADDRESS, Local0, RBAS)
Return (^RBUF)
}
@@ -85,9 +86,9 @@ scope (\_SB) {
Device (GPO2)
{
Name (_ADR, 0)
- Name (_HID, "INT3452")
- Name (_CID, "INT3452")
- Name (_DDN, "General Purpose Input/Output (GPIO) Controller - West" )
+ Name (_HID, GPIO_COMM_NAME)
+ Name (_CID, GPIO_COMM_NAME)
+ Name (_DDN, GPIO_COMM_2_DESC)
Name (_UID, 3)
Name (RBUF, ResourceTemplate ()
@@ -102,7 +103,7 @@ scope (\_SB) {
Method (_CRS, 0x0, NotSerialized)
{
CreateDwordField (^RBUF, ^RMEM._BAS, RBAS)
- ShiftLeft (PID_GPIO_W, PCR_PORTID_SHIFT, Local0)
+ ShiftLeft (GPIO_COMM2_PID, PCR_PORTID_SHIFT, Local0)
Or (CONFIG_PCR_BASE_ADDRESS, Local0, RBAS)
Return (^RBUF)
}
@@ -116,9 +117,9 @@ scope (\_SB) {
Device (GPO3)
{
Name (_ADR, 0)
- Name (_HID, "INT3452")
- Name (_CID, "INT3452")
- Name (_DDN, "General Purpose Input/Output (GPIO) Controller - Southwest" )
+ Name (_HID, GPIO_COMM_NAME)
+ Name (_CID, GPIO_COMM_NAME)
+ Name (_DDN, GPIO_COMM_3_DESC)
Name (_UID, 4)
Name (RBUF, ResourceTemplate ()
@@ -133,7 +134,7 @@ scope (\_SB) {
Method (_CRS, 0x0, NotSerialized)
{
CreateDwordField (^RBUF, ^RMEM._BAS, RBAS)
- ShiftLeft (PID_GPIO_SW, PCR_PORTID_SHIFT, Local0)
+ ShiftLeft (GPIO_COMM3_PID, PCR_PORTID_SHIFT, Local0)
Or (CONFIG_PCR_BASE_ADDRESS, Local0, RBAS)
Return (^RBUF)
}
diff --git a/src/soc/intel/apollolake/acpi/gpiolib.asl b/src/soc/intel/apollolake/acpi/gpiolib.asl
index a4d4b00cf6..3e99f0966f 100644
--- a/src/soc/intel/apollolake/acpi/gpiolib.asl
+++ b/src/soc/intel/apollolake/acpi/gpiolib.asl
@@ -81,7 +81,7 @@ Scope (\_SB)
Method (CHSA, 0x1, Serialized)
{
/* Arg0 - GPIO pad offset relative to the community */
- Add (HOSTSW_OWN_REG_BASE, Multiply (Divide (Arg0, 32), 4), Local1)
+ Add (HOSTSW_OWN_REG_0, Multiply (Divide (Arg0, 32), 4), Local1)
Return (Local1)
}