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