1 From 197d4096c697bcde8f9833b1d04b17eb2b232b85 Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Mon, 31 Oct 2022 22:59:00 -0500
4 Subject: [PATCH 88/90] sunxi: riscv: Copy in WIP version of devicetrees
6 While the bindings still are not stable, this should help things work
9 Signed-off-by: Samuel Holland <samuel@sholland.org>
11 .../riscv/dts/sun20i-d1-clockworkpi-v3.14.dts | 134 +++++++-
12 .../dts/sun20i-d1-common-regulators.dtsi | 13 +
13 arch/riscv/dts/sun20i-d1-devterm-v3.14.dts | 16 +
14 .../dts/sun20i-d1-dongshan-nezha-stu.dts | 48 ++-
15 .../dts/sun20i-d1-lichee-rv-86-panel-480p.dts | 51 +++
16 .../dts/sun20i-d1-lichee-rv-86-panel.dtsi | 64 ++++
17 arch/riscv/dts/sun20i-d1-lichee-rv-dock.dts | 98 ++++++
18 arch/riscv/dts/sun20i-d1-lichee-rv.dts | 6 +
19 arch/riscv/dts/sun20i-d1-mangopi-mq-pro.dts | 41 +++
20 arch/riscv/dts/sun20i-d1-nezha.dts | 117 ++++++-
21 arch/riscv/dts/sun20i-d1.dtsi | 314 +++++++++++++++++-
22 11 files changed, 881 insertions(+), 21 deletions(-)
24 --- a/arch/riscv/dts/sun20i-d1-clockworkpi-v3.14.dts
25 +++ b/arch/riscv/dts/sun20i-d1-clockworkpi-v3.14.dts
27 stdout-path = "serial0:115200n8";
30 + audio_amplifier: audio-amplifier {
31 + compatible = "simple-audio-amplifier";
32 + enable-gpios = <&pio 4 1 GPIO_ACTIVE_HIGH>; /* PE1/GPIO11 */
33 + sound-name-prefix = "Amplifier";
34 + VCC-supply = <®_vcc>;
38 + * FIXME: This is not really an amplifier, but the amplifier binding
39 + * has the needed properties and behavior.
41 + audio_switch: audio-switch {
42 + compatible = "simple-audio-amplifier";
43 + enable-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2/AUD_SWITCH */
44 + sound-name-prefix = "Switch";
45 + VCC-supply = <®_aldo1>;
48 + backlight: backlight {
49 + compatible = "pwm-backlight";
50 + power-supply = <®_vcc>;
51 + pwms = <&pwm 4 50000 0>; /* PD20/GPIO9 */
54 + bt_sco_codec: bt-sco-codec {
55 + #sound-dai-cells = <0>;
56 + compatible = "linux,bt-sco";
60 + compatible = "simple-audio-card";
61 + simple-audio-card,name = "Bluetooth";
62 + #address-cells = <1>;
65 + simple-audio-card,dai-link@0 {
67 + frame-master = <&bt_sound_cpu>;
68 + bitclock-master = <&bt_sound_cpu>;
71 + sound-dai = <&i2s1>;
75 + sound-dai = <&bt_sco_codec>;
80 + hdmi_connector: connector {
81 + compatible = "hdmi-connector";
85 + hdmi_connector_in: endpoint {
86 + remote-endpoint = <&hdmi_out_connector>;
92 * This regulator is PWM-controlled, but the PWM controller is not
93 * yet supported, so fix the regulator to its default voltage.
95 reg_vdd_cpu: vdd-cpu {
96 - compatible = "regulator-fixed";
97 + compatible = "pwm-regulator";
98 + pwms = <&pwm 0 50000 0>;
99 + pwm-supply = <®_vcc>;
100 regulator-name = "vdd-cpu";
101 - regulator-min-microvolt = <1100000>;
102 - regulator-max-microvolt = <1100000>;
103 - vin-supply = <®_vcc>;
104 + regulator-min-microvolt = <810000>;
105 + regulator-max-microvolt = <1160000>;
108 wifi_pwrseq: wifi-pwrseq {
114 + aux-devs = <&audio_amplifier>, <&audio_switch>;
115 + hp-det-gpio = <&pio 1 12 GPIO_ACTIVE_HIGH>; /* PB12/GPIO10 */
116 + pin-switches = "Internal Speakers";
117 + routing = "Internal Speakers", "Amplifier OUTL",
118 + "Internal Speakers", "Amplifier OUTR",
119 + "Amplifier INL", "Switch OUTL",
120 + "Amplifier INR", "Switch OUTR",
121 + "Headphone Jack", "Switch OUTL",
122 + "Headphone Jack", "Switch OUTR",
123 + "Switch INL", "HPOUTL",
124 + "Switch INR", "HPOUTR",
125 + "MICIN3", "Headset Microphone",
126 + "Headset Microphone", "HBIAS";
127 + widgets = "Microphone", "Headset Microphone",
128 + "Headphone", "Headphone Jack",
129 + "Speaker", "Internal Speakers";
133 cpu-supply = <®_vdd_cpu>;
149 + hdmi_out_connector: endpoint {
150 + remote-endpoint = <&hdmi_connector_in>;
159 pinctrl-0 = <&i2c0_pb10_pins>;
160 pinctrl-names = "default";
166 + pinctrl-0 = <&i2s1_clk_pins>, <&i2s1_din_pin>, <&i2s1_dout_pin>;
167 + pinctrl-names = "default";
177 vcc-pg-supply = <®_ldoa>;
179 + i2s1_clk_pins: i2s1-clk-pins {
180 + pins = "PG12", "PG13";
184 + i2s1_din_pin: i2s1-din-pin {
186 + function = "i2s1_din";
189 + i2s1_dout_pin: i2s1-dout-pin {
191 + function = "i2s1_dout";
196 + pinctrl-0 = <&pwm0_pd16_pin>, <&pwm4_pd20_pin>;
197 + pinctrl-names = "default";
202 --- a/arch/riscv/dts/sun20i-d1-common-regulators.dtsi
203 +++ b/arch/riscv/dts/sun20i-d1-common-regulators.dtsi
209 + avcc-supply = <®_aldo>;
210 + hpvcc-supply = <®_hpldo>;
214 + hvcc-supply = <®_ldoa>;
218 vref-supply = <®_aldo>;
221 regulator-max-microvolt = <1800000>;
222 ldo-in-supply = <®_vcc_3v3>;
226 + vref-supply = <®_aldo>;
228 --- a/arch/riscv/dts/sun20i-d1-devterm-v3.14.dts
229 +++ b/arch/riscv/dts/sun20i-d1-devterm-v3.14.dts
236 + pinctrl-0 = <&dsi_4lane_pins>;
237 + pinctrl-names = "default";
241 + compatible = "clockwork,cwd686";
243 + backlight = <&backlight>;
244 + reset-gpios = <&pio 3 19 GPIO_ACTIVE_LOW>; /* PD19/GPIO8 */
246 + iovcc-supply = <®_dcdc3>;
247 + vci-supply = <®_aldo2>;
250 --- a/arch/riscv/dts/sun20i-d1-dongshan-nezha-stu.dts
251 +++ b/arch/riscv/dts/sun20i-d1-dongshan-nezha-stu.dts
253 stdout-path = "serial0:115200n8";
256 + hdmi_connector: connector {
257 + compatible = "hdmi-connector";
261 + hdmi_connector_in: endpoint {
262 + remote-endpoint = <&hdmi_out_connector>;
268 compatible = "gpio-leds";
271 vin-supply = <®_vcc>;
275 - * This regulator is PWM-controlled, but the PWM controller is not
276 - * yet supported, so fix the regulator to its default voltage.
278 reg_vdd_cpu: vdd-cpu {
279 - compatible = "regulator-fixed";
280 + compatible = "pwm-regulator";
281 + pwms = <&pwm 0 50000 0>;
282 + pwm-supply = <®_vcc>;
283 regulator-name = "vdd-cpu";
284 - regulator-min-microvolt = <1100000>;
285 - regulator-max-microvolt = <1100000>;
286 - vin-supply = <®_vcc>;
287 + regulator-min-microvolt = <810000>;
288 + regulator-max-microvolt = <1160000>;
293 cpu-supply = <®_vdd_cpu>;
312 + hdmi_out_connector: endpoint {
313 + remote-endpoint = <&hdmi_connector_in>;
322 ext_rgmii_phy: ethernet-phy@1 {
323 compatible = "ethernet-phy-ieee802.3-c22";
329 + pinctrl-0 = <&pwm0_pd16_pin>;
330 + pinctrl-names = "default";
335 pinctrl-0 = <&uart0_pb8_pins>;
336 pinctrl-names = "default";
337 --- a/arch/riscv/dts/sun20i-d1-lichee-rv-86-panel-480p.dts
338 +++ b/arch/riscv/dts/sun20i-d1-lichee-rv-86-panel-480p.dts
340 model = "Sipeed Lichee RV 86 Panel (480p)";
341 compatible = "sipeed,lichee-rv-86-panel-480p", "sipeed,lichee-rv",
342 "allwinner,sun20i-d1";
344 + backlight: backlight {
345 + compatible = "pwm-backlight";
346 + power-supply = <®_vcc>;
347 + pwms = <&pwm 7 50000 0>;
351 + compatible = "spi-gpio";
352 + cs-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; /* PE14 */
353 + mosi-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>; /* PE12 */
354 + sck-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* PE15 */
355 + num-chipselects = <1>;
356 + #address-cells = <1>;
360 + compatible = "sitronix,st7701s";
362 + backlight = <&backlight>;
363 + reset-gpios = <&pio 6 13 GPIO_ACTIVE_LOW>; /* PG13 */
367 + panel_in_tcon_lcd0: endpoint {
368 + remote-endpoint = <&tcon_lcd0_out_panel>;
386 + pinctrl-0 = <&pwm7_pd22_pin>;
387 + pinctrl-names = "default";
392 + pinctrl-0 = <&lcd_rgb666_pins>;
393 + pinctrl-names = "default";
397 + tcon_lcd0_out_panel: endpoint {
398 + remote-endpoint = <&panel_in_tcon_lcd0>;
401 --- a/arch/riscv/dts/sun20i-d1-lichee-rv-86-panel.dtsi
402 +++ b/arch/riscv/dts/sun20i-d1-lichee-rv-86-panel.dtsi
407 + audio_amplifier: audio-amplifier {
408 + compatible = "simple-audio-amplifier";
409 + enable-gpios = <&pio 1 10 GPIO_ACTIVE_HIGH>; /* PB10 */
410 + sound-name-prefix = "Amplifier";
413 + dmic_codec: dmic-codec {
414 + compatible = "dmic-codec";
415 + num-channels = <2>;
416 + #sound-dai-cells = <0>;
420 + compatible = "simple-audio-card";
421 + simple-audio-card,name = "DMIC";
422 + #address-cells = <1>;
425 + simple-audio-card,dai-link@0 {
427 + frame-master = <&link0_cpu>;
428 + bitclock-master = <&link0_cpu>;
431 + sound-dai = <&dmic>;
434 + link0_codec: codec {
435 + sound-dai = <&dmic_codec>;
440 /* PC1 is repurposed as BT_WAKE_AP */
448 + aux-devs = <&audio_amplifier>;
449 + routing = "Internal Speaker", "Amplifier OUTL",
450 + "Internal Speaker", "Amplifier OUTR",
451 + "Amplifier INL", "HPOUTL",
452 + "Amplifier INR", "HPOUTR",
453 + "LINEINL", "HPOUTL",
454 + "LINEINR", "HPOUTR",
455 + "MICIN3", "Internal Microphone",
456 + "Internal Microphone", "HBIAS";
457 + widgets = "Microphone", "Internal Microphone",
458 + "Speaker", "Internal Speaker";
463 + pinctrl-0 = <&dmic_pb11_d0_pin>, <&dmic_pe17_clk_pin>;
464 + pinctrl-names = "default";
476 + dmic_pb11_d0_pin: dmic-pb11-d0-pin {
481 + dmic_pe17_clk_pin: dmic-pe17-clk-pin {
488 --- a/arch/riscv/dts/sun20i-d1-lichee-rv-dock.dts
489 +++ b/arch/riscv/dts/sun20i-d1-lichee-rv-dock.dts
491 ethernet1 = &rtl8723ds;
494 + dmic_codec: dmic-codec {
495 + compatible = "dmic-codec";
496 + num-channels = <2>;
497 + #sound-dai-cells = <0>;
501 + compatible = "simple-audio-card";
502 + simple-audio-card,name = "DMIC";
503 + #address-cells = <1>;
506 + simple-audio-card,dai-link@0 {
508 + frame-master = <&link0_cpu>;
509 + bitclock-master = <&link0_cpu>;
512 + sound-dai = <&dmic>;
515 + link0_codec: codec {
516 + sound-dai = <&dmic_codec>;
521 + hdmi_connector: connector {
522 + compatible = "hdmi-connector";
526 + hdmi_connector_in: endpoint {
527 + remote-endpoint = <&hdmi_out_connector>;
532 wifi_pwrseq: wifi-pwrseq {
533 compatible = "mmc-pwrseq-simple";
534 reset-gpios = <&pio 6 12 GPIO_ACTIVE_LOW>; /* PG12 */
539 + routing = "Internal Speaker", "HPOUTL",
540 + "Internal Speaker", "HPOUTR",
541 + "LINEINL", "HPOUTL",
542 + "LINEINR", "HPOUTR",
543 + "MICIN3", "Internal Microphone",
544 + "Internal Microphone", "HBIAS";
545 + widgets = "Microphone", "Internal Microphone",
546 + "Speaker", "Internal Speaker";
555 + pinctrl-0 = <&dmic_pb11_d0_pin>, <&dmic_pe17_clk_pin>;
556 + pinctrl-names = "default";
569 + hdmi_out_connector: endpoint {
570 + remote-endpoint = <&hdmi_connector_in>;
579 + pinctrl-0 = <&ledc_pc0_pin>;
580 + pinctrl-names = "default";
585 + color = <LED_COLOR_ID_RGB>;
586 + function = LED_FUNCTION_STATUS;
598 + dmic_pb11_d0_pin: dmic-pb11-d0-pin {
603 + dmic_pe17_clk_pin: dmic-pe17-clk-pin {
611 pinctrl-0 = <&uart1_pg6_pins>, <&uart1_pg8_rts_cts_pins>;
612 --- a/arch/riscv/dts/sun20i-d1-lichee-rv.dts
613 +++ b/arch/riscv/dts/sun20i-d1-lichee-rv.dts
619 + pinctrl-0 = <&spi0_pins>;
620 + pinctrl-names = "default";
625 pinctrl-0 = <&uart0_pb8_pins>;
626 pinctrl-names = "default";
627 --- a/arch/riscv/dts/sun20i-d1-mangopi-mq-pro.dts
628 +++ b/arch/riscv/dts/sun20i-d1-mangopi-mq-pro.dts
632 #include <dt-bindings/gpio/gpio.h>
633 +#include <dt-bindings/leds/common.h>
635 #include "sun20i-d1.dtsi"
636 #include "sun20i-d1-common-regulators.dtsi"
638 stdout-path = "serial0:115200n8";
641 + hdmi_connector: connector {
642 + compatible = "hdmi-connector";
646 + hdmi_connector_in: endpoint {
647 + remote-endpoint = <&hdmi_out_connector>;
653 + compatible = "pwm-leds";
656 + color = <LED_COLOR_ID_BLUE>;
657 + function = LED_FUNCTION_STATUS;
658 + max-brightness = <255>;
659 + pwms = <&pwm 2 50000 0>;
663 reg_avdd2v8: avdd2v8 {
664 compatible = "regulator-fixed";
665 regulator-name = "avdd2v8";
667 cpu-supply = <®_vdd_cpu>;
683 + hdmi_out_connector: endpoint {
684 + remote-endpoint = <&hdmi_connector_in>;
694 cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
695 --- a/arch/riscv/dts/sun20i-d1-nezha.dts
696 +++ b/arch/riscv/dts/sun20i-d1-nezha.dts
699 #include <dt-bindings/gpio/gpio.h>
700 #include <dt-bindings/input/input.h>
701 +#include <dt-bindings/leds/common.h>
703 #include "sun20i-d1.dtsi"
704 #include "sun20i-d1-common-regulators.dtsi"
713 stdout-path = "serial0:115200n8";
716 + hdmi_connector: connector {
717 + compatible = "hdmi-connector";
721 + hdmi_connector_in: endpoint {
722 + remote-endpoint = <&hdmi_out_connector>;
727 reg_usbvbus: usbvbus {
728 compatible = "regulator-fixed";
729 regulator-name = "usbvbus";
731 vin-supply = <®_vcc>;
735 - * This regulator is PWM-controlled, but the PWM controller is not
736 - * yet supported, so fix the regulator to its default voltage.
738 reg_vdd_cpu: vdd-cpu {
739 - compatible = "regulator-fixed";
740 + compatible = "pwm-regulator";
741 + pwms = <&pwm 0 50000 0>;
742 + pwm-supply = <®_vcc>;
743 regulator-name = "vdd-cpu";
744 - regulator-min-microvolt = <1100000>;
745 - regulator-max-microvolt = <1100000>;
746 - vin-supply = <®_vcc>;
747 + regulator-min-microvolt = <810000>;
748 + regulator-max-microvolt = <1160000>;
751 wifi_pwrseq: wifi-pwrseq {
757 + routing = "Headphone Jack", "HPOUTL",
758 + "Headphone Jack", "HPOUTR",
759 + "LINEINL", "HPOUTL",
760 + "LINEINR", "HPOUTR",
761 + "MICIN3", "Headset Microphone",
762 + "Headset Microphone", "HBIAS";
763 + widgets = "Microphone", "Headset Microphone",
764 + "Headphone", "Headphone Jack";
769 cpu-supply = <®_vdd_cpu>;
788 + hdmi_out_connector: endpoint {
789 + remote-endpoint = <&hdmi_connector_in>;
798 pinctrl-0 = <&i2c2_pb0_pins>;
799 pinctrl-names = "default";
805 + pinctrl-0 = <&ledc_pc0_pin>;
806 + pinctrl-names = "default";
811 + color = <LED_COLOR_ID_RGB>;
812 + function = LED_FUNCTION_STATUS;
824 + pinctrl-0 = <&pwm0_pd16_pin>;
825 + pinctrl-names = "default";
830 + pinctrl-0 = <&spi0_pins>;
831 + pinctrl-names = "default";
835 + compatible = "spi-nand";
839 + compatible = "fixed-partitions";
840 + #address-cells = <1>;
845 + reg = <0x00000000 0x00100000>;
850 + reg = <0x00100000 0x00300000>;
854 + label = "secure_storage";
855 + reg = <0x00400000 0x00100000>;
860 + reg = <0x00500000 0x0fb00000>;
867 + pinctrl-0 = <&spi1_pd_pins>;
868 + pinctrl-names = "default";
873 pinctrl-0 = <&uart0_pb8_pins>;
874 pinctrl-names = "default";
875 --- a/arch/riscv/dts/sun20i-d1.dtsi
876 +++ b/arch/riscv/dts/sun20i-d1.dtsi
883 + polling-delay = <0>;
884 + polling-delay-passive = <0>;
885 + thermal-sensors = <&ths>;
888 + cpu_target: cpu-target {
889 + hysteresis = <3000>;
890 + temperature = <85000>;
896 + temperature = <110000>;
903 + trip = <&cpu_target>;
904 + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
911 compatible = "simple-bus";
914 #interrupt-cells = <3>;
917 + dsi_4lane_pins: dsi-4lane-pins {
918 + pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5",
919 + "PD6", "PD7", "PD8", "PD9";
920 + drive-strength = <30>;
925 i2c0_pb10_pins: i2c0-pb10-pins {
926 pins = "PB10", "PB11";
932 + ledc_pc0_pin: ledc-pc0-pin {
938 mmc0_pins: mmc0-pins {
939 pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5";
945 + pwm0_pd16_pin: pwm0-pd16-pin {
951 + pwm2_pd18_pin: pwm2-pd18-pin {
957 + pwm4_pd20_pin: pwm4-pd20-pin {
963 + pwm7_pd22_pin: pwm7-pd22-pin {
969 + spi0_pins: spi0-pins {
970 + pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7";
975 + spi1_pb_pins: spi1-pb-pins {
976 + pins = "PB0", "PB8", "PB9", "PB10", "PB11", "PB12";
981 + spi1_pd_pins: spi1-pd-pins {
982 + pins = "PD10", "PD11", "PD12", "PD13", "PD14", "PD15";
987 uart0_pb8_pins: uart0-pb8-pins {
995 + compatible = "allwinner,sun20i-d1-pwm";
996 + reg = <0x2000c00 0x400>;
997 + interrupts = <34 IRQ_TYPE_LEVEL_HIGH>;
998 + clocks = <&ccu CLK_BUS_PWM>, <&osc24M>;
999 + clock-names = "bus", "mod";
1000 + resets = <&ccu RST_BUS_PWM>;
1001 + status = "disabled";
1005 ccu: clock-controller@2001000 {
1006 compatible = "allwinner,sun20i-d1-ccu";
1007 reg = <0x2001000 0x1000>;
1008 @@ -178,6 +274,33 @@
1012 + ledc: led-controller@2008000 {
1013 + compatible = "allwinner,sun20i-d1-ledc",
1014 + "allwinner,sun50i-a100-ledc";
1015 + reg = <0x2008000 0x400>;
1016 + interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
1017 + clocks = <&ccu CLK_BUS_LEDC>, <&ccu CLK_LEDC>;
1018 + clock-names = "bus", "mod";
1019 + resets = <&ccu RST_BUS_LEDC>;
1022 + status = "disabled";
1023 + #address-cells = <1>;
1024 + #size-cells = <0>;
1027 + ths: temperature-sensor@2009400 {
1028 + compatible = "allwinner,sun20i-d1-ths";
1029 + reg = <0x2009400 0x400>;
1030 + interrupts = <74 IRQ_TYPE_LEVEL_HIGH>;
1031 + clocks = <&ccu CLK_BUS_THS>, <&osc24M>;
1032 + clock-names = "bus", "mod";
1033 + resets = <&ccu RST_BUS_THS>;
1034 + nvmem-cells = <&ths_calib>;
1035 + nvmem-cell-names = "calibration";
1036 + #thermal-sensor-cells = <0>;
1039 lradc: keys@2009800 {
1040 compatible = "allwinner,sun20i-d1-lradc",
1041 "allwinner,sun50i-r329-lradc";
1042 @@ -188,11 +311,30 @@
1043 status = "disabled";
1046 + iommu: iommu@2010000 {
1047 + compatible = "allwinner,sun20i-d1-iommu";
1048 + reg = <0x2010000 0x10000>;
1049 + interrupts = <80 IRQ_TYPE_LEVEL_HIGH>;
1050 + clocks = <&ccu CLK_BUS_IOMMU>;
1051 + #iommu-cells = <1>;
1054 codec: audio-codec@2030000 {
1055 - compatible = "simple-mfd", "syscon";
1056 + compatible = "allwinner,sun20i-d1-codec", "simple-mfd", "syscon";
1057 reg = <0x2030000 0x1000>;
1058 + interrupts = <41 IRQ_TYPE_LEVEL_HIGH>;
1059 + clocks = <&ccu CLK_BUS_AUDIO>,
1060 + <&ccu CLK_AUDIO_ADC>,
1061 + <&ccu CLK_AUDIO_DAC>,
1063 + <&rtc CLK_OSC32K>;
1064 + clock-names = "bus", "adc", "dac", "hosc", "losc";
1065 + resets = <&ccu RST_BUS_AUDIO>;
1066 + dmas = <&dma 7>, <&dma 7>;
1067 + dma-names = "rx", "tx";
1068 #address-cells = <1>;
1070 + #sound-dai-cells = <0>;
1072 regulators@2030348 {
1073 compatible = "allwinner,sun20i-d1-analog-ldos";
1074 @@ -208,6 +350,21 @@
1078 + dmic: dmic@2031000 {
1079 + compatible = "allwinner,sun20i-d1-dmic",
1080 + "allwinner,sun50i-h6-dmic";
1081 + reg = <0x2031000 0x400>;
1082 + interrupts = <40 IRQ_TYPE_LEVEL_HIGH>;
1083 + clocks = <&ccu CLK_BUS_DMIC>,
1085 + clock-names = "bus", "mod";
1086 + resets = <&ccu RST_BUS_DMIC>;
1089 + status = "disabled";
1090 + #sound-dai-cells = <0>;
1094 compatible = "allwinner,sun20i-d1-i2s",
1095 "allwinner,sun50i-r329-i2s";
1097 #sound-dai-cells = <0>;
1100 + // TODO: how to integrate ASRC? same or separate node?
1102 compatible = "allwinner,sun20i-d1-i2s",
1103 "allwinner,sun50i-r329-i2s";
1104 @@ -253,6 +411,22 @@
1105 #sound-dai-cells = <0>;
1108 + // TODO: add receive functionality
1109 + spdif: spdif@2036000 {
1110 + compatible = "allwinner,sun20i-d1-spdif";
1111 + reg = <0x2036000 0x400>;
1112 + interrupts = <39 IRQ_TYPE_LEVEL_HIGH>;
1113 + clocks = <&ccu CLK_BUS_SPDIF>,
1114 + <&ccu CLK_SPDIF_RX>,
1115 + <&ccu CLK_SPDIF_TX>;
1116 + clock-names = "apb", "rx", "tx";
1117 + resets = <&ccu RST_BUS_SPDIF>;
1118 + dmas = <&dma 2>, <&dma 2>;
1119 + dma-names = "rx", "tx";
1120 + status = "disabled";
1121 + #sound-dai-cells = <0>;
1124 timer: timer@2050000 {
1125 compatible = "allwinner,sun20i-d1-timer",
1126 "allwinner,sun8i-a23-timer";
1127 @@ -457,6 +631,18 @@
1131 + crypto: crypto@3040000 {
1132 + compatible = "allwinner,sun20i-d1-crypto";
1133 + reg = <0x3040000 0x800>;
1134 + interrupts = <68 IRQ_TYPE_LEVEL_HIGH>;
1135 + clocks = <&ccu CLK_BUS_CE>,
1137 + <&ccu CLK_MBUS_CE>,
1139 + clock-names = "bus", "mod", "ram", "trng";
1140 + resets = <&ccu RST_BUS_CE>;
1143 mbus: dram-controller@3102000 {
1144 compatible = "allwinner,sun20i-d1-mbus";
1145 reg = <0x3102000 0x1000>,
1146 @@ -525,6 +711,39 @@
1150 + spi0: spi@4025000 {
1151 + compatible = "allwinner,sun20i-d1-spi",
1152 + "allwinner,sun50i-r329-spi";
1153 + reg = <0x4025000 0x1000>;
1154 + interrupts = <31 IRQ_TYPE_LEVEL_HIGH>;
1155 + clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>;
1156 + clock-names = "ahb", "mod";
1157 + resets = <&ccu RST_BUS_SPI0>;
1158 + dmas = <&dma 22>, <&dma 22>;
1159 + dma-names = "rx", "tx";
1161 + status = "disabled";
1162 + #address-cells = <1>;
1163 + #size-cells = <0>;
1166 + spi1: spi@4026000 {
1167 + compatible = "allwinner,sun20i-d1-spi-dbi",
1168 + "allwinner,sun50i-r329-spi-dbi",
1169 + "allwinner,sun50i-r329-spi";
1170 + reg = <0x4026000 0x1000>;
1171 + interrupts = <32 IRQ_TYPE_LEVEL_HIGH>;
1172 + clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_SPI1>;
1173 + clock-names = "ahb", "mod";
1174 + resets = <&ccu RST_BUS_SPI1>;
1175 + dmas = <&dma 23>, <&dma 23>;
1176 + dma-names = "rx", "tx";
1178 + status = "disabled";
1179 + #address-cells = <1>;
1180 + #size-cells = <0>;
1183 usb_otg: usb@4100000 {
1184 compatible = "allwinner,sun20i-d1-musb",
1185 "allwinner,sun8i-a33-musb";
1187 <&display_clocks CLK_MIXER0>;
1188 clock-names = "bus", "mod";
1189 resets = <&display_clocks RST_MIXER0>;
1190 + iommus = <&iommu 2>;
1193 #address-cells = <1>;
1195 <&display_clocks CLK_MIXER1>;
1196 clock-names = "bus", "mod";
1197 resets = <&display_clocks RST_MIXER1>;
1198 + iommus = <&iommu 2>;
1201 #address-cells = <1>;
1202 @@ -690,6 +911,40 @@
1206 + dsi: dsi@5450000 {
1207 + compatible = "allwinner,sun20i-d1-mipi-dsi",
1208 + "allwinner,sun50i-a100-mipi-dsi";
1209 + reg = <0x5450000 0x1000>;
1210 + interrupts = <108 IRQ_TYPE_LEVEL_HIGH>;
1211 + clocks = <&ccu CLK_BUS_MIPI_DSI>,
1212 + <&tcon_top CLK_TCON_TOP_DSI>;
1213 + clock-names = "bus", "mod";
1214 + resets = <&ccu RST_BUS_MIPI_DSI>;
1216 + phy-names = "dphy";
1217 + status = "disabled";
1218 + #address-cells = <1>;
1219 + #size-cells = <0>;
1222 + dsi_in_tcon_lcd0: endpoint {
1223 + remote-endpoint = <&tcon_lcd0_out_dsi>;
1228 + dphy: phy@5451000 {
1229 + compatible = "allwinner,sun20i-d1-mipi-dphy",
1230 + "allwinner,sun50i-a100-mipi-dphy";
1231 + reg = <0x5451000 0x1000>;
1232 + interrupts = <108 IRQ_TYPE_LEVEL_HIGH>;
1233 + clocks = <&ccu CLK_BUS_MIPI_DSI>,
1234 + <&ccu CLK_MIPI_DSI>;
1235 + clock-names = "bus", "mod";
1236 + resets = <&ccu RST_BUS_MIPI_DSI>;
1240 tcon_top: tcon-top@5460000 {
1241 compatible = "allwinner,sun20i-d1-tcon-top";
1242 reg = <0x5460000 0x1000>;
1243 @@ -770,6 +1025,10 @@
1245 tcon_top_hdmi_out: port@5 {
1248 + tcon_top_hdmi_out_hdmi: endpoint {
1249 + remote-endpoint = <&hdmi_in_tcon_top>;
1254 @@ -785,6 +1044,8 @@
1255 resets = <&ccu RST_BUS_TCON_LCD0>,
1256 <&ccu RST_BUS_LVDS0>;
1257 reset-names = "lcd", "lvds";
1259 + phy-names = "lvds0";
1263 @@ -809,6 +1070,13 @@
1265 tcon_lcd0_out: port@1 {
1267 + #address-cells = <1>;
1268 + #size-cells = <0>;
1270 + tcon_lcd0_out_dsi: endpoint@1 {
1272 + remote-endpoint = <&dsi_in_tcon_lcd0>;
1277 @@ -853,6 +1121,50 @@
1281 + hdmi: hdmi@5500000 {
1282 + compatible = "allwinner,sun20i-d1-dw-hdmi";
1283 + reg = <0x5500000 0x10000>;
1284 + reg-io-width = <1>;
1285 + interrupts = <109 IRQ_TYPE_LEVEL_HIGH>;
1286 + clocks = <&ccu CLK_BUS_HDMI>,
1287 + <&ccu CLK_HDMI_24M>,
1288 + <&ccu CLK_HDMI_CEC>;
1289 + clock-names = "iahb", "isfr", "cec";
1290 + resets = <&ccu RST_BUS_HDMI_SUB>;
1291 + reset-names = "ctrl";
1292 + phys = <&hdmi_phy>;
1293 + phy-names = "phy";
1294 + status = "disabled";
1297 + #address-cells = <1>;
1298 + #size-cells = <0>;
1303 + hdmi_in_tcon_top: endpoint {
1304 + remote-endpoint = <&tcon_top_hdmi_out_hdmi>;
1308 + hdmi_out: port@1 {
1314 + hdmi_phy: phy@5510000 {
1315 + compatible = "allwinner,sun20i-d1-hdmi-phy";
1316 + reg = <0x5510000 0x10000>;
1317 + clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_24M>;
1318 + clock-names = "bus", "mod";
1319 + resets = <&ccu RST_BUS_HDMI_MAIN>;
1320 + reset-names = "phy";
1321 + status = "disabled";
1325 riscv_wdt: watchdog@6011000 {
1326 compatible = "allwinner,sun20i-d1-wdt";
1327 reg = <0x6011000 0x20>;