aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mxs/mach-mx28evk.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-01 23:31:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-01 23:31:25 -0400
commit16ee792e45cf0c97ce061fce03c36cab5551ec72 (patch)
treedc68af705fbac4b5d71325aa972730199bb187dd /arch/arm/mach-mxs/mach-mx28evk.c
parentf906fb1d70e016726fccfb0d978c5d425503db9d (diff)
parentefa62e1355f0495f37f1296754b8880947c8da72 (diff)
Merge branch 'next/devel' of git://git.linaro.org/people/arnd/arm-soc
* 'next/devel' of git://git.linaro.org/people/arnd/arm-soc: (50 commits) ARM: tegra: update defconfig arm/tegra: Harmony: Configure PMC for low-level interrupts arm/tegra: device tree support for ventana board arm/tegra: add support for ventana pinmuxing arm/tegra: prepare Seaboard pinmux code for derived boards arm/tegra: pinmux: ioremap registers gpio/tegra: Convert to a platform device arm/tegra: Convert pinmux driver to a platform device arm/dt: Tegra: Add pinmux node to tegra20.dtsi arm/tegra: Prep boards for gpio/pinmux conversion to pdevs ARM: mx5: fix clock usage for suspend ARM i.MX entry-macro.S: remove now unused code ARM i.MX boards: use CONFIG_MULTI_IRQ_HANDLER ARM i.MX tzic: add handle_irq function ARM i.MX avic: add handle_irq function ARM: mx25: Add the missing IIM base definition ARM i.MX avic: convert to use generic irq chip mx31moboard: Add poweroff support ARM: mach-qong: Add watchdog support ARM: davinci: AM18x: Add wl1271/wlan support ... Fix up conflicts in: arch/arm/mach-at91/at91sam9g45.c arch/arm/mach-mx5/devices-imx53.h arch/arm/plat-mxc/include/mach/memory.h
Diffstat (limited to 'arch/arm/mach-mxs/mach-mx28evk.c')
-rw-r--r--arch/arm/mach-mxs/mach-mx28evk.c80
1 files changed, 80 insertions, 0 deletions
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
index 0173c3bce4ef..ac2316d53d3c 100644
--- a/arch/arm/mach-mxs/mach-mx28evk.c
+++ b/arch/arm/mach-mxs/mach-mx28evk.c
@@ -17,6 +17,9 @@
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18#include <linux/leds.h> 18#include <linux/leds.h>
19#include <linux/clk.h> 19#include <linux/clk.h>
20#include <linux/i2c.h>
21#include <linux/regulator/machine.h>
22#include <linux/regulator/fixed.h>
20 23
21#include <asm/mach-types.h> 24#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
@@ -182,6 +185,24 @@ static const iomux_cfg_t mx28evk_pads[] __initconst = {
182 185
183 /* led */ 186 /* led */
184 MX28_PAD_AUART1_TX__GPIO_3_5 | MXS_PAD_CTRL, 187 MX28_PAD_AUART1_TX__GPIO_3_5 | MXS_PAD_CTRL,
188
189 /* I2C */
190 MX28_PAD_I2C0_SCL__I2C0_SCL |
191 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
192 MX28_PAD_I2C0_SDA__I2C0_SDA |
193 (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
194
195 /* saif0 & saif1 */
196 MX28_PAD_SAIF0_MCLK__SAIF0_MCLK |
197 (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
198 MX28_PAD_SAIF0_LRCLK__SAIF0_LRCLK |
199 (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
200 MX28_PAD_SAIF0_BITCLK__SAIF0_BITCLK |
201 (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
202 MX28_PAD_SAIF0_SDATA0__SAIF0_SDATA0 |
203 (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
204 MX28_PAD_SAIF1_SDATA0__SAIF1_SDATA0 |
205 (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
185}; 206};
186 207
187/* led */ 208/* led */
@@ -351,6 +372,50 @@ static struct mxs_mmc_platform_data mx28evk_mmc_pdata[] __initdata = {
351 }, 372 },
352}; 373};
353 374
375static struct i2c_board_info mxs_i2c0_board_info[] __initdata = {
376 {
377 I2C_BOARD_INFO("sgtl5000", 0x0a),
378 },
379};
380
381#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
382static struct regulator_consumer_supply mx28evk_audio_consumer_supplies[] = {
383 REGULATOR_SUPPLY("VDDA", "0-000a"),
384 REGULATOR_SUPPLY("VDDIO", "0-000a"),
385};
386
387static struct regulator_init_data mx28evk_vdd_reg_init_data = {
388 .constraints = {
389 .name = "3V3",
390 .always_on = 1,
391 },
392 .consumer_supplies = mx28evk_audio_consumer_supplies,
393 .num_consumer_supplies = ARRAY_SIZE(mx28evk_audio_consumer_supplies),
394};
395
396static struct fixed_voltage_config mx28evk_vdd_pdata = {
397 .supply_name = "board-3V3",
398 .microvolts = 3300000,
399 .gpio = -EINVAL,
400 .enabled_at_boot = 1,
401 .init_data = &mx28evk_vdd_reg_init_data,
402};
403static struct platform_device mx28evk_voltage_regulator = {
404 .name = "reg-fixed-voltage",
405 .id = -1,
406 .num_resources = 0,
407 .dev = {
408 .platform_data = &mx28evk_vdd_pdata,
409 },
410};
411static void __init mx28evk_add_regulators(void)
412{
413 platform_device_register(&mx28evk_voltage_regulator);
414}
415#else
416static void __init mx28evk_add_regulators(void) {}
417#endif
418
354static struct gpio mx28evk_lcd_gpios[] = { 419static struct gpio mx28evk_lcd_gpios[] = {
355 { MX28EVK_LCD_ENABLE, GPIOF_OUT_INIT_HIGH, "lcd-enable" }, 420 { MX28EVK_LCD_ENABLE, GPIOF_OUT_INIT_HIGH, "lcd-enable" },
356 { MX28EVK_BL_ENABLE, GPIOF_OUT_INIT_HIGH, "bl-enable" }, 421 { MX28EVK_BL_ENABLE, GPIOF_OUT_INIT_HIGH, "bl-enable" },
@@ -389,6 +454,18 @@ static void __init mx28evk_init(void)
389 else 454 else
390 mx28_add_mxsfb(&mx28evk_mxsfb_pdata); 455 mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
391 456
457 mx28_add_saif(0);
458 mx28_add_saif(1);
459
460 mx28_add_mxs_i2c(0);
461 i2c_register_board_info(0, mxs_i2c0_board_info,
462 ARRAY_SIZE(mxs_i2c0_board_info));
463
464 mx28evk_add_regulators();
465
466 mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0,
467 NULL, 0);
468
392 /* power on mmc slot by writing 0 to the gpio */ 469 /* power on mmc slot by writing 0 to the gpio */
393 ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW, 470 ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW,
394 "mmc0-slot-power"); 471 "mmc0-slot-power");
@@ -403,6 +480,9 @@ static void __init mx28evk_init(void)
403 else 480 else
404 mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); 481 mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);
405 482
483 mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);
484 mx28_add_rtc_stmp3xxx();
485
406 gpio_led_register_device(0, &mx28evk_led_data); 486 gpio_led_register_device(0, &mx28evk_led_data);
407} 487}
408 488