Merge pull request #580 from wigyori/cc-libpcap
[15.05/openwrt.git] / target / linux / mvebu / patches-3.18 / 011-use_pinctrl_node_alias.patch
1 From 01c434225ee67388711e78166cfe9b159e34fc9d Mon Sep 17 00:00:00 2001
2 From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
3 Date: Fri, 19 Sep 2014 21:20:09 +0200
4 Subject: ARM: mvebu: armada-xp: Use pinctrl node alias
5
6 Armada XP pinctrl node gained an alias, make use of it.
7
8 Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
9 Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 Tested-By: Benoit Masson <yahoo@perenite.com>
11 Signed-off-by: Jason Cooper <jason@lakedaemon.net>
12
13 --- a/arch/arm/boot/dts/armada-xp-axpwifiap.dts
14 +++ b/arch/arm/boot/dts/armada-xp-axpwifiap.dts
15 @@ -60,40 +60,6 @@
16                 };
17  
18                 internal-regs {
19 -                       pinctrl: pin-ctrl@18000 {
20 -                               pinctrl-0 = <&pmx_phy_int>;
21 -                               pinctrl-names = "default";
22 -
23 -                               pmx_ge0: pmx-ge0 {
24 -                                       marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
25 -                                                      "mpp4", "mpp5", "mpp6", "mpp7",
26 -                                                      "mpp8", "mpp9", "mpp10", "mpp11";
27 -                                       marvell,function = "ge0";
28 -                               };
29 -
30 -                               pmx_ge1: pmx-ge1 {
31 -                                       marvell,pins = "mpp12", "mpp13", "mpp14", "mpp15",
32 -                                                      "mpp16", "mpp17", "mpp18", "mpp19",
33 -                                                      "mpp20", "mpp21", "mpp22", "mpp23";
34 -                                       marvell,function = "ge1";
35 -                               };
36 -
37 -                               pmx_keys: pmx-keys {
38 -                                       marvell,pins = "mpp33";
39 -                                       marvell,function = "gpio";
40 -                               };
41 -
42 -                               pmx_spi: pmx-spi {
43 -                                       marvell,pins = "mpp36", "mpp37", "mpp38", "mpp39";
44 -                                       marvell,function = "spi";
45 -                               };
46 -
47 -                               pmx_phy_int: pmx-phy-int {
48 -                                       marvell,pins = "mpp32";
49 -                                       marvell,function = "gpio";
50 -                               };
51 -                       };
52 -
53                         serial@12000 {
54                                 status = "okay";
55                         };
56 @@ -162,3 +128,37 @@
57                 };
58         };
59  };
60 +
61 +&pinctrl {
62 +       pinctrl-0 = <&pmx_phy_int>;
63 +       pinctrl-names = "default";
64 +
65 +       pmx_ge0: pmx-ge0 {
66 +               marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
67 +                              "mpp4", "mpp5", "mpp6", "mpp7",
68 +                              "mpp8", "mpp9", "mpp10", "mpp11";
69 +               marvell,function = "ge0";
70 +       };
71 +
72 +       pmx_ge1: pmx-ge1 {
73 +               marvell,pins = "mpp12", "mpp13", "mpp14", "mpp15",
74 +                              "mpp16", "mpp17", "mpp18", "mpp19",
75 +                              "mpp20", "mpp21", "mpp22", "mpp23";
76 +               marvell,function = "ge1";
77 +       };
78 +
79 +       pmx_keys: pmx-keys {
80 +               marvell,pins = "mpp33";
81 +               marvell,function = "gpio";
82 +       };
83 +
84 +       pmx_spi: pmx-spi {
85 +               marvell,pins = "mpp36", "mpp37", "mpp38", "mpp39";
86 +               marvell,function = "spi";
87 +       };
88 +
89 +       pmx_phy_int: pmx-phy-int {
90 +               marvell,pins = "mpp32";
91 +               marvell,function = "gpio";
92 +       };
93 +};
94 --- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
95 +++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
96 @@ -51,37 +51,6 @@
97                 };
98  
99                 internal-regs {
100 -                       pinctrl: pin-ctrl@18000 {
101 -                               poweroff_pin: poweroff-pin {
102 -                                       marvell,pins = "mpp24";
103 -                                       marvell,function = "gpio";
104 -                               };
105 -
106 -                               power_button_pin: power-button-pin {
107 -                                       marvell,pins = "mpp44";
108 -                                       marvell,function = "gpio";
109 -                               };
110 -
111 -                               reset_button_pin: reset-button-pin {
112 -                                       marvell,pins = "mpp45";
113 -                                       marvell,function = "gpio";
114 -                               };
115 -                               select_button_pin: select-button-pin {
116 -                                       marvell,pins = "mpp41";
117 -                                       marvell,function = "gpio";
118 -                               };
119 -
120 -                               scroll_button_pin: scroll-button-pin {
121 -                                       marvell,pins = "mpp42";
122 -                                       marvell,function = "gpio";
123 -                               };
124 -
125 -                               hdd_led_pin: hdd-led-pin {
126 -                                       marvell,pins = "mpp26";
127 -                                       marvell,function = "gpio";
128 -                               };
129 -                       };
130 -
131                         serial@12000 {
132                                 status = "okay";
133                         };
134 @@ -282,3 +251,34 @@
135                 gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
136         };
137  };
138 +
139 +&pinctrl {
140 +       poweroff_pin: poweroff-pin {
141 +               marvell,pins = "mpp24";
142 +               marvell,function = "gpio";
143 +       };
144 +
145 +       power_button_pin: power-button-pin {
146 +               marvell,pins = "mpp44";
147 +               marvell,function = "gpio";
148 +       };
149 +
150 +       reset_button_pin: reset-button-pin {
151 +               marvell,pins = "mpp45";
152 +               marvell,function = "gpio";
153 +       };
154 +       select_button_pin: select-button-pin {
155 +               marvell,pins = "mpp41";
156 +               marvell,function = "gpio";
157 +       };
158 +
159 +       scroll_button_pin: scroll-button-pin {
160 +               marvell,pins = "mpp42";
161 +               marvell,function = "gpio";
162 +       };
163 +
164 +       hdd_led_pin: hdd-led-pin {
165 +               marvell,pins = "mpp26";
166 +               marvell,function = "gpio";
167 +       };
168 +};
169 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi
170 +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
171 @@ -167,10 +167,6 @@
172                 };
173  
174                 internal-regs {
175 -                       pinctrl: pin-ctrl@18000 {
176 -                               compatible = "marvell,mv78230-pinctrl";
177 -                       };
178 -
179                         gpio0: gpio@18100 {
180                                 compatible = "marvell,orion-gpio";
181                                 reg = <0x18100 0x40>;
182 @@ -195,3 +191,7 @@
183                 };
184         };
185  };
186 +
187 +&pinctrl {
188 +       compatible = "marvell,mv78230-pinctrl";
189 +};
190 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
191 +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
192 @@ -251,10 +251,6 @@
193                 };
194  
195                 internal-regs {
196 -                       pinctrl: pin-ctrl@18000 {
197 -                               compatible = "marvell,mv78260-pinctrl";
198 -                       };
199 -
200                         gpio0: gpio@18100 {
201                                 compatible = "marvell,orion-gpio";
202                                 reg = <0x18100 0x40>;
203 @@ -298,3 +294,7 @@
204                 };
205         };
206  };
207 +
208 +&pinctrl {
209 +       compatible = "marvell,mv78260-pinctrl";
210 +};
211 --- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi
212 +++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
213 @@ -289,10 +289,6 @@
214                 };
215  
216                 internal-regs {
217 -                       pinctrl: pin-ctrl@18000 {
218 -                               compatible = "marvell,mv78460-pinctrl";
219 -                       };
220 -
221                         gpio0: gpio@18100 {
222                                 compatible = "marvell,orion-gpio";
223                                 reg = <0x18100 0x40>;
224 @@ -336,3 +332,7 @@
225                 };
226         };
227  };
228 +
229 +&pinctrl {
230 +       compatible = "marvell,mv78460-pinctrl";
231 +};
232 --- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
233 +++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
234 @@ -81,12 +81,7 @@
235                         serial@12100 {
236                                 status = "okay";
237                         };
238 -                       pinctrl: pin-ctrl@18000 {
239 -                               led_pins: led-pins-0 {
240 -                                       marvell,pins = "mpp49", "mpp51", "mpp53";
241 -                                       marvell,function = "gpio";
242 -                               };
243 -                       };
244 +
245                         leds {
246                                 compatible = "gpio-leds";
247                                 pinctrl-names = "default";
248 @@ -191,3 +186,10 @@
249                 };
250         };
251  };
252 +
253 +&pinctrl {
254 +       led_pins: led-pins-0 {
255 +               marvell,pins = "mpp49", "mpp51", "mpp53";
256 +               marvell,function = "gpio";
257 +       };
258 +};