Skip to content

Commit 9db0c7d

Browse files
Andre-ARMclementperon
authored andcommitted
arm64: dts: allwinner: Add OrangePi Zero 2 .dts
The OrangePi Zero 2 is a development board with the new H616 SoC. It features the usual connectors used on those small boards, and comes with the AXP305, which seems to be compatible with the AXP805. For more details see: http://linux-sunxi.org/Xunlong_Orange_Pi_Zero2 Signed-off-by: Andre Przywara <[email protected]>
1 parent 5ee8885 commit 9db0c7d

File tree

2 files changed

+241
-0
lines changed

2 files changed

+241
-0
lines changed

arch/arm64/boot/dts/allwinner/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-one-plus.dtb
3535
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb
3636
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64-model-b.dtb
3737
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6.dtb
38+
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ or MIT)
2+
/*
3+
* Copyright (C) 2020 Arm Ltd.
4+
*/
5+
6+
/dts-v1/;
7+
8+
#include "sun50i-h616.dtsi"
9+
10+
#include <dt-bindings/gpio/gpio.h>
11+
#include <dt-bindings/interrupt-controller/arm-gic.h>
12+
#include <dt-bindings/leds/common.h>
13+
14+
/ {
15+
model = "OrangePi Zero2";
16+
compatible = "xunlong,orangepi-zero2", "allwinner,sun50i-h616";
17+
18+
aliases {
19+
ethernet0 = &emac0;
20+
serial0 = &uart0;
21+
};
22+
23+
chosen {
24+
stdout-path = "serial0:115200n8";
25+
};
26+
27+
leds {
28+
compatible = "gpio-leds";
29+
30+
power {
31+
function = LED_FUNCTION_POWER;
32+
color = <LED_COLOR_ID_RED>;
33+
gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
34+
default-state = "on";
35+
};
36+
37+
status {
38+
function = LED_FUNCTION_STATUS;
39+
color = <LED_COLOR_ID_GREEN>;
40+
gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
41+
};
42+
};
43+
44+
reg_vcc5v: vcc5v {
45+
/* board wide 5V supply directly from the USB-C socket */
46+
compatible = "regulator-fixed";
47+
regulator-name = "vcc-5v";
48+
regulator-min-microvolt = <5000000>;
49+
regulator-max-microvolt = <5000000>;
50+
regulator-always-on;
51+
};
52+
53+
reg_usb1_vbus: usb1-vbus {
54+
compatible = "regulator-fixed";
55+
regulator-name = "usb1-vbus";
56+
regulator-min-microvolt = <5000000>;
57+
regulator-max-microvolt = <5000000>;
58+
vin-supply = <&reg_vcc5v>;
59+
enable-active-high;
60+
gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
61+
status = "okay";
62+
};
63+
};
64+
65+
&ehci0 {
66+
status = "okay";
67+
};
68+
69+
&ehci1 {
70+
status = "okay";
71+
};
72+
73+
/* USB 2 & 3 are on headers only. */
74+
75+
&emac0 {
76+
pinctrl-names = "default";
77+
pinctrl-0 = <&ext_rgmii_pins>;
78+
phy-mode = "rgmii";
79+
phy-handle = <&ext_rgmii_phy>;
80+
phy-supply = <&reg_dcdce>;
81+
allwinner,rx-delay-ps = <3100>;
82+
allwinner,tx-delay-ps = <700>;
83+
status = "okay";
84+
};
85+
86+
&mdio0 {
87+
ext_rgmii_phy: ethernet-phy@1 {
88+
compatible = "ethernet-phy-ieee802.3-c22";
89+
reg = <1>;
90+
};
91+
};
92+
93+
&mmc0 {
94+
vmmc-supply = <&reg_dcdce>;
95+
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
96+
bus-width = <4>;
97+
status = "okay";
98+
};
99+
100+
&ohci0 {
101+
status = "okay";
102+
};
103+
104+
&ohci1 {
105+
status = "okay";
106+
};
107+
108+
&r_i2c {
109+
status = "okay";
110+
111+
axp305: pmic@36 {
112+
compatible = "x-powers,axp305", "x-powers,axp805",
113+
"x-powers,axp806";
114+
reg = <0x36>;
115+
116+
x-powers,self-working-mode;
117+
vina-supply = <&reg_vcc5v>;
118+
vinb-supply = <&reg_vcc5v>;
119+
vinc-supply = <&reg_vcc5v>;
120+
vind-supply = <&reg_vcc5v>;
121+
vine-supply = <&reg_vcc5v>;
122+
aldoin-supply = <&reg_vcc5v>;
123+
bldoin-supply = <&reg_vcc5v>;
124+
cldoin-supply = <&reg_vcc5v>;
125+
126+
regulators {
127+
reg_aldo1: aldo1 {
128+
regulator-always-on;
129+
regulator-min-microvolt = <3300000>;
130+
regulator-max-microvolt = <3300000>;
131+
regulator-name = "vcc-sys";
132+
};
133+
134+
reg_aldo2: aldo2 { /* 3.3V on headers */
135+
regulator-always-on;
136+
regulator-min-microvolt = <3300000>;
137+
regulator-max-microvolt = <3300000>;
138+
regulator-name = "vcc3v3-ext";
139+
};
140+
141+
reg_aldo3: aldo3 { /* 3.3V on headers */
142+
regulator-always-on;
143+
regulator-min-microvolt = <3300000>;
144+
regulator-max-microvolt = <3300000>;
145+
regulator-name = "vcc3v3-ext2";
146+
};
147+
148+
reg_bldo1: bldo1 {
149+
regulator-always-on;
150+
regulator-min-microvolt = <1800000>;
151+
regulator-max-microvolt = <1800000>;
152+
regulator-name = "vcc1v8";
153+
};
154+
155+
bldo2 {
156+
/* unused */
157+
};
158+
159+
bldo3 {
160+
/* unused */
161+
};
162+
163+
bldo4 {
164+
/* unused */
165+
};
166+
167+
cldo1 {
168+
/* reserved */
169+
};
170+
171+
cldo2 {
172+
/* unused */
173+
};
174+
175+
cldo3 {
176+
/* unused */
177+
};
178+
179+
reg_dcdca: dcdca {
180+
regulator-always-on;
181+
regulator-min-microvolt = <810000>;
182+
regulator-max-microvolt = <1080000>;
183+
regulator-name = "vdd-cpu";
184+
};
185+
186+
reg_dcdcc: dcdcc {
187+
regulator-always-on;
188+
regulator-min-microvolt = <810000>;
189+
regulator-max-microvolt = <1080000>;
190+
regulator-name = "vdd-gpu-sys";
191+
};
192+
193+
reg_dcdcd: dcdcd {
194+
regulator-always-on;
195+
regulator-min-microvolt = <1500000>;
196+
regulator-max-microvolt = <1500000>;
197+
regulator-name = "vdd-dram";
198+
};
199+
200+
reg_dcdce: dcdce {
201+
regulator-boot-on;
202+
regulator-min-microvolt = <3300000>;
203+
regulator-max-microvolt = <3300000>;
204+
regulator-name = "vcc-eth-mmc";
205+
};
206+
207+
sw {
208+
/* unused */
209+
};
210+
};
211+
};
212+
};
213+
214+
&spi0 {
215+
status = "okay";
216+
217+
flash@0 {
218+
#address-cells = <1>;
219+
#size-cells = <1>;
220+
compatible = "jedec,spi-nor";
221+
reg = <0>;
222+
spi-max-frequency = <40000000>;
223+
};
224+
};
225+
226+
&uart0 {
227+
pinctrl-names = "default";
228+
pinctrl-0 = <&uart0_ph_pins>;
229+
status = "okay";
230+
};
231+
232+
&usbotg {
233+
dr_mode = "peripheral";
234+
status = "okay";
235+
};
236+
237+
&usbphy {
238+
usb1_vbus-supply = <&reg_usb1_vbus>;
239+
status = "okay";
240+
};

0 commit comments

Comments
 (0)