]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
arm: kirkwood: dlink dns: move pinmux configs to the right devices
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 24 May 2013 09:44:39 +0000 (11:44 +0200)
committerJason Cooper <jason@lakedaemon.net>
Mon, 27 May 2013 15:31:13 +0000 (15:31 +0000)
When the pinmux mechanism was added in Kirkwood, the device driver
core was not yet providing the possibility of attaching pinmux
configurations to all devices, drivers had to do it explicitly, and
not all drivers were doing this.

Now that the driver core does that in a generic way, it makes sense to
attach the pinmux configuration to their corresponding devices.

This allows the pinctrl subsystem to show in debugfs to which device
is related which pins, for example:

pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41
pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42
pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/boot/dts/kirkwood-dns320.dts
arch/arm/boot/dts/kirkwood-dns325.dts
arch/arm/boot/dts/kirkwood-dnskw.dtsi

index c9c44b2f62d7b6a4248a7f2d84125e14ce4b1284..14d4ceea30578f811195e404927be76a33e08087 100644 (file)
 
        gpio-leds {
                compatible = "gpio-leds";
+               pinctrl-0 = <&pmx_led_power &pmx_led_red_usb_320
+                            &pmx_led_red_left_hdd &pmx_led_red_right_hdd
+                            &pmx_led_white_usb>;
+               pinctrl-names = "default";
+
                blue-power {
                        label = "dns320:blue:power";
                        gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */
@@ -46,6 +51,8 @@
                };
 
                serial@12100 {
+                       pinctrl-0 = <&pmx_uart1>;
+                       pinctrl-names = "default";
                        status = "okay";
                };
        };
index e4e4930dc5cf78b9318e9f7015980ab5bd5b90da..63872570e6ce475bf3067cd1955b454958bfe65b 100644 (file)
 
        gpio-leds {
                compatible = "gpio-leds";
+               pinctrl-0 = <&pmx_led_power &pmx_led_red_usb_325
+                            &pmx_led_red_left_hdd &pmx_led_red_right_hdd
+                            &pmx_led_white_usb>;
+               pinctrl-names = "default";
+
                white-power {
                        label = "dns325:white:power";
                        gpios = <&gpio0 26 1>; /* GPIO 26 Active Low */
index 6875ac00c17437c51a0e31c8dad0edf34ae64096..0afe1d07c8038913d4580cd125424ba5aabe126e 100644 (file)
@@ -9,6 +9,10 @@
                compatible = "gpio-keys";
                #address-cells = <1>;
                #size-cells = <0>;
+               pinctrl-0 = <&pmx_button_power &pmx_button_unmount
+                            &pmx_button_reset>;
+               pinctrl-names = "default";
+
                button@1 {
                        label = "Power button";
                        linux,code = <116>;
@@ -29,6 +33,8 @@
        gpio_fan {
                /* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */
                compatible = "gpio-fan";
+               pinctrl-0 = <&pmx_fan_high_speed &pmx_fan_low_speed>;
+               pinctrl-names = "default";
                gpios = <&gpio1 14 1
                         &gpio1 13 1>;
                gpio-fan,speed-map = <0    0
 
        gpio_poweroff {
                compatible = "gpio-poweroff";
+               pinctrl-0 = <&pmx_power_off>;
+               pinctrl-names = "default";
                gpios = <&gpio1 4 0>;
        };
 
        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-0 = <&pmx_power_back_on &pmx_present_sata0
+                                    &pmx_present_sata1 &pmx_fan_tacho
+                                    &pmx_temp_alarm>;
                        pinctrl-names = "default";
 
                        pmx_sata0: pmx-sata0 {
                        };
                };
                sata@80000 {
+                       pinctrl-0 = <&pmx_sata0 &pmx_sata1>;
+                       pinctrl-names = "default";
                        status = "okay";
                        nr-ports = <2>;
                };
 
                nand@3000000 {
+                       pinctrl-0 = <&pmx_nand>;
+                       pinctrl-names = "default";
                        status = "okay";
                        chip-delay = <35>;
 
                compatible = "simple-bus";
                #address-cells = <1>;
                #size-cells = <0>;
+               pinctrl-0 = <&pmx_power_sata0 &pmx_power_sata1>;
+               pinctrl-names = "default";
 
                sata0_power: regulator@1 {
                        compatible = "regulator-fixed";