forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
....@@ -8,7 +8,6 @@
88 /dts-v1/;
99
1010 #include <dt-bindings/input/input.h>
11
-#include <dt-bindings/thermal/thermal.h>
1211
1312 #include "meson-gxm.dtsi"
1413
....@@ -100,53 +99,6 @@
10099 clock-names = "ext_clock";
101100 };
102101
103
- thermal-zones {
104
- cpu-thermal {
105
- polling-delay-passive = <250>; /* milliseconds */
106
- polling-delay = <1000>; /* milliseconds */
107
-
108
- thermal-sensors = <&scpi_sensors 0>;
109
-
110
- trips {
111
- cpu_alert0: cpu-alert0 {
112
- temperature = <70000>; /* millicelsius */
113
- hysteresis = <2000>; /* millicelsius */
114
- type = "active";
115
- };
116
-
117
- cpu_alert1: cpu-alert1 {
118
- temperature = <80000>; /* millicelsius */
119
- hysteresis = <2000>; /* millicelsius */
120
- type = "passive";
121
- };
122
- };
123
-
124
- cooling-maps {
125
- map0 {
126
- trip = <&cpu_alert0>;
127
- cooling-device = <&gpio_fan THERMAL_NO_LIMIT 1>;
128
- };
129
-
130
- map1 {
131
- trip = <&cpu_alert1>;
132
- cooling-device = <&gpio_fan 2 THERMAL_NO_LIMIT>;
133
- };
134
-
135
- map2 {
136
- trip = <&cpu_alert1>;
137
- cooling-device =
138
- <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
139
- };
140
-
141
- map3 {
142
- trip = <&cpu_alert1>;
143
- cooling-device =
144
- <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
145
- };
146
- };
147
- };
148
- };
149
-
150102 hdmi_5v: regulator-hdmi-5v {
151103 compatible = "regulator-fixed";
152104
....@@ -202,36 +154,23 @@
202154 hdmi-phandle = <&hdmi_tx>;
203155 };
204156
205
-&cpu0 {
206
- #cooling-cells = <2>;
207
-};
208157
209
-&cpu1 {
210
- #cooling-cells = <2>;
211
-};
158
+&cpu_cooling_maps {
159
+ map0 {
160
+ cooling-device = <&gpio_fan THERMAL_NO_LIMIT 1>;
161
+ };
212162
213
-&cpu2 {
214
- #cooling-cells = <2>;
215
-};
216
-
217
-&cpu3 {
218
- #cooling-cells = <2>;
219
-};
220
-
221
-&cpu4 {
222
- #cooling-cells = <2>;
223
-};
224
-
225
-&cpu5 {
226
- #cooling-cells = <2>;
227
-};
228
-
229
-&cpu6 {
230
- #cooling-cells = <2>;
231
-};
232
-
233
-&cpu7 {
234
- #cooling-cells = <2>;
163
+ map1 {
164
+ cooling-device = <&gpio_fan 2 THERMAL_NO_LIMIT>,
165
+ <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
166
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
167
+ <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
168
+ <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
169
+ <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
170
+ <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
171
+ <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
172
+ <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
173
+ };
235174 };
236175
237176 &ethmac {
....@@ -243,11 +182,6 @@
243182
244183 amlogic,tx-delay-ns = <2>;
245184
246
- /* External PHY reset is shared with internal PHY Led signals */
247
- snps,reset-gpio = <&gpio GPIOZ_14 0>;
248
- snps,reset-delays-us = <0 10000 1000000>;
249
- snps,reset-active-low;
250
-
251185 /* External PHY is in RGMII */
252186 phy-mode = "rgmii";
253187
....@@ -258,6 +192,11 @@
258192 external_phy: ethernet-phy@0 {
259193 /* Realtek RTL8211F (0x001cc916) */
260194 reg = <0>;
195
+
196
+ reset-assert-us = <10000>;
197
+ reset-deassert-us = <80000>;
198
+ reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
199
+
261200 interrupt-parent = <&gpio_intc>;
262201 /* MAC_INTR on GPIOZ_15 */
263202 interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
....@@ -303,7 +242,7 @@
303242 status = "okay";
304243 pinctrl-0 = <&remote_input_ao_pins>;
305244 pinctrl-names = "default";
306
- linux,rc-map-name = "rc-geekbox";
245
+ linux,rc-map-name = "rc-khadas";
307246 };
308247
309248 &pwm_AO_ab {
....@@ -325,15 +264,19 @@
325264 &sd_emmc_a {
326265 status = "okay";
327266 pinctrl-0 = <&sdio_pins>;
328
- pinctrl-names = "default";
267
+ pinctrl-1 = <&sdio_clk_gate_pins>;
268
+ pinctrl-names = "default", "clk-gate";
329269 #address-cells = <1>;
330270 #size-cells = <0>;
331271
332272 bus-width = <4>;
333
- max-frequency = <100000000>;
273
+ max-frequency = <60000000>;
334274
335275 non-removable;
336276 disable-wp;
277
+
278
+ /* WiFi firmware requires power to be kept while in suspend */
279
+ keep-power-in-suspend;
337280
338281 mmc-pwrseq = <&sdio_pwrseq>;
339282
....@@ -350,15 +293,15 @@
350293 &sd_emmc_b {
351294 status = "okay";
352295 pinctrl-0 = <&sdcard_pins>;
353
- pinctrl-names = "default";
296
+ pinctrl-1 = <&sdcard_clk_gate_pins>;
297
+ pinctrl-names = "default", "clk-gate";
354298
355299 bus-width = <4>;
356300 cap-sd-highspeed;
357
- max-frequency = <100000000>;
301
+ max-frequency = <50000000>;
358302 disable-wp;
359303
360
- cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
361
- cd-inverted;
304
+ cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
362305
363306 vmmc-supply = <&vddao_3v3>;
364307 vqmmc-supply = <&vddio_boot>;
....@@ -368,17 +311,16 @@
368311 &sd_emmc_c {
369312 status = "okay";
370313 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
371
- pinctrl-names = "default";
314
+ pinctrl-1 = <&emmc_clk_gate_pins>;
315
+ pinctrl-names = "default", "clk-gate";
372316
373317 bus-width = <8>;
374
- cap-sd-highspeed;
375318 cap-mmc-highspeed;
376319 max-frequency = <200000000>;
377320 non-removable;
378321 disable-wp;
379322 mmc-ddr-1_8v;
380323 mmc-hs200-1_8v;
381
- mmc-hs400-1_8v;
382324
383325 mmc-pwrseq = <&emmc_pwrseq>;
384326 vmmc-supply = <&vcc_3v3>;
....@@ -438,6 +380,7 @@
438380 vref-supply = <&vddio_ao18>;
439381 };
440382
441
-&usb0 {
383
+&usb {
442384 status = "okay";
385
+ dr_mode = "peripheral";
443386 };