]> git.karo-electronics.de Git - linux-beck.git/commitdiff
arm: mvebu: move Armada 370/XP pinctrl node definition armada-370-xp.dtsi
authorArnaud Ebalard <arno@natisbad.org>
Fri, 21 Nov 2014 23:45:56 +0000 (00:45 +0100)
committerJason Cooper <jason@lakedaemon.net>
Sat, 22 Nov 2014 04:32:04 +0000 (04:32 +0000)
What was done by Sebastian in 264a05e19bf5 ("ARM: mvebu: armada-xp:
Add node alias to pinctrl and add base address") and 01c434225ee6
("ARM: mvebu: armada-xp: Use pinctrl node alias") can also be done for
Armada 370, i.e.

 - Rename Armada 370 pinctrl node to pin-ctrl with its address encoded
 - Add a node alias to access the pinctrl node easily.
 - use the newly available alias in existing Armada 370 .dts files

We can even go a bit further by putting the pinctrl node definition in
armada-370-xp.dtsi, with only its reg property defined. This allows us
to then also use the newly defined node alias in armada-xp.dtsi,
armada-370.dtsi.

Suggested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Suggested-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Arnaud Ebalard <arno@natisbad.org>
Link: https://lkml.kernel.org/r/b54eb45e5242728aace3ce8aef2eae4251f8dea3.1416613429.git.arno@natisbad.org
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/boot/dts/armada-370-db.dts
arch/arm/boot/dts/armada-370-mirabox.dts
arch/arm/boot/dts/armada-370-netgear-rn102.dts
arch/arm/boot/dts/armada-370-netgear-rn104.dts
arch/arm/boot/dts/armada-370-rd.dts
arch/arm/boot/dts/armada-370-xp.dtsi
arch/arm/boot/dts/armada-370.dtsi
arch/arm/boot/dts/armada-xp.dtsi

index 0b7bf5ea7bd5613347562a0a61da86668be1c415..472b7434e80c059eb8d46d6c06bbf58770d855d4 100644 (file)
                compatible = "linux,spdif-dir";
        };
 };
+
+&pinctrl {
+       /*
+        * These pins might be muxed as I2S by
+        * the bootloader, but it conflicts
+        * with the real I2S pins that are
+        * muxed using i2s_pins. We must mux
+        * those pins to a function other than
+        * I2S.
+        */
+       pinctrl-0 = <&hog_pins1 &hog_pins2>;
+       pinctrl-names = "default";
+
+       hog_pins1: hog-pins1 {
+               marvell,pins = "mpp6",  "mpp8", "mpp10",
+                              "mpp12", "mpp13";
+               marvell,function = "gpio";
+       };
+
+       hog_pins2: hog-pins2 {
+               marvell,pins = "mpp5", "mpp7", "mpp9";
+               marvell,function = "gpo";
+       };
+};
index 2b6d24e0d1e8a2a33a879bea7689514f840f95dc..e1b0eb6b091ffa04814e41401d57e3c65d7e961a 100644 (file)
                                status = "okay";
                        };
 
-                       pinctrl {
-                               pwr_led_pin: pwr-led-pin {
-                                       marvell,pins = "mpp63";
-                                       marvell,function = "gpo";
-                               };
-
-                               stat_led_pins: stat-led-pins {
-                                       marvell,pins = "mpp64", "mpp65";
-                                       marvell,function = "gpio";
-                               };
-                       };
-
                        gpio_leds {
                                compatible = "gpio-leds";
                                pinctrl-names = "default";
                };
        };
 };
+
+&pinctrl {
+       pwr_led_pin: pwr-led-pin {
+               marvell,pins = "mpp63";
+               marvell,function = "gpo";
+       };
+
+       stat_led_pins: stat-led-pins {
+               marvell,pins = "mpp64", "mpp65";
+               marvell,function = "gpio";
+       };
+};
+
index 1e38628f4060323c757173c1a2f1738fd142a638..4e24932c6e30709831c54a866445f97d0cb53514 100644 (file)
                                status = "okay";
                        };
 
-                       pinctrl {
-                               power_led_pin: power-led-pin {
-                                       marvell,pins = "mpp57";
-                                       marvell,function = "gpio";
-                               };
-
-                               sata1_led_pin: sata1-led-pin {
-                                       marvell,pins = "mpp15";
-                                       marvell,function = "gpio";
-                               };
-
-                               sata2_led_pin: sata2-led-pin {
-                                       marvell,pins = "mpp14";
-                                       marvell,function = "gpio";
-                               };
-
-                               backup_led_pin: backup-led-pin {
-                                       marvell,pins = "mpp56";
-                                       marvell,function = "gpio";
-                               };
-
-                               backup_button_pin: backup-button-pin {
-                                       marvell,pins = "mpp58";
-                                       marvell,function = "gpio";
-                               };
-
-                               power_button_pin: power-button-pin {
-                                       marvell,pins = "mpp62";
-                                       marvell,function = "gpio";
-                               };
-
-                               reset_button_pin: reset-button-pin {
-                                       marvell,pins = "mpp6";
-                                       marvell,function = "gpio";
-                               };
-
-                               poweroff: poweroff {
-                                       marvell,pins = "mpp8";
-                                       marvell,function = "gpio";
-                               };
-                       };
-
                        mdio {
                                pinctrl-0 = <&mdio_pins>;
                                pinctrl-names = "default";
                gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
        };
 };
+
+&pinctrl {
+       power_led_pin: power-led-pin {
+               marvell,pins = "mpp57";
+               marvell,function = "gpio";
+       };
+
+       sata1_led_pin: sata1-led-pin {
+               marvell,pins = "mpp15";
+               marvell,function = "gpio";
+       };
+
+       sata2_led_pin: sata2-led-pin {
+               marvell,pins = "mpp14";
+               marvell,function = "gpio";
+       };
+
+       backup_led_pin: backup-led-pin {
+               marvell,pins = "mpp56";
+               marvell,function = "gpio";
+       };
+
+       backup_button_pin: backup-button-pin {
+               marvell,pins = "mpp58";
+               marvell,function = "gpio";
+       };
+
+       power_button_pin: power-button-pin {
+               marvell,pins = "mpp62";
+               marvell,function = "gpio";
+       };
+
+       reset_button_pin: reset-button-pin {
+               marvell,pins = "mpp6";
+               marvell,function = "gpio";
+       };
+
+       poweroff: poweroff {
+               marvell,pins = "mpp8";
+               marvell,function = "gpio";
+       };
+};
index c2f414bb9aba9aee392aaceee43fb68ef0330116..30586e47986a9738321b2a6d2a085dbc514f600f 100644 (file)
                                status = "okay";
                        };
 
-                       pinctrl {
-                               poweroff: poweroff {
-                                       marvell,pins = "mpp60";
-                                       marvell,function = "gpio";
-                               };
-
-                               backup_button_pin: backup-button-pin {
-                                       marvell,pins = "mpp52";
-                                       marvell,function = "gpio";
-                               };
-
-                               power_button_pin: power-button-pin {
-                                       marvell,pins = "mpp62";
-                                       marvell,function = "gpio";
-                               };
-
-                               backup_led_pin: backup-led-pin {
-                                       marvell,pins = "mpp63";
-                                       marvell,function = "gpo";
-                               };
-
-                               power_led_pin: power-led-pin {
-                                       marvell,pins = "mpp64";
-                                       marvell,function = "gpio";
-                               };
-
-                               reset_button_pin: reset-button-pin {
-                                       marvell,pins = "mpp65";
-                                       marvell,function = "gpio";
-                               };
-                       };
-
                        mdio {
                                pinctrl-0 = <&mdio_pins>;
                                pinctrl-names = "default";
                gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
        };
 };
+
+&pinctrl {
+       poweroff: poweroff {
+               marvell,pins = "mpp60";
+               marvell,function = "gpio";
+       };
+
+       backup_button_pin: backup-button-pin {
+               marvell,pins = "mpp52";
+               marvell,function = "gpio";
+       };
+
+       power_button_pin: power-button-pin {
+               marvell,pins = "mpp62";
+               marvell,function = "gpio";
+       };
+
+       backup_led_pin: backup-led-pin {
+               marvell,pins = "mpp63";
+               marvell,function = "gpo";
+       };
+
+       power_led_pin: power-led-pin {
+               marvell,pins = "mpp64";
+               marvell,function = "gpio";
+       };
+
+       reset_button_pin: reset-button-pin {
+               marvell,pins = "mpp65";
+               marvell,function = "gpio";
+       };
+};
index 2bb671a778db3d055711f5d337c8b8e14ab8e263..394308951ed9e02e7328396ca17e3fd5cb90de34 100644 (file)
                };
 
                internal-regs {
-                       pinctrl {
-                               fan_pins: fan-pins {
-                                       marvell,pins = "mpp8";
-                                       marvell,function = "gpio";
-                               };
-
-                               led_pins: led-pins {
-                                       marvell,pins = "mpp32";
-                                       marvell,function = "gpio";
-                               };
-                       };
-
                        serial@12000 {
                                status = "okay";
                        };
                };
         };
  };
+
+&pinctrl {
+       fan_pins: fan-pins {
+               marvell,pins = "mpp8";
+               marvell,function = "gpio";
+       };
+
+       led_pins: led-pins {
+               marvell,pins = "mpp32";
+               marvell,function = "gpio";
+       };
+};
index 2057351ed00b0a50e8fe2325f4754e1d196be791..83c31c86dd0906e51b75db263e0d160e135453e0 100644 (file)
                                status = "disabled";
                        };
 
+                       pinctrl: pin-ctrl@18000 {
+                               reg = <0x18000 0x38>;
+                       };
+
                        coredivclk: corediv-clock@18740 {
                                compatible = "marvell,armada-370-corediv-clock";
                                reg = <0x18740 0xc>;
index 509928621ea76a1c78c86cef49febd7958909ab9..ecf0bf153fec89685c40cd6cad0258274bd686f3 100644 (file)
                                reg = <0x11100 0x20>;
                        };
 
-                       pinctrl {
-                               compatible = "marvell,mv88f6710-pinctrl";
-                               reg = <0x18000 0x38>;
-
-                               sdio_pins1: sdio-pins1 {
-                                       marvell,pins = "mpp9",  "mpp11", "mpp12",
-                                                       "mpp13", "mpp14", "mpp15";
-                                       marvell,function = "sd0";
-                               };
-
-                               sdio_pins2: sdio-pins2 {
-                                       marvell,pins = "mpp47", "mpp48", "mpp49",
-                                                       "mpp50", "mpp51", "mpp52";
-                                       marvell,function = "sd0";
-                               };
-
-                               sdio_pins3: sdio-pins3 {
-                                       marvell,pins = "mpp48", "mpp49", "mpp50",
-                                                       "mpp51", "mpp52", "mpp53";
-                                       marvell,function = "sd0";
-                               };
-
-                               i2c0_pins: i2c0-pins {
-                                       marvell,pins = "mpp2", "mpp3";
-                                       marvell,function = "i2c0";
-                               };
-
-                               i2s_pins1: i2s-pins1 {
-                                       marvell,pins = "mpp5", "mpp6", "mpp7",
-                                                      "mpp8", "mpp9", "mpp10",
-                                                      "mpp12", "mpp13";
-                                       marvell,function = "audio";
-                               };
-
-                               i2s_pins2: i2s-pins2 {
-                                       marvell,pins = "mpp49", "mpp47", "mpp50",
-                                                      "mpp59", "mpp57", "mpp61",
-                                                      "mpp62", "mpp60", "mpp58";
-                                       marvell,function = "audio";
-                               };
-
-                               mdio_pins: mdio-pins {
-                                       marvell,pins = "mpp17", "mpp18";
-                                       marvell,function = "ge";
-                               };
-
-                               ge0_rgmii_pins: ge0-rgmii-pins {
-                                       marvell,pins = "mpp5", "mpp6", "mpp7", "mpp8",
-                                                      "mpp9", "mpp10", "mpp11", "mpp12",
-                                                      "mpp13", "mpp14", "mpp15", "mpp16";
-                                       marvell,function = "ge0";
-                               };
-
-                               ge1_rgmii_pins: ge1-rgmii-pins {
-                                       marvell,pins = "mpp19", "mpp20", "mpp21", "mpp22",
-                                                      "mpp23", "mpp24", "mpp25", "mpp26",
-                                                      "mpp27", "mpp28", "mpp29", "mpp30";
-                                       marvell,function = "ge1";
-                               };
-                       };
-
                        gpio0: gpio@18100 {
                                compatible = "marvell,orion-gpio";
                                reg = <0x18100 0x40>;
                };
        };
 };
+
+&pinctrl {
+       compatible = "marvell,mv88f6710-pinctrl";
+
+       sdio_pins1: sdio-pins1 {
+               marvell,pins = "mpp9",  "mpp11", "mpp12",
+                               "mpp13", "mpp14", "mpp15";
+               marvell,function = "sd0";
+       };
+
+       sdio_pins2: sdio-pins2 {
+               marvell,pins = "mpp47", "mpp48", "mpp49",
+                               "mpp50", "mpp51", "mpp52";
+               marvell,function = "sd0";
+       };
+
+       sdio_pins3: sdio-pins3 {
+               marvell,pins = "mpp48", "mpp49", "mpp50",
+                               "mpp51", "mpp52", "mpp53";
+               marvell,function = "sd0";
+       };
+
+       i2c0_pins: i2c0-pins {
+               marvell,pins = "mpp2", "mpp3";
+               marvell,function = "i2c0";
+       };
+
+       i2s_pins1: i2s-pins1 {
+               marvell,pins = "mpp5", "mpp6", "mpp7",
+                              "mpp8", "mpp9", "mpp10",
+                              "mpp12", "mpp13";
+               marvell,function = "audio";
+       };
+
+       i2s_pins2: i2s-pins2 {
+               marvell,pins = "mpp49", "mpp47", "mpp50",
+                              "mpp59", "mpp57", "mpp61",
+                              "mpp62", "mpp60", "mpp58";
+               marvell,function = "audio";
+       };
+
+       mdio_pins: mdio-pins {
+               marvell,pins = "mpp17", "mpp18";
+               marvell,function = "ge";
+       };
+
+       ge0_rgmii_pins: ge0-rgmii-pins {
+               marvell,pins = "mpp5", "mpp6", "mpp7", "mpp8",
+                              "mpp9", "mpp10", "mpp11", "mpp12",
+                              "mpp13", "mpp14", "mpp15", "mpp16";
+               marvell,function = "ge0";
+       };
+
+       ge1_rgmii_pins: ge1-rgmii-pins {
+               marvell,pins = "mpp19", "mpp20", "mpp21", "mpp22",
+                              "mpp23", "mpp24", "mpp25", "mpp26",
+                              "mpp27", "mpp28", "mpp29", "mpp30";
+               marvell,function = "ge1";
+       };
+};
index e4ba27ef109b9cc233a8c2c4939b84de8bf5c9e0..b59a83cf2f26ea065c143b8850b2f3b9096129a9 100644 (file)
                                status = "disabled";
                        };
 
-                       pinctrl: pin-ctrl@18000 {
-                               reg = <0x18000 0x38>;
-
-                               pmx_ge0_gmii: pmx-ge0-gmii {
-                                       marvell,pins =
-                                            "mpp0",  "mpp1",  "mpp2",  "mpp3",
-                                            "mpp4",  "mpp5",  "mpp6",  "mpp7",
-                                            "mpp8",  "mpp9",  "mpp10", "mpp11",
-                                            "mpp12", "mpp13", "mpp14", "mpp15",
-                                            "mpp16", "mpp17", "mpp18", "mpp19",
-                                            "mpp20", "mpp21", "mpp22", "mpp23";
-                                       marvell,function = "ge0";
-                               };
-
-                               pmx_ge0_rgmii: pmx-ge0-rgmii {
-                                       marvell,pins =
-                                            "mpp0", "mpp1", "mpp2", "mpp3",
-                                            "mpp4", "mpp5", "mpp6", "mpp7",
-                                            "mpp8", "mpp9", "mpp10", "mpp11";
-                                       marvell,function = "ge0";
-                               };
-
-                               pmx_ge1_rgmii: pmx-ge1-rgmii {
-                                       marvell,pins =
-                                            "mpp12", "mpp13", "mpp14", "mpp15",
-                                            "mpp16", "mpp17", "mpp18", "mpp19",
-                                            "mpp20", "mpp21", "mpp22", "mpp23";
-                                       marvell,function = "ge1";
-                               };
-
-                               sdio_pins: sdio-pins {
-                                       marvell,pins = "mpp30", "mpp31", "mpp32",
-                                                      "mpp33", "mpp34", "mpp35";
-                                       marvell,function = "sd0";
-                               };
-                       };
-
                        system-controller@18200 {
                                compatible = "marvell,armada-370-xp-system-controller";
                                reg = <0x18200 0x500>;
                };
        };
 };
+
+&pinctrl {
+       pmx_ge0_gmii: pmx-ge0-gmii {
+               marvell,pins =
+                    "mpp0",  "mpp1",  "mpp2",  "mpp3",
+                    "mpp4",  "mpp5",  "mpp6",  "mpp7",
+                    "mpp8",  "mpp9",  "mpp10", "mpp11",
+                    "mpp12", "mpp13", "mpp14", "mpp15",
+                    "mpp16", "mpp17", "mpp18", "mpp19",
+                    "mpp20", "mpp21", "mpp22", "mpp23";
+               marvell,function = "ge0";
+       };
+
+       pmx_ge0_rgmii: pmx-ge0-rgmii {
+               marvell,pins =
+                    "mpp0", "mpp1", "mpp2", "mpp3",
+                    "mpp4", "mpp5", "mpp6", "mpp7",
+                    "mpp8", "mpp9", "mpp10", "mpp11";
+               marvell,function = "ge0";
+       };
+
+       pmx_ge1_rgmii: pmx-ge1-rgmii {
+               marvell,pins =
+                    "mpp12", "mpp13", "mpp14", "mpp15",
+                    "mpp16", "mpp17", "mpp18", "mpp19",
+                    "mpp20", "mpp21", "mpp22", "mpp23";
+               marvell,function = "ge1";
+       };
+
+       sdio_pins: sdio-pins {
+               marvell,pins = "mpp30", "mpp31", "mpp32",
+                              "mpp33", "mpp34", "mpp35";
+               marvell,function = "sd0";
+       };
+};