Merge branch 'akpm' (patches from Andrew)
[sfrench/cifs-2.6.git] / arch / arm64 / boot / dts / allwinner / 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         pinctrl-names = "default";
60         pinctrl-0 = <&mmc0_pins>;
61         vmmc-supply = <&reg_cldo1>;
62         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
63         bus-width = <4>;
64         status = "okay";
65 };
66
67 &ohci0 {
68         status = "okay";
69 };
70
71 &ohci3 {
72         status = "okay";
73 };
74
75 &r_i2c {
76         status = "okay";
77
78         axp805: pmic@36 {
79                 compatible = "x-powers,axp805", "x-powers,axp806";
80                 reg = <0x36>;
81                 interrupt-parent = <&r_intc>;
82                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
83                 interrupt-controller;
84                 #interrupt-cells = <1>;
85                 x-powers,self-working-mode;
86                 vina-supply = <&reg_vcc5v>;
87                 vinb-supply = <&reg_vcc5v>;
88                 vinc-supply = <&reg_vcc5v>;
89                 vind-supply = <&reg_vcc5v>;
90                 vine-supply = <&reg_vcc5v>;
91                 aldoin-supply = <&reg_vcc5v>;
92                 bldoin-supply = <&reg_vcc5v>;
93                 cldoin-supply = <&reg_vcc5v>;
94
95                 regulators {
96                         reg_aldo1: aldo1 {
97                                 regulator-always-on;
98                                 regulator-min-microvolt = <3300000>;
99                                 regulator-max-microvolt = <3300000>;
100                                 regulator-name = "vcc-pl";
101                         };
102
103                         reg_aldo2: aldo2 {
104                                 regulator-min-microvolt = <3300000>;
105                                 regulator-max-microvolt = <3300000>;
106                                 regulator-name = "vcc-ac200";
107                         };
108
109                         reg_aldo3: aldo3 {
110                                 regulator-always-on;
111                                 regulator-min-microvolt = <3300000>;
112                                 regulator-max-microvolt = <3300000>;
113                                 regulator-name = "vcc25-dram";
114                         };
115
116                         reg_bldo1: bldo1 {
117                                 regulator-always-on;
118                                 regulator-min-microvolt = <1800000>;
119                                 regulator-max-microvolt = <1800000>;
120                                 regulator-name = "vcc-bias-pll";
121                         };
122
123                         reg_bldo2: bldo2 {
124                                 regulator-always-on;
125                                 regulator-min-microvolt = <1800000>;
126                                 regulator-max-microvolt = <1800000>;
127                                 regulator-name = "vcc-efuse-pcie-hdmi-io";
128                         };
129
130                         reg_bldo3: bldo3 {
131                                 regulator-always-on;
132                                 regulator-min-microvolt = <1800000>;
133                                 regulator-max-microvolt = <1800000>;
134                                 regulator-name = "vcc-dcxoio";
135                         };
136
137                         bldo4 {
138                                 /* unused */
139                         };
140
141                         reg_cldo1: cldo1 {
142                                 regulator-always-on;
143                                 regulator-min-microvolt = <3300000>;
144                                 regulator-max-microvolt = <3300000>;
145                                 regulator-name = "vcc-3v3";
146                         };
147
148                         reg_cldo2: cldo2 {
149                                 regulator-min-microvolt = <3300000>;
150                                 regulator-max-microvolt = <3300000>;
151                                 regulator-name = "vcc-wifi-1";
152                         };
153
154                         reg_cldo3: cldo3 {
155                                 regulator-min-microvolt = <3300000>;
156                                 regulator-max-microvolt = <3300000>;
157                                 regulator-name = "vcc-wifi-2";
158                         };
159
160                         reg_dcdca: dcdca {
161                                 regulator-always-on;
162                                 regulator-min-microvolt = <810000>;
163                                 regulator-max-microvolt = <1080000>;
164                                 regulator-name = "vdd-cpu";
165                         };
166
167                         reg_dcdcc: dcdcc {
168                                 regulator-min-microvolt = <810000>;
169                                 regulator-max-microvolt = <1080000>;
170                                 regulator-name = "vdd-gpu";
171                         };
172
173                         reg_dcdcd: dcdcd {
174                                 regulator-always-on;
175                                 regulator-min-microvolt = <960000>;
176                                 regulator-max-microvolt = <960000>;
177                                 regulator-name = "vdd-sys";
178                         };
179
180                         reg_dcdce: dcdce {
181                                 regulator-always-on;
182                                 regulator-min-microvolt = <1200000>;
183                                 regulator-max-microvolt = <1200000>;
184                                 regulator-name = "vcc-dram";
185                         };
186
187                         sw {
188                                 /* unused */
189                         };
190                 };
191         };
192 };
193
194 &uart0 {
195         pinctrl-names = "default";
196         pinctrl-0 = <&uart0_ph_pins>;
197         status = "okay";
198 };
199
200 &usb2otg {
201         dr_mode = "otg";
202         status = "okay";
203 };
204
205 &usb2phy {
206         usb0_id_det-gpios = <&pio 2 6 GPIO_ACTIVE_HIGH>; /* PC6 */
207         usb0_vbus-supply = <&reg_vcc5v>;
208         usb3_vbus-supply = <&reg_vcc5v>;
209         status = "okay";
210 };