1c66ec88fSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2c66ec88fSEmmanuel Vadot/*
3c66ec88fSEmmanuel Vadot * Copyright (c) 2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com>.
4c66ec88fSEmmanuel Vadot * Based on meson-gx-p23x-q20x.dtsi:
5c66ec88fSEmmanuel Vadot * - Copyright (c) 2016 Endless Computers, Inc.
6c66ec88fSEmmanuel Vadot *   Author: Carlo Caione <carlo@endlessm.com>
7c66ec88fSEmmanuel Vadot * - Copyright (c) 2016 BayLibre, SAS.
8c66ec88fSEmmanuel Vadot *   Author: Neil Armstrong <narmstrong@baylibre.com>
9c66ec88fSEmmanuel Vadot */
10c66ec88fSEmmanuel Vadot
11c66ec88fSEmmanuel Vadot/* Common DTSI for devices which are based on the P212 reference board. */
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadot#include "meson-gxl-s905x.dtsi"
14c66ec88fSEmmanuel Vadot
15c66ec88fSEmmanuel Vadot/ {
16c66ec88fSEmmanuel Vadot	aliases {
17c66ec88fSEmmanuel Vadot		serial0 = &uart_AO;
18c66ec88fSEmmanuel Vadot		ethernet0 = &ethmac;
19c66ec88fSEmmanuel Vadot	};
20c66ec88fSEmmanuel Vadot
21c66ec88fSEmmanuel Vadot	chosen {
22c66ec88fSEmmanuel Vadot		stdout-path = "serial0:115200n8";
23c66ec88fSEmmanuel Vadot	};
24c66ec88fSEmmanuel Vadot
25c66ec88fSEmmanuel Vadot	memory@0 {
26c66ec88fSEmmanuel Vadot		device_type = "memory";
27c66ec88fSEmmanuel Vadot		reg = <0x0 0x0 0x0 0x80000000>;
28c66ec88fSEmmanuel Vadot	};
29c66ec88fSEmmanuel Vadot
30c66ec88fSEmmanuel Vadot	hdmi_5v: regulator-hdmi-5v {
31c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
32c66ec88fSEmmanuel Vadot
33c66ec88fSEmmanuel Vadot		regulator-name = "HDMI_5V";
34c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
35c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
36c66ec88fSEmmanuel Vadot
37c66ec88fSEmmanuel Vadot		gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
38c66ec88fSEmmanuel Vadot		enable-active-high;
39c66ec88fSEmmanuel Vadot		regulator-always-on;
40c66ec88fSEmmanuel Vadot	};
41c66ec88fSEmmanuel Vadot
42c66ec88fSEmmanuel Vadot	vddio_boot: regulator-vddio_boot {
43c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
44c66ec88fSEmmanuel Vadot		regulator-name = "VDDIO_BOOT";
45c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <1800000>;
46c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <1800000>;
47c66ec88fSEmmanuel Vadot	};
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel Vadot	vddao_3v3: regulator-vddao_3v3 {
50c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
51c66ec88fSEmmanuel Vadot		regulator-name = "VDDAO_3V3";
52c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
53c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
54c66ec88fSEmmanuel Vadot	};
55c66ec88fSEmmanuel Vadot
56c66ec88fSEmmanuel Vadot	vddio_ao18: regulator-vddio_ao18 {
57c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
58c66ec88fSEmmanuel Vadot		regulator-name = "VDDIO_AO18";
59c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <1800000>;
60c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <1800000>;
61c66ec88fSEmmanuel Vadot	};
62c66ec88fSEmmanuel Vadot
63c66ec88fSEmmanuel Vadot	vcc_3v3: regulator-vcc_3v3 {
64c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
65c66ec88fSEmmanuel Vadot		regulator-name = "VCC_3V3";
66c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
67c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
68c66ec88fSEmmanuel Vadot	};
69c66ec88fSEmmanuel Vadot
70c66ec88fSEmmanuel Vadot	emmc_pwrseq: emmc-pwrseq {
71c66ec88fSEmmanuel Vadot		compatible = "mmc-pwrseq-emmc";
72c66ec88fSEmmanuel Vadot		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
73c66ec88fSEmmanuel Vadot	};
74c66ec88fSEmmanuel Vadot
75c66ec88fSEmmanuel Vadot	wifi32k: wifi32k {
76c66ec88fSEmmanuel Vadot		compatible = "pwm-clock";
77c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
78c66ec88fSEmmanuel Vadot		clock-frequency = <32768>;
79c66ec88fSEmmanuel Vadot		pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
80c66ec88fSEmmanuel Vadot	};
81c66ec88fSEmmanuel Vadot
82c66ec88fSEmmanuel Vadot	sdio_pwrseq: sdio-pwrseq {
83c66ec88fSEmmanuel Vadot		compatible = "mmc-pwrseq-simple";
84c66ec88fSEmmanuel Vadot		reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
85c66ec88fSEmmanuel Vadot		clocks = <&wifi32k>;
86c66ec88fSEmmanuel Vadot		clock-names = "ext_clock";
87c66ec88fSEmmanuel Vadot	};
88c66ec88fSEmmanuel Vadot};
89c66ec88fSEmmanuel Vadot
90c66ec88fSEmmanuel Vadot&ethmac {
91c66ec88fSEmmanuel Vadot	status = "okay";
92c66ec88fSEmmanuel Vadot};
93c66ec88fSEmmanuel Vadot
94c66ec88fSEmmanuel Vadot&ir {
95c66ec88fSEmmanuel Vadot	status = "okay";
96c66ec88fSEmmanuel Vadot	pinctrl-0 = <&remote_input_ao_pins>;
97c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
98c66ec88fSEmmanuel Vadot};
99c66ec88fSEmmanuel Vadot
100*cb7aa33aSEmmanuel Vadot&pwm_ef {
101*cb7aa33aSEmmanuel Vadot	status = "okay";
102*cb7aa33aSEmmanuel Vadot	pinctrl-0 = <&pwm_e_pins>;
103*cb7aa33aSEmmanuel Vadot	pinctrl-names = "default";
104*cb7aa33aSEmmanuel Vadot	clocks = <&clkc CLKID_FCLK_DIV4>;
105*cb7aa33aSEmmanuel Vadot	clock-names = "clkin0";
106*cb7aa33aSEmmanuel Vadot};
107*cb7aa33aSEmmanuel Vadot
108c66ec88fSEmmanuel Vadot&saradc {
109c66ec88fSEmmanuel Vadot	status = "okay";
110c66ec88fSEmmanuel Vadot	vref-supply = <&vddio_ao18>;
111c66ec88fSEmmanuel Vadot};
112c66ec88fSEmmanuel Vadot
113c66ec88fSEmmanuel Vadot/* Wireless SDIO Module */
114c66ec88fSEmmanuel Vadot&sd_emmc_a {
115c66ec88fSEmmanuel Vadot	status = "okay";
116c66ec88fSEmmanuel Vadot	pinctrl-0 = <&sdio_pins>;
117c66ec88fSEmmanuel Vadot	pinctrl-1 = <&sdio_clk_gate_pins>;
118c66ec88fSEmmanuel Vadot	pinctrl-names = "default", "clk-gate";
119c66ec88fSEmmanuel Vadot	#address-cells = <1>;
120c66ec88fSEmmanuel Vadot	#size-cells = <0>;
121c66ec88fSEmmanuel Vadot
122c66ec88fSEmmanuel Vadot	bus-width = <4>;
123c66ec88fSEmmanuel Vadot	cap-sd-highspeed;
124c66ec88fSEmmanuel Vadot	max-frequency = <50000000>;
125c66ec88fSEmmanuel Vadot
126c66ec88fSEmmanuel Vadot	non-removable;
127c66ec88fSEmmanuel Vadot	disable-wp;
128c66ec88fSEmmanuel Vadot
129c66ec88fSEmmanuel Vadot	/* WiFi firmware requires power to be kept while in suspend */
130c66ec88fSEmmanuel Vadot	keep-power-in-suspend;
131c66ec88fSEmmanuel Vadot
132c66ec88fSEmmanuel Vadot	mmc-pwrseq = <&sdio_pwrseq>;
133c66ec88fSEmmanuel Vadot
134c66ec88fSEmmanuel Vadot	vmmc-supply = <&vddao_3v3>;
135c66ec88fSEmmanuel Vadot	vqmmc-supply = <&vddio_boot>;
136*cb7aa33aSEmmanuel Vadot
137*cb7aa33aSEmmanuel Vadot	brcmf: wifi@1 {
138*cb7aa33aSEmmanuel Vadot		reg = <1>;
139*cb7aa33aSEmmanuel Vadot		compatible = "brcm,bcm4329-fmac";
140*cb7aa33aSEmmanuel Vadot	};
141c66ec88fSEmmanuel Vadot};
142c66ec88fSEmmanuel Vadot
143c66ec88fSEmmanuel Vadot/* SD card */
144c66ec88fSEmmanuel Vadot&sd_emmc_b {
145c66ec88fSEmmanuel Vadot	status = "okay";
146c66ec88fSEmmanuel Vadot	pinctrl-0 = <&sdcard_pins>;
147c66ec88fSEmmanuel Vadot	pinctrl-1 = <&sdcard_clk_gate_pins>;
148c66ec88fSEmmanuel Vadot	pinctrl-names = "default", "clk-gate";
149c66ec88fSEmmanuel Vadot
150c66ec88fSEmmanuel Vadot	bus-width = <4>;
151c66ec88fSEmmanuel Vadot	cap-sd-highspeed;
152c66ec88fSEmmanuel Vadot	max-frequency = <50000000>;
153c66ec88fSEmmanuel Vadot	disable-wp;
154c66ec88fSEmmanuel Vadot
155c66ec88fSEmmanuel Vadot	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
156c66ec88fSEmmanuel Vadot
157c66ec88fSEmmanuel Vadot	vmmc-supply = <&vddao_3v3>;
158c66ec88fSEmmanuel Vadot	vqmmc-supply = <&vddio_boot>;
159c66ec88fSEmmanuel Vadot};
160c66ec88fSEmmanuel Vadot
161c66ec88fSEmmanuel Vadot/* eMMC */
162c66ec88fSEmmanuel Vadot&sd_emmc_c {
163c66ec88fSEmmanuel Vadot	status = "okay";
164c66ec88fSEmmanuel Vadot	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
165c66ec88fSEmmanuel Vadot	pinctrl-1 = <&emmc_clk_gate_pins>;
166c66ec88fSEmmanuel Vadot	pinctrl-names = "default", "clk-gate";
167c66ec88fSEmmanuel Vadot
168c66ec88fSEmmanuel Vadot	bus-width = <8>;
169c66ec88fSEmmanuel Vadot	cap-mmc-highspeed;
170c66ec88fSEmmanuel Vadot	max-frequency = <200000000>;
171c66ec88fSEmmanuel Vadot	non-removable;
172c66ec88fSEmmanuel Vadot	disable-wp;
173c66ec88fSEmmanuel Vadot	mmc-ddr-1_8v;
174c66ec88fSEmmanuel Vadot	mmc-hs200-1_8v;
175c66ec88fSEmmanuel Vadot
176c66ec88fSEmmanuel Vadot	mmc-pwrseq = <&emmc_pwrseq>;
177c66ec88fSEmmanuel Vadot	vmmc-supply = <&vcc_3v3>;
178c66ec88fSEmmanuel Vadot	vqmmc-supply = <&vddio_boot>;
179c66ec88fSEmmanuel Vadot};
180c66ec88fSEmmanuel Vadot
181c66ec88fSEmmanuel Vadot/* This is connected to the Bluetooth module: */
182c66ec88fSEmmanuel Vadot&uart_A {
183c66ec88fSEmmanuel Vadot	status = "okay";
184c66ec88fSEmmanuel Vadot	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
185c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
186c66ec88fSEmmanuel Vadot	uart-has-rtscts;
187c66ec88fSEmmanuel Vadot
188c66ec88fSEmmanuel Vadot	bluetooth {
189c66ec88fSEmmanuel Vadot		compatible = "brcm,bcm43438-bt";
190c66ec88fSEmmanuel Vadot		shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
191c66ec88fSEmmanuel Vadot		max-speed = <2000000>;
192c66ec88fSEmmanuel Vadot		clocks = <&wifi32k>;
193c66ec88fSEmmanuel Vadot		clock-names = "lpo";
194c66ec88fSEmmanuel Vadot	};
195c66ec88fSEmmanuel Vadot};
196c66ec88fSEmmanuel Vadot
197c66ec88fSEmmanuel Vadot&uart_AO {
198c66ec88fSEmmanuel Vadot	status = "okay";
199c66ec88fSEmmanuel Vadot	pinctrl-0 = <&uart_ao_a_pins>;
200c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
201c66ec88fSEmmanuel Vadot};
202c66ec88fSEmmanuel Vadot
203c66ec88fSEmmanuel Vadot&usb {
204c66ec88fSEmmanuel Vadot	status = "okay";
205c66ec88fSEmmanuel Vadot	dr_mode = "host";
206c66ec88fSEmmanuel Vadot};
207c66ec88fSEmmanuel Vadot
208c66ec88fSEmmanuel Vadot&usb2_phy0 {
209c66ec88fSEmmanuel Vadot	/*
210c66ec88fSEmmanuel Vadot	 * HDMI_5V is also used as supply for the USB VBUS.
211c66ec88fSEmmanuel Vadot	 */
212c66ec88fSEmmanuel Vadot	phy-supply = <&hdmi_5v>;
213c66ec88fSEmmanuel Vadot};
214