Merge branch 'CR_2030_5.15_evb_vout_shengyang.chen' into 'jh7110-5.15.y-devel'
[platform/kernel/linux-starfive.git] / arch / riscv / boot / dts / starfive / jh7110-common.dtsi
1 // SPDX-License-Identifier: GPL-2.0 OR MIT
2 /*
3  * Copyright (C) 2022 StarFive Technology Co., Ltd.
4  * Copyright (C) 2022 Hal Feng <hal.feng@starfivetech.com>
5  */
6
7 /dts-v1/;
8 #include "jh7110.dtsi"
9 #include "jh7110-evb-pinctrl.dtsi"
10
11 / {
12         aliases {
13                 spi0 = &qspi;
14                 gpio0 = &gpio;
15                 ethernet0 = &gmac0;
16                 ethernet1 = &gmac1;
17                 mmc0 = &sdio0;
18                 mmc1 = &sdio1;
19                 serial0 = &uart0;
20                 serial3 = &uart3;
21                 i2c0 = &i2c0;
22                 i2c1 = &i2c1;
23                 i2c2 = &i2c2;
24                 i2c3 = &i2c3;
25                 i2c4 = &i2c4;
26                 i2c5 = &i2c5;
27                 i2c6 = &i2c6;
28         };
29
30         chosen {
31                 linux,initrd-start = <0x0 0x46100000>;
32                 linux,initrd-end = <0x0 0x4c000000>;
33                 stdout-path = "serial0:115200";
34                 #bootargs = "debug console=ttyS0 rootwait";
35         };
36
37         cpus {
38                 timebase-frequency = <4000000>;
39         };
40
41         memory@40000000 {
42                 device_type = "memory";
43                 reg = <0x0 0x40000000 0x1 0x0>;
44         };
45
46         reserved-memory {
47                 #address-cells = <2>;
48                 #size-cells = <2>;
49                 ranges;
50
51                 linux,cma {
52                         compatible = "shared-dma-pool";
53                         reusable;
54                         size = <0x0 0x20000000>;
55                         alignment = <0x0 0x1000>;
56                         alloc-ranges = <0x0 0xa0000000 0x0 0x20000000>;
57                         linux,cma-default;
58                 };
59
60                 e24_mem: e24@c0000000 {
61                         no-map;
62                         reg = <0x0 0xc0110000 0x0 0xf0000>;
63                 };
64
65                 xrp_reserved: xrpbuffer@f0000000 {
66                         reg = <0x0 0xf0000000 0x0 0x01ffffff
67                                 0x0 0xf2000000 0x0 0x00001000
68                                 0x0 0xf2001000 0x0 0x00fff000
69                                 0x0 0xf3000000 0x0 0x00001000>;
70                 };
71
72         };
73 };
74
75 &uart0 {
76         pinctrl-names = "default";
77         pinctrl-0 = <&uart0_pins>;
78         status = "okay";
79 };
80
81 &uart1 {
82        pinctrl-names = "default";
83        pinctrl-0 = <&uart1_pins>;
84        status = "disabled";
85 };
86
87 &uart2 {
88        pinctrl-names = "default";
89        pinctrl-0 = <&uart2_pins>;
90        status = "disabled";
91 };
92
93 &uart3 {
94        pinctrl-names = "default";
95        pinctrl-0 = <&uart3_pins>;
96        status = "disabled";
97 };
98
99 &uart4 {
100        pinctrl-names = "default";
101        pinctrl-0 = <&uart4_pins>;
102        status = "disabled";
103 };
104
105 &uart5 {
106        pinctrl-names = "default";
107        pinctrl-0 = <&uart5_pins>;
108        status = "disabled";
109 };
110
111 &dma {
112         status = "okay";
113 };
114
115 &trng {
116         status = "okay";
117 };
118
119 &crypto {
120         status = "okay";
121 };
122
123 &sec_dma {
124         status = "okay";
125 };
126
127 &i2c0 {
128         clock-frequency = <100000>;
129         i2c-sda-hold-time-ns = <300>;
130         i2c-sda-falling-time-ns = <510>;
131         i2c-scl-falling-time-ns = <510>;
132         auto_calc_scl_lhcnt;
133         pinctrl-names = "default";
134         pinctrl-0 = <&i2c0_pins>;
135         status = "disabled";
136
137         ac108_a: ac108@3b {
138                 compatible = "x-power,ac108_0";
139                 reg = <0x3b>;
140                 #sound-dai-cells = <0>;
141                 data-protocol = <0>;
142         };
143
144         wm8960: codec@1a {
145                 compatible = "wlf,wm8960";
146                 reg = <0x1a>;
147                 #sound-dai-cells = <0>;
148
149                 wlf,shared-lrclk;
150         };
151 };
152
153 &i2c1 {
154         clock-frequency = <100000>;
155         i2c-sda-hold-time-ns = <300>;
156         i2c-sda-falling-time-ns = <510>;
157         i2c-scl-falling-time-ns = <510>;
158         auto_calc_scl_lhcnt;
159         pinctrl-names = "default";
160         pinctrl-0 = <&i2c1_pins>;
161         status = "disabled";
162 };
163
164 &i2c2 {
165         clock-frequency = <100000>;
166         i2c-sda-hold-time-ns = <300>;
167         i2c-sda-falling-time-ns = <510>;
168         i2c-scl-falling-time-ns = <510>;
169         auto_calc_scl_lhcnt;
170         pinctrl-names = "default";
171         pinctrl-0 = <&i2c2_pins>;
172         status = "okay";
173
174         seeed_plane_i2c@45 {
175                 compatible = "seeed_panel";
176                 reg = <0x45>;
177
178                 port {
179                         panel_dsi_port: endpoint {
180                                 remote-endpoint = <&dsi_out_port>;
181                         };
182                 };
183         };
184
185 };
186
187 &i2c3 {
188         clock-frequency = <100000>;
189         i2c-sda-hold-time-ns = <300>;
190         i2c-sda-falling-time-ns = <510>;
191         i2c-scl-falling-time-ns = <510>;
192         auto_calc_scl_lhcnt;
193         pinctrl-names = "default";
194         pinctrl-0 = <&i2c3_pins>;
195         status = "disabled";
196 };
197
198 &i2c4 {
199         clock-frequency = <100000>;
200         i2c-sda-hold-time-ns = <300>;
201         i2c-sda-falling-time-ns = <510>;
202         i2c-scl-falling-time-ns = <510>;
203         auto_calc_scl_lhcnt;
204         pinctrl-names = "default";
205         pinctrl-0 = <&i2c4_pins>;
206         status = "okay";
207
208         sc2235: sc2235@30 {
209                 compatible = "smartsens,sc2235";
210                 reg = <0x30>;
211                 clocks = <&clk_ext_camera>;
212                 clock-names = "xclk";
213
214                 port {
215                         /* Parallel bus endpoint */
216                         sc2235_to_parallel: endpoint {
217                                 remote-endpoint = <&parallel_from_sc2235>;
218                                 bus-type = <5>;      /* Parallel */
219                                 bus-width = <8>;
220                                 data-shift = <2>; /* lines 13:6 are used */
221                                 hsync-active = <1>;
222                                 vsync-active = <1>;
223                                 pclk-sample = <1>;
224                         };
225                 };
226         };
227
228         tda998x@70 {
229                 compatible = "nxp,tda998x";
230                 reg = <0x70>;
231
232                 port {
233                         tda998x_0_input: endpoint {
234                                 remote-endpoint = <&hdmi_out>;
235                         };
236                 };
237         };
238 };
239
240 &i2c5 {
241         clock-frequency = <100000>;
242         i2c-sda-hold-time-ns = <300>;
243         i2c-sda-falling-time-ns = <510>;
244         i2c-scl-falling-time-ns = <510>;
245         auto_calc_scl_lhcnt;
246         pinctrl-names = "default";
247         pinctrl-0 = <&i2c5_pins>;
248         status = "okay";
249 };
250
251 &i2c6 {
252         clock-frequency = <100000>;
253         i2c-sda-hold-time-ns = <300>;
254         i2c-sda-falling-time-ns = <510>;
255         i2c-scl-falling-time-ns = <510>;
256         auto_calc_scl_lhcnt;
257         pinctrl-names = "default";
258         pinctrl-0 = <&i2c6_pins>;
259         status = "okay";
260
261         ov4689: ov4689@36 {
262                 compatible = "ovti,ov4689";
263                 reg = <0x36>;
264                 clocks = <&clk_ext_camera>;
265                 clock-names = "xclk";
266                 //reset-gpio = <&gpio 18 0>;
267                 rotation = <180>;
268
269                 port {
270                         /* Parallel bus endpoint */
271                         ov4689_to_csi2rx0: endpoint {
272                                 remote-endpoint = <&csi2rx0_from_ov4689>;
273                                 bus-type = <4>;         /* MIPI CSI-2 D-PHY */
274                                 clock-lanes = <0>;
275                                 data-lanes = <1 2 3 4>;
276                         };
277                 };
278         };
279
280         imx219: imx219@10 {
281                 compatible = "sony,imx219";
282                 reg = <0x10>;
283                 clocks = <&clk_ext_camera>;
284                 clock-names = "xclk";
285                 //reset-gpio = <&gpio 10 0>;
286                 //DOVDD-supply = <&v2v8>;
287                 pinctrl-names = "default", "power_up", "power_down";
288                 pinctrl-0 = <&csi_pins_default>;
289                 pinctrl-1 = <&csi_pins_pwup>;
290                 pinctrl-2 = <&csi_pins_pwdn>;
291                 rotation = <0>;
292                 orientation = <1>; //CAMERA_ORIENTATION_BACK
293
294                 port {
295                         /* CSI2 bus endpoint */
296                         imx219_to_csi2rx0: endpoint {
297                                 remote-endpoint = <&csi2rx0_from_imx219>;
298                                 bus-type = <4>;      /* MIPI CSI-2 D-PHY */
299                                 clock-lanes = <0>;
300                                 data-lanes = <2 1>;
301                                 lane-polarities = <1 1 1>;
302                                 link-frequencies = /bits/ 64 <456000000>;
303                         };
304                 };
305         };
306 };
307
308 &sdio0 {
309         status = "disabled";
310 };
311
312 &sdio1 {
313         status = "disabled";
314 };
315
316 &vin_sysctl {
317         status = "okay";
318
319         ports {
320                 #address-cells = <1>;
321                 #size-cells = <0>;
322
323                 port@0 {
324                         reg = <0>;
325                         #address-cells = <1>;
326                         #size-cells = <0>;
327
328                         /* Parallel bus endpoint */
329                         parallel_from_sc2235: endpoint@0 {
330                                 reg = <0>;
331                                 remote-endpoint = <&sc2235_to_parallel>;
332                                 bus-type = <5>;         /* Parallel */
333                                 bus-width = <8>;
334                                 data-shift = <2>;       /* lines 9:2 are used */
335                                 hsync-active = <1>;
336                                 vsync-active = <0>;
337                                 pclk-sample = <1>;
338                                 status = "okay";
339                         };
340                 };
341
342                 port@1 {
343                         reg = <1>;
344                         #address-cells = <1>;
345                         #size-cells = <0>;
346
347                         /* CSI2 bus endpoint */
348                         csi2rx0_from_ov4689: endpoint@0 {
349                                 reg = <0>;
350                                 remote-endpoint = <&ov4689_to_csi2rx0>;
351                                 bus-type = <4>;      /* MIPI CSI-2 D-PHY */
352                                 clock-lanes = <0>;
353                                 data-lanes = <1 2 3 4>;
354                                 status = "okay";
355                         };
356
357                         /* CSI2 bus endpoint */
358                         csi2rx0_from_imx219: endpoint@1 {
359                                 reg = <1>;
360                                 remote-endpoint = <&imx219_to_csi2rx0>;
361                                 bus-type = <4>;      /* MIPI CSI-2 D-PHY */
362                                 clock-lanes = <0>;
363                                 data-lanes = <2 1>;
364                                 lane-polarities = <1 1 1>;
365                                 status = "okay";
366                         };
367                 };
368         };
369 };
370
371 &sfctemp {
372         status = "okay";
373 };
374
375 &jpu {
376         status = "okay";
377 };
378
379 &vpu_dec {
380         status = "okay";
381 };
382
383 &vpu_enc {
384         status = "okay";
385 };
386
387 &gmac0 {
388         status = "okay";
389         #address-cells = <1>;
390         #size-cells = <0>;
391         phy0: ethernet-phy@0 {
392                 rxc_dly_en = <0>;
393                 tx_delay_sel_fe = <5>;
394                 tx_delay_sel = <11>;
395         };
396 };
397
398 &gmac1 {
399         #address-cells = <1>;
400         #size-cells = <0>;
401         status = "okay";
402         phy1: ethernet-phy@1 {
403                 rxc-skew-ps = <1060>;
404                 txc-skew-ps = <1800>;
405                 reg = <0>;
406         };
407 };
408
409 &gpu {
410         status = "okay";
411 };
412
413 &can0 {
414         pinctrl-names = "default";
415         pinctrl-0 = <&can0_pins>;
416         status = "disabled";
417 };
418
419 &can1 {
420         pinctrl-names = "default";
421         pinctrl-0 = <&can1_pins>;
422         status = "disabled";
423 };
424
425 &tdm {
426         pinctrl-names = "default";
427         pinctrl-0 = <&tdm0_pins>;
428         status = "disabled";
429 };
430
431 &spdif0 {
432         pinctrl-names = "default";
433         pinctrl-0 = <&spdif0_pins>;
434         status = "disabled";
435 };
436
437 &pwmdac {
438         pinctrl-names = "default";
439         pinctrl-0 = <&pwmdac0_pins>;
440         status = "disabled";
441 };
442
443 &i2stx {
444         status = "disabled";
445 };
446
447 &pdm {
448         pinctrl-names = "default";
449         pinctrl-0 = <&pdm0_pins>;
450         status = "disabled";
451 };
452
453 &i2srx_mst {
454         pinctrl-names = "default";
455         pinctrl-0 = <&i2srx_clk_pins>;
456         status = "disabled";
457 };
458
459 &i2srx_3ch {
460         pinctrl-names = "default";
461         pinctrl-0 = <&i2s_clk_pins &i2srx_pins>;
462         status = "disabled";
463 };
464
465 &i2stx_4ch0 {
466         status = "disabled";
467 };
468
469 &i2stx_4ch1 {
470         pinctrl-names = "default";
471         pinctrl-0 = <&i2stx_pins>;
472         status = "disabled";
473 };
474
475 &spdif_transmitter {
476         status = "disabled";
477 };
478
479 &pwmdac_codec {
480         status = "okay";
481 };
482
483 &dmic_codec {
484         status = "okay";
485 };
486
487 &spi0 {
488         pinctrl-names = "default";
489         pinctrl-0 = <&ssp0_pins>;
490         status = "disabled";
491
492         spi_dev0: spi@0 {
493                 compatible = "rohm,dh2228fv";
494                 pl022,com-mode = <1>;
495                 spi-max-frequency = <10000000>;
496                 reg = <0>;
497                 status = "okay";
498         };
499 };
500
501 &spi1 {
502         pinctrl-names = "default";
503         pinctrl-0 = <&ssp1_pins>;
504         status = "disabled";
505
506         spi_dev1: spi@0 {
507                 compatible = "rohm,dh2228fv";
508                 pl022,com-mode = <1>;
509                 spi-max-frequency = <10000000>;
510                 reg = <0>;
511                 status = "okay";
512         };
513 };
514
515 &spi2 {
516         pinctrl-names = "default";
517         pinctrl-0 = <&ssp2_pins>;
518         status = "disabled";
519
520         spi_dev2: spi@0 {
521                 compatible = "rohm,dh2228fv";
522                 pl022,com-mode = <1>;
523                 spi-max-frequency = <10000000>;
524                 reg = <0>;
525                 status = "okay";
526         };
527 };
528
529 &spi3 {
530         pinctrl-names = "default";
531         pinctrl-0 = <&ssp3_pins>;
532         status = "disabled";
533
534         spi_dev3: spi@0 {
535                 compatible = "rohm,dh2228fv";
536                 pl022,com-mode = <1>;
537                 spi-max-frequency = <10000000>;
538                 reg = <0>;
539                 status = "okay";
540         };
541 };
542
543 &spi4 {
544         pinctrl-names = "default";
545         pinctrl-0 = <&ssp4_pins>;
546         status = "disabled";
547
548         spi_dev4: spi@0 {
549                 compatible = "rohm,dh2228fv";
550                 pl022,com-mode = <1>;
551                 spi-max-frequency = <10000000>;
552                 reg = <0>;
553                 status = "okay";
554         };
555 };
556
557 &spi5 {
558         pinctrl-names = "default";
559         pinctrl-0 = <&ssp5_pins>;
560         status = "disabled";
561
562         spi_dev5: spi@0 {
563                 compatible = "rohm,dh2228fv";
564                 pl022,com-mode = <1>;
565                 spi-max-frequency = <10000000>;
566                 reg = <0>;
567                 status = "okay";
568         };
569 };
570
571 &spi6 {
572         pinctrl-names = "default";
573         pinctrl-0 = <&ssp6_pins>;
574         status = "disabled";
575
576         spi_dev6: spi@0 {
577                 compatible = "rohm,dh2228fv";
578                 pl022,com-mode = <1>;
579                 spi-max-frequency = <10000000>;
580                 reg = <0>;
581                 status = "okay";
582         };
583 };
584
585 &pcie0 {
586         pinctrl-names = "perst-default", "perst-active", "power-active";
587         pinctrl-0 = <&pcie0_perst_default>;
588         pinctrl-1 = <&pcie0_perst_active>;
589         pinctrl-2 = <&pcie0_power_active>;
590         status = "disabled";
591 };
592
593 &pcie1 {
594         pinctrl-names = "perst-default", "perst-active", "power-active";
595         pinctrl-0 = <&pcie1_perst_default>;
596         pinctrl-1 = <&pcie1_perst_active>;
597         pinctrl-2 = <&pcie1_power_active>;
598         status = "disabled";
599 };
600
601 &mailbox_contrl0 {
602         status = "okay";
603 };
604
605 &mailbox_client0 {
606         status = "okay";
607 };
608
609 &display {
610         status = "okay";
611 };
612
613 &hdmi {
614         status = "okay";
615         pinctrl-names = "default";
616         pinctrl-0 = <&inno_hdmi_pins>;
617
618         hdmi_in: port {
619                 #address-cells = <1>;
620                 #size-cells = <0>;
621                 hdmi_in_lcdc: endpoint@0 {
622                         reg = <0>;
623                         remote-endpoint = <&dc_out_dpi1>;
624                 };
625         };
626 };
627
628 &dc8200 {
629         status = "okay";
630
631         dc_out: port {
632                 #address-cells = <1>;
633                 #size-cells = <0>;
634                 dc_out_dpi0: endpoint@0 {
635                         reg = <0>;
636                         remote-endpoint = <&hdmi_input0>;
637                 };
638                 dc_out_dpi1: endpoint@1 {
639                         reg = <1>;
640                         remote-endpoint = <&hdmi_in_lcdc>;
641                 };
642
643                 dc_out_dpi2: endpoint@2 {
644                         reg = <2>;
645                         remote-endpoint = <&mipi_in>;
646                 };
647         };
648 };
649
650 &rgb_output {
651         status = "okay";
652
653         ports {
654                 #address-cells = <1>;
655                 #size-cells = <0>;
656                 port@0 {
657                         #address-cells = <1>;
658                         #size-cells = <0>;
659                         reg = <0>;
660                         hdmi_input0:endpoint@0 {
661                                 reg = <0>;
662                                 remote-endpoint = <&dc_out_dpi0>;
663                         };
664                 };
665                 port@1 {
666                         reg = <1>;
667                         hdmi_out:endpoint {
668                                 remote-endpoint = <&tda998x_0_input>;
669                         };
670                 };
671         };
672 };
673
674 &tda988x_pin {
675         pinctrl-names = "default";
676         pinctrl-0 = <&rgb_pad_pins>;
677         status = "disabled";
678 };
679
680 &dsi_output {
681         status = "okay";
682
683         ports {
684                 #address-cells = <1>;
685                 #size-cells = <0>;
686
687                 port@0 {
688                         reg = <0>;
689                         mipi_in: endpoint {
690                                 remote-endpoint = <&dc_out_dpi2>;
691                         };
692                 };
693
694                 port@1 {
695                         reg = <1>;
696                         mipi_out: endpoint {
697                                 remote-endpoint = <&dsi_in_port>;
698                         };
699                 };
700         };
701 };
702
703 &mipi_dsi {
704         status = "okay";
705 };
706
707 &mipi_dphy {
708         status = "okay";
709 };
710
711 &co_process {
712         status = "okay";
713 };
714
715 &usbdrd30 {
716         pinctrl-names = "default";
717         pinctrl-0 = <&usb_pins>;
718         dr_mode = "host"; /*host or peripheral*/
719         status = "disabled";
720 };
721
722 &xrp {
723         status = "okay";
724 };