hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/boot/dts/rk3288-evb.dtsi
....@@ -5,42 +5,9 @@
55 #include "rk3288.dtsi"
66
77 / {
8
- backlight: backlight {
9
- compatible = "pwm-backlight";
10
- 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
24
- 104 105 106 107 108 109 110 111
25
- 112 113 114 115 116 117 118 119
26
- 120 121 122 123 124 125 126 127
27
- 128 129 130 131 132 133 134 135
28
- 136 137 138 139 140 141 142 143
29
- 144 145 146 147 148 149 150 151
30
- 152 153 154 155 156 157 158 159
31
- 160 161 162 163 164 165 166 167
32
- 168 169 170 171 172 173 174 175
33
- 176 177 178 179 180 181 182 183
34
- 184 185 186 187 188 189 190 191
35
- 192 193 194 195 196 197 198 199
36
- 200 201 202 203 204 205 206 207
37
- 208 209 210 211 212 213 214 215
38
- 216 217 218 219 220 221 222 223
39
- 224 225 226 227 228 229 230 231
40
- 232 233 234 235 236 237 238 239
41
- 240 241 242 243 244 245 246 247
42
- 248 249 250 251 252 253 254 255>;
43
- default-brightness-level = <128>;
8
+ memory@0 {
9
+ device_type = "memory";
10
+ reg = <0x0 0x0 0x0 0x80000000>;
4411 };
4512
4613 adc-keys {
....@@ -48,54 +15,44 @@
4815 io-channels = <&saradc 1>;
4916 io-channel-names = "buttons";
5017 keyup-threshold-microvolt = <1800000>;
51
- poll-interval = <100>;
5218
53
- vol-up-key {
54
- label = "volume up";
19
+ button-up {
20
+ label = "Volume Up";
5521 linux,code = <KEY_VOLUMEUP>;
56
- press-threshold-microvolt = <1000>;
22
+ press-threshold-microvolt = <100000>;
5723 };
5824
59
- vol-down-key {
60
- label = "volume down";
25
+ button-down {
26
+ label = "Volume Down";
6127 linux,code = <KEY_VOLUMEDOWN>;
62
- press-threshold-microvolt = <170000>;
28
+ press-threshold-microvolt = <300000>;
6329 };
6430
6531 menu {
66
- label = "menu";
32
+ label = "Menu";
6733 linux,code = <KEY_MENU>;
6834 press-threshold-microvolt = <640000>;
6935 };
7036
7137 esc {
72
- label = "esc";
38
+ label = "Esc";
7339 linux,code = <KEY_ESC>;
7440 press-threshold-microvolt = <1000000>;
7541 };
7642
7743 home {
78
- label = "home";
44
+ label = "Home";
7945 linux,code = <KEY_HOME>;
8046 press-threshold-microvolt = <1300000>;
8147 };
8248 };
8349
8450 sound: sound {
85
- status = "disabled";
8651 compatible = "simple-audio-card";
8752 simple-audio-card,format = "i2s";
8853 simple-audio-card,name = "rockchip,rt5640-codec";
8954 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";
55
+ status = "okay";
9956
10057 simple-audio-card,dai-link@0 {
10158 format = "i2s";
....@@ -126,24 +83,49 @@
12683 rockchip,model = "rockchip,rt5640-codec";
12784 rockchip,cpu = <&i2s>;
12885 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";
13886 status = "disabled";
13987 };
14088
141
- rk_headset {
142
- compatible = "rockchip_headset";
143
- headset_gpio = <&gpio7 RK_PA7 GPIO_ACTIVE_HIGH>;
89
+ backlight: backlight {
90
+ compatible = "pwm-backlight";
91
+ brightness-levels = <
92
+ 0 1 2 3 4 5 6 7
93
+ 8 9 10 11 12 13 14 15
94
+ 16 17 18 19 20 21 22 23
95
+ 24 25 26 27 28 29 30 31
96
+ 32 33 34 35 36 37 38 39
97
+ 40 41 42 43 44 45 46 47
98
+ 48 49 50 51 52 53 54 55
99
+ 56 57 58 59 60 61 62 63
100
+ 64 65 66 67 68 69 70 71
101
+ 72 73 74 75 76 77 78 79
102
+ 80 81 82 83 84 85 86 87
103
+ 88 89 90 91 92 93 94 95
104
+ 96 97 98 99 100 101 102 103
105
+ 104 105 106 107 108 109 110 111
106
+ 112 113 114 115 116 117 118 119
107
+ 120 121 122 123 124 125 126 127
108
+ 128 129 130 131 132 133 134 135
109
+ 136 137 138 139 140 141 142 143
110
+ 144 145 146 147 148 149 150 151
111
+ 152 153 154 155 156 157 158 159
112
+ 160 161 162 163 164 165 166 167
113
+ 168 169 170 171 172 173 174 175
114
+ 176 177 178 179 180 181 182 183
115
+ 184 185 186 187 188 189 190 191
116
+ 192 193 194 195 196 197 198 199
117
+ 200 201 202 203 204 205 206 207
118
+ 208 209 210 211 212 213 214 215
119
+ 216 217 218 219 220 221 222 223
120
+ 224 225 226 227 228 229 230 231
121
+ 232 233 234 235 236 237 238 239
122
+ 240 241 242 243 244 245 246 247
123
+ 248 249 250 251 252 253 254 255>;
124
+ default-brightness-level = <128>;
125
+ enable-gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;
144126 pinctrl-names = "default";
145
- pinctrl-0 = <&hp_det>;
146
- io-channels = <&saradc 2>;
127
+ pinctrl-0 = <&bl_en>;
128
+ pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
147129 };
148130
149131 ext_gmac: external-gmac-clock {
....@@ -151,6 +133,39 @@
151133 clock-frequency = <125000000>;
152134 clock-output-names = "ext_gmac";
153135 #clock-cells = <0>;
136
+ };
137
+
138
+ panel: panel {
139
+ compatible = "simple-panel";
140
+ backlight = <&backlight>;
141
+ enable-gpios = <&gpio7 RK_PA4 GPIO_ACTIVE_HIGH>;
142
+ pinctrl-names = "default";
143
+ pinctrl-0 = <&lcd_cs>;
144
+ prepare-delay-ms = <120>;
145
+
146
+ panel-timing {
147
+ clock-frequency = <200000000>;
148
+ hactive = <1536>;
149
+ hfront-porch = <12>;
150
+ hback-porch = <48>;
151
+ hsync-len = <16>;
152
+ vactive = <2048>;
153
+ vfront-porch = <8>;
154
+ vback-porch = <8>;
155
+ vsync-len = <4>;
156
+ hsync-active = <0>;
157
+ vsync-active = <0>;
158
+ de-active = <0>;
159
+ pixelclk-active = <0>;
160
+ };
161
+
162
+ ports {
163
+ panel_in: port {
164
+ panel_in_edp: endpoint {
165
+ remote-endpoint = <&edp_out_panel>;
166
+ };
167
+ };
168
+ };
154169 };
155170
156171 gpio-keys {
....@@ -168,15 +183,6 @@
168183 wakeup-source;
169184 debounce-interval = <100>;
170185 };
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>;
180186 };
181187
182188 /* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
....@@ -222,16 +228,6 @@
222228 regulator-boot-on;
223229 };
224230
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
-
235231 /*
236232 * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from
237233 * vcc_io directly. Those boards won't be able to power cycle SD cards
....@@ -275,9 +271,33 @@
275271 cpu0-supply = <&vdd_cpu>;
276272 };
277273
274
+&edp {
275
+ force-hpd;
276
+ status = "okay";
277
+
278
+ ports {
279
+ edp_out: port@1 {
280
+ reg = <1>;
281
+ #address-cells = <1>;
282
+ #size-cells = <0>;
283
+
284
+ edp_out_panel: endpoint@0 {
285
+ reg = <0>;
286
+ remote-endpoint = <&panel_in_edp>;
287
+ };
288
+ };
289
+ };
290
+};
291
+
292
+&edp_phy {
293
+ status = "okay";
294
+};
295
+
278296 &emmc {
279297 bus-width = <8>;
280298 cap-mmc-highspeed;
299
+ no-sdio;
300
+ no-sd;
281301 disable-wp;
282302 non-removable;
283303 pinctrl-names = "default";
....@@ -286,7 +306,7 @@
286306 };
287307
288308 &saradc {
289
- vref-supply = <&vccadc_ref>;
309
+ vref-supply = <&vcc_18>;
290310 status = "okay";
291311 };
292312
....@@ -298,31 +318,15 @@
298318 sd-uhs-sdr50;
299319 sd-uhs-sdr104;
300320 cap-sd-highspeed;
321
+ no-mmc;
322
+ no-sdio;
301323 card-detect-delay = <200>;
302324 disable-wp; /* wp not hooked up */
303
- num-slots = <1>;
304325 pinctrl-names = "default";
305326 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
306327 status = "okay";
307328 vmmc-supply = <&vcc_sd>;
308329 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;
326330 };
327331
328332 &gmac {
....@@ -334,12 +338,12 @@
334338 assigned-clock-rates = <125000000>;
335339 snps,reset-gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
336340 snps,reset-active-low;
337
- snps,reset-delays-us = <0 10000 50000>;
341
+ snps,reset-delays-us = <0 10000 1000000>;
338342 pinctrl-names = "default";
339343 pinctrl-0 = <&rgmii_pins>;
340344 tx_delay = <0x30>;
341345 rx_delay = <0x10>;
342
- status = "ok";
346
+ status = "okay";
343347 };
344348
345349 &gpu {
....@@ -348,14 +352,6 @@
348352 };
349353
350354 &hdmi {
351
- status = "okay";
352
-};
353
-
354
-&hdmi_in_vopl {
355
- status = "disabled";
356
-};
357
-
358
-&hdmi_in_vopb {
359355 status = "okay";
360356 };
361357
....@@ -372,15 +368,11 @@
372368 reg = <0x1c>;
373369 clocks = <&cru SCLK_I2S0_OUT>;
374370 clock-names = "mclk";
375
- interrupt-parent = <&gpio6>;
371
+ interrupt-parent = <&gpio7>;
376372 interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
377373 pinctrl-names = "default";
378374 pinctrl-0 = <&i2s0_mclk>;
379375 };
380
-};
381
-
382
-&i2c3 {
383
- status = "okay";
384376 };
385377
386378 &i2c4 {
....@@ -398,24 +390,33 @@
398390 };
399391 };
400392
401
-&i2c5 {
402
- status = "okay";
403
-};
404
-
405393 &i2s {
406394 #sound-dai-cells = <0>;
407395 status = "okay";
408396 };
409397
410
-&io_domains {
411
- status = "okay";
412
-
413
- sdcard-supply = <&vccio_sd>;
414
- wifi-supply = <&vcc_18>;
415
-};
416
-
417398 &wdt {
418399 status = "okay";
400
+};
401
+
402
+&pwm0 {
403
+ status = "okay";
404
+};
405
+
406
+&sdio0 {
407
+ status = "okay";
408
+ max-frequency = <150000000>;
409
+ bus-width = <4>;
410
+ cap-sd-highspeed;
411
+ no-mmc;
412
+ no-sd;
413
+ cap-sdio-irq;
414
+ mmc-pwrseq = <&sdio_pwrseq>;
415
+ keep-power-in-suspend;
416
+ non-removable;
417
+ pinctrl-names = "default";
418
+ pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
419
+ sd-uhs-sdr104;
419420 };
420421
421422 &uart0 {
....@@ -424,63 +425,13 @@
424425 status = "okay";
425426 };
426427
427
-&uart1 {
428
- status = "okay";
429
-};
430
-
431428 &uart2 {
432
- status = "okay";
433
-};
434
-
435
-&uart3 {
436
- status = "okay";
437
-};
438
-
439
-&uart4 {
440429 status = "okay";
441430 };
442431
443432 &tsadc {
444433 rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
445434 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 {
484435 status = "okay";
485436 };
486437
....@@ -494,15 +445,21 @@
494445 drive-strength = <8>;
495446 };
496447
448
+ backlight {
449
+ bl_en: bl-en {
450
+ rockchip,pins = <7 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
451
+ };
452
+ };
453
+
497454 buttons {
498455 pwrbtn: pwrbtn {
499456 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
500457 };
501458 };
502459
503
- headphone {
504
- hp_det: hp-det {
505
- rockchip,pins = <7 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
460
+ lcd {
461
+ lcd_cs: lcd-cs {
462
+ rockchip,pins = <7 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
506463 };
507464 };
508465
....@@ -551,10 +508,6 @@
551508 otg_vbus_drv: otg-bus-drv {
552509 rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
553510 };
554
-
555
- pwr_3g: pwr-3g {
556
- rockchip,pins = <7 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
557
- };
558511 };
559512
560513 eth_phy {
....@@ -569,3 +522,41 @@
569522 };
570523 };
571524 };
525
+
526
+&usbphy {
527
+ status = "okay";
528
+};
529
+
530
+&usb_host0_ehci {
531
+ rockchip-relinquish-port;
532
+ status = "okay";
533
+};
534
+
535
+&usb_host0_ohci {
536
+ status = "okay";
537
+};
538
+
539
+&usb_host1 {
540
+ status = "okay";
541
+};
542
+
543
+&usb_otg {
544
+ vbus-supply = <&vcc_otg_vbus>;
545
+ status = "okay";
546
+};
547
+
548
+&vopb {
549
+ status = "okay";
550
+};
551
+
552
+&vopb_mmu {
553
+ status = "okay";
554
+};
555
+
556
+&vopl {
557
+ status = "okay";
558
+};
559
+
560
+&vopl_mmu {
561
+ status = "okay";
562
+};