aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-kzm9g.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-04 15:32:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-04 15:32:41 -0400
commit22b154365fbc096a46d936ec1f462ef8b9bd1f05 (patch)
tree69459adc5424e1efc3c74ae3e96bfa44e00672c6 /arch/arm/mach-shmobile/board-kzm9g.c
parent6fa52ed33bea997374a88dbacbba5bf8c7ac4fef (diff)
parentcb3daf580a6bd798580d274a164e63a598d165c5 (diff)
Merge tag 'renesas-pinctrl-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC pinctrl changes for Renesas from Olof Johansson: "This is yet another driver change, which is split out just because of its size. As already in 3.9, a lot of changes are going on here, as the shmobile platform gets converted from its own pin control API to the generic drivers/pinctrl subsystem. Based on agreements with Paul Mundt, we are merging the sh-arch-side changes here as well" * tag 'renesas-pinctrl-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (142 commits) ARM: shmobile: r8a7779: Remove INTC function GPIOs ARM: shmobile: r8a7779: Remove LBSC function GPIOs ARM: shmobile: r8a7779: Remove USB function GPIOs ARM: shmobile: r8a7779: Remove HSPI function GPIOs ARM: shmobile: r8a7779: Remove SCIF function GPIOs ARM: shmobile: r8a7779: Remove SDHI and MMCIF function GPIOs ARM: shmobile: r8a7779: Remove DU function GPIOs ARM: shmobile: r8a7779: Remove DU1_DOTCLKOUT1 GPIO ARM: shmobile: r8a7740: Remove SDHI and MMCIF function GPIOs ARM: shmobile: r8a7740: Remove LCD0 and LCD1 function GPIOs ARM: shmobile: sh73a0: Remove IrDA function GPIOs ARM: shmobile: sh73a0: Remove USB function GPIOs ARM: shmobile: sh73a0: Remove BSC function GPIOs ARM: shmobile: sh73a0: Remove KEYSC function GPIOs ARM: shmobile: sh73a0: Remove pull-up function GPIOS ARM: shmobile: sh73a0: Remove FSI function GPIOs ARM: shmobile: sh73a0: Remove I2C function GPIOs ARM: shmobile: sh73a0: Remove SCIFA and SCIFB function GPIOs ARM: shmobile: sh73a0: Remove LCDC and LCDC2 function GPIOs ARM: shmobile: sh7372: Remove SDHI and MMCIF function GPIOs ...
Diffstat (limited to 'arch/arm/mach-shmobile/board-kzm9g.c')
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g.c152
1 files changed, 69 insertions, 83 deletions
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 95fe396f9604..42e51645ee54 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -30,6 +30,8 @@
30#include <linux/mmc/sh_mmcif.h> 30#include <linux/mmc/sh_mmcif.h>
31#include <linux/mmc/sh_mobile_sdhi.h> 31#include <linux/mmc/sh_mobile_sdhi.h>
32#include <linux/mfd/tmio.h> 32#include <linux/mfd/tmio.h>
33#include <linux/pinctrl/machine.h>
34#include <linux/pinctrl/pinconf-generic.h>
33#include <linux/platform_device.h> 35#include <linux/platform_device.h>
34#include <linux/regulator/fixed.h> 36#include <linux/regulator/fixed.h>
35#include <linux/regulator/machine.h> 37#include <linux/regulator/machine.h>
@@ -437,7 +439,7 @@ static struct sh_mobile_sdhi_info sdhi2_info = {
437 TMIO_MMC_WRPROTECT_DISABLE, 439 TMIO_MMC_WRPROTECT_DISABLE,
438 .tmio_caps = MMC_CAP_SD_HIGHSPEED, 440 .tmio_caps = MMC_CAP_SD_HIGHSPEED,
439 .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, 441 .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29,
440 .cd_gpio = GPIO_PORT13, 442 .cd_gpio = 13,
441}; 443};
442 444
443static struct resource sdhi2_resources[] = { 445static struct resource sdhi2_resources[] = {
@@ -603,6 +605,64 @@ static struct platform_device *kzm_devices[] __initdata = {
603 &fsi_ak4648_device, 605 &fsi_ak4648_device,
604}; 606};
605 607
608static unsigned long pin_pullup_conf[] = {
609 PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_UP, 0),
610};
611
612static const struct pinctrl_map kzm_pinctrl_map[] = {
613 /* FSIA (AK4648) */
614 PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0",
615 "fsia_mclk_in", "fsia"),
616 PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0",
617 "fsia_sclk_in", "fsia"),
618 PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0",
619 "fsia_data_in", "fsia"),
620 PIN_MAP_MUX_GROUP_DEFAULT("sh_fsi2.0", "pfc-sh73a0",
621 "fsia_data_out", "fsia"),
622 /* I2C3 */
623 PIN_MAP_MUX_GROUP_DEFAULT("i2c-sh_mobile.3", "pfc-sh73a0",
624 "i2c3_1", "i2c3"),
625 /* LCD */
626 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-sh73a0",
627 "lcd_data24", "lcd"),
628 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-sh73a0",
629 "lcd_sync", "lcd"),
630 /* MMCIF */
631 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0",
632 "mmc0_data8_0", "mmc0"),
633 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0",
634 "mmc0_ctrl_0", "mmc0"),
635 PIN_MAP_CONFIGS_PIN_DEFAULT("sh_mmcif.0", "pfc-sh73a0",
636 "PORT279", pin_pullup_conf),
637 PIN_MAP_CONFIGS_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0",
638 "mmc0_data8_0", pin_pullup_conf),
639 /* SCIFA4 */
640 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "pfc-sh73a0",
641 "scifa4_data", "scifa4"),
642 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "pfc-sh73a0",
643 "scifa4_ctrl", "scifa4"),
644 /* SDHI0 */
645 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0",
646 "sdhi0_data4", "sdhi0"),
647 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0",
648 "sdhi0_ctrl", "sdhi0"),
649 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0",
650 "sdhi0_cd", "sdhi0"),
651 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0",
652 "sdhi0_wp", "sdhi0"),
653 /* SDHI2 */
654 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-sh73a0",
655 "sdhi2_data4", "sdhi2"),
656 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-sh73a0",
657 "sdhi2_ctrl", "sdhi2"),
658 /* SMSC */
659 PIN_MAP_MUX_GROUP_DEFAULT("smsc911x.0", "pfc-sh73a0",
660 "bsc_cs4", "bsc"),
661 /* USB */
662 PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs", "pfc-sh73a0",
663 "usb_vbus", "usb"),
664};
665
606/* 666/*
607 * FIXME 667 * FIXME
608 * 668 *
@@ -664,100 +724,26 @@ static void __init kzm_init(void)
664 ARRAY_SIZE(fixed2v8_power_consumers), 2800000); 724 ARRAY_SIZE(fixed2v8_power_consumers), 2800000);
665 regulator_register_fixed(2, dummy_supplies, ARRAY_SIZE(dummy_supplies)); 725 regulator_register_fixed(2, dummy_supplies, ARRAY_SIZE(dummy_supplies));
666 726
667 sh73a0_pinmux_init(); 727 pinctrl_register_mappings(kzm_pinctrl_map, ARRAY_SIZE(kzm_pinctrl_map));
668
669 /* enable SCIFA4 */
670 gpio_request(GPIO_FN_SCIFA4_TXD, NULL);
671 gpio_request(GPIO_FN_SCIFA4_RXD, NULL);
672 gpio_request(GPIO_FN_SCIFA4_RTS_, NULL);
673 gpio_request(GPIO_FN_SCIFA4_CTS_, NULL);
674 728
675 /* CS4 for SMSC/USB */ 729 sh73a0_pinmux_init();
676 gpio_request(GPIO_FN_CS4_, NULL); /* CS4 */
677 730
678 /* SMSC */ 731 /* SMSC */
679 gpio_request_one(GPIO_PORT224, GPIOF_IN, NULL); /* IRQ3 */ 732 gpio_request_one(224, GPIOF_IN, NULL); /* IRQ3 */
680 733
681 /* LCDC */ 734 /* LCDC */
682 gpio_request(GPIO_FN_LCDD23, NULL); 735 gpio_request_one(222, GPIOF_OUT_INIT_HIGH, NULL); /* LCDCDON */
683 gpio_request(GPIO_FN_LCDD22, NULL); 736 gpio_request_one(226, GPIOF_OUT_INIT_HIGH, NULL); /* SC */
684 gpio_request(GPIO_FN_LCDD21, NULL);
685 gpio_request(GPIO_FN_LCDD20, NULL);
686 gpio_request(GPIO_FN_LCDD19, NULL);
687 gpio_request(GPIO_FN_LCDD18, NULL);
688 gpio_request(GPIO_FN_LCDD17, NULL);
689 gpio_request(GPIO_FN_LCDD16, NULL);
690 gpio_request(GPIO_FN_LCDD15, NULL);
691 gpio_request(GPIO_FN_LCDD14, NULL);
692 gpio_request(GPIO_FN_LCDD13, NULL);
693 gpio_request(GPIO_FN_LCDD12, NULL);
694 gpio_request(GPIO_FN_LCDD11, NULL);
695 gpio_request(GPIO_FN_LCDD10, NULL);
696 gpio_request(GPIO_FN_LCDD9, NULL);
697 gpio_request(GPIO_FN_LCDD8, NULL);
698 gpio_request(GPIO_FN_LCDD7, NULL);
699 gpio_request(GPIO_FN_LCDD6, NULL);
700 gpio_request(GPIO_FN_LCDD5, NULL);
701 gpio_request(GPIO_FN_LCDD4, NULL);
702 gpio_request(GPIO_FN_LCDD3, NULL);
703 gpio_request(GPIO_FN_LCDD2, NULL);
704 gpio_request(GPIO_FN_LCDD1, NULL);
705 gpio_request(GPIO_FN_LCDD0, NULL);
706 gpio_request(GPIO_FN_LCDDISP, NULL);
707 gpio_request(GPIO_FN_LCDDCK, NULL);
708
709 gpio_request_one(GPIO_PORT222, GPIOF_OUT_INIT_HIGH, NULL); /* LCDCDON */
710 gpio_request_one(GPIO_PORT226, GPIOF_OUT_INIT_HIGH, NULL); /* SC */
711 737
712 /* Touchscreen */ 738 /* Touchscreen */
713 gpio_request_one(GPIO_PORT223, GPIOF_IN, NULL); /* IRQ8 */ 739 gpio_request_one(223, GPIOF_IN, NULL); /* IRQ8 */
714
715 /* enable MMCIF */
716 gpio_request(GPIO_FN_MMCCLK0, NULL);
717 gpio_request(GPIO_FN_MMCCMD0_PU, NULL);
718 gpio_request(GPIO_FN_MMCD0_0_PU, NULL);
719 gpio_request(GPIO_FN_MMCD0_1_PU, NULL);
720 gpio_request(GPIO_FN_MMCD0_2_PU, NULL);
721 gpio_request(GPIO_FN_MMCD0_3_PU, NULL);
722 gpio_request(GPIO_FN_MMCD0_4_PU, NULL);
723 gpio_request(GPIO_FN_MMCD0_5_PU, NULL);
724 gpio_request(GPIO_FN_MMCD0_6_PU, NULL);
725 gpio_request(GPIO_FN_MMCD0_7_PU, NULL);
726 740
727 /* enable SD */ 741 /* enable SD */
728 gpio_request(GPIO_FN_SDHIWP0, NULL);
729 gpio_request(GPIO_FN_SDHICD0, NULL);
730 gpio_request(GPIO_FN_SDHICMD0, NULL);
731 gpio_request(GPIO_FN_SDHICLK0, NULL);
732 gpio_request(GPIO_FN_SDHID0_3, NULL);
733 gpio_request(GPIO_FN_SDHID0_2, NULL);
734 gpio_request(GPIO_FN_SDHID0_1, NULL);
735 gpio_request(GPIO_FN_SDHID0_0, NULL);
736 gpio_request(GPIO_FN_SDHI0_VCCQ_MC0_ON, NULL); 742 gpio_request(GPIO_FN_SDHI0_VCCQ_MC0_ON, NULL);
737 gpio_request_one(GPIO_PORT15, GPIOF_OUT_INIT_HIGH, NULL); /* power */ 743 gpio_request_one(15, GPIOF_OUT_INIT_HIGH, NULL); /* power */
738 744
739 /* enable Micro SD */ 745 /* enable Micro SD */
740 gpio_request(GPIO_FN_SDHID2_0, NULL); 746 gpio_request_one(14, GPIOF_OUT_INIT_HIGH, NULL); /* power */
741 gpio_request(GPIO_FN_SDHID2_1, NULL);
742 gpio_request(GPIO_FN_SDHID2_2, NULL);
743 gpio_request(GPIO_FN_SDHID2_3, NULL);
744 gpio_request(GPIO_FN_SDHICMD2, NULL);
745 gpio_request(GPIO_FN_SDHICLK2, NULL);
746 gpio_request_one(GPIO_PORT14, GPIOF_OUT_INIT_HIGH, NULL); /* power */
747
748 /* I2C 3 */
749 gpio_request(GPIO_FN_PORT27_I2C_SCL3, NULL);
750 gpio_request(GPIO_FN_PORT28_I2C_SDA3, NULL);
751
752 /* enable FSI2 port A (ak4648) */
753 gpio_request(GPIO_FN_FSIACK, NULL);
754 gpio_request(GPIO_FN_FSIAILR, NULL);
755 gpio_request(GPIO_FN_FSIAIBT, NULL);
756 gpio_request(GPIO_FN_FSIAISLD, NULL);
757 gpio_request(GPIO_FN_FSIAOSLD, NULL);
758
759 /* enable USB */
760 gpio_request(GPIO_FN_VBUS_0, NULL);
761 747
762#ifdef CONFIG_CACHE_L2X0 748#ifdef CONFIG_CACHE_L2X0
763 /* Early BRESP enable, Shared attribute override enable, 64K*8way */ 749 /* Early BRESP enable, Shared attribute override enable, 64K*8way */