xref: /freebsd-src/sys/contrib/device-tree/src/arm/allwinner/sunxi-libretech-all-h3-it.dtsi (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*f126890aSEmmanuel Vadot// Copyright (C) 2019 Chen-Yu Tsai <wens@csie.org>
3*f126890aSEmmanuel Vadot
4*f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
5*f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
6*f126890aSEmmanuel Vadot
7*f126890aSEmmanuel Vadot/ {
8*f126890aSEmmanuel Vadot	aliases {
9*f126890aSEmmanuel Vadot		serial0 = &uart0;
10*f126890aSEmmanuel Vadot		spi0 = &spi0;
11*f126890aSEmmanuel Vadot	};
12*f126890aSEmmanuel Vadot
13*f126890aSEmmanuel Vadot	chosen {
14*f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
15*f126890aSEmmanuel Vadot	};
16*f126890aSEmmanuel Vadot
17*f126890aSEmmanuel Vadot	connector {
18*f126890aSEmmanuel Vadot		compatible = "hdmi-connector";
19*f126890aSEmmanuel Vadot		type = "d";
20*f126890aSEmmanuel Vadot
21*f126890aSEmmanuel Vadot		port {
22*f126890aSEmmanuel Vadot			hdmi_con_in: endpoint {
23*f126890aSEmmanuel Vadot				remote-endpoint = <&hdmi_out_con>;
24*f126890aSEmmanuel Vadot			};
25*f126890aSEmmanuel Vadot		};
26*f126890aSEmmanuel Vadot	};
27*f126890aSEmmanuel Vadot
28*f126890aSEmmanuel Vadot	leds {
29*f126890aSEmmanuel Vadot		compatible = "gpio-leds";
30*f126890aSEmmanuel Vadot
31*f126890aSEmmanuel Vadot		status_led {
32*f126890aSEmmanuel Vadot			label = "librecomputer:blue:status";
33*f126890aSEmmanuel Vadot			gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */
34*f126890aSEmmanuel Vadot		};
35*f126890aSEmmanuel Vadot	};
36*f126890aSEmmanuel Vadot
37*f126890aSEmmanuel Vadot	reg_vcc3v3: vcc3v3 {
38*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
39*f126890aSEmmanuel Vadot		regulator-name = "vcc3v3";
40*f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
41*f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
42*f126890aSEmmanuel Vadot		regulator-always-on;
43*f126890aSEmmanuel Vadot		regulator-boot-on;
44*f126890aSEmmanuel Vadot		vin-supply = <&reg_vcc5v0>;
45*f126890aSEmmanuel Vadot	};
46*f126890aSEmmanuel Vadot
47*f126890aSEmmanuel Vadot	/* This represents the board's 5V input */
48*f126890aSEmmanuel Vadot	reg_vcc5v0: vcc5v0 {
49*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
50*f126890aSEmmanuel Vadot		regulator-name = "vcc5v0";
51*f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
52*f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
53*f126890aSEmmanuel Vadot		regulator-always-on;
54*f126890aSEmmanuel Vadot		regulator-boot-on;
55*f126890aSEmmanuel Vadot	};
56*f126890aSEmmanuel Vadot
57*f126890aSEmmanuel Vadot	reg_vcc_dram: vcc-dram {
58*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
59*f126890aSEmmanuel Vadot		regulator-name = "vcc-dram";
60*f126890aSEmmanuel Vadot		regulator-min-microvolt = <1500000>;
61*f126890aSEmmanuel Vadot		regulator-max-microvolt = <1500000>;
62*f126890aSEmmanuel Vadot		regulator-always-on;
63*f126890aSEmmanuel Vadot		regulator-boot-on;
64*f126890aSEmmanuel Vadot		vin-supply = <&reg_vcc5v0>;
65*f126890aSEmmanuel Vadot		gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
66*f126890aSEmmanuel Vadot		enable-active-high;
67*f126890aSEmmanuel Vadot	};
68*f126890aSEmmanuel Vadot
69*f126890aSEmmanuel Vadot	reg_vcc_io: vcc-io {
70*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
71*f126890aSEmmanuel Vadot		regulator-name = "vcc-io";
72*f126890aSEmmanuel Vadot		/* This is simply a MOSFET switch */
73*f126890aSEmmanuel Vadot		regulator-always-on;
74*f126890aSEmmanuel Vadot		regulator-boot-on;
75*f126890aSEmmanuel Vadot		vin-supply = <&reg_vcc3v3>;
76*f126890aSEmmanuel Vadot		gpio = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
77*f126890aSEmmanuel Vadot	};
78*f126890aSEmmanuel Vadot
79*f126890aSEmmanuel Vadot	reg_vcc_usbwifi: vcc-usbwifi {
80*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
81*f126890aSEmmanuel Vadot		regulator-name = "vcc-usbwifi";
82*f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
83*f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
84*f126890aSEmmanuel Vadot		vin-supply = <&reg_vcc5v0>;
85*f126890aSEmmanuel Vadot		gpio = <&pio 6 4 GPIO_ACTIVE_HIGH>; /* PG4 */
86*f126890aSEmmanuel Vadot		enable-active-high;
87*f126890aSEmmanuel Vadot	};
88*f126890aSEmmanuel Vadot
89*f126890aSEmmanuel Vadot	reg_vdd_cpux: vdd-cpux {
90*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
91*f126890aSEmmanuel Vadot		regulator-name = "vdd-cpux";
92*f126890aSEmmanuel Vadot		regulator-min-microvolt = <1100000>;
93*f126890aSEmmanuel Vadot		regulator-max-microvolt = <1100000>;
94*f126890aSEmmanuel Vadot		regulator-always-on;
95*f126890aSEmmanuel Vadot		regulator-boot-on;
96*f126890aSEmmanuel Vadot		vin-supply = <&reg_vcc5v0>;
97*f126890aSEmmanuel Vadot		gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
98*f126890aSEmmanuel Vadot		enable-active-high;
99*f126890aSEmmanuel Vadot	};
100*f126890aSEmmanuel Vadot};
101*f126890aSEmmanuel Vadot
102*f126890aSEmmanuel Vadot&cpu0 {
103*f126890aSEmmanuel Vadot	cpu-supply = <&reg_vdd_cpux>;
104*f126890aSEmmanuel Vadot};
105*f126890aSEmmanuel Vadot
106*f126890aSEmmanuel Vadot&cpu1 {
107*f126890aSEmmanuel Vadot	cpu-supply = <&reg_vdd_cpux>;
108*f126890aSEmmanuel Vadot};
109*f126890aSEmmanuel Vadot
110*f126890aSEmmanuel Vadot&cpu2 {
111*f126890aSEmmanuel Vadot	cpu-supply = <&reg_vdd_cpux>;
112*f126890aSEmmanuel Vadot};
113*f126890aSEmmanuel Vadot
114*f126890aSEmmanuel Vadot&cpu3 {
115*f126890aSEmmanuel Vadot	cpu-supply = <&reg_vdd_cpux>;
116*f126890aSEmmanuel Vadot};
117*f126890aSEmmanuel Vadot
118*f126890aSEmmanuel Vadot&de {
119*f126890aSEmmanuel Vadot	status = "okay";
120*f126890aSEmmanuel Vadot};
121*f126890aSEmmanuel Vadot
122*f126890aSEmmanuel Vadot&ehci1 {
123*f126890aSEmmanuel Vadot	status = "okay";
124*f126890aSEmmanuel Vadot};
125*f126890aSEmmanuel Vadot
126*f126890aSEmmanuel Vadot&hdmi {
127*f126890aSEmmanuel Vadot	status = "okay";
128*f126890aSEmmanuel Vadot};
129*f126890aSEmmanuel Vadot
130*f126890aSEmmanuel Vadot&hdmi_out {
131*f126890aSEmmanuel Vadot	hdmi_out_con: endpoint {
132*f126890aSEmmanuel Vadot		remote-endpoint = <&hdmi_con_in>;
133*f126890aSEmmanuel Vadot	};
134*f126890aSEmmanuel Vadot};
135*f126890aSEmmanuel Vadot
136*f126890aSEmmanuel Vadot&mmc0 {
137*f126890aSEmmanuel Vadot	vmmc-supply = <&reg_vcc_io>;
138*f126890aSEmmanuel Vadot	bus-width = <4>;
139*f126890aSEmmanuel Vadot	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
140*f126890aSEmmanuel Vadot	status = "okay";
141*f126890aSEmmanuel Vadot};
142*f126890aSEmmanuel Vadot
143*f126890aSEmmanuel Vadot&pio {
144*f126890aSEmmanuel Vadot	vcc-pa-supply = <&reg_vcc_io>;
145*f126890aSEmmanuel Vadot	vcc-pc-supply = <&reg_vcc_io>;
146*f126890aSEmmanuel Vadot	vcc-pd-supply = <&reg_vcc_io>;
147*f126890aSEmmanuel Vadot	vcc-pe-supply = <&reg_vcc_io>;
148*f126890aSEmmanuel Vadot	vcc-pf-supply = <&reg_vcc_io>;
149*f126890aSEmmanuel Vadot	vcc-pg-supply = <&reg_vcc_io>;
150*f126890aSEmmanuel Vadot};
151*f126890aSEmmanuel Vadot
152*f126890aSEmmanuel Vadot&r_pio {
153*f126890aSEmmanuel Vadot	vcc-pl-supply = <&reg_vcc3v3>;
154*f126890aSEmmanuel Vadot};
155*f126890aSEmmanuel Vadot
156*f126890aSEmmanuel Vadot&spi0 {
157*f126890aSEmmanuel Vadot	status = "okay";
158*f126890aSEmmanuel Vadot
159*f126890aSEmmanuel Vadot	flash@0 {
160*f126890aSEmmanuel Vadot		compatible = "jedec,spi-nor";
161*f126890aSEmmanuel Vadot		reg = <0>;
162*f126890aSEmmanuel Vadot		spi-max-frequency = <50000000>;
163*f126890aSEmmanuel Vadot	};
164*f126890aSEmmanuel Vadot};
165*f126890aSEmmanuel Vadot
166*f126890aSEmmanuel Vadot&uart0 {
167*f126890aSEmmanuel Vadot	pinctrl-names = "default";
168*f126890aSEmmanuel Vadot	pinctrl-0 = <&uart0_pa_pins>;
169*f126890aSEmmanuel Vadot	status = "okay";
170*f126890aSEmmanuel Vadot};
171*f126890aSEmmanuel Vadot
172*f126890aSEmmanuel Vadot&usb_otg {
173*f126890aSEmmanuel Vadot	dr_mode = "peripheral";
174*f126890aSEmmanuel Vadot	status = "okay";
175*f126890aSEmmanuel Vadot};
176*f126890aSEmmanuel Vadot
177*f126890aSEmmanuel Vadot&usbphy {
178*f126890aSEmmanuel Vadot	usb1_vbus-supply = <&reg_vcc_usbwifi>;
179*f126890aSEmmanuel Vadot	status = "okay";
180*f126890aSEmmanuel Vadot};
181