Merge branch 'CR_1490_7110_evb_5.15_mipitx_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 = <3000>;
131         i2c-scl-falling-time-ns = <3000>;
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 = <3000>;
157         i2c-scl-falling-time-ns = <3000>;
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 = <3000>;
168         i2c-scl-falling-time-ns = <3000>;
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 = <3000>;
191         i2c-scl-falling-time-ns = <3000>;
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 = <3000>;
202         i2c-scl-falling-time-ns = <3000>;
203         auto_calc_scl_lhcnt;
204         pinctrl-names = "default";
205         pinctrl-0 = <&i2c4_pins>;
206         status = "okay";
207
208         sc2235: sc2235@30 {
209                 compatible = "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 = <3000>;
244         i2c-scl-falling-time-ns = <3000>;
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 = <3000>;
255         i2c-scl-falling-time-ns = <3000>;
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@10 {
281                 compatible = "imx219";
282                 reg = <0x10>;
283                 clocks = <&clk_ext_camera>;
284                 clock-names = "xclk";
285                 //reset-gpio = <&gpio 18 0>;
286                 //DOVDD-supply = <&v2v8>;
287                 rotation = <0>;
288                 orientation = <1>; //CAMERA_ORIENTATION_BACK
289
290                 port {
291                         /* CSI2 bus endpoint */
292                         imx219_to_csi2rx0: endpoint {
293                                 remote-endpoint = <&csi2rx0_from_imx219>;
294                                 bus-type = <4>;      /* MIPI CSI-2 D-PHY */
295                                 clock-lanes = <0>;
296                                 data-lanes = <2 1>;
297                                 lane-polarities = <1 1 1>;
298                                 link-frequencies = /bits/ 64 <456000000>;
299                         };
300                 };
301         };
302 };
303
304 &sdio0 {
305         status = "disabled";
306 };
307
308 &sdio1 {
309         status = "disabled";
310 };
311
312 &vin_sysctl {
313         /* when use dvp open this pinctrl*/
314         status = "okay";
315
316         ports {
317                 #address-cells = <1>;
318                 #size-cells = <0>;
319
320                 port@2 {
321                         reg = <2>;
322                         #address-cells = <1>;
323                         #size-cells = <0>;
324
325                         /* Parallel bus endpoint */
326                         parallel_from_sc2235: endpoint@0 {
327                                 reg = <0>;
328                                 remote-endpoint = <&sc2235_to_parallel>;
329                                 bus-type = <5>;         /* Parallel */
330                                 bus-width = <8>;
331                                 data-shift = <2>;       /* lines 9:2 are used */
332                                 hsync-active = <1>;
333                                 vsync-active = <0>;
334                                 pclk-sample = <1>;
335                                 status = "okay";
336                         };
337                 };
338
339                 port@3 {
340                         reg = <3>;
341                         #address-cells = <1>;
342                         #size-cells = <0>;
343
344                         /* CSI2 bus endpoint */
345                         csi2rx0_from_ov4689: endpoint@0 {
346                                 reg = <0>;
347                                 remote-endpoint = <&ov4689_to_csi2rx0>;
348                                 bus-type = <4>;      /* MIPI CSI-2 D-PHY */
349                                 clock-lanes = <0>;
350                                 data-lanes = <1 2 3 4>;
351                                 status = "okay";
352                         };
353
354                         /* CSI2 bus endpoint */
355                         csi2rx0_from_imx219: endpoint@1 {
356                                 reg = <1>;
357                                 remote-endpoint = <&imx219_to_csi2rx0>;
358                                 bus-type = <4>;      /* MIPI CSI-2 D-PHY */
359                                 clock-lanes = <0>;
360                                 data-lanes = <2 1>;
361                                 lane-polarities = <1 1 1>;
362                                 status = "okay";
363                         };
364                 };
365         };
366 };
367
368 &sfctemp {
369         status = "okay";
370 };
371
372 &jpu {
373         status = "okay";
374 };
375
376 &vpu_dec {
377         status = "okay";
378 };
379
380 &vpu_enc {
381         status = "okay";
382 };
383
384 &gmac0 {
385         status = "okay";
386 };
387
388 &gmac1 {
389         #address-cells = <1>;
390         #size-cells = <0>;
391         status = "okay";
392         phy0: ethernet-phy@0 {
393                 rxc-skew-ps = <1060>;
394                 txc-skew-ps = <1800>;
395                 reg = <0>;
396         };
397 };
398
399 &gpu {
400         status = "okay";
401 };
402
403 &can0 {
404         pinctrl-names = "default";
405         pinctrl-0 = <&can0_pins>;
406         status = "disabled";
407 };
408
409 &can1 {
410         pinctrl-names = "default";
411         pinctrl-0 = <&can1_pins>;
412         status = "disabled";
413 };
414
415 &tdm {
416         pinctrl-names = "default";
417         pinctrl-0 = <&tdm0_pins>;
418         status = "disabled";
419 };
420
421 &spdif0 {
422         pinctrl-names = "default";
423         pinctrl-0 = <&spdif0_pins>;
424         status = "disabled";
425 };
426
427 &pwmdac {
428         pinctrl-names = "default";
429         pinctrl-0 = <&pwmdac0_pins>;
430         status = "disabled";
431 };
432
433 &i2stx {
434         status = "disabled";
435 };
436
437 &pdm {
438         pinctrl-names = "default";
439         pinctrl-0 = <&pdm0_pins>;
440         status = "disabled";
441 };
442
443 &i2srx_mst {
444         pinctrl-names = "default";
445         pinctrl-0 = <&i2srx_clk_pins>;
446         status = "disabled";
447 };
448
449 &i2srx_3ch {
450         pinctrl-names = "default";
451         pinctrl-0 = <&i2srx_pins>;
452         status = "disabled";
453 };
454
455 &i2stx_4ch0 {
456         status = "disabled";
457 };
458
459 &i2stx_4ch1 {
460         pinctrl-names = "default";
461         pinctrl-0 = <&i2s_clk_pins &i2stx_pins>;
462         status = "disabled";
463 };
464
465 &spdif_transmitter {
466         compatible = "linux,spdif-dit";
467         #sound-dai-cells = <0>;
468         status = "disabled";
469 };
470
471 &spdif_receiver {
472         compatible = "linux,spdif-dir";
473         #sound-dai-cells = <0>;
474         status = "disabled";
475 };
476
477 &pwmdac_codec {
478         status = "okay";
479 };
480
481 &dmic_codec {
482         status = "okay";
483 };
484
485 &spi0 {
486         pinctrl-names = "default";
487         pinctrl-0 = <&ssp0_pins>;
488         status = "disabled";
489
490         spi_dev0: spi@0 {
491                 compatible = "rohm,dh2228fv";
492                 pl022,com-mode = <1>;
493                 spi-max-frequency = <10000000>;
494                 reg = <0>;
495                 status = "okay";
496         };
497 };
498
499 &spi1 {
500         pinctrl-names = "default";
501         pinctrl-0 = <&ssp1_pins>;
502         status = "disabled";
503
504         spi_dev1: spi@0 {
505                 compatible = "rohm,dh2228fv";
506                 pl022,com-mode = <1>;
507                 spi-max-frequency = <10000000>;
508                 reg = <0>;
509                 status = "okay";
510         };
511 };
512
513 &spi2 {
514         pinctrl-names = "default";
515         pinctrl-0 = <&ssp2_pins>;
516         status = "disabled";
517
518         spi_dev2: spi@0 {
519                 compatible = "rohm,dh2228fv";
520                 pl022,com-mode = <1>;
521                 spi-max-frequency = <10000000>;
522                 reg = <0>;
523                 status = "okay";
524         };
525 };
526
527 &spi3 {
528         pinctrl-names = "default";
529         pinctrl-0 = <&ssp3_pins>;
530         status = "disabled";
531
532         spi_dev3: spi@0 {
533                 compatible = "rohm,dh2228fv";
534                 pl022,com-mode = <1>;
535                 spi-max-frequency = <10000000>;
536                 reg = <0>;
537                 status = "okay";
538         };
539 };
540
541 &spi4 {
542         pinctrl-names = "default";
543         pinctrl-0 = <&ssp4_pins>;
544         status = "disabled";
545
546         spi_dev4: spi@0 {
547                 compatible = "rohm,dh2228fv";
548                 pl022,com-mode = <1>;
549                 spi-max-frequency = <10000000>;
550                 reg = <0>;
551                 status = "okay";
552         };
553 };
554
555 &spi5 {
556         pinctrl-names = "default";
557         pinctrl-0 = <&ssp5_pins>;
558         status = "disabled";
559
560         spi_dev5: spi@0 {
561                 compatible = "rohm,dh2228fv";
562                 pl022,com-mode = <1>;
563                 spi-max-frequency = <10000000>;
564                 reg = <0>;
565                 status = "okay";
566         };
567 };
568
569 &spi6 {
570         pinctrl-names = "default";
571         pinctrl-0 = <&ssp6_pins>;
572         status = "disabled";
573
574         spi_dev6: spi@0 {
575                 compatible = "rohm,dh2228fv";
576                 pl022,com-mode = <1>;
577                 spi-max-frequency = <10000000>;
578                 reg = <0>;
579                 status = "okay";
580         };
581 };
582
583 &pcie0 {
584         pinctrl-names = "perst-default", "perst-active", "power-active";
585         pinctrl-0 = <&pcie0_perst_default>;
586         pinctrl-1 = <&pcie0_perst_active>;
587         pinctrl-2 = <&pcie0_power_active>;
588         status = "disabled";
589 };
590
591 &pcie1 {
592         pinctrl-names = "perst-default", "perst-active", "power-active";
593         pinctrl-0 = <&pcie1_perst_default>;
594         pinctrl-1 = <&pcie1_perst_active>;
595         pinctrl-2 = <&pcie1_power_active>;
596         status = "disabled";
597 };
598
599 &mailbox_contrl0 {
600         status = "okay";
601 };
602
603 &mailbox_client0 {
604         status = "okay";
605 };
606
607 &display {
608         status = "okay";
609 };
610
611 &hdmi {
612         status = "okay";
613         pinctrl-names = "default";
614         pinctrl-0 = <&inno_hdmi_pins>;
615
616         hdmi_in: port {
617                 #address-cells = <1>;
618                 #size-cells = <0>;
619                 hdmi_in_lcdc: endpoint@0 {
620                         reg = <0>;
621                         remote-endpoint = <&dc_out_dpi1>;
622                 };
623         };
624 };
625
626 &dc8200 {
627         status = "okay";
628
629         dc_out: port {
630                 #address-cells = <1>;
631                 #size-cells = <0>;
632                 dc_out_dpi0: endpoint@0 {
633                         reg = <0>;
634                         remote-endpoint = <&hdmi_input0>;
635                 };
636                 dc_out_dpi1: endpoint@1 {
637                         reg = <1>;
638                         remote-endpoint = <&hdmi_in_lcdc>;
639                 };
640
641                 dc_out_dpi2: endpoint@2 {
642                         reg = <2>;
643                         remote-endpoint = <&mipi_in>;
644                 };
645         };
646 };
647
648 &hdmi_output {
649         status = "okay";
650
651         ports {
652                 #address-cells = <1>;
653                 #size-cells = <0>;
654                 port@0 {
655                         #address-cells = <1>;
656                         #size-cells = <0>;
657                         reg = <0>;
658                         hdmi_input0:endpoint@0 {
659                                 reg = <0>;
660                                 remote-endpoint = <&dc_out_dpi0>;
661                         };
662                 };
663                 port@1 {
664                         reg = <1>;
665                         hdmi_out:endpoint {
666                                 remote-endpoint = <&tda998x_0_input>;
667                         };
668                 };
669         };
670 };
671
672 &tda988x_pin {
673         pinctrl-names = "default";
674         pinctrl-0 = <&rgb_pad_pins>;
675         status = "disabled";
676 };
677
678 &encoder {
679         status = "okay";
680
681         ports {
682                 #address-cells = <1>;
683                 #size-cells = <0>;
684
685                 port@0 {
686                         reg = <0>;
687                         mipi_in: endpoint {
688                                 remote-endpoint = <&dc_out_dpi2>;
689                         };
690                 };
691
692                 port@1 {
693                         reg = <1>;
694                         mipi_out: endpoint {
695                                 remote-endpoint = <&dsi_in_port>;
696                         };
697                 };
698         };
699 };
700
701 &mipi_dsi {
702         status = "okay";
703 };
704
705 &mipi_dphy {
706         status = "okay";
707 };
708
709 &co_process {
710         status = "okay";
711 };
712
713 &usbdrd30 {
714         pinctrl-names = "default";
715         pinctrl-0 = <&usb_pins>;
716         dr_mode = "host"; /*host or peripheral*/
717         status = "disabled";
718 };
719
720 &xrp {
721         status = "okay";
722 };