xref: /linux/scripts/dtc/include-prefixes/arm/allwinner/sunxi-libretech-all-h3-cc.dtsi (revision cdd5b5a9761fd66d17586e4f4ba6588c70e640ea)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org>
4 */
5
6#include <dt-bindings/gpio/gpio.h>
7#include <dt-bindings/input/input.h>
8
9/ {
10	aliases {
11		ethernet0 = &emac;
12		serial0 = &uart0;
13	};
14
15	chosen {
16		stdout-path = "serial0:115200n8";
17	};
18
19	connector {
20		compatible = "hdmi-connector";
21		type = "a";
22
23		port {
24			hdmi_con_in: endpoint {
25				remote-endpoint = <&hdmi_out_con>;
26			};
27		};
28	};
29
30	leds {
31		compatible = "gpio-leds";
32
33		pwr_led {
34			label = "librecomputer:green:pwr";
35			gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
36			default-state = "on";
37		};
38
39		status_led {
40			label = "librecomputer:blue:status";
41			gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */
42		};
43	};
44
45	gpio-keys {
46		compatible = "gpio-keys";
47
48		key-power {
49			label = "power";
50			linux,code = <KEY_POWER>;
51			gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
52			wakeup-source;
53		};
54	};
55
56	reg_vcc1v2: vcc1v2 {
57		compatible = "regulator-fixed";
58		regulator-name = "vcc1v2";
59		regulator-min-microvolt = <1200000>;
60		regulator-max-microvolt = <1200000>;
61		regulator-always-on;
62		regulator-boot-on;
63		vin-supply = <&reg_vcc5v0>;
64		gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
65		enable-active-high;
66	};
67
68	reg_vcc3v3: vcc3v3 {
69		compatible = "regulator-fixed";
70		regulator-name = "vcc3v3";
71		regulator-min-microvolt = <3300000>;
72		regulator-max-microvolt = <3300000>;
73		vin-supply = <&reg_vcc5v0>;
74	};
75
76	/* This represents the board's 5V input */
77	reg_vcc5v0: vcc5v0 {
78		compatible = "regulator-fixed";
79		regulator-name = "vcc5v0";
80		regulator-min-microvolt = <5000000>;
81		regulator-max-microvolt = <5000000>;
82	};
83
84	reg_vcc_dram: vcc-dram {
85		compatible = "regulator-fixed";
86		regulator-name = "vcc-dram";
87		regulator-min-microvolt = <1500000>;
88		regulator-max-microvolt = <1500000>;
89		regulator-always-on;
90		regulator-boot-on;
91		vin-supply = <&reg_vcc5v0>;
92		gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
93		enable-active-high;
94	};
95
96	reg_vcc_io: vcc-io {
97		compatible = "regulator-fixed";
98		regulator-name = "vcc-io";
99		regulator-min-microvolt = <3300000>;
100		regulator-max-microvolt = <3300000>;
101		regulator-always-on;
102		regulator-boot-on;
103		vin-supply = <&reg_vcc3v3>;
104		gpio = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
105	};
106
107	reg_vdd_cpux: vdd-cpux {
108		compatible = "regulator-fixed";
109		regulator-name = "vdd-cpux";
110		regulator-min-microvolt = <1200000>;
111		regulator-max-microvolt = <1200000>;
112		regulator-always-on;
113		regulator-boot-on;
114		vin-supply = <&reg_vcc5v0>;
115		gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
116		enable-active-high;
117	};
118};
119
120&codec {
121	allwinner,audio-routing =
122		"Line Out", "LINEOUT",
123		"MIC1", "Mic",
124		"Mic",  "MBIAS";
125	status = "okay";
126};
127
128&cpu0 {
129	cpu-supply = <&reg_vdd_cpux>;
130};
131
132&cpu1 {
133	cpu-supply = <&reg_vdd_cpux>;
134};
135
136&cpu2 {
137	cpu-supply = <&reg_vdd_cpux>;
138};
139
140&cpu3 {
141	cpu-supply = <&reg_vdd_cpux>;
142};
143
144&de {
145	status = "okay";
146};
147
148&ehci0 {
149	status = "okay";
150};
151
152&ehci1 {
153	status = "okay";
154};
155
156&ehci2 {
157	status = "okay";
158};
159
160&ehci3 {
161	status = "okay";
162};
163
164&emac {
165	phy-handle = <&int_mii_phy>;
166	phy-mode = "mii";
167	allwinner,leds-active-low;
168	status = "okay";
169};
170
171&hdmi {
172	status = "okay";
173};
174
175&hdmi_out {
176	hdmi_out_con: endpoint {
177		remote-endpoint = <&hdmi_con_in>;
178	};
179};
180
181&ir {
182	pinctrl-names = "default";
183	pinctrl-0 = <&r_ir_rx_pin>;
184	status = "okay";
185};
186
187&mmc0 {
188	vmmc-supply = <&reg_vcc_io>;
189	bus-width = <4>;
190	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
191	status = "okay";
192};
193
194&mmc2 {
195	pinctrl-names = "default";
196	pinctrl-0 = <&mmc2_8bit_pins>;
197	vmmc-supply = <&reg_vcc_io>;
198	bus-width = <8>;
199	non-removable;
200	status = "okay";
201};
202
203&ohci0 {
204	status = "okay";
205};
206
207&ohci1 {
208	status = "okay";
209};
210
211&ohci2 {
212	status = "okay";
213};
214
215&ohci3 {
216	status = "okay";
217};
218
219&uart0 {
220	pinctrl-names = "default";
221	pinctrl-0 = <&uart0_pa_pins>;
222	status = "okay";
223};
224
225&usb_otg {
226	dr_mode = "host";
227	status = "okay";
228};
229
230&usbphy {
231	/* VBUS on USB ports are always on */
232	usb0_vbus-supply = <&reg_vcc5v0>;
233	usb1_vbus-supply = <&reg_vcc5v0>;
234	usb2_vbus-supply = <&reg_vcc5v0>;
235	usb3_vbus-supply = <&reg_vcc5v0>;
236	status = "okay";
237};
238