ARM: Kirkwood: Convert dnskw to pinctrl
authorAndrew Lunn <andrew@lunn.ch>
Sat, 17 Nov 2012 16:00:48 +0000 (17:00 +0100)
committerJason Cooper <jason@lakedaemon.net>
Sat, 24 Nov 2012 02:57:56 +0000 (02:57 +0000)
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/boot/dts/kirkwood-dnskw.dtsi
arch/arm/mach-kirkwood/board-dnskw.c

index d11054f538de87a2fc1049d21f2b7b433fb31a07..6875ac00c17437c51a0e31c8dad0edf34ae64096 100644 (file)
@@ -1,4 +1,5 @@
 /include/ "kirkwood.dtsi"
+/include/ "kirkwood-6281.dtsi"
 
 / {
        model = "D-Link DNS NASes (kirkwood-based)";
        };
 
        ocp@f1000000 {
+               pinctrl: pinctrl@10000 {
+
+                       pinctrl-0 = < &pmx_nand &pmx_uart1
+                                     &pmx_sata0 &pmx_sata1
+                                     &pmx_led_power
+                                     &pmx_led_red_right_hdd
+                                     &pmx_led_red_left_hdd
+                                     &pmx_led_red_usb_325
+                                     &pmx_button_power
+                                     &pmx_led_red_usb_320
+                                     &pmx_power_off &pmx_power_back_on
+                                     &pmx_power_sata0 &pmx_power_sata1
+                                     &pmx_present_sata0 &pmx_present_sata1
+                                     &pmx_led_white_usb &pmx_fan_tacho
+                                     &pmx_fan_high_speed &pmx_fan_low_speed
+                                     &pmx_button_unmount &pmx_button_reset
+                                     &pmx_temp_alarm >;
+                       pinctrl-names = "default";
+
+                       pmx_sata0: pmx-sata0 {
+                               marvell,pins = "mpp20";
+                               marvell,function = "sata1";
+                       };
+                       pmx_sata1: pmx-sata1 {
+                               marvell,pins = "mpp21";
+                               marvell,function = "sata0";
+                       };
+                       pmx_led_power: pmx-led-power {
+                               marvell,pins = "mpp26";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_red_right_hdd: pmx-led-red-right-hdd {
+                               marvell,pins = "mpp27";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_red_left_hdd: pmx-led-red-left-hdd {
+                               marvell,pins = "mpp28";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_red_usb_325: pmx-led-red-usb-325 {
+                               marvell,pins = "mpp29";
+                               marvell,function = "gpio";
+                       };
+                       pmx_button_power: pmx-button-power {
+                               marvell,pins = "mpp34";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_red_usb_320: pmx-led-red-usb-320 {
+                               marvell,pins = "mpp35";
+                               marvell,function = "gpio";
+                       };
+                       pmx_power_off: pmx-power-off {
+                               marvell,pins = "mpp36";
+                               marvell,function = "gpio";
+                       };
+                       pmx_power_back_on: pmx-power-back-on {
+                               marvell,pins = "mpp37";
+                               marvell,function = "gpio";
+                       };
+                       pmx_power_sata0: pmx-power-sata0 {
+                               marvell,pins = "mpp39";
+                               marvell,function = "gpio";
+                       };
+                       pmx_power_sata1: pmx-power-sata1 {
+                               marvell,pins = "mpp40";
+                               marvell,function = "gpio";
+                       };
+                       pmx_present_sata0: pmx-present-sata0 {
+                               marvell,pins = "mpp41";
+                               marvell,function = "gpio";
+                       };
+                       pmx_present_sata1: pmx-present-sata1 {
+                               marvell,pins = "mpp42";
+                               marvell,function = "gpio";
+                       };
+                       pmx_led_white_usb: pmx-led-white-usb {
+                               marvell,pins = "mpp43";
+                               marvell,function = "gpio";
+                       };
+                       pmx_fan_tacho: pmx-fan-tacho {
+                               marvell,pins = "mpp44";
+                               marvell,function = "gpio";
+                       };
+                       pmx_fan_high_speed: pmx-fan-high-speed {
+                               marvell,pins = "mpp45";
+                               marvell,function = "gpio";
+                       };
+                       pmx_fan_low_speed: pmx-fan-low-speed {
+                               marvell,pins = "mpp46";
+                               marvell,function = "gpio";
+                       };
+                       pmx_button_unmount: pmx-button-unmount {
+                               marvell,pins = "mpp47";
+                               marvell,function = "gpio";
+                       };
+                       pmx_button_reset: pmx-button-reset {
+                               marvell,pins = "mpp48";
+                               marvell,function = "gpio";
+                       };
+                       pmx_temp_alarm: pmx-temp-alarm {
+                               marvell,pins = "mpp49";
+                               marvell,function = "gpio";
+                       };
+               };
                sata@80000 {
                        status = "okay";
                        nr-ports = <2>;
index 6c4028c9c3b7632631aec7b85ba62566179b66c2..a1aa87f09180f91215a3d2c95c3c6153f82f87f2 100644 (file)
 #include <linux/mv643xx_eth.h>
 #include <linux/gpio.h>
 #include "common.h"
-#include "mpp.h"
 
 static struct mv643xx_eth_platform_data dnskw_ge00_data = {
        .phy_addr       = MV643XX_ETH_PHY_ADDR(8),
 };
 
-static unsigned int dnskw_mpp_config[] __initdata = {
-       MPP13_UART1_TXD,        /* Custom ... */
-       MPP14_UART1_RXD,        /* ... Controller (DNS-320 only) */
-       MPP20_SATA1_ACTn,       /* LED: White Right HDD */
-       MPP21_SATA0_ACTn,       /* LED: White Left HDD */
-       MPP24_GPIO,
-       MPP25_GPIO,
-       MPP26_GPIO,     /* LED: Power */
-       MPP27_GPIO,     /* LED: Red Right HDD */
-       MPP28_GPIO,     /* LED: Red Left HDD */
-       MPP29_GPIO,     /* LED: Red USB (DNS-325 only) */
-       MPP30_GPIO,
-       MPP31_GPIO,
-       MPP32_GPIO,
-       MPP33_GPO,
-       MPP34_GPIO,     /* Button: Front power */
-       MPP35_GPIO,     /* LED: Red USB (DNS-320 only) */
-       MPP36_GPIO,     /* Power: Turn off board */
-       MPP37_GPIO,     /* Power: Turn back on after power failure */
-       MPP38_GPIO,
-       MPP39_GPIO,     /* Power: SATA0 */
-       MPP40_GPIO,     /* Power: SATA1 */
-       MPP41_GPIO,     /* SATA0 present */
-       MPP42_GPIO,     /* SATA1 present */
-       MPP43_GPIO,     /* LED: White USB */
-       MPP44_GPIO,     /* Fan: Tachometer Pin */
-       MPP45_GPIO,     /* Fan: high speed */
-       MPP46_GPIO,     /* Fan: low speed */
-       MPP47_GPIO,     /* Button: Back unmount */
-       MPP48_GPIO,     /* Button: Back reset */
-       MPP49_GPIO,     /* Temp Alarm (DNS-325) Pin of U5 (DNS-320) */
-       0
-};
-
 /* Register any GPIO for output and set the value */
 static void __init dnskw_gpio_register(unsigned gpio, char *name, int def)
 {
@@ -71,8 +36,6 @@ static void __init dnskw_gpio_register(unsigned gpio, char *name, int def)
 
 void __init dnskw_init(void)
 {
-       kirkwood_mpp_conf(dnskw_mpp_config);
-
        kirkwood_ge00_init(&dnskw_ge00_data);
 
        /* Set NAS to turn back on after a power failure */