ARM: Kirkwood: Convert IX2-200 to pinctrl.
authorAndrew Lunn <andrew@lunn.ch>
Sat, 17 Nov 2012 16:00:54 +0000 (17:00 +0100)
committerJason Cooper <jason@lakedaemon.net>
Sat, 24 Nov 2012 02:58:36 +0000 (02:58 +0000)
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
arch/arm/mach-kirkwood/board-iomega_ix2_200.c

index 865aeec40a268da8f2a0b2ab3416ccbad4da90f5..6cae4599c4b3e620974dbfa318119db952a56136 100644 (file)
@@ -1,6 +1,7 @@
 /dts-v1/;
 
 /include/ "kirkwood.dtsi"
+/include/ "kirkwood-6281.dtsi"
 
 / {
        model = "Iomega StorCenter ix2-200";
        };
 
        ocp@f1000000 {
+               pinctrl: pinctrl@10000 {
+
+                       pinctrl-0 = < &pmx_button_reset &pmx_button_power
+                                     &pmx_led_backup &pmx_led_power
+                                     &pmx_button_otb &pmx_led_rebuild
+                                     &pmx_led_health
+                                     &pmx_led_sata_brt_ctrl_1
+                                     &pmx_led_sata_brt_ctrl_2
+                                     &pmx_led_backup_brt_ctrl_1
+                                     &pmx_led_backup_brt_ctrl_2
+                                     &pmx_led_power_brt_ctrl_1
+                                     &pmx_led_power_brt_ctrl_2
+                                     &pmx_led_health_brt_ctrl_1
+                                     &pmx_led_health_brt_ctrl_2
+                                     &pmx_led_rebuild_brt_ctrl_1
+                                     &pmx_led_rebuild_brt_ctrl_2 >;
+                       pinctrl-names = "default";
+
+                       pmx_button_reset: pmx-button-reset {
+                               marvell,pins = "mpp12";
+                               marvell,function = "gpio";
+                       };
+                       pmx_button_power: pmx-button-power {
+                               marvell,pins = "mpp14";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_backup: pmx-led-backup {
+                               marvell,pins = "mpp15";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_power: pmx-led-power {
+                               marvell,pins = "mpp16";
+                               marvell,function = "gpio";
+                       };
+                       pmx_button_otb: pmx-button-otb {
+                               marvell,pins = "mpp35";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_rebuild: pmx-led-rebuild {
+                               marvell,pins = "mpp36";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_health: pmx-led_health {
+                               marvell,pins = "mpp37";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_sata_brt_ctrl_1: pmx-led-sata-brt-ctrl-1 {
+                               marvell,pins = "mpp38";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_sata_brt_ctrl_2: pmx-led-sata-brt-ctrl-2 {
+                               marvell,pins = "mpp39";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_backup_brt_ctrl_1: pmx-led-backup-brt-ctrl-1 {
+                               marvell,pins = "mpp40";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_backup_brt_ctrl_2: pmx-led-backup-brt-ctrl-2 {
+                               marvell,pins = "mpp41";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_power_brt_ctrl_1: pmx-led-power-brt-ctrl-1 {
+                               marvell,pins = "mpp42";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_power_brt_ctrl_2: pmx-led-power-brt-ctrl-2 {
+                               marvell,pins = "mpp43";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_health_brt_ctrl_1: pmx-led-health-brt-ctrl-1 {
+                               marvell,pins = "mpp44";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_health_brt_ctrl_2: pmx-led-health-brt-ctrl-2 {
+                               marvell,pins = "mpp45";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_rebuild_brt_ctrl_1: pmx-led-rebuild-brt-ctrl-1 {
+                               marvell,pins = "mpp44";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_rebuild_brt_ctrl_2: pmx-led-rebuild-brt-ctrl-2 {
+                               marvell,pins = "mpp45";
+                               marvell,function = "gpio";
+                       };
+
+               };
                i2c@11000 {
                        status = "okay";
 
index a6f3d29e8c8bc442d510be726e390b5a9f5f8248..22b86494671f5b2378a76378433d079f1f43c344 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/ethtool.h>
 #include <mach/kirkwood.h>
 #include "common.h"
-#include "mpp.h"
 
 static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = {
        .phy_addr       = MV643XX_ETH_PHY_NONE,
@@ -23,33 +22,10 @@ static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = {
        .duplex         = DUPLEX_FULL,
 };
 
-static unsigned int iomega_ix2_200_mpp_config[] __initdata = {
-       MPP12_GPIO,                     /* Reset Button */
-       MPP14_GPIO,                     /* Power Button */
-       MPP15_GPIO,                     /* Backup LED (blue) */
-       MPP16_GPIO,                     /* Power LED (white) */
-       MPP35_GPIO,                     /* OTB Button */
-       MPP36_GPIO,                     /* Rebuild LED (white) */
-       MPP37_GPIO,                     /* Health LED (red) */
-       MPP38_GPIO,                     /* SATA LED brightness control 1 */
-       MPP39_GPIO,                     /* SATA LED brightness control 2 */
-       MPP40_GPIO,                     /* Backup LED brightness control 1 */
-       MPP41_GPIO,                     /* Backup LED brightness control 2 */
-       MPP42_GPIO,                     /* Power LED brightness control 1 */
-       MPP43_GPIO,                     /* Power LED brightness control 2 */
-       MPP44_GPIO,                     /* Health LED brightness control 1 */
-       MPP45_GPIO,                     /* Health LED brightness control 2 */
-       MPP46_GPIO,                     /* Rebuild LED brightness control 1 */
-       MPP47_GPIO,                     /* Rebuild LED brightness control 2 */
-       0
-};
-
 void __init iomega_ix2_200_init(void)
 {
        /*
         * Basic setup. Needs to be called early.
         */
-       kirkwood_mpp_conf(iomega_ix2_200_mpp_config);
-
        kirkwood_ge01_init(&iomega_ix2_200_ge00_data);
 }