summaryrefslogtreecommitdiff
path: root/src/mainboard/google/falco/mainboard.c
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2013-05-24 12:37:02 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-11-25 23:46:02 +0100
commit22419e045616c344c7a2a308c5ef086a221ad006 (patch)
tree2e7cc4a9bb50419a8552eea2ef9201c92f9f3144 /src/mainboard/google/falco/mainboard.c
parentd67c5dbf06f009b705bc0c2b7278504bb538d36e (diff)
downloadcoreboot-22419e045616c344c7a2a308c5ef086a221ad006.tar.xz
falco: Add on-board devices and configure GPIO irq/wake
Add the onboard I2C devices for Falco trackpad/lightsensor and generate SMBIOS Type41 tables for them. Add ACPI device for the trackpad to expose the interrupt map to the OS so it can be used. Configure interrupt GPIOs as PIRQ type and wake GPIOs as just standard input type. The wake GPIO is reconfigured as ACPI SCI in the specific device _DSW method. This prevents the wake GPIO from generating a flood of SCI at runtime. LTE_WAKE_L_Q and WLAN_WAKE_L_Q are left as ACPI SCI as these are not repurposed interrupt pins so they are not generated at runtime. SIM_DET and ALS_INT_L are set as input since we don't have an interrupt handler for them. Change-Id: Ibe9687b2f7f41ead18353c3f650219fe6e94ae2f Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/56632 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/4191 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/mainboard/google/falco/mainboard.c')
-rw-r--r--src/mainboard/google/falco/mainboard.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/mainboard/google/falco/mainboard.c b/src/mainboard/google/falco/mainboard.c
index 0159bd0b6c..3bf26e3f21 100644
--- a/src/mainboard/google/falco/mainboard.c
+++ b/src/mainboard/google/falco/mainboard.c
@@ -20,6 +20,7 @@
#include <types.h>
#include <string.h>
+#include <smbios.h>
#include <device/device.h>
#include <device/device.h>
#include <device/pci_def.h>
@@ -36,6 +37,7 @@
#include "hda_verb.h"
#include <southbridge/intel/lynxpoint/pch.h>
#include "ec.h"
+#include "onboard.h"
void mainboard_suspend_resume(void)
{
@@ -145,12 +147,48 @@ static void mainboard_init(device_t dev)
mainboard_ec_init();
}
+static int mainboard_smbios_data(device_t dev, int *handle,
+ unsigned long *current)
+{
+ int len = 0;
+
+ len += smbios_write_type41(
+ current, handle,
+ BOARD_LIGHTSENSOR_NAME, /* name */
+ BOARD_LIGHTSENSOR_IRQ, /* instance */
+ BOARD_LIGHTSENSOR_I2C_BUS, /* segment */
+ BOARD_LIGHTSENSOR_I2C_ADDR, /* bus */
+ 0, /* device */
+ 0); /* function */
+
+ len += smbios_write_type41(
+ current, handle,
+ BOARD_TRACKPAD_NAME, /* name */
+ BOARD_TRACKPAD_IRQ, /* instance */
+ BOARD_TRACKPAD_I2C_BUS, /* segment */
+ BOARD_TRACKPAD_I2C_ADDR, /* bus */
+ 0, /* device */
+ 0); /* function */
+
+ len += smbios_write_type41(
+ current, handle,
+ BOARD_TOUCHSCREEN_NAME, /* name */
+ BOARD_TOUCHSCREEN_IRQ, /* instance */
+ BOARD_TOUCHSCREEN_I2C_BUS, /* segment */
+ BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */
+ 0, /* device */
+ 0); /* function */
+
+ return len;
+}
+
// mainboard_enable is executed as first thing after
// enumerate_buses().
static void mainboard_enable(device_t dev)
{
dev->ops->init = mainboard_init;
+ dev->ops->get_smbios_data = mainboard_smbios_data;
#if CONFIG_PCI_ROM_RUN || CONFIG_VGA_ROM_RUN
/* Install custom int15 handler for VGA OPROM */
mainboard_interrupt_handlers(0x15, &int15_handler);