1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2// Copyright (c) 2019 Jernej Skrabec <jernej.skrabec@siol.net>
3
4/dts-v1/;
5
6#include "sun50i-h6.dtsi"
7#include "sun50i-h6-cpu-opp.dtsi"
8
9#include <dt-bindings/gpio/gpio.h>
10
11/ {
12	aliases {
13		serial0 = &uart0;
14	};
15
16	chosen {
17		stdout-path = "serial0:115200n8";
18	};
19
20	connector {
21		compatible = "hdmi-connector";
22		ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
23		type = "a";
24
25		port {
26			hdmi_con_in: endpoint {
27				remote-endpoint = <&hdmi_out_con>;
28			};
29		};
30	};
31
32	/* used for FD650 LED display driver */
33	i2c {
34		compatible = "i2c-gpio";
35		sda-gpios = <&pio 7 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; /* PH6 */
36		scl-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; /* PH5 */
37		i2c-gpio,delay-us = <5>;
38	};
39
40	reg_vcc1v8: regulator-vcc1v8 {
41		compatible = "regulator-fixed";
42		regulator-name = "vcc1v8";
43		regulator-min-microvolt = <1800000>;
44		regulator-max-microvolt = <1800000>;
45	};
46
47	reg_vcc3v3: regulator-vcc3v3 {
48		compatible = "regulator-fixed";
49		regulator-name = "vcc3v3";
50		regulator-min-microvolt = <3300000>;
51		regulator-max-microvolt = <3300000>;
52	};
53
54	reg_vdd_cpu_gpu: regulator-vdd-cpu-gpu {
55		compatible = "regulator-fixed";
56		regulator-name = "vdd-cpu-gpu";
57		regulator-min-microvolt = <1135000>;
58		regulator-max-microvolt = <1135000>;
59	};
60
61	sound-spdif {
62		compatible = "simple-audio-card";
63		simple-audio-card,name = "sun50i-h6-spdif";
64
65		simple-audio-card,cpu {
66			sound-dai = <&spdif>;
67		};
68
69		simple-audio-card,codec {
70			sound-dai = <&spdif_out>;
71		};
72	};
73
74	spdif_out: spdif-out {
75		#sound-dai-cells = <0>;
76		compatible = "linux,spdif-dit";
77	};
78};
79
80&cpu0 {
81	cpu-supply = <&reg_vdd_cpu_gpu>;
82};
83
84&de {
85	status = "okay";
86};
87
88&dwc3 {
89	status = "okay";
90};
91
92&ehci0 {
93	status = "okay";
94};
95
96&ehci3 {
97	status = "okay";
98};
99
100&gpu {
101	mali-supply = <&reg_vdd_cpu_gpu>;
102	status = "okay";
103};
104
105&hdmi {
106	status = "okay";
107};
108
109&hdmi_out {
110	hdmi_out_con: endpoint {
111		remote-endpoint = <&hdmi_con_in>;
112	};
113};
114
115&mmc0 {
116	pinctrl-names = "default";
117	pinctrl-0 = <&mmc0_pins>;
118	vmmc-supply = <&reg_vcc3v3>;
119	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
120	bus-width = <4>;
121	status = "okay";
122};
123
124&mmc2 {
125	vmmc-supply = <&reg_vcc3v3>;
126	vqmmc-supply = <&reg_vcc1v8>;
127	bus-width = <8>;
128	non-removable;
129	cap-mmc-hw-reset;
130	mmc-hs200-1_8v;
131	status = "okay";
132};
133
134&ohci0 {
135	status = "okay";
136};
137
138&ohci3 {
139	status = "okay";
140};
141
142&pio {
143	vcc-pc-supply = <&reg_vcc1v8>;
144	vcc-pd-supply = <&reg_vcc3v3>;
145	vcc-pg-supply = <&reg_vcc1v8>;
146};
147
148&r_ir {
149	status = "okay";
150};
151
152&spdif {
153	status = "okay";
154};
155
156&uart0 {
157	pinctrl-names = "default";
158	pinctrl-0 = <&uart0_ph_pins>;
159	status = "okay";
160};
161
162&usb2otg {
163	dr_mode = "host";
164	status = "okay";
165};
166
167&usb2phy {
168	status = "okay";
169};
170
171&usb3phy {
172	status = "okay";
173};
174