1e9a12e14SNeil Armstrong// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2e9a12e14SNeil Armstrong/*
3e9a12e14SNeil Armstrong * Copyright (c) 2019 BayLibre SAS. All rights reserved.
4e9a12e14SNeil Armstrong */
5e9a12e14SNeil Armstrong
6e9a12e14SNeil Armstrong/dts-v1/;
7e9a12e14SNeil Armstrong
8e9a12e14SNeil Armstrong#include "meson-sm1.dtsi"
9e9a12e14SNeil Armstrong#include <dt-bindings/gpio/gpio.h>
10e9a12e14SNeil Armstrong#include <dt-bindings/input/input.h>
11e9a12e14SNeil Armstrong#include <dt-bindings/gpio/meson-g12a-gpio.h>
12e9a12e14SNeil Armstrong
13e9a12e14SNeil Armstrong/ {
14e9a12e14SNeil Armstrong	compatible = "seirobotics,sei610", "amlogic,sm1";
15e9a12e14SNeil Armstrong	model = "SEI Robotics SEI610";
16e9a12e14SNeil Armstrong
17e9a12e14SNeil Armstrong	aliases {
18e9a12e14SNeil Armstrong		serial0 = &uart_AO;
19e9a12e14SNeil Armstrong		ethernet0 = &ethmac;
20e9a12e14SNeil Armstrong	};
21e9a12e14SNeil Armstrong
22e9a12e14SNeil Armstrong	chosen {
23e9a12e14SNeil Armstrong		stdout-path = "serial0:115200n8";
24e9a12e14SNeil Armstrong	};
25e9a12e14SNeil Armstrong
26e9a12e14SNeil Armstrong	emmc_pwrseq: emmc-pwrseq {
27e9a12e14SNeil Armstrong		compatible = "mmc-pwrseq-emmc";
28e9a12e14SNeil Armstrong		reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
29e9a12e14SNeil Armstrong	};
30e9a12e14SNeil Armstrong
31e9a12e14SNeil Armstrong	gpio-keys {
32e9a12e14SNeil Armstrong		compatible = "gpio-keys-polled";
33e9a12e14SNeil Armstrong		poll-interval = <100>;
34e9a12e14SNeil Armstrong
35e9a12e14SNeil Armstrong		key1 {
36e9a12e14SNeil Armstrong			label = "A";
37e9a12e14SNeil Armstrong			linux,code = <BTN_0>;
38e9a12e14SNeil Armstrong			gpios = <&gpio GPIOH_6 GPIO_ACTIVE_LOW>;
39e9a12e14SNeil Armstrong		};
40e9a12e14SNeil Armstrong
41e9a12e14SNeil Armstrong		key2 {
42e9a12e14SNeil Armstrong			label = "B";
43e9a12e14SNeil Armstrong			linux,code = <BTN_1>;
44e9a12e14SNeil Armstrong			gpios = <&gpio GPIOH_7 GPIO_ACTIVE_LOW>;
45e9a12e14SNeil Armstrong		};
46e9a12e14SNeil Armstrong
47e9a12e14SNeil Armstrong		key3 {
48e9a12e14SNeil Armstrong			label = "C";
49e9a12e14SNeil Armstrong			linux,code = <BTN_2>;
50e9a12e14SNeil Armstrong			gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
51e9a12e14SNeil Armstrong		};
52e9a12e14SNeil Armstrong	};
53e9a12e14SNeil Armstrong
5496a386b6SNeil Armstrong	hdmi-connector {
5596a386b6SNeil Armstrong		compatible = "hdmi-connector";
5696a386b6SNeil Armstrong		type = "a";
5796a386b6SNeil Armstrong
5896a386b6SNeil Armstrong		port {
5996a386b6SNeil Armstrong			hdmi_connector_in: endpoint {
6096a386b6SNeil Armstrong				remote-endpoint = <&hdmi_tx_tmds_out>;
6196a386b6SNeil Armstrong			};
6296a386b6SNeil Armstrong		};
6396a386b6SNeil Armstrong	};
6496a386b6SNeil Armstrong
65e9a12e14SNeil Armstrong	leds {
66e9a12e14SNeil Armstrong		compatible = "gpio-leds";
67e9a12e14SNeil Armstrong
68e9a12e14SNeil Armstrong		bluetooth {
69e9a12e14SNeil Armstrong			label = "sei610:blue:bt";
70e9a12e14SNeil Armstrong			gpios = <&gpio GPIOC_7 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
71e9a12e14SNeil Armstrong			default-state = "off";
72e9a12e14SNeil Armstrong		};
73e9a12e14SNeil Armstrong	};
74e9a12e14SNeil Armstrong
75e9a12e14SNeil Armstrong	pwmleds {
76e9a12e14SNeil Armstrong		compatible = "pwm-leds";
77e9a12e14SNeil Armstrong
78e9a12e14SNeil Armstrong		power {
79e9a12e14SNeil Armstrong			label = "sei610:red:power";
80e9a12e14SNeil Armstrong			pwms = <&pwm_AO_ab 0 30518 0>;
81e9a12e14SNeil Armstrong			max-brightness = <255>;
82e9a12e14SNeil Armstrong			linux,default-trigger = "default-on";
83e9a12e14SNeil Armstrong			active-low;
84e9a12e14SNeil Armstrong		};
85e9a12e14SNeil Armstrong	};
86e9a12e14SNeil Armstrong
87e9a12e14SNeil Armstrong	memory@0 {
88e9a12e14SNeil Armstrong		device_type = "memory";
89e9a12e14SNeil Armstrong		reg = <0x0 0x0 0x0 0x40000000>;
90e9a12e14SNeil Armstrong	};
91e9a12e14SNeil Armstrong
92e9a12e14SNeil Armstrong	ao_5v: regulator-ao_5v {
93e9a12e14SNeil Armstrong		compatible = "regulator-fixed";
94e9a12e14SNeil Armstrong		regulator-name = "AO_5V";
95e9a12e14SNeil Armstrong		regulator-min-microvolt = <5000000>;
96e9a12e14SNeil Armstrong		regulator-max-microvolt = <5000000>;
97e9a12e14SNeil Armstrong		vin-supply = <&dc_in>;
98e9a12e14SNeil Armstrong		regulator-always-on;
99e9a12e14SNeil Armstrong	};
100e9a12e14SNeil Armstrong
101e9a12e14SNeil Armstrong	dc_in: regulator-dc_in {
102e9a12e14SNeil Armstrong		compatible = "regulator-fixed";
103e9a12e14SNeil Armstrong		regulator-name = "DC_IN";
104e9a12e14SNeil Armstrong		regulator-min-microvolt = <5000000>;
105e9a12e14SNeil Armstrong		regulator-max-microvolt = <5000000>;
106e9a12e14SNeil Armstrong		regulator-always-on;
107e9a12e14SNeil Armstrong	};
108e9a12e14SNeil Armstrong
109e9a12e14SNeil Armstrong	emmc_1v8: regulator-emmc_1v8 {
110e9a12e14SNeil Armstrong		compatible = "regulator-fixed";
111e9a12e14SNeil Armstrong		regulator-name = "EMMC_1V8";
112e9a12e14SNeil Armstrong		regulator-min-microvolt = <1800000>;
113e9a12e14SNeil Armstrong		regulator-max-microvolt = <1800000>;
114e9a12e14SNeil Armstrong		vin-supply = <&vddao_3v3>;
115e9a12e14SNeil Armstrong		regulator-always-on;
116e9a12e14SNeil Armstrong	};
117e9a12e14SNeil Armstrong
118e9a12e14SNeil Armstrong	vddao_3v3: regulator-vddao_3v3 {
119e9a12e14SNeil Armstrong		compatible = "regulator-fixed";
120e9a12e14SNeil Armstrong		regulator-name = "VDDAO_3V3";
121e9a12e14SNeil Armstrong		regulator-min-microvolt = <3300000>;
122e9a12e14SNeil Armstrong		regulator-max-microvolt = <3300000>;
123e9a12e14SNeil Armstrong		vin-supply = <&dc_in>;
124e9a12e14SNeil Armstrong		regulator-always-on;
125e9a12e14SNeil Armstrong	};
126e9a12e14SNeil Armstrong
127e9a12e14SNeil Armstrong	/* Used by Tuner, RGB Led & IR Emitter LED array */
128e9a12e14SNeil Armstrong	vddao_3v3_t: regulator-vddao_3v3_t {
129e9a12e14SNeil Armstrong		compatible = "regulator-fixed";
130e9a12e14SNeil Armstrong		regulator-name = "VDDAO_3V3_T";
131e9a12e14SNeil Armstrong		regulator-min-microvolt = <3300000>;
132e9a12e14SNeil Armstrong		regulator-max-microvolt = <3300000>;
133e9a12e14SNeil Armstrong		vin-supply = <&vddao_3v3>;
134e9a12e14SNeil Armstrong		gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
135e9a12e14SNeil Armstrong		enable-active-low;
136e9a12e14SNeil Armstrong		regulator-always-on;
137e9a12e14SNeil Armstrong	};
138e9a12e14SNeil Armstrong
139e9a12e14SNeil Armstrong	vddio_ao1v8: regulator-vddio_ao1v8 {
140e9a12e14SNeil Armstrong		compatible = "regulator-fixed";
141e9a12e14SNeil Armstrong		regulator-name = "VDDIO_AO1V8";
142e9a12e14SNeil Armstrong		regulator-min-microvolt = <1800000>;
143e9a12e14SNeil Armstrong		regulator-max-microvolt = <1800000>;
144e9a12e14SNeil Armstrong		vin-supply = <&vddao_3v3>;
145e9a12e14SNeil Armstrong		regulator-always-on;
146e9a12e14SNeil Armstrong	};
147e9a12e14SNeil Armstrong
148e9a12e14SNeil Armstrong	reserved-memory {
149e9a12e14SNeil Armstrong		/* TEE Reserved Memory */
150e9a12e14SNeil Armstrong		bl32_reserved: bl32@5000000 {
151e9a12e14SNeil Armstrong			reg = <0x0 0x05300000 0x0 0x2000000>;
152e9a12e14SNeil Armstrong			no-map;
153e9a12e14SNeil Armstrong		};
154e9a12e14SNeil Armstrong	};
155e9a12e14SNeil Armstrong
156e9a12e14SNeil Armstrong	sdio_pwrseq: sdio-pwrseq {
157e9a12e14SNeil Armstrong		compatible = "mmc-pwrseq-simple";
158e9a12e14SNeil Armstrong		reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
159e9a12e14SNeil Armstrong		clocks = <&wifi32k>;
160e9a12e14SNeil Armstrong		clock-names = "ext_clock";
161e9a12e14SNeil Armstrong	};
162e9a12e14SNeil Armstrong
163e9a12e14SNeil Armstrong	wifi32k: wifi32k {
164e9a12e14SNeil Armstrong		compatible = "pwm-clock";
165e9a12e14SNeil Armstrong		#clock-cells = <0>;
166e9a12e14SNeil Armstrong		clock-frequency = <32768>;
167e9a12e14SNeil Armstrong		pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
168e9a12e14SNeil Armstrong	};
169e9a12e14SNeil Armstrong};
170e9a12e14SNeil Armstrong
171e9a12e14SNeil Armstrong&cec_AO {
172e9a12e14SNeil Armstrong	pinctrl-0 = <&cec_ao_a_h_pins>;
173e9a12e14SNeil Armstrong	pinctrl-names = "default";
174e9a12e14SNeil Armstrong	status = "disabled";
175e9a12e14SNeil Armstrong	hdmi-phandle = <&hdmi_tx>;
176e9a12e14SNeil Armstrong};
177e9a12e14SNeil Armstrong
178e9a12e14SNeil Armstrong&cecb_AO {
179e9a12e14SNeil Armstrong	pinctrl-0 = <&cec_ao_b_h_pins>;
180e9a12e14SNeil Armstrong	pinctrl-names = "default";
181e9a12e14SNeil Armstrong	status = "okay";
182e9a12e14SNeil Armstrong	hdmi-phandle = <&hdmi_tx>;
183e9a12e14SNeil Armstrong};
184e9a12e14SNeil Armstrong
185e9a12e14SNeil Armstrong&ethmac {
186e9a12e14SNeil Armstrong	status = "okay";
187e9a12e14SNeil Armstrong	phy-handle = <&internal_ephy>;
188e9a12e14SNeil Armstrong	phy-mode = "rmii";
189e9a12e14SNeil Armstrong};
190e9a12e14SNeil Armstrong
19196a386b6SNeil Armstrong&hdmi_tx {
19296a386b6SNeil Armstrong	status = "okay";
19396a386b6SNeil Armstrong	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
19496a386b6SNeil Armstrong	pinctrl-names = "default";
19596a386b6SNeil Armstrong};
19696a386b6SNeil Armstrong
19796a386b6SNeil Armstrong&hdmi_tx_tmds_port {
19896a386b6SNeil Armstrong	hdmi_tx_tmds_out: endpoint {
19996a386b6SNeil Armstrong		remote-endpoint = <&hdmi_connector_in>;
20096a386b6SNeil Armstrong	};
20196a386b6SNeil Armstrong};
20296a386b6SNeil Armstrong
203e9a12e14SNeil Armstrong&i2c3 {
204e9a12e14SNeil Armstrong	status = "okay";
205e9a12e14SNeil Armstrong	pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
206e9a12e14SNeil Armstrong	pinctrl-names = "default";
207e9a12e14SNeil Armstrong};
208e9a12e14SNeil Armstrong
209e9a12e14SNeil Armstrong&ir {
210e9a12e14SNeil Armstrong	status = "okay";
211e9a12e14SNeil Armstrong	pinctrl-0 = <&remote_input_ao_pins>;
212e9a12e14SNeil Armstrong	pinctrl-names = "default";
213e9a12e14SNeil Armstrong};
214e9a12e14SNeil Armstrong
215e9a12e14SNeil Armstrong&pwm_AO_ab {
216e9a12e14SNeil Armstrong	status = "okay";
217e9a12e14SNeil Armstrong	pinctrl-0 = <&pwm_ao_a_pins>;
218e9a12e14SNeil Armstrong	pinctrl-names = "default";
219e9a12e14SNeil Armstrong	clocks = <&xtal>;
220e9a12e14SNeil Armstrong	clock-names = "clkin0";
221e9a12e14SNeil Armstrong};
222e9a12e14SNeil Armstrong
223e9a12e14SNeil Armstrong&pwm_ef {
224e9a12e14SNeil Armstrong	status = "okay";
225e9a12e14SNeil Armstrong	pinctrl-0 = <&pwm_e_pins>;
226e9a12e14SNeil Armstrong	pinctrl-names = "default";
227e9a12e14SNeil Armstrong	clocks = <&xtal>;
228e9a12e14SNeil Armstrong	clock-names = "clkin0";
229e9a12e14SNeil Armstrong};
230e9a12e14SNeil Armstrong
231e9a12e14SNeil Armstrong&saradc {
232e9a12e14SNeil Armstrong	status = "okay";
233e9a12e14SNeil Armstrong	vref-supply = <&vddio_ao1v8>;
234e9a12e14SNeil Armstrong};
235e9a12e14SNeil Armstrong
236e9a12e14SNeil Armstrong/* SDIO */
237e9a12e14SNeil Armstrong&sd_emmc_a {
238e9a12e14SNeil Armstrong	status = "okay";
239e9a12e14SNeil Armstrong	pinctrl-0 = <&sdio_pins>;
240e9a12e14SNeil Armstrong	pinctrl-1 = <&sdio_clk_gate_pins>;
241e9a12e14SNeil Armstrong	pinctrl-names = "default", "clk-gate";
242e9a12e14SNeil Armstrong	#address-cells = <1>;
243e9a12e14SNeil Armstrong	#size-cells = <0>;
244e9a12e14SNeil Armstrong
245e9a12e14SNeil Armstrong	bus-width = <4>;
246e9a12e14SNeil Armstrong	cap-sd-highspeed;
247e9a12e14SNeil Armstrong	sd-uhs-sdr50;
248e9a12e14SNeil Armstrong	max-frequency = <100000000>;
249e9a12e14SNeil Armstrong
250e9a12e14SNeil Armstrong	non-removable;
251e9a12e14SNeil Armstrong	disable-wp;
252e9a12e14SNeil Armstrong
253e9a12e14SNeil Armstrong	mmc-pwrseq = <&sdio_pwrseq>;
254e9a12e14SNeil Armstrong
255e9a12e14SNeil Armstrong	vmmc-supply = <&vddao_3v3>;
256e9a12e14SNeil Armstrong	vqmmc-supply = <&vddio_ao1v8>;
257e9a12e14SNeil Armstrong
258e9a12e14SNeil Armstrong	brcmf: wifi@1 {
259e9a12e14SNeil Armstrong		reg = <1>;
260e9a12e14SNeil Armstrong		compatible = "brcm,bcm4329-fmac";
261e9a12e14SNeil Armstrong	};
262e9a12e14SNeil Armstrong};
263e9a12e14SNeil Armstrong
264e9a12e14SNeil Armstrong/* SD card */
265e9a12e14SNeil Armstrong&sd_emmc_b {
266e9a12e14SNeil Armstrong	status = "okay";
267e9a12e14SNeil Armstrong	pinctrl-0 = <&sdcard_c_pins>;
268e9a12e14SNeil Armstrong	pinctrl-1 = <&sdcard_clk_gate_c_pins>;
269e9a12e14SNeil Armstrong	pinctrl-names = "default", "clk-gate";
270e9a12e14SNeil Armstrong
271e9a12e14SNeil Armstrong	bus-width = <4>;
272e9a12e14SNeil Armstrong	cap-sd-highspeed;
273e9a12e14SNeil Armstrong	max-frequency = <50000000>;
274e9a12e14SNeil Armstrong	disable-wp;
275e9a12e14SNeil Armstrong
276e9a12e14SNeil Armstrong	cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
277e9a12e14SNeil Armstrong	vmmc-supply = <&vddao_3v3>;
278e9a12e14SNeil Armstrong	vqmmc-supply = <&vddao_3v3>;
279e9a12e14SNeil Armstrong};
280e9a12e14SNeil Armstrong
281e9a12e14SNeil Armstrong/* eMMC */
282e9a12e14SNeil Armstrong&sd_emmc_c {
283e9a12e14SNeil Armstrong	status = "okay";
284e9a12e14SNeil Armstrong	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
285e9a12e14SNeil Armstrong	pinctrl-1 = <&emmc_clk_gate_pins>;
286e9a12e14SNeil Armstrong	pinctrl-names = "default", "clk-gate";
287e9a12e14SNeil Armstrong
288e9a12e14SNeil Armstrong	bus-width = <8>;
289e9a12e14SNeil Armstrong	cap-mmc-highspeed;
290e9a12e14SNeil Armstrong	mmc-ddr-1_8v;
291e9a12e14SNeil Armstrong	mmc-hs200-1_8v;
292e9a12e14SNeil Armstrong	max-frequency = <200000000>;
293e9a12e14SNeil Armstrong	non-removable;
294e9a12e14SNeil Armstrong	disable-wp;
295e9a12e14SNeil Armstrong
296e9a12e14SNeil Armstrong	mmc-pwrseq = <&emmc_pwrseq>;
297e9a12e14SNeil Armstrong	vmmc-supply = <&vddao_3v3>;
298e9a12e14SNeil Armstrong	vqmmc-supply = <&emmc_1v8>;
299e9a12e14SNeil Armstrong};
300e9a12e14SNeil Armstrong
301e9a12e14SNeil Armstrong&uart_A {
302e9a12e14SNeil Armstrong	status = "okay";
303e9a12e14SNeil Armstrong	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
304e9a12e14SNeil Armstrong	pinctrl-names = "default";
305e9a12e14SNeil Armstrong	uart-has-rtscts;
306e9a12e14SNeil Armstrong
307e9a12e14SNeil Armstrong	bluetooth {
308e9a12e14SNeil Armstrong		compatible = "brcm,bcm43438-bt";
309e9a12e14SNeil Armstrong		shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
310e9a12e14SNeil Armstrong		max-speed = <2000000>;
311e9a12e14SNeil Armstrong		clocks = <&wifi32k>;
312e9a12e14SNeil Armstrong		clock-names = "lpo";
313e9a12e14SNeil Armstrong		vbat-supply = <&vddao_3v3>;
314e9a12e14SNeil Armstrong		vddio-supply = <&vddio_ao1v8>;
315e9a12e14SNeil Armstrong	};
316e9a12e14SNeil Armstrong};
317e9a12e14SNeil Armstrong
318e9a12e14SNeil Armstrong/* Exposed via the on-board USB to Serial FT232RL IC */
319e9a12e14SNeil Armstrong&uart_AO {
320e9a12e14SNeil Armstrong	status = "okay";
321e9a12e14SNeil Armstrong	pinctrl-0 = <&uart_ao_a_pins>;
322e9a12e14SNeil Armstrong	pinctrl-names = "default";
323e9a12e14SNeil Armstrong};
324