blob: 1010c1b22d2e6504ef4f0b214f5a84eb906d9e07 [file] [log] [blame]
Chen-Yu Tsai8d7da692020-01-12 23:36:13 +08001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2// Copyright (C) 2016 ARM Ltd.
Andre Przywara47b3cab2017-02-16 01:20:29 +00003
4/dts-v1/;
Jagan Teki053d9a12017-05-25 18:15:36 +00005#include "sun50i-h5.dtsi"
Andre Przywara47b3cab2017-02-16 01:20:29 +00006
Jagan Teki9b646a72017-05-25 18:26:41 +00007#include <dt-bindings/gpio/gpio.h>
Andre Przywarae237db62018-07-04 14:16:37 +01008#include <dt-bindings/input/input.h>
9#include <dt-bindings/pinctrl/sun4i-a10.h>
Jagan Teki9b646a72017-05-25 18:26:41 +000010
Andre Przywara47b3cab2017-02-16 01:20:29 +000011/ {
Andre Przywarae237db62018-07-04 14:16:37 +010012 model = "Xunlong Orange Pi PC 2";
13 compatible = "xunlong,orangepi-pc2", "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 };
Andre Przywara47b3cab2017-02-16 01:20:29 +000021
Jagan Teki1e8816c2018-05-07 13:03:47 +053022 aliases {
Jagan Teki1e8816c2018-05-07 13:03:47 +053023 ethernet0 = &emac;
Andre Przywarae237db62018-07-04 14:16:37 +010024 serial0 = &uart0;
Jagan Teki1e8816c2018-05-07 13:03:47 +053025 };
26
Andre Przywara47b3cab2017-02-16 01:20:29 +000027 chosen {
28 stdout-path = "serial0:115200n8";
29 };
30
Andre Przywarae237db62018-07-04 14:16:37 +010031 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
Andre Przywara3da6e432021-05-25 01:20:25 +010045 led-0 {
Andre Przywarae237db62018-07-04 14:16:37 +010046 label = "orangepi:green:pwr";
47 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
48 default-state = "on";
49 };
50
Andre Przywara3da6e432021-05-25 01:20:25 +010051 led-1 {
Andre Przywarae237db62018-07-04 14:16:37 +010052 label = "orangepi:red:status";
53 gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>;
54 };
Andre Przywara47b3cab2017-02-16 01:20:29 +000055 };
56
Andre Przywarae237db62018-07-04 14:16:37 +010057 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>;
Andre Przywara3da6e432021-05-25 01:20:25 +010064 wakeup-source;
Andre Przywara47b3cab2017-02-16 01:20:29 +000065 };
66 };
Andre Przywarae237db62018-07-04 14:16:37 +010067
68 reg_gmac_3v3: gmac-3v3 {
69 compatible = "regulator-fixed";
70 regulator-name = "gmac-3v3";
71 regulator-min-microvolt = <3300000>;
72 regulator-max-microvolt = <3300000>;
73 startup-delay-us = <100000>;
74 enable-active-high;
75 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
76 };
77
78 reg_usb0_vbus: usb0-vbus {
79 compatible = "regulator-fixed";
80 regulator-name = "usb0-vbus";
81 regulator-min-microvolt = <5000000>;
82 regulator-max-microvolt = <5000000>;
83 enable-active-high;
84 gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
85 status = "okay";
86 };
87};
88
89&codec {
90 allwinner,audio-routing =
91 "Line Out", "LINEOUT",
92 "MIC1", "Mic",
93 "Mic", "MBIAS";
94 status = "okay";
Andre Przywara47b3cab2017-02-16 01:20:29 +000095};
96
Andre Przywara3da6e432021-05-25 01:20:25 +010097&cpu0 {
98 cpu-supply = <&reg_vdd_cpux>;
99};
100
Andre Przywarae237db62018-07-04 14:16:37 +0100101&de {
102 status = "okay";
103};
104
Jagan Tekiad812222018-05-07 13:03:48 +0530105&ehci0 {
106 status = "okay";
107};
108
Jagan Teki1e8816c2018-05-07 13:03:47 +0530109&ehci1 {
110 status = "okay";
111};
112
Andre Przywarae237db62018-07-04 14:16:37 +0100113&ehci2 {
114 status = "okay";
115};
116
117&ehci3 {
118 status = "okay";
119};
120
Jagan Teki1e8816c2018-05-07 13:03:47 +0530121&emac {
122 pinctrl-names = "default";
123 pinctrl-0 = <&emac_rgmii_pins>;
Andre Przywarae237db62018-07-04 14:16:37 +0100124 phy-supply = <&reg_gmac_3v3>;
Jagan Teki1e8816c2018-05-07 13:03:47 +0530125 phy-handle = <&ext_rgmii_phy>;
Andre Przywara3da6e432021-05-25 01:20:25 +0100126 phy-mode = "rgmii-id";
Jagan Teki1e8816c2018-05-07 13:03:47 +0530127 status = "okay";
128};
129
130&external_mdio {
131 ext_rgmii_phy: ethernet-phy@1 {
132 compatible = "ethernet-phy-ieee802.3-c22";
133 reg = <1>;
134 };
135};
136
Andre Przywarae237db62018-07-04 14:16:37 +0100137&hdmi {
138 status = "okay";
139};
140
141&hdmi_out {
142 hdmi_out_con: endpoint {
143 remote-endpoint = <&hdmi_con_in>;
144 };
145};
146
147&ir {
148 pinctrl-names = "default";
Chen-Yu Tsai8d7da692020-01-12 23:36:13 +0800149 pinctrl-0 = <&r_ir_rx_pin>;
Andre Przywarae237db62018-07-04 14:16:37 +0100150 status = "okay";
151};
152
Andre Przywara47b3cab2017-02-16 01:20:29 +0000153&mmc0 {
Andre Przywara47b3cab2017-02-16 01:20:29 +0000154 vmmc-supply = <&reg_vcc3v3>;
155 bus-width = <4>;
Andre Przywarae237db62018-07-04 14:16:37 +0100156 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
Andre Przywara47b3cab2017-02-16 01:20:29 +0000157 status = "okay";
158};
159
Jagan Tekiad812222018-05-07 13:03:48 +0530160&ohci0 {
161 status = "okay";
162};
163
Andre Przywara47b3cab2017-02-16 01:20:29 +0000164&ohci1 {
165 status = "okay";
166};
167
Andre Przywarae237db62018-07-04 14:16:37 +0100168&ohci2 {
169 status = "okay";
170};
171
172&ohci3 {
173 status = "okay";
174};
175
Andre Przywara3da6e432021-05-25 01:20:25 +0100176&r_i2c {
177 status = "okay";
178
179 reg_vdd_cpux: regulator@65 {
180 compatible = "silergy,sy8106a";
181 reg = <0x65>;
182 regulator-name = "vdd-cpux";
183 silergy,fixed-microvolt = <1100000>;
184 regulator-min-microvolt = <1000000>;
185 regulator-max-microvolt = <1400000>;
186 regulator-ramp-delay = <200>;
187 regulator-boot-on;
188 regulator-always-on;
189 };
190};
191
Andre Przywaracd3eeab2018-10-29 00:56:49 +0000192&spi0 {
193 status = "okay";
194
195 flash@0 {
196 #address-cells = <1>;
197 #size-cells = <1>;
198 compatible = "jedec,spi-nor";
199 reg = <0>;
200 spi-max-frequency = <40000000>;
201 };
202};
203
Jagan Teki1e8816c2018-05-07 13:03:47 +0530204&uart0 {
Andre Przywara47b3cab2017-02-16 01:20:29 +0000205 pinctrl-names = "default";
Chen-Yu Tsai8d7da692020-01-12 23:36:13 +0800206 pinctrl-0 = <&uart0_pa_pins>;
Andre Przywara47b3cab2017-02-16 01:20:29 +0000207 status = "okay";
Andre Przywaraeb6b7512018-04-04 01:31:19 +0100208};
Andre Przywara47b3cab2017-02-16 01:20:29 +0000209
Andre Przywarae237db62018-07-04 14:16:37 +0100210&uart1 {
211 pinctrl-names = "default";
212 pinctrl-0 = <&uart1_pins>;
213 status = "disabled";
214};
215
216&uart2 {
217 pinctrl-names = "default";
218 pinctrl-0 = <&uart2_pins>;
219 status = "disabled";
220};
221
Jagan Tekiad812222018-05-07 13:03:48 +0530222&usb_otg {
223 dr_mode = "otg";
224 status = "okay";
225};
226
Jagan Teki1e8816c2018-05-07 13:03:47 +0530227&usbphy {
Andre Przywarae237db62018-07-04 14:16:37 +0100228 /* USB Type-A ports' VBUS is always on */
229 usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
230 usb0_vbus-supply = <&reg_usb0_vbus>;
Jagan Teki1e8816c2018-05-07 13:03:47 +0530231 status = "okay";
Andre Przywara47b3cab2017-02-16 01:20:29 +0000232};