1// SPDX-License-Identifier: (GPL-2.0+ or MIT)
2/*
3 * Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.io>
4 */
5
6/dts-v1/;
7
8#include "sun50i-h6.dtsi"
9
10#include <dt-bindings/gpio/gpio.h>
11
12/ {
13	model = "Pine H64";
14	compatible = "pine64,pine-h64", "allwinner,sun50i-h6";
15
16	aliases {
17		serial0 = &uart0;
18	};
19
20	chosen {
21		stdout-path = "serial0:115200n8";
22	};
23
24	leds {
25		compatible = "gpio-leds";
26
27		heartbeat {
28			label = "pine-h64:green:heartbeat";
29			gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
30		};
31
32		link {
33			label = "pine-h64:white:link";
34			gpios = <&r_pio 0 3 GPIO_ACTIVE_HIGH>; /* PL3 */
35		};
36
37		status {
38			label = "pine-h64:blue:status";
39			gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
40		};
41	};
42};
43
44&mmc0 {
45	pinctrl-names = "default";
46	pinctrl-0 = <&mmc0_pins>;
47	vmmc-supply = <&reg_cldo1>;
48	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
49	bus-width = <4>;
50	status = "okay";
51};
52
53&mmc2 {
54	pinctrl-names = "default";
55	pinctrl-0 = <&mmc2_pins>;
56	vmmc-supply = <&reg_cldo1>;
57	vqmmc-supply = <&reg_bldo2>;
58	non-removable;
59	cap-mmc-hw-reset;
60	bus-width = <8>;
61	status = "okay";
62};
63
64&r_i2c {
65	status = "okay";
66
67	axp805: pmic@36 {
68		compatible = "x-powers,axp805", "x-powers,axp806";
69		reg = <0x36>;
70		interrupt-parent = <&r_intc>;
71		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
72		interrupt-controller;
73		#interrupt-cells = <1>;
74		x-powers,self-working-mode;
75
76		regulators {
77			reg_aldo1: aldo1 {
78				regulator-always-on;
79				regulator-min-microvolt = <3300000>;
80				regulator-max-microvolt = <3300000>;
81				regulator-name = "vcc-pl";
82			};
83
84			reg_aldo2: aldo2 {
85				regulator-min-microvolt = <3300000>;
86				regulator-max-microvolt = <3300000>;
87				regulator-name = "vcc-ac200";
88			};
89
90			reg_aldo3: aldo3 {
91				/* This regulator is connected with CLDO1 */
92				regulator-always-on;
93				regulator-min-microvolt = <3300000>;
94				regulator-max-microvolt = <3300000>;
95				regulator-name = "vcc-3v3-1";
96			};
97
98			reg_bldo1: bldo1 {
99				regulator-always-on;
100				regulator-min-microvolt = <1800000>;
101				regulator-max-microvolt = <1800000>;
102				regulator-name = "vcc-bias-pll";
103			};
104
105			reg_bldo2: bldo2 {
106				regulator-always-on;
107				regulator-min-microvolt = <1800000>;
108				regulator-max-microvolt = <1800000>;
109				regulator-name = "vcc-efuse-pcie-hdmi-io";
110			};
111
112			reg_bldo3: bldo3 {
113				regulator-always-on;
114				regulator-min-microvolt = <1800000>;
115				regulator-max-microvolt = <1800000>;
116				regulator-name = "vcc-dcxoio";
117			};
118
119			bldo4 {
120				/* unused */
121			};
122
123			reg_cldo1: cldo1 {
124				/* This regulator is connected with ALDO3 */
125				regulator-always-on;
126				regulator-min-microvolt = <3300000>;
127				regulator-max-microvolt = <3300000>;
128				regulator-name = "vcc-3v3-2";
129			};
130
131			reg_cldo2: cldo2 {
132				regulator-min-microvolt = <3300000>;
133				regulator-max-microvolt = <3300000>;
134				regulator-name = "vcc-wifi-1";
135			};
136
137			reg_cldo3: cldo3 {
138				regulator-min-microvolt = <3300000>;
139				regulator-max-microvolt = <3300000>;
140				regulator-name = "vcc-wifi-2";
141			};
142
143			reg_dcdca: dcdca {
144				regulator-always-on;
145				regulator-min-microvolt = <810000>;
146				regulator-max-microvolt = <1080000>;
147				regulator-name = "vdd-cpu";
148			};
149
150			reg_dcdcc: dcdcc {
151				regulator-min-microvolt = <810000>;
152				regulator-max-microvolt = <1080000>;
153				regulator-name = "vdd-gpu";
154			};
155
156			reg_dcdcd: dcdcd {
157				regulator-always-on;
158				regulator-min-microvolt = <960000>;
159				regulator-max-microvolt = <960000>;
160				regulator-name = "vdd-sys";
161			};
162
163			reg_dcdce: dcdce {
164				regulator-always-on;
165				regulator-min-microvolt = <1200000>;
166				regulator-max-microvolt = <1200000>;
167				regulator-name = "vcc-dram";
168			};
169
170			sw {
171				/* unused */
172			};
173		};
174	};
175
176	pcf8563: rtc@51 {
177		compatible = "nxp,pcf8563";
178		reg = <0x51>;
179		#clock-cells = <0>;
180	};
181};
182
183&uart0 {
184	pinctrl-names = "default";
185	pinctrl-0 = <&uart0_ph_pins>;
186	status = "okay";
187};
188