xref: /freebsd/sys/contrib/device-tree/src/arm/amlogic/meson8m2-mxiii-plus.dts (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2018 Oleg Ivanov <balbes-150@yandex.ru>
4 * Copyright (c) 2018 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
5 */
6
7/dts-v1/;
8
9#include "meson8m2.dtsi"
10
11#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/input/input.h>
13
14/ {
15	model = "Tronsmart MXIII Plus";
16	compatible = "tronsmart,mxiii-plus", "amlogic,meson8m2";
17
18	aliases {
19		ethernet0 = &ethmac;
20		i2c0 = &i2c_AO;
21		serial0 = &uart_AO;
22		mmc0 = &sd_card_slot;
23	};
24
25	chosen {
26		stdout-path = "serial0:115200n8";
27	};
28
29	memory {
30		device_type = "memory";
31		reg = <0x40000000 0x80000000>;
32	};
33
34	adc-keys {
35		compatible = "adc-keys";
36		io-channels = <&saradc 0>;
37		io-channel-names = "buttons";
38		keyup-threshold-microvolt = <1710000>;
39
40		button-function {
41			label = "Function";
42			linux,code = <KEY_FN>;
43			press-threshold-microvolt = <10000>;
44		};
45	};
46
47	sdio_pwrseq: sdio-pwrseq {
48		compatible = "mmc-pwrseq-simple";
49
50		pinctrl-0 = <&xtal_32k_out_pins>;
51		pinctrl-names = "default";
52
53		reset-gpios = <&gpio GPIOX_11 GPIO_ACTIVE_LOW>,
54			      <&gpio_ao GPIOAO_6 GPIO_ACTIVE_LOW>;
55
56		clocks = <&xtal_32k_out>;
57		clock-names = "ext_clock";
58	};
59
60	vcc_3v3: regulator-vcc3v3 {
61		compatible = "regulator-fixed";
62		regulator-name = "VCC3V3";
63		regulator-min-microvolt = <3300000>;
64		regulator-max-microvolt = <3300000>;
65	};
66
67	xtal_32k_out: xtal-32k-out-clk {
68		compatible = "fixed-clock";
69		#clock-cells = <0>;
70		clock-frequency = <32768>;
71		clock-output-names = "xtal_32k_out";
72	};
73};
74
75&cpu0 {
76	cpu-supply = <&vcck>;
77};
78
79&ethmac {
80	status = "okay";
81
82	pinctrl-0 = <&eth_rgmii_pins>;
83	pinctrl-names = "default";
84
85	phy-handle = <&eth_phy0>;
86	phy-mode = "rgmii-id";
87
88	mdio {
89		compatible = "snps,dwmac-mdio";
90		#address-cells = <1>;
91		#size-cells = <0>;
92
93		eth_phy0: ethernet-phy@0 {
94			/* Realtek RTL8211F (0x001cc916) */
95			reg = <0>;
96
97			reset-assert-us = <10000>;
98			reset-deassert-us = <80000>;
99			reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
100		};
101	};
102};
103
104&ir_receiver {
105	status = "okay";
106	pinctrl-0 = <&ir_recv_pins>;
107	pinctrl-names = "default";
108};
109
110&i2c_AO {
111	status = "okay";
112	pinctrl-0 = <&i2c_ao_pins>;
113	pinctrl-names = "default";
114
115	pmic@32 {
116		compatible = "ricoh,rn5t618";
117		reg = <0x32>;
118		system-power-controller;
119
120		regulators {
121			vcck: DCDC1 {
122				regulator-name = "VCCK";
123				regulator-min-microvolt = <825000>;
124				regulator-max-microvolt = <1150000>;
125				regulator-boot-on;
126				regulator-always-on;
127			};
128
129			vddee: DCDC2 {
130				/* the output is also used as VDDAO */
131				regulator-name = "VDD_EE";
132				regulator-min-microvolt = <950000>;
133				regulator-max-microvolt = <1150000>;
134				regulator-boot-on;
135				regulator-always-on;
136			};
137
138			DCDC3 {
139				regulator-name = "VDD_DDR";
140				regulator-min-microvolt = <1500000>;
141				regulator-max-microvolt = <1500000>;
142				regulator-boot-on;
143				regulator-always-on;
144			};
145
146			LDO1 {
147				regulator-name = "VDDIO_AO28";
148				regulator-min-microvolt = <2900000>;
149				regulator-max-microvolt = <2900000>;
150				regulator-boot-on;
151				regulator-always-on;
152			};
153
154			vddio_ao1v8: LDO2 {
155				regulator-name = "VDDIO_AO18";
156				regulator-min-microvolt = <1800000>;
157				regulator-max-microvolt = <1800000>;
158				regulator-boot-on;
159				regulator-always-on;
160			};
161
162			LDO3 {
163				regulator-name = "VCC1V8";
164				regulator-min-microvolt = <1800000>;
165				regulator-max-microvolt = <1800000>;
166				regulator-boot-on;
167				regulator-always-on;
168			};
169
170			LDO4 {
171				regulator-name = "VCC2V8";
172				regulator-min-microvolt = <2850000>;
173				regulator-max-microvolt = <2850000>;
174				regulator-boot-on;
175				regulator-always-on;
176			};
177
178			LDO5 {
179				regulator-name = "AVDD1V8";
180				regulator-min-microvolt = <1800000>;
181				regulator-max-microvolt = <1800000>;
182				regulator-boot-on;
183				regulator-always-on;
184			};
185
186			LDORTC1 {
187				regulator-name = "VDD_LDO";
188				regulator-min-microvolt = <2700000>;
189				regulator-max-microvolt = <2700000>;
190				regulator-boot-on;
191				regulator-always-on;
192			};
193
194			LDORTC2 {
195				regulator-name = "RTC_0V9";
196				regulator-min-microvolt = <900000>;
197				regulator-max-microvolt = <900000>;
198				regulator-boot-on;
199				regulator-always-on;
200			};
201		};
202	};
203};
204
205&mali {
206	mali-supply = <&vddee>;
207};
208
209&saradc {
210	status = "okay";
211	vref-supply = <&vddio_ao1v8>;
212};
213
214/* SDIO wifi */
215&sdhc {
216	status = "okay";
217
218	pinctrl-0 = <&sdxc_a_pins>;
219	pinctrl-names = "default";
220
221	bus-width = <4>;
222	max-frequency = <50000000>;
223
224	disable-wp;
225	non-removable;
226	cap-mmc-highspeed;
227	cap-sd-highspeed;
228
229	mmc-pwrseq = <&sdio_pwrseq>;
230
231	vmmc-supply = <&vcc_3v3>;
232	vqmmc-supply = <&vcc_3v3>;
233};
234
235&sdio {
236	status = "okay";
237
238	pinctrl-0 = <&sd_b_pins>;
239	pinctrl-names = "default";
240
241	/* SD card */
242	sd_card_slot: slot@1 {
243		compatible = "mmc-slot";
244		reg = <1>;
245		status = "okay";
246
247		bus-width = <4>;
248		no-sdio;
249		cap-mmc-highspeed;
250		cap-sd-highspeed;
251		disable-wp;
252
253		cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
254
255		vmmc-supply = <&vcc_3v3>;
256	};
257};
258
259/* connected to the Bluetooth module */
260&uart_A {
261	status = "okay";
262	pinctrl-0 = <&uart_a1_pins>, <&uart_a1_cts_rts_pins>;
263	pinctrl-names = "default";
264	uart-has-rtscts;
265
266	bluetooth {
267		compatible = "brcm,bcm20702a1";
268		shutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;
269		max-speed = <2000000>;
270	};
271};
272
273&uart_AO {
274	status = "okay";
275	pinctrl-0 = <&uart_ao_a_pins>;
276	pinctrl-names = "default";
277};
278
279&usb0 {
280	status = "okay";
281};
282
283&usb1 {
284	status = "okay";
285};
286
287&usb0_phy {
288	status = "okay";
289};
290
291&usb1_phy {
292	status = "okay";
293};
294