forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 072de836f53be56a70cecf70b43ae43b7ce17376
kernel/arch/arm/boot/dts/rk3288-evb.dtsi
....@@ -5,22 +5,109 @@
55 #include "rk3288.dtsi"
66
77 / {
8
+ memory@0 {
9
+ device_type = "memory";
10
+ reg = <0x0 0x0 0x0 0x80000000>;
11
+ };
12
+
13
+ adc-keys {
14
+ compatible = "adc-keys";
15
+ io-channels = <&saradc 1>;
16
+ io-channel-names = "buttons";
17
+ keyup-threshold-microvolt = <1800000>;
18
+
19
+ button-up {
20
+ label = "Volume Up";
21
+ linux,code = <KEY_VOLUMEUP>;
22
+ press-threshold-microvolt = <100000>;
23
+ };
24
+
25
+ button-down {
26
+ label = "Volume Down";
27
+ linux,code = <KEY_VOLUMEDOWN>;
28
+ press-threshold-microvolt = <300000>;
29
+ };
30
+
31
+ menu {
32
+ label = "Menu";
33
+ linux,code = <KEY_MENU>;
34
+ press-threshold-microvolt = <640000>;
35
+ };
36
+
37
+ esc {
38
+ label = "Esc";
39
+ linux,code = <KEY_ESC>;
40
+ press-threshold-microvolt = <1000000>;
41
+ };
42
+
43
+ home {
44
+ label = "Home";
45
+ linux,code = <KEY_HOME>;
46
+ press-threshold-microvolt = <1300000>;
47
+ };
48
+ };
49
+
50
+ rt5640_sound: rt5640-sound {
51
+ status = "okay";
52
+ compatible = "rockchip,multicodecs-card";
53
+ rockchip,card-name = "rockchip-rt5640";
54
+ hp-det-gpio = <&gpio7 RK_PA7 GPIO_ACTIVE_HIGH>;
55
+ io-channels = <&saradc 2>;
56
+ io-channel-names = "adc-detect";
57
+ keyup-threshold-microvolt = <1800000>;
58
+ poll-interval = <100>;
59
+ rockchip,format = "i2s";
60
+ rockchip,mclk-fs = <512>;
61
+ rockchip,cpu = <&i2s>;
62
+ rockchip,codec = <&rt5640>;
63
+ rockchip,audio-routing =
64
+ "Headphone", "HPOL",
65
+ "Headphone", "HPOR",
66
+ "Speaker", "SPOLP",
67
+ "Speaker", "SPOLN",
68
+ "Speaker", "SPORP",
69
+ "Speaker", "SPORN",
70
+ "Headphone", "Headphone Power",
71
+ "Headphone", "Headphone Power",
72
+ "Speaker", "Speaker Power",
73
+ "Speaker", "Speaker Power",
74
+ "DMIC L1", "Main Mic",
75
+ "DMIC R1", "Main Mic",
76
+ "IN3P", "Headset Mic",
77
+ "Headset Mic", "MICBIAS1";
78
+ play-pause-key {
79
+ label = "playpause";
80
+ linux,code = <KEY_PLAYPAUSE>;
81
+ press-threshold-microvolt = <2000>;
82
+ };
83
+ };
84
+
85
+ hdmi_sound: hdmi-sound {
86
+ status = "disabled";
87
+ compatible = "rockchip,hdmi";
88
+ rockchip,mclk-fs = <256>;
89
+ rockchip,card-name = "rockchip-hdmi0";
90
+ rockchip,cpu = <&i2s>;
91
+ rockchip,codec = <&hdmi>;
92
+ rockchip,jack-det;
93
+ };
94
+
895 backlight: backlight {
996 compatible = "pwm-backlight";
1097 brightness-levels = <
11
- 0 1 2 3 4 5 6 7
12
- 8 9 10 11 12 13 14 15
13
- 16 17 18 19 20 21 22 23
14
- 24 25 26 27 28 29 30 31
15
- 32 33 34 35 36 37 38 39
16
- 40 41 42 43 44 45 46 47
17
- 48 49 50 51 52 53 54 55
18
- 56 57 58 59 60 61 62 63
19
- 64 65 66 67 68 69 70 71
20
- 72 73 74 75 76 77 78 79
21
- 80 81 82 83 84 85 86 87
22
- 88 89 90 91 92 93 94 95
23
- 96 97 98 99 100 101 102 103
98
+ 0 1 2 3 4 5 6 7
99
+ 8 9 10 11 12 13 14 15
100
+ 16 17 18 19 20 21 22 23
101
+ 24 25 26 27 28 29 30 31
102
+ 32 33 34 35 36 37 38 39
103
+ 40 41 42 43 44 45 46 47
104
+ 48 49 50 51 52 53 54 55
105
+ 56 57 58 59 60 61 62 63
106
+ 64 65 66 67 68 69 70 71
107
+ 72 73 74 75 76 77 78 79
108
+ 80 81 82 83 84 85 86 87
109
+ 88 89 90 91 92 93 94 95
110
+ 96 97 98 99 100 101 102 103
24111 104 105 106 107 108 109 110 111
25112 112 113 114 115 116 117 118 119
26113 120 121 122 123 124 125 126 127
....@@ -41,109 +128,10 @@
41128 240 241 242 243 244 245 246 247
42129 248 249 250 251 252 253 254 255>;
43130 default-brightness-level = <128>;
44
- };
45
-
46
- adc-keys {
47
- compatible = "adc-keys";
48
- io-channels = <&saradc 1>;
49
- io-channel-names = "buttons";
50
- keyup-threshold-microvolt = <1800000>;
51
- poll-interval = <100>;
52
-
53
- vol-up-key {
54
- label = "volume up";
55
- linux,code = <KEY_VOLUMEUP>;
56
- press-threshold-microvolt = <1000>;
57
- };
58
-
59
- vol-down-key {
60
- label = "volume down";
61
- linux,code = <KEY_VOLUMEDOWN>;
62
- press-threshold-microvolt = <170000>;
63
- };
64
-
65
- menu {
66
- label = "menu";
67
- linux,code = <KEY_MENU>;
68
- press-threshold-microvolt = <640000>;
69
- };
70
-
71
- esc {
72
- label = "esc";
73
- linux,code = <KEY_ESC>;
74
- press-threshold-microvolt = <1000000>;
75
- };
76
-
77
- home {
78
- label = "home";
79
- linux,code = <KEY_HOME>;
80
- press-threshold-microvolt = <1300000>;
81
- };
82
- };
83
-
84
- sound: sound {
85
- status = "disabled";
86
- compatible = "simple-audio-card";
87
- simple-audio-card,format = "i2s";
88
- simple-audio-card,name = "rockchip,rt5640-codec";
89
- simple-audio-card,mclk-fs = <512>;
90
- simple-audio-card,widgets =
91
- "Microphone", "Microphone Jack",
92
- "Headphone", "Headphone Jack";
93
- simple-audio-card,routing =
94
- "MIC1", "Microphone Jack",
95
- "MIC2", "Microphone Jack",
96
- "Microphone Jack", "micbias1",
97
- "Headphone Jack", "HPOL",
98
- "Headphone Jack", "HPOR";
99
-
100
- simple-audio-card,dai-link@0 {
101
- format = "i2s";
102
- cpu {
103
- sound-dai = <&i2s>;
104
- };
105
-
106
- codec {
107
- sound-dai = <&rt5640>;
108
- };
109
- };
110
-
111
- simple-audio-card,dai-link@1 {
112
- format = "i2s";
113
- cpu {
114
- sound-dai = <&i2s>;
115
- };
116
-
117
- codec {
118
- sound-dai = <&hdmi>;
119
- };
120
- };
121
- };
122
-
123
- hdmi_analog_sound: hdmi-analog-sound {
124
- compatible = "rockchip,rk3288-hdmi-analog",
125
- "rockchip,rk3368-hdmi-analog";
126
- rockchip,model = "rockchip,rt5640-codec";
127
- rockchip,cpu = <&i2s>;
128
- rockchip,codec = <&rt5640>, <&hdmi>;
129
- rockchip,widgets =
130
- "Microphone", "Microphone Jack",
131
- "Headphone", "Headphone Jack";
132
- rockchip,routing =
133
- "MIC1", "Microphone Jack",
134
- "MIC2", "Microphone Jack",
135
- "Microphone Jack", "micbias1",
136
- "Headphone Jack", "HPOL",
137
- "Headphone Jack", "HPOR";
138
- status = "disabled";
139
- };
140
-
141
- rk_headset {
142
- compatible = "rockchip_headset";
143
- headset_gpio = <&gpio7 RK_PA7 GPIO_ACTIVE_HIGH>;
131
+ enable-gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;
144132 pinctrl-names = "default";
145
- pinctrl-0 = <&hp_det>;
146
- io-channels = <&saradc 2>;
133
+ pinctrl-0 = <&bl_en>;
134
+ pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
147135 };
148136
149137 ext_gmac: external-gmac-clock {
....@@ -151,6 +139,39 @@
151139 clock-frequency = <125000000>;
152140 clock-output-names = "ext_gmac";
153141 #clock-cells = <0>;
142
+ };
143
+
144
+ panel: panel {
145
+ compatible = "simple-panel";
146
+ backlight = <&backlight>;
147
+ enable-gpios = <&gpio7 RK_PA4 GPIO_ACTIVE_HIGH>;
148
+ pinctrl-names = "default";
149
+ pinctrl-0 = <&lcd_cs>;
150
+ prepare-delay-ms = <120>;
151
+
152
+ panel-timing {
153
+ clock-frequency = <200000000>;
154
+ hactive = <1536>;
155
+ hfront-porch = <12>;
156
+ hback-porch = <48>;
157
+ hsync-len = <16>;
158
+ vactive = <2048>;
159
+ vfront-porch = <8>;
160
+ vback-porch = <8>;
161
+ vsync-len = <4>;
162
+ hsync-active = <0>;
163
+ vsync-active = <0>;
164
+ de-active = <0>;
165
+ pixelclk-active = <0>;
166
+ };
167
+
168
+ ports {
169
+ panel_in: port {
170
+ panel_in_edp: endpoint {
171
+ remote-endpoint = <&edp_out_panel>;
172
+ };
173
+ };
174
+ };
154175 };
155176
156177 gpio-keys {
....@@ -168,15 +189,6 @@
168189 wakeup-source;
169190 debounce-interval = <100>;
170191 };
171
- };
172
-
173
- vccadc_ref: vccadc-ref {
174
- compatible = "regulator-fixed";
175
- regulator-name = "vcc1v8_sys";
176
- regulator-always-on;
177
- regulator-boot-on;
178
- regulator-min-microvolt = <1800000>;
179
- regulator-max-microvolt = <1800000>;
180192 };
181193
182194 /* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
....@@ -222,16 +234,6 @@
222234 regulator-boot-on;
223235 };
224236
225
- /* This switch DIO3222 HOST_DP_HOST to host2 (dwc2) */
226
- vcc_3g: vcc-3g-regulator {
227
- compatible = "regulator-fixed";
228
- enable-active-high;
229
- gpio = <&gpio7 8 GPIO_ACTIVE_HIGH>;
230
- pinctrl-names = "default";
231
- pinctrl-0 = <&pwr_3g>;
232
- regulator-name = "vcc_3g";
233
- };
234
-
235237 /*
236238 * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from
237239 * vcc_io directly. Those boards won't be able to power cycle SD cards
....@@ -275,9 +277,33 @@
275277 cpu0-supply = <&vdd_cpu>;
276278 };
277279
280
+&edp {
281
+ force-hpd;
282
+ status = "okay";
283
+
284
+ ports {
285
+ edp_out: port@1 {
286
+ reg = <1>;
287
+ #address-cells = <1>;
288
+ #size-cells = <0>;
289
+
290
+ edp_out_panel: endpoint@0 {
291
+ reg = <0>;
292
+ remote-endpoint = <&panel_in_edp>;
293
+ };
294
+ };
295
+ };
296
+};
297
+
298
+&edp_phy {
299
+ status = "okay";
300
+};
301
+
278302 &emmc {
279303 bus-width = <8>;
280304 cap-mmc-highspeed;
305
+ no-sdio;
306
+ no-sd;
281307 disable-wp;
282308 non-removable;
283309 pinctrl-names = "default";
....@@ -286,7 +312,7 @@
286312 };
287313
288314 &saradc {
289
- vref-supply = <&vccadc_ref>;
315
+ vref-supply = <&vcc_18>;
290316 status = "okay";
291317 };
292318
....@@ -298,31 +324,15 @@
298324 sd-uhs-sdr50;
299325 sd-uhs-sdr104;
300326 cap-sd-highspeed;
327
+ no-mmc;
328
+ no-sdio;
301329 card-detect-delay = <200>;
302330 disable-wp; /* wp not hooked up */
303
- num-slots = <1>;
304331 pinctrl-names = "default";
305332 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
306333 status = "okay";
307334 vmmc-supply = <&vcc_sd>;
308335 vqmmc-supply = <&vccio_sd>;
309
- supports-sd;
310
-};
311
-
312
-&sdio0 {
313
- status = "okay";
314
- max-frequency = <150000000>;
315
- bus-width = <4>;
316
- cap-sd-highspeed;
317
- cap-sdio-irq;
318
- keep-power-in-suspend;
319
- mmc-pwrseq = <&sdio_pwrseq>;
320
- non-removable;
321
- num-slots = <1>;
322
- pinctrl-names = "default";
323
- pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
324
- sd-uhs-sdr104;
325
- supports-sdio;
326336 };
327337
328338 &gmac {
....@@ -334,12 +344,12 @@
334344 assigned-clock-rates = <125000000>;
335345 snps,reset-gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
336346 snps,reset-active-low;
337
- snps,reset-delays-us = <0 10000 50000>;
347
+ snps,reset-delays-us = <0 10000 1000000>;
338348 pinctrl-names = "default";
339349 pinctrl-0 = <&rgmii_pins>;
340350 tx_delay = <0x30>;
341351 rx_delay = <0x10>;
342
- status = "ok";
352
+ status = "okay";
343353 };
344354
345355 &gpu {
....@@ -348,14 +358,6 @@
348358 };
349359
350360 &hdmi {
351
- status = "okay";
352
-};
353
-
354
-&hdmi_in_vopl {
355
- status = "disabled";
356
-};
357
-
358
-&hdmi_in_vopb {
359361 status = "okay";
360362 };
361363
....@@ -372,15 +374,9 @@
372374 reg = <0x1c>;
373375 clocks = <&cru SCLK_I2S0_OUT>;
374376 clock-names = "mclk";
375
- interrupt-parent = <&gpio6>;
376
- interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
377377 pinctrl-names = "default";
378378 pinctrl-0 = <&i2s0_mclk>;
379379 };
380
-};
381
-
382
-&i2c3 {
383
- status = "okay";
384380 };
385381
386382 &i2c4 {
....@@ -398,24 +394,33 @@
398394 };
399395 };
400396
401
-&i2c5 {
402
- status = "okay";
403
-};
404
-
405397 &i2s {
406398 #sound-dai-cells = <0>;
407399 status = "okay";
408400 };
409401
410
-&io_domains {
411
- status = "okay";
412
-
413
- sdcard-supply = <&vccio_sd>;
414
- wifi-supply = <&vcc_18>;
415
-};
416
-
417402 &wdt {
418403 status = "okay";
404
+};
405
+
406
+&pwm0 {
407
+ status = "okay";
408
+};
409
+
410
+&sdio0 {
411
+ status = "okay";
412
+ max-frequency = <150000000>;
413
+ bus-width = <4>;
414
+ cap-sd-highspeed;
415
+ no-mmc;
416
+ no-sd;
417
+ cap-sdio-irq;
418
+ mmc-pwrseq = <&sdio_pwrseq>;
419
+ keep-power-in-suspend;
420
+ non-removable;
421
+ pinctrl-names = "default";
422
+ pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
423
+ sd-uhs-sdr104;
419424 };
420425
421426 &uart0 {
....@@ -424,63 +429,13 @@
424429 status = "okay";
425430 };
426431
427
-&uart1 {
428
- status = "okay";
429
-};
430
-
431432 &uart2 {
432
- status = "okay";
433
-};
434
-
435
-&uart3 {
436
- status = "okay";
437
-};
438
-
439
-&uart4 {
440433 status = "okay";
441434 };
442435
443436 &tsadc {
444437 rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
445438 rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
446
- status = "okay";
447
-};
448
-
449
-&usbphy {
450
- status = "okay";
451
-};
452
-
453
-&usb_host0_ehci {
454
- rockchip-relinquish-port;
455
- status = "okay";
456
-};
457
-
458
-&usb_host0_ohci {
459
- status = "okay";
460
-};
461
-
462
-&usb_host1 {
463
- status = "okay";
464
-};
465
-
466
-&usb_otg {
467
- vbus-supply = <&vcc_otg_vbus>;
468
- status = "okay";
469
-};
470
-
471
-&vopb {
472
- status = "okay";
473
-};
474
-
475
-&vopb_mmu {
476
- status = "okay";
477
-};
478
-
479
-&vopl {
480
- status = "okay";
481
-};
482
-
483
-&vopl_mmu {
484439 status = "okay";
485440 };
486441
....@@ -494,15 +449,21 @@
494449 drive-strength = <8>;
495450 };
496451
452
+ backlight {
453
+ bl_en: bl-en {
454
+ rockchip,pins = <7 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
455
+ };
456
+ };
457
+
497458 buttons {
498459 pwrbtn: pwrbtn {
499460 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
500461 };
501462 };
502463
503
- headphone {
504
- hp_det: hp-det {
505
- rockchip,pins = <7 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
464
+ lcd {
465
+ lcd_cs: lcd-cs {
466
+ rockchip,pins = <7 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
506467 };
507468 };
508469
....@@ -551,10 +512,6 @@
551512 otg_vbus_drv: otg-bus-drv {
552513 rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
553514 };
554
-
555
- pwr_3g: pwr-3g {
556
- rockchip,pins = <7 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
557
- };
558515 };
559516
560517 eth_phy {
....@@ -569,3 +526,41 @@
569526 };
570527 };
571528 };
529
+
530
+&usbphy {
531
+ status = "okay";
532
+};
533
+
534
+&usb_host0_ehci {
535
+ rockchip-relinquish-port;
536
+ status = "okay";
537
+};
538
+
539
+&usb_host0_ohci {
540
+ status = "okay";
541
+};
542
+
543
+&usb_host1 {
544
+ status = "okay";
545
+};
546
+
547
+&usb_otg {
548
+ vbus-supply = <&vcc_otg_vbus>;
549
+ status = "okay";
550
+};
551
+
552
+&vopb {
553
+ status = "okay";
554
+};
555
+
556
+&vopb_mmu {
557
+ status = "okay";
558
+};
559
+
560
+&vopl {
561
+ status = "okay";
562
+};
563
+
564
+&vopl_mmu {
565
+ status = "okay";
566
+};