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