1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2016 Andreas Färber
4 */
5
6#include "meson-gxbb.dtsi"
7
8/ {
9	compatible = "tronsmart,vega-s95", "amlogic,meson-gxbb";
10
11	aliases {
12		serial0 = &uart_AO;
13		ethernet0 = &ethmac;
14	};
15
16	chosen {
17		stdout-path = "serial0:115200n8";
18	};
19
20	leds {
21		compatible = "gpio-leds";
22
23		blue {
24			label = "vega-s95:blue:on";
25			gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
26			default-state = "on";
27			panic-indicator;
28		};
29	};
30
31	usb_pwr: regulator-usb-pwrs {
32		compatible = "regulator-fixed";
33
34		regulator-name = "USB_PWR";
35
36		regulator-min-microvolt = <5000000>;
37		regulator-max-microvolt = <5000000>;
38
39		gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
40		enable-active-high;
41	};
42
43	vddio_boot: regulator-vddio_boot {
44		compatible = "regulator-fixed";
45		regulator-name = "VDDIO_BOOT";
46		regulator-min-microvolt = <1800000>;
47		regulator-max-microvolt = <1800000>;
48	};
49
50	vddao_3v3: regulator-vddao_3v3 {
51		compatible = "regulator-fixed";
52		regulator-name = "VDDAO_3V3";
53		regulator-min-microvolt = <3300000>;
54		regulator-max-microvolt = <3300000>;
55	};
56
57	vcc_3v3: regulator-vcc_3v3 {
58		compatible = "regulator-fixed";
59		regulator-name = "VCC_3V3";
60		regulator-min-microvolt = <3300000>;
61		regulator-max-microvolt = <3300000>;
62	};
63
64	emmc_pwrseq: emmc-pwrseq {
65		compatible = "mmc-pwrseq-emmc";
66		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
67	};
68
69	wifi32k: wifi32k {
70		compatible = "pwm-clock";
71		#clock-cells = <0>;
72		clock-frequency = <32768>;
73		pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
74	};
75
76	hdmi-connector {
77		compatible = "hdmi-connector";
78		type = "a";
79
80		port {
81			hdmi_connector_in: endpoint {
82				remote-endpoint = <&hdmi_tx_tmds_out>;
83			};
84		};
85	};
86
87	sdio_pwrseq: sdio-pwrseq {
88		compatible = "mmc-pwrseq-simple";
89		reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>,
90				<&gpio GPIOX_20 GPIO_ACTIVE_LOW>;
91		clocks = <&wifi32k>;
92		clock-names = "ext_clock";
93	};
94};
95
96&cec_AO {
97	status = "okay";
98	pinctrl-0 = <&ao_cec_pins>;
99	pinctrl-names = "default";
100	hdmi-phandle = <&hdmi_tx>;
101};
102
103&ethmac {
104	status = "okay";
105	pinctrl-0 = <&eth_rgmii_pins>;
106	pinctrl-names = "default";
107
108	phy-handle = <&eth_phy0>;
109	phy-mode = "rgmii";
110
111	amlogic,tx-delay-ns = <2>;
112
113	snps,reset-gpio = <&gpio GPIOZ_14 0>;
114	snps,reset-delays-us = <0 10000 1000000>;
115	snps,reset-active-low;
116
117	mdio {
118		compatible = "snps,dwmac-mdio";
119		#address-cells = <1>;
120		#size-cells = <0>;
121
122		eth_phy0: ethernet-phy@0 {
123			/* Realtek RTL8211F (0x001cc916) */
124			reg = <0>;
125		};
126	};
127};
128
129&hdmi_tx {
130	status = "okay";
131	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
132	pinctrl-names = "default";
133};
134
135&hdmi_tx_tmds_port {
136	hdmi_tx_tmds_out: endpoint {
137		remote-endpoint = <&hdmi_connector_in>;
138	};
139};
140
141&ir {
142	status = "okay";
143	pinctrl-0 = <&remote_input_ao_pins>;
144	pinctrl-names = "default";
145};
146
147&pwm_ef {
148	status = "okay";
149	pinctrl-0 = <&pwm_e_pins>;
150	pinctrl-names = "default";
151	clocks = <&clkc CLKID_FCLK_DIV4>;
152	clock-names = "clkin0";
153};
154
155/* Wireless SDIO Module */
156&sd_emmc_a {
157	status = "okay";
158	pinctrl-0 = <&sdio_pins &sdio_irq_pins>;
159	pinctrl-1 = <&sdio_clk_gate_pins>;
160	pinctrl-names = "default", "clk-gate";
161	#address-cells = <1>;
162	#size-cells = <0>;
163
164	bus-width = <4>;
165	cap-sd-highspeed;
166	max-frequency = <50000000>;
167
168	non-removable;
169	disable-wp;
170
171	mmc-pwrseq = <&sdio_pwrseq>;
172
173	vmmc-supply = <&vddao_3v3>;
174	vqmmc-supply = <&vddio_boot>;
175
176	brcmf: wifi@1 {
177		reg = <1>;
178		compatible = "brcm,bcm4329-fmac";
179	};
180};
181
182/* SD card */
183&sd_emmc_b {
184	status = "okay";
185	pinctrl-0 = <&sdcard_pins>;
186	pinctrl-1 = <&sdcard_clk_gate_pins>;
187	pinctrl-names = "default", "clk-gate";
188
189	bus-width = <4>;
190	cap-sd-highspeed;
191	max-frequency = <50000000>;
192	disable-wp;
193
194	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
195
196	vmmc-supply = <&vddao_3v3>;
197	vqmmc-supply = <&vcc_3v3>;
198};
199
200/* eMMC */
201&sd_emmc_c {
202	status = "okay";
203	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
204	pinctrl-1 = <&emmc_clk_gate_pins>;
205	pinctrl-names = "default", "clk-gate";
206
207	bus-width = <8>;
208	cap-mmc-highspeed;
209	max-frequency = <200000000>;
210	non-removable;
211	disable-wp;
212	mmc-ddr-1_8v;
213	mmc-hs200-1_8v;
214
215	mmc-pwrseq = <&emmc_pwrseq>;
216	vmmc-supply = <&vcc_3v3>;
217	vqmmc-supply = <&vddio_boot>;
218};
219
220&uart_AO {
221	status = "okay";
222	pinctrl-0 = <&uart_ao_a_pins>;
223	pinctrl-names = "default";
224};
225
226&usb0_phy {
227	status = "okay";
228	phy-supply = <&usb_pwr>;
229};
230
231&usb1_phy {
232	status = "okay";
233};
234
235&usb0 {
236	status = "okay";
237};
238
239&usb1 {
240	status = "okay";
241};
242