hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
....@@ -74,8 +74,6 @@
7474
7575 leds {
7676 compatible = "gpio-leds";
77
- pinctrl-names = "default";
78
- pinctrl-0 = <&led_pins_cubietruck>;
7977
8078 blue {
8179 label = "cubietruck:blue:usr";
....@@ -100,9 +98,9 @@
10098
10199 mmc3_pwrseq: mmc3_pwrseq {
102100 compatible = "mmc-pwrseq-simple";
103
- pinctrl-names = "default";
104
- pinctrl-0 = <&mmc3_pwrseq_pin_cubietruck>;
105101 reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */
102
+ clocks = <&ccu CLK_OUT_A>;
103
+ clock-names = "ext_clock";
106104 };
107105
108106 sound {
....@@ -151,14 +149,10 @@
151149
152150 &gmac {
153151 pinctrl-names = "default";
154
- pinctrl-0 = <&gmac_pins_rgmii_a>;
155
- phy = <&phy1>;
156
- phy-mode = "rgmii";
152
+ pinctrl-0 = <&gmac_rgmii_pins>;
153
+ phy-handle = <&phy1>;
154
+ phy-mode = "rgmii-id";
157155 status = "okay";
158
-
159
- phy1: ethernet-phy@1 {
160
- reg = <1>;
161
- };
162156 };
163157
164158 &hdmi {
....@@ -172,8 +166,6 @@
172166 };
173167
174168 &i2c0 {
175
- pinctrl-names = "default";
176
- pinctrl-0 = <&i2c0_pins_a>;
177169 status = "okay";
178170
179171 axp209: pmic@34 {
....@@ -185,25 +177,26 @@
185177
186178 &i2c1 {
187179 pinctrl-names = "default";
188
- pinctrl-0 = <&i2c1_pins_a>;
189180 status = "okay";
190181 };
191182
192183 &i2c2 {
193
- pinctrl-names = "default";
194
- pinctrl-0 = <&i2c2_pins_a>;
195184 status = "okay";
196185 };
197186
198187 &ir0 {
199188 pinctrl-names = "default";
200
- pinctrl-0 = <&ir0_rx_pins_a>;
189
+ pinctrl-0 = <&ir0_rx_pin>;
201190 status = "okay";
202191 };
203192
193
+&gmac_mdio {
194
+ phy1: ethernet-phy@1 {
195
+ reg = <1>;
196
+ };
197
+};
198
+
204199 &mmc0 {
205
- pinctrl-names = "default";
206
- pinctrl-0 = <&mmc0_pins_a>;
207200 vmmc-supply = <&reg_vcc3v3>;
208201 bus-width = <4>;
209202 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
....@@ -211,8 +204,6 @@
211204 };
212205
213206 &mmc3 {
214
- pinctrl-names = "default";
215
- pinctrl-0 = <&mmc3_pins_a>;
216207 vmmc-supply = <&reg_vcc3v3>;
217208 mmc-pwrseq = <&mmc3_pwrseq>;
218209 bus-width = <4>;
....@@ -228,11 +219,6 @@
228219 };
229220 };
230221
231
-&mmc3_pins_a {
232
- /* AP6210 requires pull-up */
233
- bias-pull-up;
234
-};
235
-
236222 &ohci0 {
237223 status = "okay";
238224 };
....@@ -246,45 +232,18 @@
246232 };
247233
248234 &pio {
249
- ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 {
250
- pins = "PH12";
251
- function = "gpio_out";
252
- };
253
-
254
- led_pins_cubietruck: led_pins@0 {
255
- pins = "PH7", "PH11", "PH20", "PH21";
256
- function = "gpio_out";
257
- };
258
-
259
- mmc3_pwrseq_pin_cubietruck: mmc3_pwrseq_pin@0 {
260
- pins = "PH9";
261
- function = "gpio_out";
262
- };
263
-
264
- usb0_vbus_pin_a: usb0_vbus_pin@0 {
265
- pins = "PH17";
266
- function = "gpio_out";
267
- };
268
-
269
- usb0_id_detect_pin: usb0_id_detect_pin@0 {
270
- pins = "PH19";
271
- function = "gpio_in";
272
- };
273
-
274
- usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
275
- pins = "PH22";
276
- function = "gpio_in";
277
- };
235
+ /* Pin outputs low power clock for WiFi and BT */
236
+ pinctrl-0 = <&clk_out_a_pin>;
237
+ pinctrl-names = "default";
278238 };
279239
280240 &pwm {
281241 pinctrl-names = "default";
282
- pinctrl-0 = <&pwm0_pins_a>, <&pwm1_pins_a>;
242
+ pinctrl-0 = <&pwm0_pin>, <&pwm1_pin>;
283243 status = "okay";
284244 };
285245
286246 &reg_ahci_5v {
287
- pinctrl-0 = <&ahci_pwr_pin_cubietruck>;
288247 gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>;
289248 status = "okay";
290249 };
....@@ -325,7 +284,6 @@
325284 };
326285
327286 &reg_usb0_vbus {
328
- pinctrl-0 = <&usb0_vbus_pin_a>;
329287 gpio = <&pio 7 17 GPIO_ACTIVE_HIGH>;
330288 status = "okay";
331289 };
....@@ -340,14 +298,31 @@
340298
341299 &spdif {
342300 pinctrl-names = "default";
343
- pinctrl-0 = <&spdif_tx_pins_a>;
301
+ pinctrl-0 = <&spdif_tx_pin>;
344302 status = "okay";
345303 };
346304
347305 &uart0 {
348306 pinctrl-names = "default";
349
- pinctrl-0 = <&uart0_pins_a>;
307
+ pinctrl-0 = <&uart0_pb_pins>;
350308 status = "okay";
309
+};
310
+
311
+&uart2 {
312
+ pinctrl-names = "default";
313
+ pinctrl-0 = <&uart2_pi_pins>, <&uart2_cts_rts_pi_pins>;
314
+ uart-has-rtscts;
315
+ status = "okay";
316
+
317
+ bluetooth {
318
+ compatible = "brcm,bcm20702a1";
319
+ clocks = <&ccu CLK_OUT_A>;
320
+ clock-names = "lpo";
321
+ device-wakeup-gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
322
+ host-wakeup-gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
323
+ shutdown-gpios = <&pio 7 18 GPIO_ACTIVE_HIGH>; /* PH18 */
324
+ max-speed = <1500000>;
325
+ };
351326 };
352327
353328 &usb_otg {
....@@ -360,8 +335,6 @@
360335 };
361336
362337 &usbphy {
363
- pinctrl-names = "default";
364
- pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
365338 usb0_id_det-gpios = <&pio 7 19 GPIO_ACTIVE_HIGH>; /* PH19 */
366339 usb0_vbus_det-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
367340 usb0_vbus_power-supply = <&usb_power_supply>;