hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
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,41 @@
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
+ width-mm = <120>;
152
+ height-mm = <160>;
153
+
154
+ panel-timing {
155
+ clock-frequency = <200000000>;
156
+ hactive = <1536>;
157
+ hfront-porch = <12>;
158
+ hback-porch = <48>;
159
+ hsync-len = <16>;
160
+ vactive = <2048>;
161
+ vfront-porch = <8>;
162
+ vback-porch = <8>;
163
+ vsync-len = <4>;
164
+ hsync-active = <0>;
165
+ vsync-active = <0>;
166
+ de-active = <0>;
167
+ pixelclk-active = <0>;
168
+ };
169
+
170
+ ports {
171
+ panel_in: port {
172
+ panel_in_edp: endpoint {
173
+ remote-endpoint = <&edp_out_panel>;
174
+ };
175
+ };
176
+ };
154177 };
155178
156179 gpio-keys {
....@@ -168,15 +191,6 @@
168191 wakeup-source;
169192 debounce-interval = <100>;
170193 };
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>;
180194 };
181195
182196 /* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
....@@ -222,16 +236,6 @@
222236 regulator-boot-on;
223237 };
224238
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
-
235239 /*
236240 * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from
237241 * vcc_io directly. Those boards won't be able to power cycle SD cards
....@@ -275,9 +279,33 @@
275279 cpu0-supply = <&vdd_cpu>;
276280 };
277281
282
+&edp {
283
+ force-hpd;
284
+ status = "okay";
285
+
286
+ ports {
287
+ edp_out: port@1 {
288
+ reg = <1>;
289
+ #address-cells = <1>;
290
+ #size-cells = <0>;
291
+
292
+ edp_out_panel: endpoint@0 {
293
+ reg = <0>;
294
+ remote-endpoint = <&panel_in_edp>;
295
+ };
296
+ };
297
+ };
298
+};
299
+
300
+&edp_phy {
301
+ status = "okay";
302
+};
303
+
278304 &emmc {
279305 bus-width = <8>;
280306 cap-mmc-highspeed;
307
+ no-sdio;
308
+ no-sd;
281309 disable-wp;
282310 non-removable;
283311 pinctrl-names = "default";
....@@ -286,7 +314,7 @@
286314 };
287315
288316 &saradc {
289
- vref-supply = <&vccadc_ref>;
317
+ vref-supply = <&vcc_18>;
290318 status = "okay";
291319 };
292320
....@@ -298,31 +326,15 @@
298326 sd-uhs-sdr50;
299327 sd-uhs-sdr104;
300328 cap-sd-highspeed;
329
+ no-mmc;
330
+ no-sdio;
301331 card-detect-delay = <200>;
302332 disable-wp; /* wp not hooked up */
303
- num-slots = <1>;
304333 pinctrl-names = "default";
305334 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
306335 status = "okay";
307336 vmmc-supply = <&vcc_sd>;
308337 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;
326338 };
327339
328340 &gmac {
....@@ -334,12 +346,12 @@
334346 assigned-clock-rates = <125000000>;
335347 snps,reset-gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
336348 snps,reset-active-low;
337
- snps,reset-delays-us = <0 10000 50000>;
349
+ snps,reset-delays-us = <0 10000 1000000>;
338350 pinctrl-names = "default";
339351 pinctrl-0 = <&rgmii_pins>;
340352 tx_delay = <0x30>;
341353 rx_delay = <0x10>;
342
- status = "ok";
354
+ status = "okay";
343355 };
344356
345357 &gpu {
....@@ -348,14 +360,6 @@
348360 };
349361
350362 &hdmi {
351
- status = "okay";
352
-};
353
-
354
-&hdmi_in_vopl {
355
- status = "disabled";
356
-};
357
-
358
-&hdmi_in_vopb {
359363 status = "okay";
360364 };
361365
....@@ -372,15 +376,9 @@
372376 reg = <0x1c>;
373377 clocks = <&cru SCLK_I2S0_OUT>;
374378 clock-names = "mclk";
375
- interrupt-parent = <&gpio6>;
376
- interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
377379 pinctrl-names = "default";
378380 pinctrl-0 = <&i2s0_mclk>;
379381 };
380
-};
381
-
382
-&i2c3 {
383
- status = "okay";
384382 };
385383
386384 &i2c4 {
....@@ -398,24 +396,33 @@
398396 };
399397 };
400398
401
-&i2c5 {
402
- status = "okay";
403
-};
404
-
405399 &i2s {
406400 #sound-dai-cells = <0>;
407401 status = "okay";
408402 };
409403
410
-&io_domains {
411
- status = "okay";
412
-
413
- sdcard-supply = <&vccio_sd>;
414
- wifi-supply = <&vcc_18>;
415
-};
416
-
417404 &wdt {
418405 status = "okay";
406
+};
407
+
408
+&pwm0 {
409
+ status = "okay";
410
+};
411
+
412
+&sdio0 {
413
+ status = "okay";
414
+ max-frequency = <150000000>;
415
+ bus-width = <4>;
416
+ cap-sd-highspeed;
417
+ no-mmc;
418
+ no-sd;
419
+ cap-sdio-irq;
420
+ mmc-pwrseq = <&sdio_pwrseq>;
421
+ keep-power-in-suspend;
422
+ non-removable;
423
+ pinctrl-names = "default";
424
+ pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
425
+ sd-uhs-sdr104;
419426 };
420427
421428 &uart0 {
....@@ -424,63 +431,13 @@
424431 status = "okay";
425432 };
426433
427
-&uart1 {
428
- status = "okay";
429
-};
430
-
431434 &uart2 {
432
- status = "okay";
433
-};
434
-
435
-&uart3 {
436
- status = "okay";
437
-};
438
-
439
-&uart4 {
440435 status = "okay";
441436 };
442437
443438 &tsadc {
444439 rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
445440 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 {
484441 status = "okay";
485442 };
486443
....@@ -494,15 +451,21 @@
494451 drive-strength = <8>;
495452 };
496453
454
+ backlight {
455
+ bl_en: bl-en {
456
+ rockchip,pins = <7 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
457
+ };
458
+ };
459
+
497460 buttons {
498461 pwrbtn: pwrbtn {
499462 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
500463 };
501464 };
502465
503
- headphone {
504
- hp_det: hp-det {
505
- rockchip,pins = <7 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
466
+ lcd {
467
+ lcd_cs: lcd-cs {
468
+ rockchip,pins = <7 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
506469 };
507470 };
508471
....@@ -551,10 +514,6 @@
551514 otg_vbus_drv: otg-bus-drv {
552515 rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
553516 };
554
-
555
- pwr_3g: pwr-3g {
556
- rockchip,pins = <7 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
557
- };
558517 };
559518
560519 eth_phy {
....@@ -569,3 +528,41 @@
569528 };
570529 };
571530 };
531
+
532
+&usbphy {
533
+ status = "okay";
534
+};
535
+
536
+&usb_host0_ehci {
537
+ rockchip-relinquish-port;
538
+ status = "okay";
539
+};
540
+
541
+&usb_host0_ohci {
542
+ status = "okay";
543
+};
544
+
545
+&usb_host1 {
546
+ status = "okay";
547
+};
548
+
549
+&usb_otg {
550
+ vbus-supply = <&vcc_otg_vbus>;
551
+ status = "okay";
552
+};
553
+
554
+&vopb {
555
+ status = "okay";
556
+};
557
+
558
+&vopb_mmu {
559
+ status = "okay";
560
+};
561
+
562
+&vopl {
563
+ status = "okay";
564
+};
565
+
566
+&vopl_mmu {
567
+ status = "okay";
568
+};