v4l2: modify v4l2 compatible name
[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         compatible = "linux,spdif-dit";
477         #sound-dai-cells = <0>;
478         status = "disabled";
479 };
480
481 &spdif_receiver {
482         compatible = "linux,spdif-dir";
483         #sound-dai-cells = <0>;
484         status = "disabled";
485 };
486
487 &pwmdac_codec {
488         status = "okay";
489 };
490
491 &dmic_codec {
492         status = "okay";
493 };
494
495 &spi0 {
496         pinctrl-names = "default";
497         pinctrl-0 = <&ssp0_pins>;
498         status = "disabled";
499
500         spi_dev0: spi@0 {
501                 compatible = "rohm,dh2228fv";
502                 pl022,com-mode = <1>;
503                 spi-max-frequency = <10000000>;
504                 reg = <0>;
505                 status = "okay";
506         };
507 };
508
509 &spi1 {
510         pinctrl-names = "default";
511         pinctrl-0 = <&ssp1_pins>;
512         status = "disabled";
513
514         spi_dev1: spi@0 {
515                 compatible = "rohm,dh2228fv";
516                 pl022,com-mode = <1>;
517                 spi-max-frequency = <10000000>;
518                 reg = <0>;
519                 status = "okay";
520         };
521 };
522
523 &spi2 {
524         pinctrl-names = "default";
525         pinctrl-0 = <&ssp2_pins>;
526         status = "disabled";
527
528         spi_dev2: spi@0 {
529                 compatible = "rohm,dh2228fv";
530                 pl022,com-mode = <1>;
531                 spi-max-frequency = <10000000>;
532                 reg = <0>;
533                 status = "okay";
534         };
535 };
536
537 &spi3 {
538         pinctrl-names = "default";
539         pinctrl-0 = <&ssp3_pins>;
540         status = "disabled";
541
542         spi_dev3: spi@0 {
543                 compatible = "rohm,dh2228fv";
544                 pl022,com-mode = <1>;
545                 spi-max-frequency = <10000000>;
546                 reg = <0>;
547                 status = "okay";
548         };
549 };
550
551 &spi4 {
552         pinctrl-names = "default";
553         pinctrl-0 = <&ssp4_pins>;
554         status = "disabled";
555
556         spi_dev4: spi@0 {
557                 compatible = "rohm,dh2228fv";
558                 pl022,com-mode = <1>;
559                 spi-max-frequency = <10000000>;
560                 reg = <0>;
561                 status = "okay";
562         };
563 };
564
565 &spi5 {
566         pinctrl-names = "default";
567         pinctrl-0 = <&ssp5_pins>;
568         status = "disabled";
569
570         spi_dev5: spi@0 {
571                 compatible = "rohm,dh2228fv";
572                 pl022,com-mode = <1>;
573                 spi-max-frequency = <10000000>;
574                 reg = <0>;
575                 status = "okay";
576         };
577 };
578
579 &spi6 {
580         pinctrl-names = "default";
581         pinctrl-0 = <&ssp6_pins>;
582         status = "disabled";
583
584         spi_dev6: spi@0 {
585                 compatible = "rohm,dh2228fv";
586                 pl022,com-mode = <1>;
587                 spi-max-frequency = <10000000>;
588                 reg = <0>;
589                 status = "okay";
590         };
591 };
592
593 &pcie0 {
594         pinctrl-names = "perst-default", "perst-active", "power-active";
595         pinctrl-0 = <&pcie0_perst_default>;
596         pinctrl-1 = <&pcie0_perst_active>;
597         pinctrl-2 = <&pcie0_power_active>;
598         status = "disabled";
599 };
600
601 &pcie1 {
602         pinctrl-names = "perst-default", "perst-active", "power-active";
603         pinctrl-0 = <&pcie1_perst_default>;
604         pinctrl-1 = <&pcie1_perst_active>;
605         pinctrl-2 = <&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 &hdmi_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 &encoder {
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
715 &mipi_dphy {
716         status = "okay";
717 };
718
719 &co_process {
720         status = "okay";
721 };
722
723 &usbdrd30 {
724         pinctrl-names = "default";
725         pinctrl-0 = <&usb_pins>;
726         dr_mode = "host"; /*host or peripheral*/
727         status = "disabled";
728 };
729
730 &xrp {
731         status = "okay";
732 };