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	reg_vcc5v: vcc5v {
26		/* board wide 5V supply directly from the DC jack */
27		compatible = "regulator-fixed";
28		regulator-name = "vcc-5v";
29		regulator-min-microvolt = <5000000>;
30		regulator-max-microvolt = <5000000>;
31		regulator-always-on;
32	};
33};
34
35&ehci0 {
36	status = "okay";
37};
38
39&ehci3 {
40	status = "okay";
41};
42
43&mmc0 {
44	pinctrl-names = "default";
45	pinctrl-0 = <&mmc0_pins>;
46	vmmc-supply = <&reg_cldo1>;
47	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
48	bus-width = <4>;
49	status = "okay";
50};
51
52&ohci0 {
53	status = "okay";
54};
55
56&ohci3 {
57	status = "okay";
58};
59
60&r_i2c {
61	status = "okay";
62
63	axp805: pmic@36 {
64		compatible = "x-powers,axp805", "x-powers,axp806";
65		reg = <0x36>;
66		interrupt-parent = <&r_intc>;
67		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
68		interrupt-controller;
69		#interrupt-cells = <1>;
70		x-powers,self-working-mode;
71		vina-supply = <&reg_vcc5v>;
72		vinb-supply = <&reg_vcc5v>;
73		vinc-supply = <&reg_vcc5v>;
74		vind-supply = <&reg_vcc5v>;
75		vine-supply = <&reg_vcc5v>;
76		aldoin-supply = <&reg_vcc5v>;
77		bldoin-supply = <&reg_vcc5v>;
78		cldoin-supply = <&reg_vcc5v>;
79
80		regulators {
81			reg_aldo1: aldo1 {
82				regulator-always-on;
83				regulator-min-microvolt = <3300000>;
84				regulator-max-microvolt = <3300000>;
85				regulator-name = "vcc-pl";
86			};
87
88			reg_aldo2: aldo2 {
89				regulator-min-microvolt = <3300000>;
90				regulator-max-microvolt = <3300000>;
91				regulator-name = "vcc-ac200";
92			};
93
94			reg_aldo3: aldo3 {
95				regulator-always-on;
96				regulator-min-microvolt = <3300000>;
97				regulator-max-microvolt = <3300000>;
98				regulator-name = "vcc25-dram";
99			};
100
101			reg_bldo1: bldo1 {
102				regulator-always-on;
103				regulator-min-microvolt = <1800000>;
104				regulator-max-microvolt = <1800000>;
105				regulator-name = "vcc-bias-pll";
106			};
107
108			reg_bldo2: bldo2 {
109				regulator-always-on;
110				regulator-min-microvolt = <1800000>;
111				regulator-max-microvolt = <1800000>;
112				regulator-name = "vcc-efuse-pcie-hdmi-io";
113			};
114
115			reg_bldo3: bldo3 {
116				regulator-always-on;
117				regulator-min-microvolt = <1800000>;
118				regulator-max-microvolt = <1800000>;
119				regulator-name = "vcc-dcxoio";
120			};
121
122			bldo4 {
123				/* unused */
124			};
125
126			reg_cldo1: cldo1 {
127				regulator-always-on;
128				regulator-min-microvolt = <3300000>;
129				regulator-max-microvolt = <3300000>;
130				regulator-name = "vcc-3v3";
131			};
132
133			reg_cldo2: cldo2 {
134				regulator-min-microvolt = <3300000>;
135				regulator-max-microvolt = <3300000>;
136				regulator-name = "vcc-wifi-1";
137			};
138
139			reg_cldo3: cldo3 {
140				regulator-min-microvolt = <3300000>;
141				regulator-max-microvolt = <3300000>;
142				regulator-name = "vcc-wifi-2";
143			};
144
145			reg_dcdca: dcdca {
146				regulator-always-on;
147				regulator-min-microvolt = <810000>;
148				regulator-max-microvolt = <1080000>;
149				regulator-name = "vdd-cpu";
150			};
151
152			reg_dcdcc: dcdcc {
153				regulator-min-microvolt = <810000>;
154				regulator-max-microvolt = <1080000>;
155				regulator-name = "vdd-gpu";
156			};
157
158			reg_dcdcd: dcdcd {
159				regulator-always-on;
160				regulator-min-microvolt = <960000>;
161				regulator-max-microvolt = <960000>;
162				regulator-name = "vdd-sys";
163			};
164
165			reg_dcdce: dcdce {
166				regulator-always-on;
167				regulator-min-microvolt = <1200000>;
168				regulator-max-microvolt = <1200000>;
169				regulator-name = "vcc-dram";
170			};
171
172			sw {
173				/* unused */
174			};
175		};
176	};
177};
178
179&uart0 {
180	pinctrl-names = "default";
181	pinctrl-0 = <&uart0_ph_pins>;
182	status = "okay";
183};
184
185&usb2otg {
186	dr_mode = "otg";
187	status = "okay";
188};
189
190&usb2phy {
191	usb0_id_det-gpios = <&pio 2 6 GPIO_ACTIVE_HIGH>; /* PC6 */
192	usb0_vbus-supply = <&reg_vcc5v>;
193	usb3_vbus-supply = <&reg_vcc5v>;
194	status = "okay";
195};
196