1// SPDX-License-Identifier: GPL-2.0 OR MIT
2/*
3 * Copyright 2015 Endless Mobile, Inc.
4 * Author: Carlo Caione <carlo@endlessm.com>
5 */
6
7/dts-v1/;
8
9#include <dt-bindings/gpio/gpio.h>
10
11#include "meson8b.dtsi"
12
13/ {
14	model = "TRONFY MXQ S805";
15	compatible = "tronfy,mxq", "amlogic,meson8b";
16
17	aliases {
18		serial0 = &uart_AO;
19	};
20
21	chosen {
22		stdout-path = "serial0:115200n8";
23	};
24
25	memory {
26		device_type = "memory";
27		reg = <0x40000000 0x40000000>;
28	};
29
30	iio-hwmon {
31		compatible = "iio-hwmon";
32		io-channels = <&saradc 8>;
33	};
34
35	vcck: regulator-vcck {
36		compatible = "pwm-regulator";
37
38		regulator-name = "VCCK";
39		regulator-min-microvolt = <860000>;
40		regulator-max-microvolt = <1140000>;
41
42		pwms = <&pwm_cd 0 1148 0>;
43		pwm-dutycycle-range = <100 0>;
44
45		regulator-boot-on;
46		regulator-always-on;
47	};
48
49	vcc_1v8: regulator-vcc1v8 {
50		compatible = "regulator-fixed";
51
52		regulator-name = "VCC1V8";
53		regulator-min-microvolt = <1800000>;
54		regulator-max-microvolt = <1800000>;
55
56		vin-supply = <&vcc_3v3>;
57	};
58
59	vcc_3v3: regulator-vcc3v3 {
60		compatible = "regulator-fixed";
61
62		regulator-name = "VCC3V3";
63		regulator-min-microvolt = <3300000>;
64		regulator-max-microvolt = <3300000>;
65
66		vin-supply = <&vcc_5v>;
67	};
68
69	vcc_5v: regulator-vcc5v {
70		compatible = "regulator-fixed";
71
72		regulator-name = "VCC5V";
73		regulator-min-microvolt = <5000000>;
74		regulator-max-microvolt = <5000000>;
75
76		regulator-boot-on;
77		regulator-always-on;
78	};
79
80	vddee: regulator-vddee {
81		compatible = "pwm-regulator";
82
83		regulator-name = "VDDEE";
84		regulator-min-microvolt = <860000>;
85		regulator-max-microvolt = <1140000>;
86
87		vin-supply = <&vcc_5v>;
88
89		pwms = <&pwm_cd 1 1148 0>;
90		pwm-dutycycle-range = <100 0>;
91
92		regulator-boot-on;
93		regulator-always-on;
94	};
95};
96
97&cpu0 {
98	cpu-supply = <&vcck>;
99};
100
101&ethmac {
102	status = "okay";
103
104	pinctrl-0 = <&eth_rmii_pins>;
105	pinctrl-names = "default";
106
107	phy-handle = <&eth_phy0>;
108	phy-mode = "rmii";
109
110	mdio {
111		compatible = "snps,dwmac-mdio";
112		#address-cells = <1>;
113		#size-cells = <0>;
114
115		eth_phy0: ethernet-phy@0 {
116			/* IC Plus IP101A/G (0x02430c54) */
117			reg = <0>;
118
119			reset-assert-us = <10000>;
120			reset-deassert-us = <10000>;
121			reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
122
123			icplus,select-interrupt;
124			interrupt-parent = <&gpio_intc>;
125			/* GPIOH_3 */
126			interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
127		};
128	};
129};
130
131&mali {
132	mali-supply = <&vddee>;
133};
134
135&saradc {
136	status = "okay";
137	vref-supply = <&vcc_1v8>;
138};
139
140&sdio {
141	status = "okay";
142
143	pinctrl-0 = <&sd_b_pins>;
144	pinctrl-names = "default";
145
146	/* SD card */
147	sd_card_slot: slot@1 {
148		compatible = "mmc-slot";
149		reg = <1>;
150		status = "okay";
151
152		bus-width = <4>;
153		no-sdio;
154		cap-mmc-highspeed;
155		cap-sd-highspeed;
156		disable-wp;
157
158		cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
159
160		vmmc-supply = <&vcc_3v3>;
161	};
162};
163
164&pwm_cd {
165	status = "okay";
166	pinctrl-0 = <&pwm_c1_pins>, <&pwm_d_pins>;
167	pinctrl-names = "default";
168	clocks = <&xtal>, <&xtal>;
169	clock-names = "clkin0", "clkin1";
170};
171
172&uart_AO {
173	status = "okay";
174	pinctrl-0 = <&uart_ao_a_pins>;
175	pinctrl-names = "default";
176};
177
178&usb0 {
179	status = "okay";
180};
181
182&usb0_phy {
183	status = "okay";
184};
185
186&usb1 {
187	status = "okay";
188};
189
190&usb1_phy {
191	status = "okay";
192};
193