aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-01-03 06:54:28 -0500
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-03-15 08:34:10 -0400
commit1e47ff221d0ad1310eec0e57a55ccbb1150b9a2d (patch)
tree8ed884540812400094f4108c2a51d7c884b2f2fa
parentc9e3a32f31dbac965ee492d7e768a40bc2b44dcd (diff)
ARM: shmobile: bonito: Register pinctrl mappings for LCDC0
Replace the GPIO-based LCDC0 pinmux configuration by pinctrl mappings. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-rw-r--r--arch/arm/mach-shmobile/board-bonito.c44
1 files changed, 14 insertions, 30 deletions
diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c
index d363526450ac..70d992c540ae 100644
--- a/arch/arm/mach-shmobile/board-bonito.c
+++ b/arch/arm/mach-shmobile/board-bonito.c
@@ -24,6 +24,7 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26#include <linux/irq.h> 26#include <linux/irq.h>
27#include <linux/pinctrl/machine.h>
27#include <linux/platform_device.h> 28#include <linux/platform_device.h>
28#include <linux/gpio.h> 29#include <linux/gpio.h>
29#include <linux/regulator/fixed.h> 30#include <linux/regulator/fixed.h>
@@ -288,6 +289,16 @@ static struct platform_device lcdc0_device = {
288 }, 289 },
289}; 290};
290 291
292static const struct pinctrl_map lcdc0_pinctrl_map[] = {
293 /* LCD0 */
294 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740",
295 "lcd0_data24_1", "lcd0"),
296 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740",
297 "lcd0_lclk_1", "lcd0"),
298 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-r8a7740",
299 "lcd0_sync", "lcd0"),
300};
301
291/* 302/*
292 * SMSC 9221 303 * SMSC 9221
293 */ 304 */
@@ -430,36 +441,9 @@ static void __init bonito_init(void)
430 */ 441 */
431 if (BIT_ON(bsw2, 3) && /* S38.1 = OFF */ 442 if (BIT_ON(bsw2, 3) && /* S38.1 = OFF */
432 BIT_ON(bsw2, 2)) { /* S38.2 = OFF */ 443 BIT_ON(bsw2, 2)) { /* S38.2 = OFF */
433 gpio_request(GPIO_FN_LCDC0_SELECT, NULL); 444 pinctrl_register_mappings(lcdc0_pinctrl_map,
434 gpio_request(GPIO_FN_LCD0_D0, NULL); 445 ARRAY_SIZE(lcdc0_pinctrl_map));
435 gpio_request(GPIO_FN_LCD0_D1, NULL); 446 gpio_request(GPIO_FN_LCDC0_SELECT, NULL);
436 gpio_request(GPIO_FN_LCD0_D2, NULL);
437 gpio_request(GPIO_FN_LCD0_D3, NULL);
438 gpio_request(GPIO_FN_LCD0_D4, NULL);
439 gpio_request(GPIO_FN_LCD0_D5, NULL);
440 gpio_request(GPIO_FN_LCD0_D6, NULL);
441 gpio_request(GPIO_FN_LCD0_D7, NULL);
442 gpio_request(GPIO_FN_LCD0_D8, NULL);
443 gpio_request(GPIO_FN_LCD0_D9, NULL);
444 gpio_request(GPIO_FN_LCD0_D10, NULL);
445 gpio_request(GPIO_FN_LCD0_D11, NULL);
446 gpio_request(GPIO_FN_LCD0_D12, NULL);
447 gpio_request(GPIO_FN_LCD0_D13, NULL);
448 gpio_request(GPIO_FN_LCD0_D14, NULL);
449 gpio_request(GPIO_FN_LCD0_D15, NULL);
450 gpio_request(GPIO_FN_LCD0_D16, NULL);
451 gpio_request(GPIO_FN_LCD0_D17, NULL);
452 gpio_request(GPIO_FN_LCD0_D18_PORT163, NULL);
453 gpio_request(GPIO_FN_LCD0_D19_PORT162, NULL);
454 gpio_request(GPIO_FN_LCD0_D20_PORT161, NULL);
455 gpio_request(GPIO_FN_LCD0_D21_PORT158, NULL);
456 gpio_request(GPIO_FN_LCD0_D22_PORT160, NULL);
457 gpio_request(GPIO_FN_LCD0_D23_PORT159, NULL);
458 gpio_request(GPIO_FN_LCD0_DCK, NULL);
459 gpio_request(GPIO_FN_LCD0_VSYN, NULL);
460 gpio_request(GPIO_FN_LCD0_HSYN, NULL);
461 gpio_request(GPIO_FN_LCD0_DISP, NULL);
462 gpio_request(GPIO_FN_LCD0_LCLK_PORT165, NULL);
463 447
464 gpio_request_one(61, GPIOF_OUT_INIT_HIGH, 448 gpio_request_one(61, GPIOF_OUT_INIT_HIGH,
465 NULL); /* LCDDON */ 449 NULL); /* LCDDON */