diff options
Diffstat (limited to 'arch/arm/mach-nomadik/board-nhk8815.c')
-rw-r--r-- | arch/arm/mach-nomadik/board-nhk8815.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c index f4535a7dadf5..66862fb981f9 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 <mach/nand.h> | 39 | #include <mach/nand.h> |
38 | #include <mach/fsmc.h> | 40 | #include <mach/fsmc.h> |
@@ -291,8 +293,42 @@ static struct i2c_board_info __initdata nhk8815_i2c2_devices[] = { | |||
291 | }, | 293 | }, |
292 | }; | 294 | }; |
293 | 295 | ||
296 | static unsigned long out_low[] = { PIN_OUTPUT_LOW }; | ||
297 | static unsigned long out_high[] = { PIN_OUTPUT_HIGH }; | ||
298 | static unsigned long in_nopull[] = { PIN_INPUT_NOPULL }; | ||
299 | static unsigned long in_pullup[] = { PIN_INPUT_PULLUP }; | ||
300 | |||
301 | static struct pinctrl_map __initdata nhk8815_pinmap[] = { | ||
302 | PIN_MAP_MUX_GROUP_DEFAULT("uart0", "pinctrl-stn8815", "u0_a_1", "u0"), | ||
303 | PIN_MAP_MUX_GROUP_DEFAULT("uart1", "pinctrl-stn8815", "u1_a_1", "u1"), | ||
304 | /* Hog in MMC/SD card mux */ | ||
305 | PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-stn8815", "mmcsd_a_1", "mmcsd"), | ||
306 | /* MCCLK */ | ||
307 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO8_B10", out_low), | ||
308 | /* MCCMD */ | ||
309 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO9_A10", in_pullup), | ||
310 | /* MCCMDDIR */ | ||
311 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO10_C11", out_high), | ||
312 | /* MCDAT3-0 */ | ||
313 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO11_B11", in_pullup), | ||
314 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO12_A11", in_pullup), | ||
315 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO13_C12", in_pullup), | ||
316 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO14_B12", in_pullup), | ||
317 | /* MCDAT0DIR */ | ||
318 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO15_A12", out_high), | ||
319 | /* MCDAT31DIR */ | ||
320 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO16_C13", out_high), | ||
321 | /* MCMSFBCLK */ | ||
322 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO24_C15", in_pullup), | ||
323 | /* CD input GPIO */ | ||
324 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO111_H21", in_nopull), | ||
325 | /* CD bias drive */ | ||
326 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO112_J21", out_low), | ||
327 | }; | ||
328 | |||
294 | static void __init nhk8815_platform_init(void) | 329 | static void __init nhk8815_platform_init(void) |
295 | { | 330 | { |
331 | pinctrl_register_mappings(nhk8815_pinmap, ARRAY_SIZE(nhk8815_pinmap)); | ||
296 | cpu8815_platform_init(); | 332 | cpu8815_platform_init(); |
297 | nhk8815_onenand_init(); | 333 | nhk8815_onenand_init(); |
298 | platform_add_devices(nhk8815_platform_devices, | 334 | platform_add_devices(nhk8815_platform_devices, |