ARM: kirkwood: Convert mplcec4 board to pinctrl
authorStefan Peter <s.peter@mpl.ch>
Mon, 19 Nov 2012 15:00:02 +0000 (16:00 +0100)
committerJason Cooper <jason@lakedaemon.net>
Sat, 24 Nov 2012 02:58:52 +0000 (02:58 +0000)
Signed-off-by: Stefan Peter <s.peter@mpl.ch>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/boot/dts/kirkwood-6281.dtsi
arch/arm/boot/dts/kirkwood-mplcec4.dts
arch/arm/mach-kirkwood/board-mplcec4.c

index b0fe682..d6c9d65 100644 (file)
                                marvell,pins = "mpp13", "mpp14";
                                marvell,function = "uart1";
                        };
+                       pmx_sdio: pmx-sdio {
+                               marvell,pins = "mpp12", "mpp13", "mpp14",
+                                              "mpp15", "mpp16", "mpp17";
+                               marvell,function = "sdio";
+                       };
                };
        };
-};
\ No newline at end of file
+};
index ac3c080..262c654 100644 (file)
@@ -1,6 +1,7 @@
 /dts-v1/;
 
 /include/ "kirkwood.dtsi"
+/include/ "kirkwood-6281.dtsi"
 
 / {
        model = "MPL CEC4";
         };
 
        ocp@f1000000 {
+               pinctrl: pinctrl@10000 {
+
+                       pinctrl-0 = < &pmx_nand &pmx_uart0
+                                     &pmx_led_health &pmx_sdio
+                                     &pmx_sata0 &pmx_sata1
+                                     &pmx_led_user1o
+                                     &pmx_led_user1g &pmx_led_user0o
+                                     &pmx_led_user0g &pmx_led_misc
+                                     &pmx_sdio_cd
+                                   >;
+                       pinctrl-names = "default";
+
+                       pmx_led_health: pmx-led-health {
+                               marvell,pins = "mpp7";
+                               marvell,function = "gpo";
+                       };
+
+                       pmx_sata1: pmx-sata1 {
+                               marvell,pins = "mpp34";
+                               marvell,function = "sata1";
+                       };
+
+                       pmx_sata0: pmx-sata0 {
+                               marvell,pins = "mpp35";
+                               marvell,function = "sata0";
+                       };
+
+                       pmx_led_user1o: pmx-led-user1o {
+                               marvell,pins = "mpp40";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_led_user1g: pmx-led-user1g {
+                               marvell,pins = "mpp41";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_led_user0o: pmx-led-user0o {
+                               marvell,pins = "mpp44";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_led_user0g: pmx-led-user0g {
+                               marvell,pins = "mpp45";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_led_misc: pmx-led-misc {
+                               marvell,pins = "mpp46";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_sdio_cd: pmx-sdio-cd {
+                               marvell,pins = "mpp47";
+                               marvell,function = "gpio";
+                       };
+               };
+
                 i2c@11000 {
                         status = "okay";
 
index e78a227..47e7181 100644 (file)
@@ -24,51 +24,16 @@ static struct mv643xx_eth_platform_data mplcec4_ge01_data = {
        .phy_addr       = MV643XX_ETH_PHY_ADDR(2),
 };
 
-static unsigned int mplcec4_mpp_config[] __initdata = {
-       MPP0_NF_IO2,
-       MPP1_NF_IO3,
-       MPP2_NF_IO4,
-       MPP3_NF_IO5,
-       MPP4_NF_IO6,
-       MPP5_NF_IO7,
-       MPP6_SYSRST_OUTn,
-       MPP7_GPO,       /* Status LED Green High Active */
-       MPP10_UART0_TXD,
-       MPP11_UART0_RXD,
-       MPP12_SD_CLK,
-       MPP13_SD_CMD,   /* Alt UART1_TXD */
-       MPP14_SD_D0,    /* Alt UART1_RXD */
-       MPP15_SD_D1,
-       MPP16_SD_D2,
-       MPP17_SD_D3,
-       MPP18_NF_IO0,
-       MPP19_NF_IO1,
-       MPP28_GPIO,     /* Input SYS_POR_DET (active High) */
-       MPP29_GPIO,     /* Input SYS_RTC_INT (active High) */
-       MPP34_SATA1_ACTn,
-       MPP35_SATA0_ACTn,
-       MPP40_GPIO,     /* LED User1 orange */
-       MPP41_GPIO,     /* LED User1 green */
-       MPP44_GPIO,     /* LED User0 orange */
-       MPP45_GPIO,     /* LED User0 green */
-       MPP46_GPIO,     /* Status LED Yellow High Active */
-       MPP47_GPIO,     /* SD_CD# (in/IRQ)*/
-       0
-};
-
-
 static struct mvsdio_platform_data mplcec4_mvsdio_data = {
        .gpio_card_detect = 47, /* MPP47 used as SD card detect */
 };
 
 
-
 void __init mplcec4_init(void)
 {
        /*
         * Basic setup. Needs to be called early.
         */
-       kirkwood_mpp_conf(mplcec4_mpp_config);
        kirkwood_ehci_init();
        kirkwood_ge00_init(&mplcec4_ge00_data);
        kirkwood_ge01_init(&mplcec4_ge01_data);