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