blob: b868ad17af8fdad6563035996b82fb5da7bf7dcd [file] [log] [blame]
Jernej Skrabec463304d2021-01-06 18:02:56 +01001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2// Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.io>
Icenowy Zheng12598692018-07-21 16:20:32 +08003
4/dts-v1/;
5
6#include "sun50i-h6.dtsi"
Jernej Skrabec463304d2021-01-06 18:02:56 +01007#include "sun50i-h6-cpu-opp.dtsi"
Icenowy Zheng12598692018-07-21 16:20:32 +08008
9#include <dt-bindings/gpio/gpio.h>
10
11/ {
Jernej Skrabec463304d2021-01-06 18:02:56 +010012 model = "Pine H64 model A";
Icenowy Zheng12598692018-07-21 16:20:32 +080013 compatible = "pine64,pine-h64", "allwinner,sun50i-h6";
14
15 aliases {
Jagan Teki7d412cd2019-04-14 22:22:21 +053016 ethernet0 = &emac;
Icenowy Zheng12598692018-07-21 16:20:32 +080017 serial0 = &uart0;
Jernej Skrabec463304d2021-01-06 18:02:56 +010018 spi0 = &spi0;
Icenowy Zheng12598692018-07-21 16:20:32 +080019 };
20
21 chosen {
22 stdout-path = "serial0:115200n8";
23 };
24
Jernej Skrabec463304d2021-01-06 18:02:56 +010025 ext_osc32k: ext_osc32k_clk {
26 #clock-cells = <0>;
27 compatible = "fixed-clock";
28 clock-frequency = <32768>;
29 clock-output-names = "ext_osc32k";
30 };
31
32 hdmi_connector: connector {
Jagan Teki7d412cd2019-04-14 22:22:21 +053033 compatible = "hdmi-connector";
34 type = "a";
Jernej Skrabec463304d2021-01-06 18:02:56 +010035 ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
Jagan Teki7d412cd2019-04-14 22:22:21 +053036
37 port {
38 hdmi_con_in: endpoint {
39 remote-endpoint = <&hdmi_out_con>;
40 };
41 };
42 };
43
Icenowy Zheng12598692018-07-21 16:20:32 +080044 leds {
45 compatible = "gpio-leds";
46
Andre Przywara787f5a02021-05-25 01:20:25 +010047 led-0 {
Icenowy Zheng12598692018-07-21 16:20:32 +080048 label = "pine-h64:green:heartbeat";
49 gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
50 };
51
Andre Przywara787f5a02021-05-25 01:20:25 +010052 led-1 {
Icenowy Zheng12598692018-07-21 16:20:32 +080053 label = "pine-h64:white:link";
54 gpios = <&r_pio 0 3 GPIO_ACTIVE_HIGH>; /* PL3 */
55 };
56
Andre Przywara787f5a02021-05-25 01:20:25 +010057 led-2 {
Icenowy Zheng12598692018-07-21 16:20:32 +080058 label = "pine-h64:blue:status";
59 gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
60 };
61 };
Jagan Teki7d412cd2019-04-14 22:22:21 +053062
Jernej Skrabec463304d2021-01-06 18:02:56 +010063 reg_gmac_3v3: gmac-3v3 {
64 compatible = "regulator-fixed";
65 regulator-name = "vcc-gmac-3v3";
66 regulator-min-microvolt = <3300000>;
67 regulator-max-microvolt = <3300000>;
68 startup-delay-us = <100000>;
69 gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>;
70 enable-active-high;
71 };
72
Jagan Teki7d412cd2019-04-14 22:22:21 +053073 reg_usb_vbus: vbus {
74 compatible = "regulator-fixed";
75 regulator-name = "usb-vbus";
76 regulator-min-microvolt = <5000000>;
77 regulator-max-microvolt = <5000000>;
78 startup-delay-us = <100000>;
79 gpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>;
80 enable-active-high;
81 };
Icenowy Zheng12598692018-07-21 16:20:32 +080082};
83
Jernej Skrabec463304d2021-01-06 18:02:56 +010084&cpu0 {
85 cpu-supply = <&reg_dcdca>;
86};
87
88&de {
89 status = "okay";
90};
91
92&ehci0 {
93 status = "okay";
94};
95
96&ehci3 {
97 status = "okay";
98};
99
Jagan Teki7d412cd2019-04-14 22:22:21 +0530100&emac {
Icenowy Zheng12598692018-07-21 16:20:32 +0800101 pinctrl-names = "default";
Jagan Teki7d412cd2019-04-14 22:22:21 +0530102 pinctrl-0 = <&ext_rgmii_pins>;
Jernej Skrabec463304d2021-01-06 18:02:56 +0100103 phy-mode = "rgmii-id";
Jagan Teki7d412cd2019-04-14 22:22:21 +0530104 phy-handle = <&ext_rgmii_phy>;
Jernej Skrabec463304d2021-01-06 18:02:56 +0100105 phy-supply = <&reg_gmac_3v3>;
Jagan Teki7d412cd2019-04-14 22:22:21 +0530106 allwinner,rx-delay-ps = <200>;
107 allwinner,tx-delay-ps = <200>;
108 status = "okay";
109};
110
Jernej Skrabec463304d2021-01-06 18:02:56 +0100111&gpu {
112 mali-supply = <&reg_dcdcc>;
Jagan Teki7d412cd2019-04-14 22:22:21 +0530113 status = "okay";
114};
115
116&hdmi {
117 status = "okay";
118};
119
120&hdmi_out {
121 hdmi_out_con: endpoint {
122 remote-endpoint = <&hdmi_con_in>;
123 };
124};
125
Jernej Skrabec463304d2021-01-06 18:02:56 +0100126&mdio {
127 ext_rgmii_phy: ethernet-phy@1 {
128 compatible = "ethernet-phy-ieee802.3-c22";
129 reg = <1>;
130 };
Jagan Teki7d412cd2019-04-14 22:22:21 +0530131};
132
133&mmc0 {
Icenowy Zheng12598692018-07-21 16:20:32 +0800134 vmmc-supply = <&reg_cldo1>;
135 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
Jagan Teki7d412cd2019-04-14 22:22:21 +0530136 bus-width = <4>;
Icenowy Zheng12598692018-07-21 16:20:32 +0800137 status = "okay";
138};
139
140&mmc2 {
Icenowy Zheng12598692018-07-21 16:20:32 +0800141 vmmc-supply = <&reg_cldo1>;
142 vqmmc-supply = <&reg_bldo2>;
143 non-removable;
144 cap-mmc-hw-reset;
Andre Przywara787f5a02021-05-25 01:20:25 +0100145 mmc-hs200-1_8v;
Jagan Teki7d412cd2019-04-14 22:22:21 +0530146 bus-width = <8>;
Icenowy Zheng12598692018-07-21 16:20:32 +0800147 status = "okay";
148};
149
Jagan Teki7d412cd2019-04-14 22:22:21 +0530150&ohci0 {
151 status = "okay";
152};
153
154&ohci3 {
155 status = "okay";
156};
157
Clément Péron725089c2019-08-25 18:04:18 +0200158&pio {
159 vcc-pc-supply = <&reg_bldo2>;
160 vcc-pd-supply = <&reg_cldo1>;
161 vcc-pg-supply = <&reg_aldo1>;
162};
163
Icenowy Zheng12598692018-07-21 16:20:32 +0800164&r_i2c {
165 status = "okay";
166
167 axp805: pmic@36 {
168 compatible = "x-powers,axp805", "x-powers,axp806";
169 reg = <0x36>;
170 interrupt-parent = <&r_intc>;
171 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
172 interrupt-controller;
173 #interrupt-cells = <1>;
174 x-powers,self-working-mode;
175
176 regulators {
177 reg_aldo1: aldo1 {
178 regulator-always-on;
179 regulator-min-microvolt = <3300000>;
180 regulator-max-microvolt = <3300000>;
181 regulator-name = "vcc-pl";
182 };
183
184 reg_aldo2: aldo2 {
185 regulator-min-microvolt = <3300000>;
186 regulator-max-microvolt = <3300000>;
187 regulator-name = "vcc-ac200";
Jagan Teki7d412cd2019-04-14 22:22:21 +0530188 regulator-enable-ramp-delay = <100000>;
Icenowy Zheng12598692018-07-21 16:20:32 +0800189 };
190
191 reg_aldo3: aldo3 {
192 /* This regulator is connected with CLDO1 */
193 regulator-always-on;
194 regulator-min-microvolt = <3300000>;
195 regulator-max-microvolt = <3300000>;
196 regulator-name = "vcc-3v3-1";
197 };
198
199 reg_bldo1: bldo1 {
200 regulator-always-on;
201 regulator-min-microvolt = <1800000>;
202 regulator-max-microvolt = <1800000>;
203 regulator-name = "vcc-bias-pll";
204 };
205
206 reg_bldo2: bldo2 {
207 regulator-always-on;
208 regulator-min-microvolt = <1800000>;
209 regulator-max-microvolt = <1800000>;
210 regulator-name = "vcc-efuse-pcie-hdmi-io";
211 };
212
213 reg_bldo3: bldo3 {
214 regulator-always-on;
215 regulator-min-microvolt = <1800000>;
216 regulator-max-microvolt = <1800000>;
217 regulator-name = "vcc-dcxoio";
218 };
219
220 bldo4 {
221 /* unused */
222 };
223
224 reg_cldo1: cldo1 {
225 /* This regulator is connected with ALDO3 */
226 regulator-always-on;
227 regulator-min-microvolt = <3300000>;
228 regulator-max-microvolt = <3300000>;
229 regulator-name = "vcc-3v3-2";
230 };
231
232 reg_cldo2: cldo2 {
233 regulator-min-microvolt = <3300000>;
234 regulator-max-microvolt = <3300000>;
235 regulator-name = "vcc-wifi-1";
236 };
237
238 reg_cldo3: cldo3 {
239 regulator-min-microvolt = <3300000>;
240 regulator-max-microvolt = <3300000>;
241 regulator-name = "vcc-wifi-2";
242 };
243
244 reg_dcdca: dcdca {
245 regulator-always-on;
246 regulator-min-microvolt = <810000>;
Jernej Skrabec463304d2021-01-06 18:02:56 +0100247 regulator-max-microvolt = <1160000>;
248 regulator-ramp-delay = <2500>;
Icenowy Zheng12598692018-07-21 16:20:32 +0800249 regulator-name = "vdd-cpu";
250 };
251
252 reg_dcdcc: dcdcc {
Jernej Skrabec463304d2021-01-06 18:02:56 +0100253 regulator-enable-ramp-delay = <32000>;
Icenowy Zheng12598692018-07-21 16:20:32 +0800254 regulator-min-microvolt = <810000>;
255 regulator-max-microvolt = <1080000>;
Jernej Skrabec463304d2021-01-06 18:02:56 +0100256 regulator-ramp-delay = <2500>;
Icenowy Zheng12598692018-07-21 16:20:32 +0800257 regulator-name = "vdd-gpu";
258 };
259
260 reg_dcdcd: dcdcd {
261 regulator-always-on;
262 regulator-min-microvolt = <960000>;
263 regulator-max-microvolt = <960000>;
264 regulator-name = "vdd-sys";
265 };
266
267 reg_dcdce: dcdce {
268 regulator-always-on;
269 regulator-min-microvolt = <1200000>;
270 regulator-max-microvolt = <1200000>;
271 regulator-name = "vcc-dram";
272 };
273
274 sw {
275 /* unused */
276 };
277 };
278 };
279
280 pcf8563: rtc@51 {
281 compatible = "nxp,pcf8563";
282 reg = <0x51>;
Clément Péron725089c2019-08-25 18:04:18 +0200283 interrupt-parent = <&r_intc>;
284 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
Icenowy Zheng12598692018-07-21 16:20:32 +0800285 #clock-cells = <0>;
286 };
287};
288
Jernej Skrabec463304d2021-01-06 18:02:56 +0100289&r_ir {
290 status = "okay";
291};
292
Clément Péron725089c2019-08-25 18:04:18 +0200293&r_pio {
294 vcc-pm-supply = <&reg_aldo1>;
295};
296
Jernej Skrabec463304d2021-01-06 18:02:56 +0100297&rtc {
298 clocks = <&ext_osc32k>;
299};
300
301/*
302 * The CS pin is shared with the MMC2 CMD pin, so we cannot have the SPI
303 * flash and eMMC at the same time, as one of them would fail probing.
304 * Disable SPI0 in here, to prefer the more useful eMMC. U-Boot can
305 * fix this up in no eMMC is connected.
306 */
307&spi0 {
308 pinctrl-0 = <&spi0_pins>, <&spi0_cs_pin>;
309 pinctrl-names = "default";
310 status = "disabled";
311
312 flash@0 {
313 compatible = "winbond,w25q128", "jedec,spi-nor";
314 reg = <0>;
315 spi-max-frequency = <4000000>;
316 };
317};
318
Icenowy Zheng12598692018-07-21 16:20:32 +0800319&uart0 {
320 pinctrl-names = "default";
321 pinctrl-0 = <&uart0_ph_pins>;
322 status = "okay";
323};
Jagan Teki7d412cd2019-04-14 22:22:21 +0530324
325&usb2otg {
326 dr_mode = "host";
327 status = "okay";
328};
329
330&usb2phy {
331 usb0_vbus-supply = <&reg_usb_vbus>;
332 usb3_vbus-supply = <&reg_usb_vbus>;
333 status = "okay";
334};