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	vcck: regulator-vcck {
31		compatible = "pwm-regulator";
32
33		regulator-name = "VCCK";
34		regulator-min-microvolt = <860000>;
35		regulator-max-microvolt = <1140000>;
36
37		pwms = <&pwm_cd 0 1148 0>;
38		pwm-dutycycle-range = <100 0>;
39
40		regulator-boot-on;
41		regulator-always-on;
42	};
43
44	vcc_1v8: regulator-vcc1v8 {
45		compatible = "regulator-fixed";
46
47		regulator-name = "VCC1V8";
48		regulator-min-microvolt = <1800000>;
49		regulator-max-microvolt = <1800000>;
50
51		vin-supply = <&vcc_3v3>;
52	};
53
54	vcc_3v3: regulator-vcc3v3 {
55		compatible = "regulator-fixed";
56
57		regulator-name = "VCC3V3";
58		regulator-min-microvolt = <3300000>;
59		regulator-max-microvolt = <3300000>;
60
61		vin-supply = <&vcc_5v>;
62	};
63
64	vcc_5v: regulator-vcc5v {
65		compatible = "regulator-fixed";
66
67		regulator-name = "VCC5V";
68		regulator-min-microvolt = <5000000>;
69		regulator-max-microvolt = <5000000>;
70
71		regulator-boot-on;
72		regulator-always-on;
73	};
74
75	vddee: regulator-vddee {
76		compatible = "pwm-regulator";
77
78		regulator-name = "VDDEE";
79		regulator-min-microvolt = <860000>;
80		regulator-max-microvolt = <1140000>;
81
82		vin-supply = <&vcc_5v>;
83
84		pwms = <&pwm_cd 1 1148 0>;
85		pwm-dutycycle-range = <100 0>;
86
87		regulator-boot-on;
88		regulator-always-on;
89	};
90};
91
92&cpu0 {
93	cpu-supply = <&vcck>;
94};
95
96&ethmac {
97	status = "okay";
98
99	pinctrl-0 = <&eth_rmii_pins>;
100	pinctrl-names = "default";
101
102	phy-handle = <&eth_phy0>;
103	phy-mode = "rmii";
104
105	mdio {
106		compatible = "snps,dwmac-mdio";
107		#address-cells = <1>;
108		#size-cells = <0>;
109
110		eth_phy0: ethernet-phy@0 {
111			/* IC Plus IP101A/G (0x02430c54) */
112			reg = <0>;
113
114			reset-assert-us = <10000>;
115			reset-deassert-us = <10000>;
116			reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
117
118			icplus,select-interrupt;
119			interrupt-parent = <&gpio_intc>;
120			/* GPIOH_3 */
121			interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
122		};
123	};
124};
125
126&mali {
127	mali-supply = <&vddee>;
128};
129
130&saradc {
131	status = "okay";
132	vref-supply = <&vcc_1v8>;
133};
134
135&sdio {
136	status = "okay";
137
138	pinctrl-0 = <&sd_b_pins>;
139	pinctrl-names = "default";
140
141	/* SD card */
142	sd_card_slot: slot@1 {
143		compatible = "mmc-slot";
144		reg = <1>;
145		status = "okay";
146
147		bus-width = <4>;
148		no-sdio;
149		cap-mmc-highspeed;
150		cap-sd-highspeed;
151		disable-wp;
152
153		cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
154
155		vmmc-supply = <&vcc_3v3>;
156	};
157};
158
159&pwm_cd {
160	status = "okay";
161	pinctrl-0 = <&pwm_c1_pins>, <&pwm_d_pins>;
162	pinctrl-names = "default";
163	clocks = <&xtal>, <&xtal>;
164	clock-names = "clkin0", "clkin1";
165};
166
167&uart_AO {
168	status = "okay";
169	pinctrl-0 = <&uart_ao_a_pins>;
170	pinctrl-names = "default";
171};
172
173&usb0 {
174	status = "okay";
175};
176
177&usb0_phy {
178	status = "okay";
179};
180
181&usb1 {
182	status = "okay";
183};
184
185&usb1_phy {
186	status = "okay";
187};
188