diff options
Diffstat (limited to 'arch/arm/mach-mx5/board-mx53_loco.c')
-rw-r--r-- | arch/arm/mach-mx5/board-mx53_loco.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c index 940aac932fa3..0af2766f8610 100644 --- a/arch/arm/mach-mx5/board-mx53_loco.c +++ b/arch/arm/mach-mx5/board-mx53_loco.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/i2c.h> | ||
25 | 26 | ||
26 | #include <mach/common.h> | 27 | #include <mach/common.h> |
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
@@ -42,6 +43,7 @@ | |||
42 | #define LOCO_SD3_CD IMX_GPIO_NR(3, 11) | 43 | #define LOCO_SD3_CD IMX_GPIO_NR(3, 11) |
43 | #define LOCO_SD3_WP IMX_GPIO_NR(3, 12) | 44 | #define LOCO_SD3_WP IMX_GPIO_NR(3, 12) |
44 | #define LOCO_SD1_CD IMX_GPIO_NR(3, 13) | 45 | #define LOCO_SD1_CD IMX_GPIO_NR(3, 13) |
46 | #define LOCO_ACCEL_EN IMX_GPIO_NR(6, 14) | ||
45 | 47 | ||
46 | static iomux_v3_cfg_t mx53_loco_pads[] = { | 48 | static iomux_v3_cfg_t mx53_loco_pads[] = { |
47 | /* FEC */ | 49 | /* FEC */ |
@@ -64,6 +66,10 @@ static iomux_v3_cfg_t mx53_loco_pads[] = { | |||
64 | MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD, | 66 | MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD, |
65 | MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS, | 67 | MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS, |
66 | MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD, | 68 | MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD, |
69 | /* I2C1 */ | ||
70 | MX53_PAD_CSI0_DAT8__I2C1_SDA, | ||
71 | MX53_PAD_CSI0_DAT9__I2C1_SCL, | ||
72 | MX53_PAD_NANDF_CS1__GPIO6_14, /* Accelerometer Enable */ | ||
67 | /* I2C2 */ | 73 | /* I2C2 */ |
68 | MX53_PAD_KEY_COL3__I2C2_SCL, | 74 | MX53_PAD_KEY_COL3__I2C2_SCL, |
69 | MX53_PAD_KEY_ROW3__I2C2_SDA, | 75 | MX53_PAD_KEY_ROW3__I2C2_SDA, |
@@ -257,8 +263,15 @@ static const struct gpio_led_platform_data mx53loco_leds_data __initconst = { | |||
257 | .num_leds = ARRAY_SIZE(mx53loco_leds), | 263 | .num_leds = ARRAY_SIZE(mx53loco_leds), |
258 | }; | 264 | }; |
259 | 265 | ||
266 | static struct i2c_board_info mx53loco_i2c_devices[] = { | ||
267 | { | ||
268 | I2C_BOARD_INFO("mma8450", 0x1C), | ||
269 | }, | ||
270 | }; | ||
271 | |||
260 | static void __init mx53_loco_board_init(void) | 272 | static void __init mx53_loco_board_init(void) |
261 | { | 273 | { |
274 | int ret; | ||
262 | imx53_soc_init(); | 275 | imx53_soc_init(); |
263 | 276 | ||
264 | mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads, | 277 | mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads, |
@@ -267,6 +280,13 @@ static void __init mx53_loco_board_init(void) | |||
267 | mx53_loco_fec_reset(); | 280 | mx53_loco_fec_reset(); |
268 | imx53_add_fec(&mx53_loco_fec_data); | 281 | imx53_add_fec(&mx53_loco_fec_data); |
269 | imx53_add_imx2_wdt(0, NULL); | 282 | imx53_add_imx2_wdt(0, NULL); |
283 | |||
284 | ret = gpio_request_one(LOCO_ACCEL_EN, GPIOF_OUT_INIT_HIGH, "accel_en"); | ||
285 | if (ret) | ||
286 | pr_err("Cannot request ACCEL_EN pin: %d\n", ret); | ||
287 | |||
288 | i2c_register_board_info(0, mx53loco_i2c_devices, | ||
289 | ARRAY_SIZE(mx53loco_i2c_devices)); | ||
270 | imx53_add_imx_i2c(0, &mx53_loco_i2c_data); | 290 | imx53_add_imx_i2c(0, &mx53_loco_i2c_data); |
271 | imx53_add_imx_i2c(1, &mx53_loco_i2c_data); | 291 | imx53_add_imx_i2c(1, &mx53_loco_i2c_data); |
272 | imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data); | 292 | imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data); |
@@ -289,6 +309,7 @@ MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board") | |||
289 | .map_io = mx53_map_io, | 309 | .map_io = mx53_map_io, |
290 | .init_early = imx53_init_early, | 310 | .init_early = imx53_init_early, |
291 | .init_irq = mx53_init_irq, | 311 | .init_irq = mx53_init_irq, |
312 | .handle_irq = imx53_handle_irq, | ||
292 | .timer = &mx53_loco_timer, | 313 | .timer = &mx53_loco_timer, |
293 | .init_machine = mx53_loco_board_init, | 314 | .init_machine = mx53_loco_board_init, |
294 | MACHINE_END | 315 | MACHINE_END |