From 0da6a0f0649f76c9bbfb097824478a9f2900d2a1 Mon Sep 17 00:00:00 2001 From: Anand Gadiyar Date: Mon, 21 May 2012 16:00:11 +0530 Subject: panda: add i2c and twlcore to panda Add i2c-omap and twlcore driver to panda board. (Based on similar patch for pcm049). Signed-off-by: Anand Gadiyar Signed-off-by: Sascha Hauer --- arch/arm/boards/panda/board.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'arch/arm/boards/panda') diff --git a/arch/arm/boards/panda/board.c b/arch/arm/boards/panda/board.c index 628d3f1e4e..669e9b33c0 100644 --- a/arch/arm/boards/panda/board.c +++ b/arch/arm/boards/panda/board.c @@ -20,6 +20,7 @@ #include #include #include +#include static int board_revision; @@ -105,6 +106,12 @@ static void __init panda_boardrev_init(void) pr_info("PandaBoard Revision: %03d\n", board_revision); } +static struct i2c_board_info i2c_devices[] = { + { + I2C_BOARD_INFO("twl6030", 0x48), + }, +}; + static int panda_devices_init(void) { panda_boardrev_init(); @@ -133,6 +140,12 @@ static int panda_devices_init(void) sr32(OMAP44XX_SCRM_ALTCLKSRC, 2, 2, 0x3); } + i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); + add_generic_device("i2c-omap", DEVICE_ID_DYNAMIC, + NULL, 0x48070000, 0x1000, + IORESOURCE_MEM, NULL); + + add_generic_device("omap-hsmmc", DEVICE_ID_DYNAMIC, NULL, 0x4809C100, SZ_4K, IORESOURCE_MEM, NULL); panda_ehci_init(); -- cgit v1.2.3 From b53c3e5c4a21d37e95577a5da65da1af2686b856 Mon Sep 17 00:00:00 2001 From: Anand Gadiyar Date: Mon, 21 May 2012 16:00:12 +0530 Subject: panda: add LED support Register GPIO7 as heartbeat LED, same as in the linux kernel. Signed-off-by: Anand Gadiyar Signed-off-by: Sascha Hauer --- arch/arm/boards/panda/board.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'arch/arm/boards/panda') diff --git a/arch/arm/boards/panda/board.c b/arch/arm/boards/panda/board.c index 669e9b33c0..66085fb414 100644 --- a/arch/arm/boards/panda/board.c +++ b/arch/arm/boards/panda/board.c @@ -21,6 +21,8 @@ #include #include #include +#include +#include static int board_revision; @@ -112,6 +114,22 @@ static struct i2c_board_info i2c_devices[] = { }, }; +struct gpio_led panda_leds[] = { + { + .gpio = 7, + .led = { + .name = "heartbeat", + }, + }, +}; + +static void panda_led_init(void) +{ + gpio_direction_output(7, 0); + led_gpio_register(&panda_leds[0]); + led_set_trigger(LED_TRIGGER_HEARTBEAT, &panda_leds[0].led); +} + static int panda_devices_init(void) { panda_boardrev_init(); @@ -150,6 +168,7 @@ static int panda_devices_init(void) IORESOURCE_MEM, NULL); panda_ehci_init(); + panda_led_init(); armlinux_set_bootparams((void *)0x80000100); armlinux_set_architecture(MACH_TYPE_OMAP4_PANDA); -- cgit v1.2.3