Debian Codegraph @

scripts/dtc/include-prefixes/arm64/allwinner/sun50i-h5-orangepi-pc2.dts

raw
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 #include "sun50i-h5-cpu-opp.dtsi"
7
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/pinctrl/sun4i-a10.h>
11
12 / {
13 model = "Xunlong Orange Pi PC 2";
14 compatible = "xunlong,orangepi-pc2", "allwinner,sun50i-h5";
15
16 reg_vcc3v3: vcc3v3 {
17 compatible = "regulator-fixed";
18 regulator-name = "vcc3v3";
19 regulator-min-microvolt = <3300000>;
20 regulator-max-microvolt = <3300000>;
21 };
22
23 aliases {
24 ethernet0 = &emac;
25 serial0 = &uart0;
26 };
27
28 chosen {
29 stdout-path = "serial0:115200n8";
30 };
31
32 connector {
33 compatible = "hdmi-connector";
34 type = "a";
35
36 port {
37 hdmi_con_in: endpoint {
38 remote-endpoint = <&hdmi_out_con>;
39 };
40 };
41 };
42
43 leds {
44 compatible = "gpio-leds";
45
46 led-0 {
47 label = "orangepi:green:pwr";
48 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
49 default-state = "on";
50 };
51
52 led-1 {
53 label = "orangepi:red:status";
54 gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>;
55 };
56 };
57
58 gpio-keys {
59 compatible = "gpio-keys";
60
61 key-sw4 {
62 label = "sw4";
63 linux,code = <BTN_0>;
64 gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
65 wakeup-source;
66 };
67 };
68
69 reg_gmac_3v3: gmac-3v3 {
70 compatible = "regulator-fixed";
71 regulator-name = "gmac-3v3";
72 regulator-min-microvolt = <3300000>;
73 regulator-max-microvolt = <3300000>;
74 startup-delay-us = <100000>;
75 enable-active-high;
76 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
77 };
78
79 reg_usb0_vbus: usb0-vbus {
80 compatible = "regulator-fixed";
81 regulator-name = "usb0-vbus";
82 regulator-min-microvolt = <5000000>;
83 regulator-max-microvolt = <5000000>;
84 enable-active-high;
85 gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
86 status = "okay";
87 };
88 };
89
90 &codec {
91 allwinner,audio-routing =
92 "Line Out", "LINEOUT",
93 "MIC1", "Mic",
94 "Mic", "MBIAS";
95 status = "okay";
96 };
97
98 &cpu0 {
99 cpu-supply = <&reg_vdd_cpux>;
100 };
101
102 &de {
103 status = "okay";
104 };
105
106 &ehci0 {
107 status = "okay";
108 };
109
110 &ehci1 {
111 status = "okay";
112 };
113
114 &ehci2 {
115 status = "okay";
116 };
117
118 &ehci3 {
119 status = "okay";
120 };
121
122 &emac {
123 pinctrl-names = "default";
124 pinctrl-0 = <&emac_rgmii_pins>;
125 phy-supply = <&reg_gmac_3v3>;
126 phy-handle = <&ext_rgmii_phy>;
127 phy-mode = "rgmii-id";
128 status = "okay";
129 };
130
131 &external_mdio {
132 ext_rgmii_phy: ethernet-phy@1 {
133 compatible = "ethernet-phy-ieee802.3-c22";
134 reg = <1>;
135 };
136 };
137
138 &hdmi {
139 status = "okay";
140 };
141
142 &hdmi_out {
143 hdmi_out_con: endpoint {
144 remote-endpoint = <&hdmi_con_in>;
145 };
146 };
147
148 &ir {
149 pinctrl-names = "default";
150 pinctrl-0 = <&r_ir_rx_pin>;
151 status = "okay";
152 };
153
154 &mmc0 {
155 vmmc-supply = <&reg_vcc3v3>;
156 disable-wp;
157 bus-width = <4>;
158 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
159 status = "okay";
160 };
161
162 &ohci0 {
163 status = "okay";
164 };
165
166 &ohci1 {
167 status = "okay";
168 };
169
170 &ohci2 {
171 status = "okay";
172 };
173
174 &ohci3 {
175 status = "okay";
176 };
177
178 &r_i2c {
179 status = "okay";
180
181 reg_vdd_cpux: regulator@65 {
182 compatible = "silergy,sy8106a";
183 reg = <0x65>;
184 regulator-name = "vdd-cpux";
185 silergy,fixed-microvolt = <1100000>;
186 regulator-min-microvolt = <1000000>;
187 regulator-max-microvolt = <1400000>;
188 regulator-ramp-delay = <200>;
189 regulator-boot-on;
190 regulator-always-on;
191 };
192 };
193
194 &spi0 {
195 status = "okay";
196
197 flash@0 {
198 #address-cells = <1>;
199 #size-cells = <1>;
200 compatible = "jedec,spi-nor";
201 reg = <0>;
202 spi-max-frequency = <40000000>;
203 };
204 };
205
206 &uart0 {
207 pinctrl-names = "default";
208 pinctrl-0 = <&uart0_pa_pins>;
209 status = "okay";
210 };
211
212 &uart1 {
213 pinctrl-names = "default";
214 pinctrl-0 = <&uart1_pins>;
215 status = "disabled";
216 };
217
218 &uart2 {
219 pinctrl-names = "default";
220 pinctrl-0 = <&uart2_pins>;
221 status = "disabled";
222 };
223
224 &usb_otg {
225 dr_mode = "otg";
226 status = "okay";
227 };
228
229 &usbphy {
230 /* USB Type-A ports' VBUS is always on */
231 usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
232 usb0_vbus-supply = <&reg_usb0_vbus>;
233 status = "okay";
234 };