summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/board-u5500.c
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@linaro.org>2011-05-05 16:16:03 +0200
committerUlf Hansson <ulf.hansson@stericsson.com>2011-09-19 15:15:02 +0200
commit8b0ffab72a5eaa13d9758099bd769c82a21bd596 (patch)
tree1b024c48cb59c00c901be36e33002e4b3acf2848 /arch/arm/mach-ux500/board-u5500.c
parent65bd46e307505bca48d3baf03648ea17ee212d0c (diff)
ab5500: fixes and basic irq support
- Remove old kernel version compat code - Make some functions static - Move to irq chip bus lock - Fix broken irq handler registration - Fix interrupt count - Use direct interrupt instead of via unimplemented PRCMU - Add RTC interrupts - Fix RTC register list - Allow get_page to read more than 4 registers ST-Ericsson Linux next: - ST-Ericsson ID: WP257121 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I590f46f1c8f83bbcb159d743a52bb4b7628c7d50 Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18936 Reviewed-by: Bibek BASU <bibek.basu@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> Conflicts: arch/arm/mach-ux500/board-u5500.c drivers/mfd/ab5500-core.c
Diffstat (limited to 'arch/arm/mach-ux500/board-u5500.c')
-rw-r--r--arch/arm/mach-ux500/board-u5500.c74
1 files changed, 68 insertions, 6 deletions
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c
index eee41c7974e..20ca76d6dab 100644
--- a/arch/arm/mach-ux500/board-u5500.c
+++ b/arch/arm/mach-ux500/board-u5500.c
@@ -21,6 +21,7 @@
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
+#include <plat/pincfg.h>
#include <plat/i2c.h>
#include <mach/hardware.h>
@@ -30,9 +31,73 @@
#include <mach/setup.h>
#include <mach/db5500-keypad.h>
+#include "pins-db5500.h"
#include "devices-db5500.h"
/*
+ * GPIO
+ */
+
+static pin_cfg_t u5500_pins[] = {
+ /* I2C */
+ GPIO3_I2C1_SCL | PIN_INPUT_PULLUP,
+ GPIO4_I2C1_SDA | PIN_INPUT_PULLUP,
+ GPIO218_I2C2_SCL | PIN_INPUT_PULLUP,
+ GPIO219_I2C2_SDA | PIN_INPUT_PULLUP,
+
+ /* Keypad */
+ GPIO128_KP_I0 | PIN_INPUT_PULLUP,
+ GPIO130_KP_I1 | PIN_INPUT_PULLUP,
+ GPIO132_KP_I2 | PIN_INPUT_PULLUP,
+ GPIO134_KP_I3 | PIN_INPUT_PULLUP,
+ GPIO137_KP_O4 | PIN_INPUT_PULLUP,
+ GPIO139_KP_O5 | PIN_INPUT_PULLUP,
+
+ /* MSP */
+ GPIO32_MSP0_TCK | PIN_INPUT_PULLDOWN,
+ GPIO33_MSP0_TFS | PIN_INPUT_PULLDOWN,
+ GPIO34_MSP0_TXD | PIN_INPUT_PULLDOWN,
+ GPIO35_MSP0_RXD | PIN_INPUT_PULLDOWN,
+ GPIO96_MSP1_TCK | PIN_INPUT_PULLDOWN,
+ GPIO97_MSP1_TFS | PIN_INPUT_PULLDOWN,
+ GPIO98_MSP1_TXD | PIN_INPUT_PULLDOWN,
+ GPIO99_MSP1_RXD | PIN_INPUT_PULLDOWN,
+ GPIO220_MSP2_TCK | PIN_OUTPUT_LOW,
+ GPIO221_MSP2_TFS | PIN_OUTPUT_LOW,
+ GPIO222_MSP2_TXD | PIN_OUTPUT_LOW,
+
+ /* DISPLAY_ENABLE */
+ GPIO226_GPIO | PIN_OUTPUT_LOW,
+
+ /* Backlight Enable */
+ GPIO224_GPIO | PIN_OUTPUT_HIGH,
+
+ /* MMC0 (POP eMMC) */
+ GPIO5_MC0_DAT0 | PIN_INPUT_PULLUP,
+ GPIO6_MC0_DAT1 | PIN_INPUT_PULLUP,
+ GPIO7_MC0_DAT2 | PIN_INPUT_PULLUP,
+ GPIO8_MC0_DAT3 | PIN_INPUT_PULLUP,
+ GPIO9_MC0_DAT4 | PIN_INPUT_PULLUP,
+ GPIO10_MC0_DAT5 | PIN_INPUT_PULLUP,
+ GPIO11_MC0_DAT6 | PIN_INPUT_PULLUP,
+ GPIO12_MC0_DAT7 | PIN_INPUT_PULLUP,
+ GPIO13_MC0_CMD | PIN_INPUT_PULLUP,
+ GPIO14_MC0_CLK | PIN_OUTPUT_LOW,
+
+ /* SPI */
+ GPIO167_SPI1_CS0n | PIN_OUTPUT_HIGH,
+ GPIO168_SPI1_RXD | PIN_INPUT_PULLDOWN,
+ GPIO169_SPI1_TXD | PIN_OUTPUT_LOW,
+ GPIO170_SPI1_CLK | PIN_OUTPUT_LOW,
+
+ /* AB5500 */
+ GPIO78_IRQn,
+
+ /* TOUCH_IRQ */
+ GPIO179_GPIO | PIN_INPUT_PULLUP,
+};
+
+/*
* Touchscreen
*/
static struct synaptics_rmi4_platform_data rmi4_i2c_platformdata = {
@@ -127,12 +192,6 @@ static struct ab5500_platform_data ab5500_plf_data = {
.base = IRQ_AB5500_BASE,
.count = AB5500_NR_IRQS,
},
- .dev_data = {
- },
- .dev_data_sz = {
- },
- .init_settings = NULL,
- .init_settings_sz = 0,
};
static struct platform_device u5500_ab5500_device = {
@@ -285,6 +344,9 @@ static void __init u5500_uart_init(void)
static void __init u5500_init_machine(void)
{
u5500_init_devices();
+
+ nmk_config_pins(u5500_pins, ARRAY_SIZE(u5500_pins));
+
u5500_i2c_init();
u5500_msp_init();
u5500_spi_init();