Skip to content

Commit 5dce1b2

Browse files
committed
Support Orange Pi PC/One H5
1 parent d41c8b2 commit 5dce1b2

File tree

5 files changed

+414
-0
lines changed

5 files changed

+414
-0
lines changed

arch/arm/dts/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,8 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \
563563
sun50i-h5-nanopi-neo-plus2.dtb \
564564
sun50i-h5-orangepi-zero-plus.dtb \
565565
sun50i-h5-orangepi-pc2.dtb \
566+
sun50i-h5-orangepi-pc.dtb \
567+
sun50i-h5-orangepi-one.dtb \
566568
sun50i-h5-nanopi-k1-plus.dtb \
567569
sun50i-h5-orangepi-prime.dtb \
568570
sun50i-h5-orangepi-zero-plus2.dtb
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
// Copyright (C) 2016 ARM Ltd.
3+
4+
/dts-v1/;
5+
#include "sun50i-h5.dtsi"
6+
7+
#include <dt-bindings/gpio/gpio.h>
8+
#include <dt-bindings/input/input.h>
9+
#include <dt-bindings/pinctrl/sun4i-a10.h>
10+
11+
/ {
12+
model = "Xunlong Orange Pi One H5";
13+
compatible = "xunlong,orangepi-one", "allwinner,sun50i-h5";
14+
15+
reg_vcc3v3: vcc3v3 {
16+
compatible = "regulator-fixed";
17+
regulator-name = "vcc3v3";
18+
regulator-min-microvolt = <3300000>;
19+
regulator-max-microvolt = <3300000>;
20+
};
21+
22+
aliases {
23+
ethernet0 = &emac;
24+
serial0 = &uart0;
25+
};
26+
27+
chosen {
28+
stdout-path = "serial0:115200n8";
29+
};
30+
31+
connector {
32+
compatible = "hdmi-connector";
33+
type = "a";
34+
35+
port {
36+
hdmi_con_in: endpoint {
37+
remote-endpoint = <&hdmi_out_con>;
38+
};
39+
};
40+
};
41+
42+
leds {
43+
compatible = "gpio-leds";
44+
45+
pwr {
46+
label = "orangepi:green:pwr";
47+
gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
48+
default-state = "on";
49+
};
50+
51+
status {
52+
label = "orangepi:red:status";
53+
gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
54+
};
55+
};
56+
57+
r-gpio-keys {
58+
compatible = "gpio-keys";
59+
60+
sw4 {
61+
label = "sw4";
62+
linux,code = <BTN_0>;
63+
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
64+
};
65+
};
66+
67+
reg_usb0_vbus: usb0-vbus {
68+
compatible = "regulator-fixed";
69+
regulator-name = "usb0-vbus";
70+
regulator-min-microvolt = <5000000>;
71+
regulator-max-microvolt = <5000000>;
72+
enable-active-high;
73+
gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
74+
status = "okay";
75+
};
76+
};
77+
78+
&codec {
79+
allwinner,audio-routing =
80+
"Line Out", "LINEOUT",
81+
"MIC1", "Mic",
82+
"Mic", "MBIAS";
83+
status = "okay";
84+
};
85+
86+
&de {
87+
status = "okay";
88+
};
89+
90+
&ehci0 {
91+
status = "okay";
92+
};
93+
94+
&ehci1 {
95+
status = "okay";
96+
};
97+
98+
&ehci2 {
99+
status = "okay";
100+
};
101+
102+
&ehci3 {
103+
status = "okay";
104+
};
105+
106+
&emac {
107+
phy-handle = <&int_mii_phy>;
108+
phy-mode = "mii";
109+
allwinner,leds-active-low;
110+
status = "okay";
111+
};
112+
113+
&hdmi {
114+
status = "okay";
115+
};
116+
117+
&hdmi_out {
118+
hdmi_out_con: endpoint {
119+
remote-endpoint = <&hdmi_con_in>;
120+
};
121+
};
122+
123+
&mmc0 {
124+
vmmc-supply = <&reg_vcc3v3>;
125+
bus-width = <4>;
126+
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
127+
status = "okay";
128+
};
129+
130+
&ohci0 {
131+
status = "okay";
132+
};
133+
134+
&ohci1 {
135+
status = "okay";
136+
};
137+
138+
&ohci2 {
139+
status = "okay";
140+
};
141+
142+
&ohci3 {
143+
status = "okay";
144+
};
145+
146+
&spi0 {
147+
status = "okay";
148+
149+
flash@0 {
150+
#address-cells = <1>;
151+
#size-cells = <1>;
152+
compatible = "jedec,spi-nor";
153+
reg = <0>;
154+
spi-max-frequency = <40000000>;
155+
};
156+
};
157+
158+
&uart0 {
159+
pinctrl-names = "default";
160+
pinctrl-0 = <&uart0_pa_pins>;
161+
status = "okay";
162+
};
163+
164+
&uart1 {
165+
pinctrl-names = "default";
166+
pinctrl-0 = <&uart1_pins>;
167+
status = "disabled";
168+
};
169+
170+
&uart2 {
171+
pinctrl-names = "default";
172+
pinctrl-0 = <&uart2_pins>;
173+
status = "disabled";
174+
};
175+
176+
&usb_otg {
177+
dr_mode = "otg";
178+
status = "okay";
179+
};
180+
181+
&usbphy {
182+
/* USB Type-A ports' VBUS is always on */
183+
usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
184+
usb0_vbus-supply = <&reg_usb0_vbus>;
185+
status = "okay";
186+
};
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
// Copyright (C) 2016 ARM Ltd.
3+
4+
/dts-v1/;
5+
#include "sun50i-h5.dtsi"
6+
7+
#include <dt-bindings/gpio/gpio.h>
8+
#include <dt-bindings/input/input.h>
9+
#include <dt-bindings/pinctrl/sun4i-a10.h>
10+
11+
/ {
12+
model = "Xunlong Orange Pi PC H5";
13+
compatible = "xunlong,orangepi-pc", "allwinner,sun50i-h5";
14+
15+
reg_vcc3v3: vcc3v3 {
16+
compatible = "regulator-fixed";
17+
regulator-name = "vcc3v3";
18+
regulator-min-microvolt = <3300000>;
19+
regulator-max-microvolt = <3300000>;
20+
};
21+
22+
aliases {
23+
ethernet0 = &emac;
24+
serial0 = &uart0;
25+
};
26+
27+
chosen {
28+
stdout-path = "serial0:115200n8";
29+
};
30+
31+
connector {
32+
compatible = "hdmi-connector";
33+
type = "a";
34+
35+
port {
36+
hdmi_con_in: endpoint {
37+
remote-endpoint = <&hdmi_out_con>;
38+
};
39+
};
40+
};
41+
42+
leds {
43+
compatible = "gpio-leds";
44+
45+
pwr {
46+
label = "orangepi:green:pwr";
47+
gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
48+
default-state = "on";
49+
};
50+
51+
status {
52+
label = "orangepi:red:status";
53+
gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
54+
};
55+
};
56+
57+
r-gpio-keys {
58+
compatible = "gpio-keys";
59+
60+
sw4 {
61+
label = "sw4";
62+
linux,code = <BTN_0>;
63+
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
64+
};
65+
};
66+
67+
reg_usb0_vbus: usb0-vbus {
68+
compatible = "regulator-fixed";
69+
regulator-name = "usb0-vbus";
70+
regulator-min-microvolt = <5000000>;
71+
regulator-max-microvolt = <5000000>;
72+
enable-active-high;
73+
gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
74+
status = "okay";
75+
};
76+
};
77+
78+
&codec {
79+
allwinner,audio-routing =
80+
"Line Out", "LINEOUT",
81+
"MIC1", "Mic",
82+
"Mic", "MBIAS";
83+
status = "okay";
84+
};
85+
86+
&de {
87+
status = "okay";
88+
};
89+
90+
&ehci0 {
91+
status = "okay";
92+
};
93+
94+
&ehci1 {
95+
status = "okay";
96+
};
97+
98+
&ehci2 {
99+
status = "okay";
100+
};
101+
102+
&ehci3 {
103+
status = "okay";
104+
};
105+
106+
&emac {
107+
phy-handle = <&int_mii_phy>;
108+
phy-mode = "mii";
109+
allwinner,leds-active-low;
110+
status = "okay";
111+
};
112+
113+
&hdmi {
114+
status = "okay";
115+
};
116+
117+
&hdmi_out {
118+
hdmi_out_con: endpoint {
119+
remote-endpoint = <&hdmi_con_in>;
120+
};
121+
};
122+
123+
&ir {
124+
pinctrl-names = "default";
125+
pinctrl-0 = <&r_ir_rx_pin>;
126+
status = "okay";
127+
};
128+
129+
&mmc0 {
130+
vmmc-supply = <&reg_vcc3v3>;
131+
bus-width = <4>;
132+
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
133+
status = "okay";
134+
};
135+
136+
&ohci0 {
137+
status = "okay";
138+
};
139+
140+
&ohci1 {
141+
status = "okay";
142+
};
143+
144+
&ohci2 {
145+
status = "okay";
146+
};
147+
148+
&ohci3 {
149+
status = "okay";
150+
};
151+
152+
&spi0 {
153+
status = "okay";
154+
155+
flash@0 {
156+
#address-cells = <1>;
157+
#size-cells = <1>;
158+
compatible = "jedec,spi-nor";
159+
reg = <0>;
160+
spi-max-frequency = <40000000>;
161+
};
162+
};
163+
164+
&uart0 {
165+
pinctrl-names = "default";
166+
pinctrl-0 = <&uart0_pa_pins>;
167+
status = "okay";
168+
};
169+
170+
&uart1 {
171+
pinctrl-names = "default";
172+
pinctrl-0 = <&uart1_pins>;
173+
status = "disabled";
174+
};
175+
176+
&uart2 {
177+
pinctrl-names = "default";
178+
pinctrl-0 = <&uart2_pins>;
179+
status = "disabled";
180+
};
181+
182+
&usb_otg {
183+
dr_mode = "otg";
184+
status = "okay";
185+
};
186+
187+
&usbphy {
188+
/* USB Type-A ports' VBUS is always on */
189+
usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
190+
usb0_vbus-supply = <&reg_usb0_vbus>;
191+
status = "okay";
192+
};

0 commit comments

Comments
 (0)