Merge branch 'linux-4.18' of git://github.com/skeggsb/linux into drm-fixes
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / sunxi-libretech-all-h3-cc.dtsi
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                 power {
49                         label = "power";
50                         linux,code = <KEY_POWER>;
51                         gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
52                 };
53         };
54
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         };
66
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         };
74
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         };
82
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         };
94
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         };
105
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         };
117 };
118
119 &codec {
120         allwinner,audio-routing =
121                 "Line Out", "LINEOUT",
122                 "MIC1", "Mic",
123                 "Mic",  "MBIAS";
124         status = "okay";
125 };
126
127 &cpu0 {
128         cpu-supply = <&reg_vdd_cpux>;
129 };
130
131 &de {
132         status = "okay";
133 };
134
135 &ehci0 {
136         status = "okay";
137 };
138
139 &ehci1 {
140         status = "okay";
141 };
142
143 &ehci2 {
144         status = "okay";
145 };
146
147 &ehci3 {
148         status = "okay";
149 };
150
151 &emac {
152         phy-handle = <&int_mii_phy>;
153         phy-mode = "mii";
154         allwinner,leds-active-low;
155         status = "okay";
156 };
157
158 &hdmi {
159         status = "okay";
160 };
161
162 &hdmi_out {
163         hdmi_out_con: endpoint {
164                 remote-endpoint = <&hdmi_con_in>;
165         };
166 };
167
168 &ir {
169         pinctrl-names = "default";
170         pinctrl-0 = <&ir_pins_a>;
171         status = "okay";
172 };
173
174 &mmc0 {
175         vmmc-supply = <&reg_vcc_io>;
176         bus-width = <4>;
177         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
178         status = "okay";
179 };
180
181 &ohci0 {
182         status = "okay";
183 };
184
185 &ohci1 {
186         status = "okay";
187 };
188
189 &ohci2 {
190         status = "okay";
191 };
192
193 &ohci3 {
194         status = "okay";
195 };
196
197 &uart0 {
198         pinctrl-names = "default";
199         pinctrl-0 = <&uart0_pins_a>;
200         status = "okay";
201 };
202
203 &usb_otg {
204         dr_mode = "host";
205         status = "okay";
206 };
207
208 &usbphy {
209         /* VBUS on USB ports are always on */
210         usb0_vbus-supply = <&reg_vcc5v0>;
211         usb1_vbus-supply = <&reg_vcc5v0>;
212         usb2_vbus-supply = <&reg_vcc5v0>;
213         usb3_vbus-supply = <&reg_vcc5v0>;
214         status = "okay";
215 };