sandy/ivy boards: Rename defines from onboard.h for ACPI

Adopted style from later Chromebooks.

Change-Id: I4993b8f40489b6bf5d08e00089f36f293853629e
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/9992
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Kyösti Mälkki 2015-04-24 16:05:58 +03:00
parent 168eda5f0d
commit b9cd5ece14
12 changed files with 91 additions and 67 deletions

View File

@ -19,6 +19,8 @@
* MA 02110-1301 USA * MA 02110-1301 USA
*/ */
#include <mainboard/google/butterfly/onboard.h>
Scope (\_SB) { Scope (\_SB) {
Device (LID0) Device (LID0)
{ {
@ -45,15 +47,18 @@ Scope (\_SB) {
Name(_HID, EisaId("PNP0C0E")) Name(_HID, EisaId("PNP0C0E"))
// Trackpad Wake is GPIO11, wake from S3 // Trackpad Wake is GPIO11, wake from S3
Name(_PRW, Package(){0x1b, 0x03}) Name(_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x03 })
Name(_CRS, ResourceTemplate() Name(_CRS, ResourceTemplate()
{ {
// PIRQG -> GSI22 // PIRQG -> GSI22
Interrupt (ResourceConsumer, EDGE, ActiveLow) {22} Interrupt (ResourceConsumer, EDGE, ActiveLow)
{
BOARD_TRACKPAD_IRQ
}
// SMBUS Address 0x67 // SMBUS Address 0x67
VendorShort (ADDR) {0x67} VendorShort (ADDR) { BOARD_TRACKPAD_I2C_ADDR }
}) })
} }

View File

@ -265,10 +265,10 @@ static int butterfly_onboard_smbios_data(device_t dev, int *handle,
len += smbios_write_type41( len += smbios_write_type41(
current, handle, current, handle,
BUTTERFLY_TRACKPAD_NAME, /* name */ BOARD_TRACKPAD_NAME, /* name */
BUTTERFLY_TRACKPAD_IRQ, /* instance */ BOARD_TRACKPAD_IRQ, /* instance */
0, /* segment */ 0, /* segment */
BUTTERFLY_TRACKPAD_I2C_ADDR, /* bus */ BOARD_TRACKPAD_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0); /* function */

View File

@ -20,12 +20,12 @@
#ifndef BUTTERFLY_ONBOARD_H #ifndef BUTTERFLY_ONBOARD_H
#define BUTTERFLY_ONBOARD_H #define BUTTERFLY_ONBOARD_H
#include <arch/smp/mpspec.h>
/* uses 7-bit I2C address */ /* uses 7-bit I2C address */
/* must be set to edge triggered */ /* must be set to edge triggered */
#define BUTTERFLY_TRACKPAD_NAME "trackpad" #define BOARD_TRACKPAD_NAME "trackpad"
#define BUTTERFLY_TRACKPAD_I2C_ADDR 0x67 #define BOARD_TRACKPAD_I2C_ADDR 0x67
#define BUTTERFLY_TRACKPAD_IRQ 22 /* PIRQG - 22 Edge triggered */ #define BOARD_TRACKPAD_IRQ 22 /* PIRQG - 22 Edge triggered */
#define BOARD_TRACKPAD_WAKE_GPIO 0x1b
/* defines for programming the MAC address */ /* defines for programming the MAC address */
#define BUTTERFLY_NIC_VENDOR_ID 0x10EC #define BUTTERFLY_NIC_VENDOR_ID 0x10EC

View File

@ -19,6 +19,8 @@
* MA 02110-1301 USA * MA 02110-1301 USA
*/ */
#include <mainboard/google/link/onboard.h>
Scope (\_SB) { Scope (\_SB) {
Device (LID0) Device (LID0)
{ {
@ -48,15 +50,18 @@ Scope (\_SB) {
Name(_HID, EisaId("PNP0C0E")) Name(_HID, EisaId("PNP0C0E"))
// Trackpad Wake is GPIO12 // Trackpad Wake is GPIO12
Name(_PRW, Package(){0x1c, 0x03}) Name(_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x03 } )
Name(_CRS, ResourceTemplate() Name(_CRS, ResourceTemplate()
{ {
// PIRQE -> GSI20 // PIRQE -> GSI20
Interrupt (ResourceConsumer, Edge, ActiveLow) {20} Interrupt (ResourceConsumer, Edge, ActiveLow)
{
BOARD_TRACKPAD_IRQ
}
// SMBUS Address 0x4b // SMBUS Address 0x4b
VendorShort (ADDR) {0x4b} VendorShort (ADDR) { BOARD_TRACKPAD_I2C_ADDR }
}) })
} }

View File

@ -173,28 +173,28 @@ static int link_onboard_smbios_data(device_t dev, int *handle,
len += smbios_write_type41( len += smbios_write_type41(
current, handle, current, handle,
LINK_LIGHTSENSOR_NAME, /* name */ BOARD_LIGHTSENSOR_NAME, /* name */
LINK_LIGHTSENSOR_IRQ, /* instance */ BOARD_LIGHTSENSOR_IRQ, /* instance */
0, /* segment */ 0, /* segment */
LINK_LIGHTSENSOR_I2C_ADDR, /* bus */ BOARD_LIGHTSENSOR_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0); /* function */
len += smbios_write_type41( len += smbios_write_type41(
current, handle, current, handle,
LINK_TRACKPAD_NAME, /* name */ BOARD_TRACKPAD_NAME, /* name */
LINK_TRACKPAD_IRQ, /* instance */ BOARD_TRACKPAD_IRQ, /* instance */
0, /* segment */ 0, /* segment */
LINK_TRACKPAD_I2C_ADDR, /* bus */ BOARD_TRACKPAD_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0); /* function */
len += smbios_write_type41( len += smbios_write_type41(
current, handle, current, handle,
LINK_TOUCHSCREEN_NAME, /* name */ BOARD_TOUCHSCREEN_NAME, /* name */
LINK_TOUCHSCREEN_IRQ, /* instance */ BOARD_TOUCHSCREEN_IRQ, /* instance */
0, /* segment */ 0, /* segment */
LINK_TOUCHSCREEN_I2C_ADDR, /* bus */ BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0); /* function */

View File

@ -20,18 +20,17 @@
#ifndef LINK_ONBOARD_H #ifndef LINK_ONBOARD_H
#define LINK_ONBOARD_H #define LINK_ONBOARD_H
#include <arch/smp/mpspec.h> #define BOARD_LIGHTSENSOR_NAME "lightsensor"
#define BOARD_LIGHTSENSOR_I2C_ADDR 0x44
#define BOARD_LIGHTSENSOR_IRQ 0
#define LINK_LIGHTSENSOR_NAME "lightsensor" #define BOARD_TRACKPAD_NAME "trackpad"
#define LINK_LIGHTSENSOR_I2C_ADDR 0x44 #define BOARD_TRACKPAD_I2C_ADDR 0x4b
#define LINK_LIGHTSENSOR_IRQ 0 #define BOARD_TRACKPAD_IRQ 20
#define BOARD_TRACKPAD_WAKE_GPIO 0x1c
#define LINK_TRACKPAD_NAME "trackpad" #define BOARD_TOUCHSCREEN_NAME "touchscreen"
#define LINK_TRACKPAD_I2C_ADDR 0x4b #define BOARD_TOUCHSCREEN_I2C_ADDR 0x4a
#define LINK_TRACKPAD_IRQ 20 #define BOARD_TOUCHSCREEN_IRQ 22
#define LINK_TOUCHSCREEN_NAME "touchscreen"
#define LINK_TOUCHSCREEN_I2C_ADDR 0x4a
#define LINK_TOUCHSCREEN_IRQ 22
#endif #endif

View File

@ -19,6 +19,8 @@
* MA 02110-1301 USA * MA 02110-1301 USA
*/ */
#include <mainboard/google/parrot/onboard.h>
Scope (\_GPE) { Scope (\_GPE) {
Method(_L1F, 0x0, NotSerialized) Method(_L1F, 0x0, NotSerialized)
{ {
@ -59,19 +61,25 @@ Scope (\_SB) {
Name(_HID, EisaId("PNP0C0E")) Name(_HID, EisaId("PNP0C0E"))
// Trackpad Wake is GPIO12, wake from S3 // Trackpad Wake is GPIO12, wake from S3
Name(_PRW, Package(){0x1c, 0x03}) Name(_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x03 })
Name(_CRS, ResourceTemplate() Name(_CRS, ResourceTemplate()
{ {
// PIRQA -> GSI16 // PIRQA -> GSI16
Interrupt (ResourceConsumer, Level, ActiveLow) {16} Interrupt (ResourceConsumer, Level, ActiveLow)
{
BOARD_TRACKPAD_IRQ_DVT
}
// PIRQE -> GSI20 // PIRQE -> GSI20
Interrupt (ResourceConsumer, Edge, ActiveLow) {20} Interrupt (ResourceConsumer, Edge, ActiveLow)
{
BOARD_TRACKPAD_IRQ_PVT
}
// SMBUS Address 0x67 // SMBUS Address 0x67
VendorShort (ADDR) {0x67} VendorShort (ADDR) { BOARD_TRACKPAD_I2C_ADDR }
}) })
} }

View File

@ -62,19 +62,19 @@ static int parrot_onboard_smbios_data(device_t dev, int *handle,
if (hardware_version < 0x2) { /* DVT vs PVT */ if (hardware_version < 0x2) { /* DVT vs PVT */
len += smbios_write_type41( len += smbios_write_type41(
current, handle, current, handle,
PARROT_TRACKPAD_NAME, /* name */ BOARD_TRACKPAD_NAME, /* name */
PARROT_TRACKPAD_IRQ_DVT, /* instance */ BOARD_TRACKPAD_IRQ_DVT, /* instance */
0, /* segment */ 0, /* segment */
PARROT_TRACKPAD_I2C_ADDR, /* bus */ BOARD_TRACKPAD_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0); /* function */
} else { } else {
len += smbios_write_type41( len += smbios_write_type41(
current, handle, current, handle,
PARROT_TRACKPAD_NAME, /* name */ BOARD_TRACKPAD_NAME, /* name */
PARROT_TRACKPAD_IRQ_PVT, /* instance */ BOARD_TRACKPAD_IRQ_PVT, /* instance */
0, /* segment */ 0, /* segment */
PARROT_TRACKPAD_I2C_ADDR, /* bus */ BOARD_TRACKPAD_I2C_ADDR, /* bus */
0, /* device */ 0, /* device */
0); /* function */ 0); /* function */
} }

View File

@ -20,10 +20,10 @@
#ifndef PARROT_ONBOARD_H #ifndef PARROT_ONBOARD_H
#define PARROT_ONBOARD_H #define PARROT_ONBOARD_H
#include <arch/smp/mpspec.h> #define BOARD_TRACKPAD_NAME "trackpad"
#define BOARD_TRACKPAD_I2C_ADDR 0x67
#define BOARD_TRACKPAD_IRQ_DVT 16
#define BOARD_TRACKPAD_IRQ_PVT 20
#define BOARD_TRACKPAD_WAKE_GPIO 0x1c
#define PARROT_TRACKPAD_NAME "trackpad"
#define PARROT_TRACKPAD_I2C_ADDR 0x67
#define PARROT_TRACKPAD_IRQ_DVT 16
#define PARROT_TRACKPAD_IRQ_PVT 20
#endif #endif

View File

@ -19,6 +19,8 @@
* MA 02110-1301 USA * MA 02110-1301 USA
*/ */
#include <mainboard/samsung/lumpy/onboard.h>
Scope (\_SB) { Scope (\_SB) {
Device (LID0) Device (LID0)
{ {
@ -45,15 +47,18 @@ Scope (\_SB) {
Name(_HID, EisaId("PNP0C0E")) Name(_HID, EisaId("PNP0C0E"))
// Trackpad Wake is GPIO11 // Trackpad Wake is GPIO11
Name(_PRW, Package(){0x1b, 0x03}) Name(_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x03 })
Name(_CRS, ResourceTemplate() Name(_CRS, ResourceTemplate()
{ {
// PIRQF -> GSI21 // PIRQF -> GSI21
Interrupt (ResourceConsumer, Edge, ActiveLow) {21} Interrupt (ResourceConsumer, Edge, ActiveLow)
{
BOARD_TRACKPAD_IRQ
}
// SMBUS Address 0x67 // SMBUS Address 0x67
VendorShort (ADDR) {0x67} VendorShort (ADDR) { BOARD_TRACKPAD_I2C_ADDR }
}) })
} }
@ -65,10 +70,13 @@ Scope (\_SB) {
Name(_CRS, ResourceTemplate() Name(_CRS, ResourceTemplate()
{ {
// PIRQE -> GSI20 // PIRQE -> GSI20
Interrupt (ResourceConsumer, Edge, ActiveLow) {20} Interrupt (ResourceConsumer, Edge, ActiveLow)
{
BOARD_LIGHTSENSOR_IRQ
}
// SMBUS Address 0x44 // SMBUS Address 0x44
VendorShort (ADDR) {0x44} VendorShort (ADDR) { BOARD_LIGHTSENSOR_I2C_ADDR }
}) })
} }
} }

View File

@ -86,14 +86,14 @@ static int lumpy_onboard_smbios_data(device_t dev, int *handle,
int len = 0; int len = 0;
len += lumpy_smbios_type41_irq(handle, current, len += lumpy_smbios_type41_irq(handle, current,
LUMPY_LIGHTSENSOR_NAME, BOARD_LIGHTSENSOR_NAME,
LUMPY_LIGHTSENSOR_IRQ, BOARD_LIGHTSENSOR_IRQ,
LUMPY_LIGHTSENSOR_I2C_ADDR); BOARD_LIGHTSENSOR_I2C_ADDR);
len += lumpy_smbios_type41_irq(handle, current, len += lumpy_smbios_type41_irq(handle, current,
LUMPY_TRACKPAD_NAME, BOARD_TRACKPAD_NAME,
LUMPY_TRACKPAD_IRQ, BOARD_TRACKPAD_IRQ,
LUMPY_TRACKPAD_I2C_ADDR); BOARD_TRACKPAD_I2C_ADDR);
return len; return len;
} }

View File

@ -20,14 +20,13 @@
#ifndef LUMPY_ONBOARD_H #ifndef LUMPY_ONBOARD_H
#define LUMPY_ONBOARD_H #define LUMPY_ONBOARD_H
#include <arch/smp/mpspec.h> #define BOARD_LIGHTSENSOR_NAME "lightsensor"
#define BOARD_LIGHTSENSOR_I2C_ADDR 0x44
#define BOARD_LIGHTSENSOR_IRQ 20
#define LUMPY_LIGHTSENSOR_NAME "lightsensor" #define BOARD_TRACKPAD_NAME "trackpad"
#define LUMPY_LIGHTSENSOR_I2C_ADDR 0x44 #define BOARD_TRACKPAD_I2C_ADDR 0x67
#define LUMPY_LIGHTSENSOR_IRQ 20 #define BOARD_TRACKPAD_IRQ 21
#define BOARD_TRACKPAD_WAKE_GPIO 0x1b
#define LUMPY_TRACKPAD_NAME "trackpad"
#define LUMPY_TRACKPAD_I2C_ADDR 0x67
#define LUMPY_TRACKPAD_IRQ 21
#endif #endif