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&ir {
36	status = "okay";
37};
38
39&mmc0 {
40	vmmc-supply = <&reg_dcdce>;
41	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;	/* PF6 */
42	bus-width = <4>;
43	status = "okay";
44};
45
46&mmc2 {
47	vmmc-supply = <&reg_dcdce>;
48	vqmmc-supply = <&reg_bldo1>;
49	bus-width = <8>;
50	non-removable;
51	cap-mmc-hw-reset;
52	mmc-ddr-1_8v;
53	mmc-hs200-1_8v;
54	status = "okay";
55};
56
57&r_rsb {
58	status = "okay";
59
60	axp305: pmic@745 {
61		compatible = "x-powers,axp305", "x-powers,axp805",
62			     "x-powers,axp806";
63		interrupt-controller;
64		#interrupt-cells = <1>;
65		reg = <0x745>;
66
67		x-powers,self-working-mode;
68		vina-supply = <&reg_vcc5v>;
69		vinb-supply = <&reg_vcc5v>;
70		vinc-supply = <&reg_vcc5v>;
71		vind-supply = <&reg_vcc5v>;
72		vine-supply = <&reg_vcc5v>;
73		aldoin-supply = <&reg_vcc5v>;
74		bldoin-supply = <&reg_vcc5v>;
75		cldoin-supply = <&reg_vcc5v>;
76
77		regulators {
78			reg_aldo1: aldo1 {
79				regulator-always-on;
80				regulator-min-microvolt = <3300000>;
81				regulator-max-microvolt = <3300000>;
82				regulator-name = "vcc-sys";
83			};
84
85			/* Enabled by the Android BSP */
86			reg_aldo2: aldo2 {
87				regulator-min-microvolt = <3300000>;
88				regulator-max-microvolt = <3300000>;
89				regulator-name = "vcc3v3-ext";
90				status = "disabled";
91			};
92
93			/* Enabled by the Android BSP */
94			reg_aldo3: aldo3 {
95				regulator-min-microvolt = <3300000>;
96				regulator-max-microvolt = <3300000>;
97				regulator-name = "vcc3v3-ext2";
98				status = "disabled";
99			};
100
101			reg_bldo1: bldo1 {
102				regulator-always-on;
103				regulator-min-microvolt = <1800000>;
104				regulator-max-microvolt = <1800000>;
105				regulator-name = "vcc1v8";
106			};
107
108			/* Enabled by the Android BSP */
109			reg_bldo2: bldo2 {
110				regulator-min-microvolt = <1800000>;
111				regulator-max-microvolt = <1800000>;
112				regulator-name = "vcc1v8-2";
113				status = "disabled";
114			};
115
116			bldo3 {
117				/* unused */
118			};
119
120			bldo4 {
121				/* unused */
122			};
123
124			cldo1 {
125				regulator-min-microvolt = <2500000>;
126				regulator-max-microvolt = <2500000>;
127				regulator-name = "vcc2v5";
128			};
129
130			cldo2 {
131				/* unused */
132			};
133
134			cldo3 {
135				/* unused */
136			};
137
138			reg_dcdca: dcdca {
139				regulator-always-on;
140				regulator-min-microvolt = <810000>;
141				regulator-max-microvolt = <1100000>;
142				regulator-name = "vdd-cpu";
143			};
144
145			reg_dcdcc: dcdcc {
146				regulator-always-on;
147				regulator-min-microvolt = <810000>;
148				regulator-max-microvolt = <990000>;
149				regulator-name = "vdd-gpu-sys";
150			};
151
152			reg_dcdcd: dcdcd {
153				regulator-always-on;
154				regulator-min-microvolt = <1360000>;
155				regulator-max-microvolt = <1360000>;
156				regulator-name = "vdd-dram";
157			};
158
159			reg_dcdce: dcdce {
160				regulator-always-on;
161				regulator-min-microvolt = <3300000>;
162				regulator-max-microvolt = <3300000>;
163				regulator-name = "vcc-eth-mmc";
164			};
165
166			sw {
167				/* unused */
168			};
169		};
170	};
171};
172
173&uart0 {
174	pinctrl-names = "default";
175	pinctrl-0 = <&uart0_ph_pins>;
176	status = "okay";
177};
178