blob: b75ca4d7d00199b7972718a6dd55306ecfc01933 [file] [log] [blame]
Jagan Tekica4cdf92017-05-24 19:18:08 +00001/*
Andre Przywarae237db62018-07-04 14:16:37 +01002 * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.xyz>
3 *
4 * Based on sun50i-h5-orangepi-pc2.dts, which is:
5 * Copyright (C) 2016 ARM Ltd.
Jagan Tekica4cdf92017-05-24 19:18:08 +00006 *
7 * This file is dual-licensed: you can use it either under the terms
8 * of the GPL or the X11 license, at your option. Note that this dual
9 * licensing only applies to this file, and not this project as a
10 * whole.
11 *
Andre Przywarae237db62018-07-04 14:16:37 +010012 * a) This file is free software; you can redistribute it and/or
Jagan Tekica4cdf92017-05-24 19:18:08 +000013 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of the
15 * License, or (at your option) any later version.
16 *
Andre Przywarae237db62018-07-04 14:16:37 +010017 * This file is distributed in the hope that it will be useful,
Jagan Tekica4cdf92017-05-24 19:18:08 +000018 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * Or, alternatively,
23 *
24 * b) Permission is hereby granted, free of charge, to any person
25 * obtaining a copy of this software and associated documentation
26 * files (the "Software"), to deal in the Software without
27 * restriction, including without limitation the rights to use,
28 * copy, modify, merge, publish, distribute, sublicense, and/or
29 * sell copies of the Software, and to permit persons to whom the
30 * Software is furnished to do so, subject to the following
31 * conditions:
32 *
33 * The above copyright notice and this permission notice shall be
34 * included in all copies or substantial portions of the Software.
35 *
36 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43 * OTHER DEALINGS IN THE SOFTWARE.
44 */
45
46/dts-v1/;
Jagan Tekica4cdf92017-05-24 19:18:08 +000047#include "sun50i-h5.dtsi"
48
49#include <dt-bindings/gpio/gpio.h>
Andre Przywarae237db62018-07-04 14:16:37 +010050#include <dt-bindings/input/input.h>
Jagan Tekica4cdf92017-05-24 19:18:08 +000051
52/ {
Andre Przywarae237db62018-07-04 14:16:37 +010053 model = "Xunlong Orange Pi Prime";
Jagan Tekica4cdf92017-05-24 19:18:08 +000054 compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5";
55
56 aliases {
Andre Przywarae237db62018-07-04 14:16:37 +010057 ethernet0 = &emac;
Jagan Tekica4cdf92017-05-24 19:18:08 +000058 serial0 = &uart0;
59 };
60
61 chosen {
62 stdout-path = "serial0:115200n8";
63 };
64
Andre Przywarae237db62018-07-04 14:16:37 +010065 connector {
66 compatible = "hdmi-connector";
67 type = "a";
68
69 port {
70 hdmi_con_in: endpoint {
71 remote-endpoint = <&hdmi_out_con>;
72 };
73 };
Jagan Tekica4cdf92017-05-24 19:18:08 +000074 };
75
Andre Przywarae237db62018-07-04 14:16:37 +010076 leds {
77 compatible = "gpio-leds";
78
79 pwr {
80 label = "orangepi:green:pwr";
81 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
82 default-state = "on";
Jagan Tekica4cdf92017-05-24 19:18:08 +000083 };
Andre Przywarae237db62018-07-04 14:16:37 +010084
85 status {
86 label = "orangepi:red:status";
87 gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>;
88 };
89 };
90
91 r-gpio-keys {
92 compatible = "gpio-keys";
93
94 sw4 {
95 label = "sw4";
96 linux,code = <BTN_0>;
97 gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
98 };
99 };
100
101 reg_gmac_3v3: gmac-3v3 {
102 compatible = "regulator-fixed";
103 regulator-name = "gmac-3v3";
104 regulator-min-microvolt = <3300000>;
105 regulator-max-microvolt = <3300000>;
106 startup-delay-us = <100000>;
107 enable-active-high;
108 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
109 };
110
111 reg_vcc3v3: vcc3v3 {
112 compatible = "regulator-fixed";
113 regulator-name = "vcc3v3";
114 regulator-min-microvolt = <3300000>;
115 regulator-max-microvolt = <3300000>;
116 };
117
118 reg_usb0_vbus: usb0-vbus {
119 compatible = "regulator-fixed";
120 regulator-name = "usb0-vbus";
121 regulator-min-microvolt = <5000000>;
122 regulator-max-microvolt = <5000000>;
123 enable-active-high;
124 gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
125 status = "okay";
Jagan Tekica4cdf92017-05-24 19:18:08 +0000126 };
Andre Przywarae237db62018-07-04 14:16:37 +0100127
128 wifi_pwrseq: wifi_pwrseq {
129 compatible = "mmc-pwrseq-simple";
130 reset-gpios = <&pio 2 14 GPIO_ACTIVE_LOW>; /* PC14 */
131 };
132};
133
134&codec {
135 allwinner,audio-routing =
136 "Line Out", "LINEOUT",
137 "MIC1", "Mic",
138 "Mic", "MBIAS";
139 status = "okay";
140};
141
142&de {
143 status = "okay";
Jagan Tekica4cdf92017-05-24 19:18:08 +0000144};
145
Jagan Teki95059822018-05-07 13:03:50 +0530146&ehci0 {
147 status = "okay";
148};
149
Jagan Tekie7bf8232017-11-29 13:14:23 +0530150&ehci1 {
151 status = "okay";
152};
153
Andre Przywarae237db62018-07-04 14:16:37 +0100154&ehci2 {
155 status = "okay";
156};
157
158&ehci3 {
159 status = "okay";
160};
161
162&emac {
163 pinctrl-names = "default";
164 pinctrl-0 = <&emac_rgmii_pins>;
165 phy-supply = <&reg_gmac_3v3>;
166 phy-handle = <&ext_rgmii_phy>;
167 phy-mode = "rgmii";
168 status = "okay";
169};
170
171&external_mdio {
172 ext_rgmii_phy: ethernet-phy@1 {
173 compatible = "ethernet-phy-ieee802.3-c22";
174 reg = <1>;
175 };
176};
177
178&hdmi {
179 status = "okay";
180};
181
182&hdmi_out {
183 hdmi_out_con: endpoint {
184 remote-endpoint = <&hdmi_con_in>;
185 };
186};
187
188&ir {
189 pinctrl-names = "default";
190 pinctrl-0 = <&ir_pins_a>;
191 status = "okay";
192};
193
Jagan Tekica4cdf92017-05-24 19:18:08 +0000194&mmc0 {
Andre Przywarae237db62018-07-04 14:16:37 +0100195 vmmc-supply = <&reg_vcc3v3>;
196 bus-width = <4>;
197 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
198 status = "okay";
199};
200
201&mmc1 {
Jagan Tekica4cdf92017-05-24 19:18:08 +0000202 vmmc-supply = <&reg_vcc3v3>;
Andre Przywarae237db62018-07-04 14:16:37 +0100203 mmc-pwrseq = <&wifi_pwrseq>;
Jagan Tekica4cdf92017-05-24 19:18:08 +0000204 bus-width = <4>;
Andre Przywarae237db62018-07-04 14:16:37 +0100205 non-removable;
Jagan Tekica4cdf92017-05-24 19:18:08 +0000206 status = "okay";
207};
208
Jagan Teki95059822018-05-07 13:03:50 +0530209&ohci0 {
210 status = "okay";
211};
212
Jagan Tekie7bf8232017-11-29 13:14:23 +0530213&ohci1 {
214 status = "okay";
215};
216
Andre Przywarae237db62018-07-04 14:16:37 +0100217&ohci2 {
218 status = "okay";
219};
220
221&ohci3 {
222 status = "okay";
223};
224
Jagan Tekica4cdf92017-05-24 19:18:08 +0000225&uart0 {
226 pinctrl-names = "default";
227 pinctrl-0 = <&uart0_pins_a>;
228 status = "okay";
229};
230
Andre Przywarae237db62018-07-04 14:16:37 +0100231&uart1 {
232 pinctrl-names = "default";
233 pinctrl-0 = <&uart1_pins>;
234 status = "disabled";
235};
236
237&uart2 {
238 pinctrl-names = "default";
239 pinctrl-0 = <&uart2_pins>;
240 status = "disabled";
241};
242
Jagan Teki95059822018-05-07 13:03:50 +0530243&usb_otg {
244 dr_mode = "otg";
245 status = "okay";
246};
247
Jagan Tekica4cdf92017-05-24 19:18:08 +0000248&usbphy {
Andre Przywarae237db62018-07-04 14:16:37 +0100249 /* USB Type-A ports' VBUS is always on */
250 usb0_id_det-gpios = <&pio 0 21 GPIO_ACTIVE_HIGH>; /* PA21 */
251 usb0_vbus-supply = <&reg_usb0_vbus>;
Jagan Tekica4cdf92017-05-24 19:18:08 +0000252 status = "okay";
253};