hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
....@@ -50,11 +50,23 @@
5050 compatible = "sinovoip,bpi-m2-berry", "allwinner,sun8i-r40";
5151
5252 aliases {
53
+ ethernet0 = &gmac;
5354 serial0 = &uart0;
5455 };
5556
5657 chosen {
5758 stdout-path = "serial0:115200n8";
59
+ };
60
+
61
+ connector {
62
+ compatible = "hdmi-connector";
63
+ type = "a";
64
+
65
+ port {
66
+ hdmi_con_in: endpoint {
67
+ remote-endpoint = <&hdmi_out_con>;
68
+ };
69
+ };
5870 };
5971
6072 leds {
....@@ -84,12 +96,50 @@
8496 wifi_pwrseq: wifi_pwrseq {
8597 compatible = "mmc-pwrseq-simple";
8698 reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 WIFI_EN */
99
+ clocks = <&ccu CLK_OUTA>;
100
+ clock-names = "ext_clock";
87101 };
102
+};
103
+
104
+&ahci {
105
+ ahci-supply = <&reg_dldo4>;
106
+ phy-supply = <&reg_eldo3>;
107
+ status = "okay";
108
+};
109
+
110
+&de {
111
+ status = "okay";
88112 };
89113
90114 &ehci1 {
91115 /* Terminus Tech FE 1.1s 4-port USB 2.0 hub here */
92116 status = "okay";
117
+};
118
+
119
+&gmac {
120
+ pinctrl-names = "default";
121
+ pinctrl-0 = <&gmac_rgmii_pins>;
122
+ phy-handle = <&phy1>;
123
+ phy-mode = "rgmii-id";
124
+ phy-supply = <&reg_dc1sw>;
125
+ status = "okay";
126
+};
127
+
128
+&gmac_mdio {
129
+ phy1: ethernet-phy@1 {
130
+ compatible = "ethernet-phy-ieee802.3-c22";
131
+ reg = <1>;
132
+ };
133
+};
134
+
135
+&hdmi {
136
+ status = "okay";
137
+};
138
+
139
+&hdmi_out {
140
+ hdmi_out_con: endpoint {
141
+ remote-endpoint = <&hdmi_con_in>;
142
+ };
93143 };
94144
95145 &i2c0 {
....@@ -105,6 +155,41 @@
105155
106156 #include "axp22x.dtsi"
107157
158
+&mmc0 {
159
+ vmmc-supply = <&reg_dcdc1>;
160
+ bus-width = <4>;
161
+ cd-gpios = <&pio 7 13 GPIO_ACTIVE_LOW>; /* PH13 */
162
+ status = "okay";
163
+};
164
+
165
+&mmc1 {
166
+ pinctrl-names = "default";
167
+ pinctrl-0 = <&mmc1_pg_pins>;
168
+ vmmc-supply = <&reg_dldo2>;
169
+ vqmmc-supply = <&reg_dldo1>;
170
+ mmc-pwrseq = <&wifi_pwrseq>;
171
+ bus-width = <4>;
172
+ non-removable;
173
+ status = "okay";
174
+};
175
+
176
+&pio {
177
+ pinctrl-names = "default";
178
+ pinctrl-0 = <&clk_out_a_pin>;
179
+ vcc-pa-supply = <&reg_aldo2>;
180
+ vcc-pc-supply = <&reg_dcdc1>;
181
+ vcc-pd-supply = <&reg_dcdc1>;
182
+ vcc-pe-supply = <&reg_eldo1>;
183
+ vcc-pf-supply = <&reg_dcdc1>;
184
+ vcc-pg-supply = <&reg_dldo1>;
185
+};
186
+
187
+&reg_aldo2 {
188
+ regulator-min-microvolt = <2500000>;
189
+ regulator-max-microvolt = <2500000>;
190
+ regulator-name = "vcc-pa";
191
+};
192
+
108193 &reg_aldo3 {
109194 regulator-always-on;
110195 regulator-min-microvolt = <2700000>;
....@@ -112,11 +197,17 @@
112197 regulator-name = "avcc";
113198 };
114199
200
+&reg_dc1sw {
201
+ regulator-min-microvolt = <3300000>;
202
+ regulator-max-microvolt = <3300000>;
203
+ regulator-name = "vcc-gmac-phy";
204
+};
205
+
115206 &reg_dcdc1 {
116207 regulator-always-on;
117
- regulator-min-microvolt = <3000000>;
118
- regulator-max-microvolt = <3000000>;
119
- regulator-name = "vcc-3v0";
208
+ regulator-min-microvolt = <3300000>;
209
+ regulator-max-microvolt = <3300000>;
210
+ regulator-name = "vcc-3v3";
120211 };
121212
122213 &reg_dcdc2 {
....@@ -146,27 +237,40 @@
146237 regulator-name = "vcc-wifi-io";
147238 };
148239
240
+/*
241
+ * Our WiFi chip needs both DLDO2 and DLDO3 to be powered at the same
242
+ * time, with the two being in sync, to be able to meet maximum power
243
+ * consumption during transmits. Since this is not really supported
244
+ * right now, just use the two as always on, and we will fix it later.
245
+ */
246
+
149247 &reg_dldo2 {
248
+ regulator-always-on;
150249 regulator-min-microvolt = <3300000>;
151250 regulator-max-microvolt = <3300000>;
152251 regulator-name = "vcc-wifi";
153252 };
154253
155
-&mmc0 {
156
- vmmc-supply = <&reg_dcdc1>;
157
- bus-width = <4>;
158
- cd-gpios = <&pio 7 13 GPIO_ACTIVE_LOW>; /* PH13 */
159
- status = "okay";
254
+&reg_dldo3 {
255
+ regulator-always-on;
256
+ regulator-min-microvolt = <3300000>;
257
+ regulator-max-microvolt = <3300000>;
258
+ regulator-name = "vcc-wifi-2";
160259 };
161260
162
-&mmc1 {
163
- pinctrl-names = "default";
164
- pinctrl-0 = <&mmc1_pg_pins>;
165
- vmmc-supply = <&reg_dldo2>;
166
- vqmmc-supply = <&reg_dldo1>;
167
- mmc-pwrseq = <&wifi_pwrseq>;
168
- bus-width = <4>;
169
- non-removable;
261
+&reg_dldo4 {
262
+ regulator-min-microvolt = <2500000>;
263
+ regulator-max-microvolt = <2500000>;
264
+ regulator-name = "vdd2v5-sata";
265
+};
266
+
267
+&reg_eldo3 {
268
+ regulator-min-microvolt = <1200000>;
269
+ regulator-max-microvolt = <1200000>;
270
+ regulator-name = "vdd1v2-sata";
271
+};
272
+
273
+&tcon_tv0 {
170274 status = "okay";
171275 };
172276
....@@ -176,6 +280,25 @@
176280 status = "okay";
177281 };
178282
283
+&uart3 {
284
+ pinctrl-names = "default";
285
+ pinctrl-0 = <&uart3_pg_pins>, <&uart3_rts_cts_pg_pins>;
286
+ uart-has-rtscts;
287
+ status = "okay";
288
+
289
+ bluetooth {
290
+ compatible = "brcm,bcm43438-bt";
291
+ clocks = <&ccu CLK_OUTA>;
292
+ clock-names = "lpo";
293
+ vbat-supply = <&reg_dldo2>;
294
+ vddio-supply = <&reg_dldo1>;
295
+ device-wakeup-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
296
+ /* TODO host wake line connected to PMIC GPIO pins */
297
+ shutdown-gpios = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
298
+ max-speed = <1500000>;
299
+ };
300
+};
301
+
179302 &usbphy {
180303 usb1_vbus-supply = <&reg_vcc5v0>;
181304 status = "okay";