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