Merge tag 'u-boot-imx-20191105' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
[oweals/u-boot.git] / arch / arm / dts / sun50i-h6-orangepi.dtsi
1 // SPDX-License-Identifier: (GPL-2.0+ or MIT)
2 /*
3  * Copyright (C) 2018 Amarula Solutions
4  * Author: Jagan Teki <jagan@amarulasolutions.com>
5  */
6
7 /dts-v1/;
8
9 #include "sun50i-h6.dtsi"
10
11 #include <dt-bindings/gpio/gpio.h>
12
13 / {
14         model = "OrangePi One Plus";
15         compatible = "xunlong,orangepi-one-plus", "allwinner,sun50i-h6";
16
17         aliases {
18                 serial0 = &uart0;
19         };
20
21         chosen {
22                 stdout-path = "serial0:115200n8";
23         };
24
25         leds {
26                 compatible = "gpio-leds";
27
28                 power {
29                         label = "orangepi:red:power";
30                         gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
31                         default-state = "on";
32                 };
33
34                 status {
35                         label = "orangepi:green:status";
36                         gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
37                 };
38         };
39
40         reg_vcc5v: vcc5v {
41                 /* board wide 5V supply directly from the DC jack */
42                 compatible = "regulator-fixed";
43                 regulator-name = "vcc-5v";
44                 regulator-min-microvolt = <5000000>;
45                 regulator-max-microvolt = <5000000>;
46                 regulator-always-on;
47         };
48 };
49
50 &ehci0 {
51         status = "okay";
52 };
53
54 &ehci3 {
55         status = "okay";
56 };
57
58 &mmc0 {
59         vmmc-supply = <&reg_cldo1>;
60         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
61         bus-width = <4>;
62         status = "okay";
63 };
64
65 &ohci0 {
66         status = "okay";
67 };
68
69 &ohci3 {
70         status = "okay";
71 };
72
73 &r_i2c {
74         status = "okay";
75
76         axp805: pmic@36 {
77                 compatible = "x-powers,axp805", "x-powers,axp806";
78                 reg = <0x36>;
79                 interrupt-parent = <&r_intc>;
80                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
81                 interrupt-controller;
82                 #interrupt-cells = <1>;
83                 x-powers,self-working-mode;
84                 vina-supply = <&reg_vcc5v>;
85                 vinb-supply = <&reg_vcc5v>;
86                 vinc-supply = <&reg_vcc5v>;
87                 vind-supply = <&reg_vcc5v>;
88                 vine-supply = <&reg_vcc5v>;
89                 aldoin-supply = <&reg_vcc5v>;
90                 bldoin-supply = <&reg_vcc5v>;
91                 cldoin-supply = <&reg_vcc5v>;
92
93                 regulators {
94                         reg_aldo1: aldo1 {
95                                 regulator-always-on;
96                                 regulator-min-microvolt = <3300000>;
97                                 regulator-max-microvolt = <3300000>;
98                                 regulator-name = "vcc-pl";
99                         };
100
101                         reg_aldo2: aldo2 {
102                                 regulator-min-microvolt = <3300000>;
103                                 regulator-max-microvolt = <3300000>;
104                                 regulator-name = "vcc-ac200";
105                         };
106
107                         reg_aldo3: aldo3 {
108                                 regulator-always-on;
109                                 regulator-min-microvolt = <3300000>;
110                                 regulator-max-microvolt = <3300000>;
111                                 regulator-name = "vcc25-dram";
112                         };
113
114                         reg_bldo1: bldo1 {
115                                 regulator-always-on;
116                                 regulator-min-microvolt = <1800000>;
117                                 regulator-max-microvolt = <1800000>;
118                                 regulator-name = "vcc-bias-pll";
119                         };
120
121                         reg_bldo2: bldo2 {
122                                 regulator-always-on;
123                                 regulator-min-microvolt = <1800000>;
124                                 regulator-max-microvolt = <1800000>;
125                                 regulator-name = "vcc-efuse-pcie-hdmi-io";
126                         };
127
128                         reg_bldo3: bldo3 {
129                                 regulator-always-on;
130                                 regulator-min-microvolt = <1800000>;
131                                 regulator-max-microvolt = <1800000>;
132                                 regulator-name = "vcc-dcxoio";
133                         };
134
135                         bldo4 {
136                                 /* unused */
137                         };
138
139                         reg_cldo1: cldo1 {
140                                 regulator-always-on;
141                                 regulator-min-microvolt = <3300000>;
142                                 regulator-max-microvolt = <3300000>;
143                                 regulator-name = "vcc-3v3";
144                         };
145
146                         reg_cldo2: cldo2 {
147                                 regulator-min-microvolt = <3300000>;
148                                 regulator-max-microvolt = <3300000>;
149                                 regulator-name = "vcc-wifi-1";
150                         };
151
152                         reg_cldo3: cldo3 {
153                                 regulator-min-microvolt = <3300000>;
154                                 regulator-max-microvolt = <3300000>;
155                                 regulator-name = "vcc-wifi-2";
156                         };
157
158                         reg_dcdca: dcdca {
159                                 regulator-always-on;
160                                 regulator-min-microvolt = <810000>;
161                                 regulator-max-microvolt = <1080000>;
162                                 regulator-name = "vdd-cpu";
163                         };
164
165                         reg_dcdcc: dcdcc {
166                                 regulator-min-microvolt = <810000>;
167                                 regulator-max-microvolt = <1080000>;
168                                 regulator-name = "vdd-gpu";
169                         };
170
171                         reg_dcdcd: dcdcd {
172                                 regulator-always-on;
173                                 regulator-min-microvolt = <960000>;
174                                 regulator-max-microvolt = <960000>;
175                                 regulator-name = "vdd-sys";
176                         };
177
178                         reg_dcdce: dcdce {
179                                 regulator-always-on;
180                                 regulator-min-microvolt = <1200000>;
181                                 regulator-max-microvolt = <1200000>;
182                                 regulator-name = "vcc-dram";
183                         };
184
185                         sw {
186                                 /* unused */
187                         };
188                 };
189         };
190 };
191
192 &uart0 {
193         pinctrl-names = "default";
194         pinctrl-0 = <&uart0_ph_pins>;
195         status = "okay";
196 };
197
198 &usb2otg {
199         dr_mode = "otg";
200         status = "okay";
201 };
202
203 &usb2phy {
204         usb0_id_det-gpios = <&pio 2 6 GPIO_ACTIVE_HIGH>; /* PC6 */
205         usb0_vbus-supply = <&reg_vcc5v>;
206         usb3_vbus-supply = <&reg_vcc5v>;
207         status = "okay";
208 };