aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-nomadik/board-nhk8815.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-nomadik/board-nhk8815.c')
-rw-r--r--arch/arm/mach-nomadik/board-nhk8815.c39
1 files changed, 37 insertions, 2 deletions
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c
index 381c08027df4..bfa1eab91f41 100644
--- a/arch/arm/mach-nomadik/board-nhk8815.c
+++ b/arch/arm/mach-nomadik/board-nhk8815.c
@@ -23,6 +23,7 @@
23#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
24#include <linux/i2c.h> 24#include <linux/i2c.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/pinctrl/machine.h>
26#include <asm/hardware/vic.h> 27#include <asm/hardware/vic.h>
27#include <asm/sizes.h> 28#include <asm/sizes.h>
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
@@ -33,6 +34,7 @@
33 34
34#include <plat/gpio-nomadik.h> 35#include <plat/gpio-nomadik.h>
35#include <plat/mtu.h> 36#include <plat/mtu.h>
37#include <plat/pincfg.h>
36 38
37#include <linux/platform_data/mtd-nomadik-nand.h> 39#include <linux/platform_data/mtd-nomadik-nand.h>
38#include <mach/fsmc.h> 40#include <mach/fsmc.h>
@@ -112,8 +114,7 @@ static struct mtd_partition nhk8815_partitions[] = {
112static struct nomadik_nand_platform_data nhk8815_nand_data = { 114static struct nomadik_nand_platform_data nhk8815_nand_data = {
113 .parts = nhk8815_partitions, 115 .parts = nhk8815_partitions,
114 .nparts = ARRAY_SIZE(nhk8815_partitions), 116 .nparts = ARRAY_SIZE(nhk8815_partitions),
115 .options = NAND_COPYBACK | NAND_CACHEPRG | NAND_NO_PADDING \ 117 .options = NAND_COPYBACK | NAND_CACHEPRG | NAND_NO_PADDING,
116 | NAND_NO_READRDY,
117 .init = nhk8815_nand_init, 118 .init = nhk8815_nand_init,
118}; 119};
119 120
@@ -291,8 +292,42 @@ static struct i2c_board_info __initdata nhk8815_i2c2_devices[] = {
291 }, 292 },
292}; 293};
293 294
295static unsigned long out_low[] = { PIN_OUTPUT_LOW };
296static unsigned long out_high[] = { PIN_OUTPUT_HIGH };
297static unsigned long in_nopull[] = { PIN_INPUT_NOPULL };
298static unsigned long in_pullup[] = { PIN_INPUT_PULLUP };
299
300static struct pinctrl_map __initdata nhk8815_pinmap[] = {
301 PIN_MAP_MUX_GROUP_DEFAULT("uart0", "pinctrl-stn8815", "u0_a_1", "u0"),
302 PIN_MAP_MUX_GROUP_DEFAULT("uart1", "pinctrl-stn8815", "u1_a_1", "u1"),
303 /* Hog in MMC/SD card mux */
304 PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-stn8815", "mmcsd_a_1", "mmcsd"),
305 /* MCCLK */
306 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO8_B10", out_low),
307 /* MCCMD */
308 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO9_A10", in_pullup),
309 /* MCCMDDIR */
310 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO10_C11", out_high),
311 /* MCDAT3-0 */
312 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO11_B11", in_pullup),
313 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO12_A11", in_pullup),
314 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO13_C12", in_pullup),
315 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO14_B12", in_pullup),
316 /* MCDAT0DIR */
317 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO15_A12", out_high),
318 /* MCDAT31DIR */
319 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO16_C13", out_high),
320 /* MCMSFBCLK */
321 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO24_C15", in_pullup),
322 /* CD input GPIO */
323 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO111_H21", in_nopull),
324 /* CD bias drive */
325 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO112_J21", out_low),
326};
327
294static void __init nhk8815_platform_init(void) 328static void __init nhk8815_platform_init(void)
295{ 329{
330 pinctrl_register_mappings(nhk8815_pinmap, ARRAY_SIZE(nhk8815_pinmap));
296 cpu8815_platform_init(); 331 cpu8815_platform_init();
297 nhk8815_onenand_init(); 332 nhk8815_onenand_init();
298 platform_add_devices(nhk8815_platform_devices, 333 platform_add_devices(nhk8815_platform_devices,