1// SPDX-License-Identifier: (GPL-2.0+ or MIT)
2/*
3 * Copyright (C) 2021 Arm Ltd.
4 */
5
6/dts-v1/;
7
8#include "sun50i-h616.dtsi"
9
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/interrupt-controller/arm-gic.h>
12
13/ {
14	model = "X96 Mate";
15	compatible = "hechuang,x96-mate", "allwinner,sun50i-h616";
16
17	aliases {
18		serial0 = &uart0;
19	};
20
21	chosen {
22		stdout-path = "serial0:115200n8";
23	};
24
25	reg_vcc5v: vcc5v {
26		/* board wide 5V supply directly from the DC input */
27		compatible = "regulator-fixed";
28		regulator-name = "vcc-5v";
29		regulator-min-microvolt = <5000000>;
30		regulator-max-microvolt = <5000000>;
31		regulator-always-on;
32	};
33};
34
35&ehci0 {
36	status = "okay";
37};
38
39&ehci2 {
40	status = "okay";
41};
42
43&ir {
44	status = "okay";
45};
46
47&mmc0 {
48	vmmc-supply = <&reg_dcdce>;
49	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;	/* PF6 */
50	bus-width = <4>;
51	status = "okay";
52};
53
54&mmc2 {
55	vmmc-supply = <&reg_dcdce>;
56	vqmmc-supply = <&reg_bldo1>;
57	bus-width = <8>;
58	non-removable;
59	cap-mmc-hw-reset;
60	mmc-ddr-1_8v;
61	mmc-hs200-1_8v;
62	status = "okay";
63};
64
65&ohci0 {
66	status = "okay";
67};
68
69&ohci2 {
70	status = "okay";
71};
72
73&r_rsb {
74	status = "okay";
75
76	axp305: pmic@745 {
77		compatible = "x-powers,axp305", "x-powers,axp805",
78			     "x-powers,axp806";
79		interrupt-controller;
80		#interrupt-cells = <1>;
81		reg = <0x745>;
82
83		x-powers,self-working-mode;
84		vina-supply = <&reg_vcc5v>;
85		vinb-supply = <&reg_vcc5v>;
86		vinc-supply = <&reg_vcc5v>;
87		vind-supply = <&reg_vcc5v>;
88		vine-supply = <&reg_vcc5v>;
89		aldoin-supply = <&reg_vcc5v>;
90		bldoin-supply = <&reg_vcc5v>;
91		cldoin-supply = <&reg_vcc5v>;
92
93		regulators {
94			reg_aldo1: aldo1 {
95				regulator-always-on;
96				regulator-min-microvolt = <3300000>;
97				regulator-max-microvolt = <3300000>;
98				regulator-name = "vcc-sys";
99			};
100
101			/* Enabled by the Android BSP */
102			reg_aldo2: aldo2 {
103				regulator-min-microvolt = <3300000>;
104				regulator-max-microvolt = <3300000>;
105				regulator-name = "vcc3v3-ext";
106				status = "disabled";
107			};
108
109			/* Enabled by the Android BSP */
110			reg_aldo3: aldo3 {
111				regulator-min-microvolt = <3300000>;
112				regulator-max-microvolt = <3300000>;
113				regulator-name = "vcc3v3-ext2";
114				status = "disabled";
115			};
116
117			reg_bldo1: bldo1 {
118				regulator-always-on;
119				regulator-min-microvolt = <1800000>;
120				regulator-max-microvolt = <1800000>;
121				regulator-name = "vcc1v8";
122			};
123
124			/* Enabled by the Android BSP */
125			reg_bldo2: bldo2 {
126				regulator-min-microvolt = <1800000>;
127				regulator-max-microvolt = <1800000>;
128				regulator-name = "vcc1v8-2";
129				status = "disabled";
130			};
131
132			bldo3 {
133				/* unused */
134			};
135
136			bldo4 {
137				/* unused */
138			};
139
140			cldo1 {
141				regulator-min-microvolt = <2500000>;
142				regulator-max-microvolt = <2500000>;
143				regulator-name = "vcc2v5";
144			};
145
146			cldo2 {
147				/* unused */
148			};
149
150			cldo3 {
151				/* unused */
152			};
153
154			reg_dcdca: dcdca {
155				regulator-always-on;
156				regulator-min-microvolt = <810000>;
157				regulator-max-microvolt = <1100000>;
158				regulator-name = "vdd-cpu";
159			};
160
161			reg_dcdcc: dcdcc {
162				regulator-always-on;
163				regulator-min-microvolt = <810000>;
164				regulator-max-microvolt = <990000>;
165				regulator-name = "vdd-gpu-sys";
166			};
167
168			reg_dcdcd: dcdcd {
169				regulator-always-on;
170				regulator-min-microvolt = <1360000>;
171				regulator-max-microvolt = <1360000>;
172				regulator-name = "vdd-dram";
173			};
174
175			reg_dcdce: dcdce {
176				regulator-always-on;
177				regulator-min-microvolt = <3300000>;
178				regulator-max-microvolt = <3300000>;
179				regulator-name = "vcc-eth-mmc";
180			};
181
182			sw {
183				/* unused */
184			};
185		};
186	};
187};
188
189&uart0 {
190	pinctrl-names = "default";
191	pinctrl-0 = <&uart0_ph_pins>;
192	status = "okay";
193};
194
195&usbotg {
196	dr_mode = "host";	/* USB A type receptable */
197	status = "okay";
198};
199
200&usbphy {
201	status = "okay";
202};
203