xref: /freebsd/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-khadas-vim2.dts (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1c66ec88fSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2c66ec88fSEmmanuel Vadot/*
3c66ec88fSEmmanuel Vadot * Copyright (c) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>.
4c66ec88fSEmmanuel Vadot * Copyright (c) 2017 BayLibre, SAS
5c66ec88fSEmmanuel Vadot * Author: Neil Armstrong <narmstrong@baylibre.com>
6c66ec88fSEmmanuel Vadot */
7c66ec88fSEmmanuel Vadot
8c66ec88fSEmmanuel Vadot/dts-v1/;
9c66ec88fSEmmanuel Vadot
10c66ec88fSEmmanuel Vadot#include "meson-gxm.dtsi"
115def4c47SEmmanuel Vadot#include <dt-bindings/input/input.h>
125def4c47SEmmanuel Vadot#include <dt-bindings/sound/meson-aiu.h>
13c66ec88fSEmmanuel Vadot
14c66ec88fSEmmanuel Vadot/ {
15c66ec88fSEmmanuel Vadot	compatible = "khadas,vim2", "amlogic,s912", "amlogic,meson-gxm";
16c66ec88fSEmmanuel Vadot	model = "Khadas VIM2";
17c66ec88fSEmmanuel Vadot
18c66ec88fSEmmanuel Vadot	aliases {
19c66ec88fSEmmanuel Vadot		serial0 = &uart_AO;
20c66ec88fSEmmanuel Vadot		serial2 = &uart_AO_B;
21c66ec88fSEmmanuel Vadot	};
22c66ec88fSEmmanuel Vadot
23c66ec88fSEmmanuel Vadot	chosen {
24c66ec88fSEmmanuel Vadot		stdout-path = "serial0:115200n8";
25c66ec88fSEmmanuel Vadot	};
26c66ec88fSEmmanuel Vadot
27c66ec88fSEmmanuel Vadot	memory@0 {
28c66ec88fSEmmanuel Vadot		device_type = "memory";
29c66ec88fSEmmanuel Vadot		reg = <0x0 0x0 0x0 0x80000000>;
30c66ec88fSEmmanuel Vadot	};
31c66ec88fSEmmanuel Vadot
32c66ec88fSEmmanuel Vadot	adc-keys {
33c66ec88fSEmmanuel Vadot		compatible = "adc-keys";
34c66ec88fSEmmanuel Vadot		io-channels = <&saradc 0>;
35c66ec88fSEmmanuel Vadot		io-channel-names = "buttons";
36c66ec88fSEmmanuel Vadot		keyup-threshold-microvolt = <1710000>;
37c66ec88fSEmmanuel Vadot
38c66ec88fSEmmanuel Vadot		button-function {
39c66ec88fSEmmanuel Vadot			label = "Function";
40c66ec88fSEmmanuel Vadot			linux,code = <KEY_FN>;
41c66ec88fSEmmanuel Vadot			press-threshold-microvolt = <10000>;
42c66ec88fSEmmanuel Vadot		};
43c66ec88fSEmmanuel Vadot	};
44c66ec88fSEmmanuel Vadot
45c66ec88fSEmmanuel Vadot	emmc_pwrseq: emmc-pwrseq {
46c66ec88fSEmmanuel Vadot		compatible = "mmc-pwrseq-emmc";
47c66ec88fSEmmanuel Vadot		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
48c66ec88fSEmmanuel Vadot	};
49c66ec88fSEmmanuel Vadot
50c66ec88fSEmmanuel Vadot	gpio_fan: gpio-fan {
51c66ec88fSEmmanuel Vadot		compatible = "gpio-fan";
52c66ec88fSEmmanuel Vadot		gpios = <&gpio GPIODV_14 GPIO_ACTIVE_HIGH
53c66ec88fSEmmanuel Vadot			 &gpio GPIODV_15 GPIO_ACTIVE_HIGH>;
54c66ec88fSEmmanuel Vadot		/* Dummy RPM values since fan is optional */
55cb7aa33aSEmmanuel Vadot		gpio-fan,speed-map =
56cb7aa33aSEmmanuel Vadot				<0 0>,
57cb7aa33aSEmmanuel Vadot				<1 1>,
58cb7aa33aSEmmanuel Vadot				<2 2>,
59cb7aa33aSEmmanuel Vadot				<3 3>;
60c66ec88fSEmmanuel Vadot		#cooling-cells = <2>;
61c66ec88fSEmmanuel Vadot	};
62c66ec88fSEmmanuel Vadot
63c66ec88fSEmmanuel Vadot	gpio-keys-polled {
64c66ec88fSEmmanuel Vadot		compatible = "gpio-keys-polled";
65c66ec88fSEmmanuel Vadot		poll-interval = <100>;
66c66ec88fSEmmanuel Vadot
67c66ec88fSEmmanuel Vadot		power-button {
68c66ec88fSEmmanuel Vadot			label = "power";
69c66ec88fSEmmanuel Vadot			linux,code = <KEY_POWER>;
70c66ec88fSEmmanuel Vadot			gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
71c66ec88fSEmmanuel Vadot		};
72c66ec88fSEmmanuel Vadot	};
73c66ec88fSEmmanuel Vadot
74c66ec88fSEmmanuel Vadot	hdmi-connector {
75c66ec88fSEmmanuel Vadot		compatible = "hdmi-connector";
76c66ec88fSEmmanuel Vadot		type = "a";
77c66ec88fSEmmanuel Vadot
78c66ec88fSEmmanuel Vadot		port {
79c66ec88fSEmmanuel Vadot			hdmi_connector_in: endpoint {
80c66ec88fSEmmanuel Vadot				remote-endpoint = <&hdmi_tx_tmds_out>;
81c66ec88fSEmmanuel Vadot			};
82c66ec88fSEmmanuel Vadot		};
83c66ec88fSEmmanuel Vadot	};
84c66ec88fSEmmanuel Vadot
855def4c47SEmmanuel Vadot	led-controller {
86c66ec88fSEmmanuel Vadot		compatible = "pwm-leds";
87c66ec88fSEmmanuel Vadot
885def4c47SEmmanuel Vadot		led-1 {
89c66ec88fSEmmanuel Vadot			label = "vim:red:power";
90c66ec88fSEmmanuel Vadot			pwms = <&pwm_AO_ab 1 7812500 0>;
91c66ec88fSEmmanuel Vadot			max-brightness = <255>;
92c66ec88fSEmmanuel Vadot			linux,default-trigger = "default-on";
93c66ec88fSEmmanuel Vadot		};
94c66ec88fSEmmanuel Vadot	};
95c66ec88fSEmmanuel Vadot
96c66ec88fSEmmanuel Vadot	sdio_pwrseq: sdio-pwrseq {
97c66ec88fSEmmanuel Vadot		compatible = "mmc-pwrseq-simple";
98c66ec88fSEmmanuel Vadot		reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
99c66ec88fSEmmanuel Vadot		clocks = <&wifi32k>;
100c66ec88fSEmmanuel Vadot		clock-names = "ext_clock";
101c66ec88fSEmmanuel Vadot	};
102c66ec88fSEmmanuel Vadot
103c66ec88fSEmmanuel Vadot	hdmi_5v: regulator-hdmi-5v {
104c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
105c66ec88fSEmmanuel Vadot
106c66ec88fSEmmanuel Vadot		regulator-name = "HDMI_5V";
107c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
108c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
109c66ec88fSEmmanuel Vadot
110c66ec88fSEmmanuel Vadot		gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
111c66ec88fSEmmanuel Vadot		enable-active-high;
112c66ec88fSEmmanuel Vadot		regulator-always-on;
113c66ec88fSEmmanuel Vadot	};
114c66ec88fSEmmanuel Vadot
11501950c46SEmmanuel Vadot	vcc_3v3: regulator-vcc-3v3 {
116c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
117c66ec88fSEmmanuel Vadot		regulator-name = "VCC_3V3";
118c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
119c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
120c66ec88fSEmmanuel Vadot	};
121c66ec88fSEmmanuel Vadot
12201950c46SEmmanuel Vadot	vddio_ao18: regulator-vddio-ao18 {
123c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
124c66ec88fSEmmanuel Vadot		regulator-name = "VDDIO_AO18";
125c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <1800000>;
126c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <1800000>;
127c66ec88fSEmmanuel Vadot	};
128c66ec88fSEmmanuel Vadot
12901950c46SEmmanuel Vadot	vddio_boot: regulator-vddio-boot {
130c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
131c66ec88fSEmmanuel Vadot		regulator-name = "VDDIO_BOOT";
132c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <1800000>;
133c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <1800000>;
134c66ec88fSEmmanuel Vadot	};
135c66ec88fSEmmanuel Vadot
13601950c46SEmmanuel Vadot	vddao_3v3: regulator-vddao-3v3 {
137c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
138c66ec88fSEmmanuel Vadot		regulator-name = "VDDAO_3V3";
139c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
140c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
141c66ec88fSEmmanuel Vadot	};
142c66ec88fSEmmanuel Vadot
143c66ec88fSEmmanuel Vadot	wifi32k: wifi32k {
144c66ec88fSEmmanuel Vadot		compatible = "pwm-clock";
145c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
146c66ec88fSEmmanuel Vadot		clock-frequency = <32768>;
147c66ec88fSEmmanuel Vadot		pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
148c66ec88fSEmmanuel Vadot	};
1495def4c47SEmmanuel Vadot
1505def4c47SEmmanuel Vadot	sound {
1515def4c47SEmmanuel Vadot		compatible = "amlogic,gx-sound-card";
1525def4c47SEmmanuel Vadot		model = "KHADAS-VIM2";
153*b2d2a78aSEmmanuel Vadot		clocks = <&clkc CLKID_MPLL0>,
154*b2d2a78aSEmmanuel Vadot			 <&clkc CLKID_MPLL1>,
155*b2d2a78aSEmmanuel Vadot			 <&clkc CLKID_MPLL2>;
156*b2d2a78aSEmmanuel Vadot
1575def4c47SEmmanuel Vadot		assigned-clocks = <&clkc CLKID_MPLL0>,
1585def4c47SEmmanuel Vadot				  <&clkc CLKID_MPLL1>,
1595def4c47SEmmanuel Vadot				  <&clkc CLKID_MPLL2>;
1605def4c47SEmmanuel Vadot		assigned-clock-parents = <0>, <0>, <0>;
1615def4c47SEmmanuel Vadot		assigned-clock-rates = <294912000>,
1625def4c47SEmmanuel Vadot				       <270950400>,
1635def4c47SEmmanuel Vadot				       <393216000>;
1645def4c47SEmmanuel Vadot
1655def4c47SEmmanuel Vadot		dai-link-0 {
1665def4c47SEmmanuel Vadot			sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
1675def4c47SEmmanuel Vadot		};
1685def4c47SEmmanuel Vadot
1695def4c47SEmmanuel Vadot		dai-link-1 {
1705def4c47SEmmanuel Vadot			sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
1715def4c47SEmmanuel Vadot			dai-format = "i2s";
1725def4c47SEmmanuel Vadot			mclk-fs = <256>;
1735def4c47SEmmanuel Vadot
1745def4c47SEmmanuel Vadot			codec-0 {
1755def4c47SEmmanuel Vadot				sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
1765def4c47SEmmanuel Vadot			};
1775def4c47SEmmanuel Vadot		};
1785def4c47SEmmanuel Vadot
1795def4c47SEmmanuel Vadot		dai-link-2 {
1805def4c47SEmmanuel Vadot			sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
1815def4c47SEmmanuel Vadot
1825def4c47SEmmanuel Vadot			codec-0 {
1835def4c47SEmmanuel Vadot				sound-dai = <&hdmi_tx>;
1845def4c47SEmmanuel Vadot			};
1855def4c47SEmmanuel Vadot		};
1865def4c47SEmmanuel Vadot	};
1875def4c47SEmmanuel Vadot};
1885def4c47SEmmanuel Vadot
1895def4c47SEmmanuel Vadot&aiu {
1905def4c47SEmmanuel Vadot	status = "okay";
191c66ec88fSEmmanuel Vadot};
192c66ec88fSEmmanuel Vadot
193c66ec88fSEmmanuel Vadot&cec_AO {
194c66ec88fSEmmanuel Vadot	status = "okay";
195c66ec88fSEmmanuel Vadot	pinctrl-0 = <&ao_cec_pins>;
196c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
197c66ec88fSEmmanuel Vadot	hdmi-phandle = <&hdmi_tx>;
198c66ec88fSEmmanuel Vadot};
199c66ec88fSEmmanuel Vadot
200c66ec88fSEmmanuel Vadot&cpu_cooling_maps {
201c66ec88fSEmmanuel Vadot	map0 {
202c66ec88fSEmmanuel Vadot		cooling-device = <&gpio_fan THERMAL_NO_LIMIT 1>;
203c66ec88fSEmmanuel Vadot	};
204c66ec88fSEmmanuel Vadot
205c66ec88fSEmmanuel Vadot	map1 {
206c66ec88fSEmmanuel Vadot		cooling-device = <&gpio_fan 2 THERMAL_NO_LIMIT>,
207c66ec88fSEmmanuel Vadot				 <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
208c66ec88fSEmmanuel Vadot				 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
209c66ec88fSEmmanuel Vadot				 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
210c66ec88fSEmmanuel Vadot				 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
211c66ec88fSEmmanuel Vadot				 <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
212c66ec88fSEmmanuel Vadot				 <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
213c66ec88fSEmmanuel Vadot				 <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
214c66ec88fSEmmanuel Vadot				 <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
215c66ec88fSEmmanuel Vadot	};
216c66ec88fSEmmanuel Vadot};
217c66ec88fSEmmanuel Vadot
218c66ec88fSEmmanuel Vadot&ethmac {
219c66ec88fSEmmanuel Vadot	pinctrl-0 = <&eth_pins>;
220c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
221c66ec88fSEmmanuel Vadot
222c66ec88fSEmmanuel Vadot	/* Select external PHY by default */
223c66ec88fSEmmanuel Vadot	phy-handle = <&external_phy>;
224c66ec88fSEmmanuel Vadot
225c66ec88fSEmmanuel Vadot	amlogic,tx-delay-ns = <2>;
226c66ec88fSEmmanuel Vadot
227c66ec88fSEmmanuel Vadot	/* External PHY is in RGMII */
228c66ec88fSEmmanuel Vadot	phy-mode = "rgmii";
229c66ec88fSEmmanuel Vadot
230c66ec88fSEmmanuel Vadot	status = "okay";
231c66ec88fSEmmanuel Vadot};
232c66ec88fSEmmanuel Vadot
233c66ec88fSEmmanuel Vadot&external_mdio {
234c66ec88fSEmmanuel Vadot	external_phy: ethernet-phy@0 {
235c66ec88fSEmmanuel Vadot		/* Realtek RTL8211F (0x001cc916) */
236c66ec88fSEmmanuel Vadot		reg = <0>;
237c66ec88fSEmmanuel Vadot
238c66ec88fSEmmanuel Vadot		reset-assert-us = <10000>;
2395def4c47SEmmanuel Vadot		reset-deassert-us = <80000>;
240c66ec88fSEmmanuel Vadot		reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
241c66ec88fSEmmanuel Vadot
242c66ec88fSEmmanuel Vadot		interrupt-parent = <&gpio_intc>;
243c66ec88fSEmmanuel Vadot		/* MAC_INTR on GPIOZ_15 */
244c66ec88fSEmmanuel Vadot		interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
245c66ec88fSEmmanuel Vadot	};
246c66ec88fSEmmanuel Vadot};
247c66ec88fSEmmanuel Vadot
248c66ec88fSEmmanuel Vadot&hdmi_tx {
249c66ec88fSEmmanuel Vadot	status = "okay";
250c66ec88fSEmmanuel Vadot	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
251c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
252c66ec88fSEmmanuel Vadot	hdmi-supply = <&hdmi_5v>;
253c66ec88fSEmmanuel Vadot};
254c66ec88fSEmmanuel Vadot
255c66ec88fSEmmanuel Vadot&hdmi_tx_tmds_port {
256c66ec88fSEmmanuel Vadot	hdmi_tx_tmds_out: endpoint {
257c66ec88fSEmmanuel Vadot		remote-endpoint = <&hdmi_connector_in>;
258c66ec88fSEmmanuel Vadot	};
259c66ec88fSEmmanuel Vadot};
260c66ec88fSEmmanuel Vadot
261c66ec88fSEmmanuel Vadot&i2c_A {
262c66ec88fSEmmanuel Vadot	status = "okay";
263c66ec88fSEmmanuel Vadot	pinctrl-0 = <&i2c_a_pins>;
264c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
265c66ec88fSEmmanuel Vadot};
266c66ec88fSEmmanuel Vadot
267c66ec88fSEmmanuel Vadot&i2c_B {
268c66ec88fSEmmanuel Vadot	status = "okay";
269c66ec88fSEmmanuel Vadot	pinctrl-0 = <&i2c_b_pins>;
270c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
271c66ec88fSEmmanuel Vadot
272c66ec88fSEmmanuel Vadot	rtc: rtc@51 {
2735def4c47SEmmanuel Vadot		status = "okay";
274c66ec88fSEmmanuel Vadot		compatible = "haoyu,hym8563";
275c66ec88fSEmmanuel Vadot		reg = <0x51>;
276c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
277c66ec88fSEmmanuel Vadot		clock-output-names = "xin32k";
278c66ec88fSEmmanuel Vadot	};
279c66ec88fSEmmanuel Vadot};
280c66ec88fSEmmanuel Vadot
281c66ec88fSEmmanuel Vadot&ir {
282c66ec88fSEmmanuel Vadot	status = "okay";
283c66ec88fSEmmanuel Vadot	pinctrl-0 = <&remote_input_ao_pins>;
284c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
285c66ec88fSEmmanuel Vadot	linux,rc-map-name = "rc-khadas";
286c66ec88fSEmmanuel Vadot};
287c66ec88fSEmmanuel Vadot
288c66ec88fSEmmanuel Vadot&pwm_AO_ab {
289c66ec88fSEmmanuel Vadot	status = "okay";
290c66ec88fSEmmanuel Vadot	pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
291c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
292c66ec88fSEmmanuel Vadot	clocks = <&clkc CLKID_FCLK_DIV4>;
293c66ec88fSEmmanuel Vadot	clock-names = "clkin0";
294c66ec88fSEmmanuel Vadot};
295c66ec88fSEmmanuel Vadot
296c66ec88fSEmmanuel Vadot&pwm_ef {
297c66ec88fSEmmanuel Vadot	status = "okay";
298c66ec88fSEmmanuel Vadot	pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>;
299c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
300c66ec88fSEmmanuel Vadot	clocks = <&clkc CLKID_FCLK_DIV4>;
301c66ec88fSEmmanuel Vadot	clock-names = "clkin0";
302c66ec88fSEmmanuel Vadot};
303c66ec88fSEmmanuel Vadot
304c66ec88fSEmmanuel Vadot&sd_emmc_a {
305c66ec88fSEmmanuel Vadot	status = "okay";
306c66ec88fSEmmanuel Vadot	pinctrl-0 = <&sdio_pins>;
307c66ec88fSEmmanuel Vadot	pinctrl-1 = <&sdio_clk_gate_pins>;
308c66ec88fSEmmanuel Vadot	pinctrl-names = "default", "clk-gate";
309c66ec88fSEmmanuel Vadot	#address-cells = <1>;
310c66ec88fSEmmanuel Vadot	#size-cells = <0>;
311c66ec88fSEmmanuel Vadot
312c66ec88fSEmmanuel Vadot	bus-width = <4>;
313354d7675SEmmanuel Vadot	cap-sd-highspeed;
314354d7675SEmmanuel Vadot	max-frequency = <100000000>;
315c66ec88fSEmmanuel Vadot
316c66ec88fSEmmanuel Vadot	non-removable;
317c66ec88fSEmmanuel Vadot	disable-wp;
318c66ec88fSEmmanuel Vadot
319c66ec88fSEmmanuel Vadot	/* WiFi firmware requires power to be kept while in suspend */
320c66ec88fSEmmanuel Vadot	keep-power-in-suspend;
321c66ec88fSEmmanuel Vadot
322c66ec88fSEmmanuel Vadot	mmc-pwrseq = <&sdio_pwrseq>;
323c66ec88fSEmmanuel Vadot
324c66ec88fSEmmanuel Vadot	vmmc-supply = <&vddao_3v3>;
325c66ec88fSEmmanuel Vadot	vqmmc-supply = <&vddio_boot>;
326c66ec88fSEmmanuel Vadot
327c66ec88fSEmmanuel Vadot	brcmf: wifi@1 {
328c66ec88fSEmmanuel Vadot		reg = <1>;
329c66ec88fSEmmanuel Vadot		compatible = "brcm,bcm4329-fmac";
330c66ec88fSEmmanuel Vadot	};
331c66ec88fSEmmanuel Vadot};
332c66ec88fSEmmanuel Vadot
333c66ec88fSEmmanuel Vadot/* SD card */
334c66ec88fSEmmanuel Vadot&sd_emmc_b {
335c66ec88fSEmmanuel Vadot	status = "okay";
336c66ec88fSEmmanuel Vadot	pinctrl-0 = <&sdcard_pins>;
337c66ec88fSEmmanuel Vadot	pinctrl-1 = <&sdcard_clk_gate_pins>;
338c66ec88fSEmmanuel Vadot	pinctrl-names = "default", "clk-gate";
339c66ec88fSEmmanuel Vadot
340c66ec88fSEmmanuel Vadot	bus-width = <4>;
341c66ec88fSEmmanuel Vadot	cap-sd-highspeed;
342c66ec88fSEmmanuel Vadot	max-frequency = <50000000>;
343c66ec88fSEmmanuel Vadot	disable-wp;
344c66ec88fSEmmanuel Vadot
345c66ec88fSEmmanuel Vadot	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
346c66ec88fSEmmanuel Vadot
347c66ec88fSEmmanuel Vadot	vmmc-supply = <&vddao_3v3>;
348c66ec88fSEmmanuel Vadot	vqmmc-supply = <&vddio_boot>;
349c66ec88fSEmmanuel Vadot};
350c66ec88fSEmmanuel Vadot
351c66ec88fSEmmanuel Vadot/* eMMC */
352c66ec88fSEmmanuel Vadot&sd_emmc_c {
353c66ec88fSEmmanuel Vadot	status = "okay";
354c66ec88fSEmmanuel Vadot	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
355c66ec88fSEmmanuel Vadot	pinctrl-1 = <&emmc_clk_gate_pins>;
356c66ec88fSEmmanuel Vadot	pinctrl-names = "default", "clk-gate";
357c66ec88fSEmmanuel Vadot
358c66ec88fSEmmanuel Vadot	bus-width = <8>;
359c66ec88fSEmmanuel Vadot	cap-mmc-highspeed;
360c66ec88fSEmmanuel Vadot	max-frequency = <200000000>;
361c66ec88fSEmmanuel Vadot	non-removable;
362c66ec88fSEmmanuel Vadot	disable-wp;
363c66ec88fSEmmanuel Vadot	mmc-ddr-1_8v;
364c66ec88fSEmmanuel Vadot	mmc-hs200-1_8v;
365c66ec88fSEmmanuel Vadot
366c66ec88fSEmmanuel Vadot	mmc-pwrseq = <&emmc_pwrseq>;
367c66ec88fSEmmanuel Vadot	vmmc-supply = <&vcc_3v3>;
368c66ec88fSEmmanuel Vadot	vqmmc-supply = <&vddio_boot>;
369c66ec88fSEmmanuel Vadot};
370c66ec88fSEmmanuel Vadot
371c66ec88fSEmmanuel Vadot/*
372c66ec88fSEmmanuel Vadot * EMMC_DS pin is shared between SPI NOR CS and eMMC Data Strobe
373c66ec88fSEmmanuel Vadot * Remove emmc_ds_pins from sd_emmc_c pinctrl-0 then spifc can be enabled
374c66ec88fSEmmanuel Vadot */
375c66ec88fSEmmanuel Vadot&spifc {
376c66ec88fSEmmanuel Vadot	status = "disabled";
377c66ec88fSEmmanuel Vadot	pinctrl-0 = <&nor_pins>;
378c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
379c66ec88fSEmmanuel Vadot
380d5b0e70fSEmmanuel Vadot	w25q32: flash@0 {
381c66ec88fSEmmanuel Vadot		#address-cells = <1>;
382c66ec88fSEmmanuel Vadot		#size-cells = <1>;
383c66ec88fSEmmanuel Vadot		compatible = "winbond,w25q16", "jedec,spi-nor";
384c66ec88fSEmmanuel Vadot		reg = <0>;
3855def4c47SEmmanuel Vadot		spi-max-frequency = <104000000>;
386c66ec88fSEmmanuel Vadot	};
387c66ec88fSEmmanuel Vadot};
388c66ec88fSEmmanuel Vadot
389c66ec88fSEmmanuel Vadot/* This one is connected to the Bluetooth module */
390c66ec88fSEmmanuel Vadot&uart_A {
391c66ec88fSEmmanuel Vadot	status = "okay";
392c66ec88fSEmmanuel Vadot	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
393c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
394c66ec88fSEmmanuel Vadot	uart-has-rtscts;
395c66ec88fSEmmanuel Vadot
396c66ec88fSEmmanuel Vadot	bluetooth {
397c66ec88fSEmmanuel Vadot		compatible = "brcm,bcm43438-bt";
398c66ec88fSEmmanuel Vadot		shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
399c66ec88fSEmmanuel Vadot		max-speed = <2000000>;
400c66ec88fSEmmanuel Vadot		clocks = <&wifi32k>;
401c66ec88fSEmmanuel Vadot		clock-names = "lpo";
402c66ec88fSEmmanuel Vadot	};
403c66ec88fSEmmanuel Vadot};
404c66ec88fSEmmanuel Vadot
405c66ec88fSEmmanuel Vadot/* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */
406c66ec88fSEmmanuel Vadot&uart_AO {
407c66ec88fSEmmanuel Vadot	status = "okay";
408c66ec88fSEmmanuel Vadot	pinctrl-0 = <&uart_ao_a_pins>;
409c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
410c66ec88fSEmmanuel Vadot};
411c66ec88fSEmmanuel Vadot
412c66ec88fSEmmanuel Vadot/* This is brought out on the UART_RX_AO_B (15) and UART_TX_AO_B (16) pins: */
413c66ec88fSEmmanuel Vadot&uart_AO_B {
414c66ec88fSEmmanuel Vadot	status = "okay";
415c66ec88fSEmmanuel Vadot	pinctrl-0 = <&uart_ao_b_pins>;
416c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
417c66ec88fSEmmanuel Vadot};
418c66ec88fSEmmanuel Vadot
419c66ec88fSEmmanuel Vadot&saradc {
420c66ec88fSEmmanuel Vadot	status = "okay";
421c66ec88fSEmmanuel Vadot	vref-supply = <&vddio_ao18>;
422c66ec88fSEmmanuel Vadot};
423c66ec88fSEmmanuel Vadot
424c66ec88fSEmmanuel Vadot&usb {
425c66ec88fSEmmanuel Vadot	status = "okay";
426c66ec88fSEmmanuel Vadot	dr_mode = "peripheral";
427c66ec88fSEmmanuel Vadot};
428