1abfaae24SVyacheslav Bocharov// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2abfaae24SVyacheslav Bocharov/*
3abfaae24SVyacheslav Bocharov * Copyright (c) 2021 Vyacheslav Bocharov <adeep@lexina.in>
4abfaae24SVyacheslav Bocharov * Copyright (c) 2020 JetHome
5abfaae24SVyacheslav Bocharov * Author: Aleksandr Kazantsev <ak@tvip.ru>
6abfaae24SVyacheslav Bocharov * Author: Alexey Shevelkin <ash@tvip.ru>
7abfaae24SVyacheslav Bocharov * Author: Vyacheslav Bocharov <adeep@lexina.in>
8abfaae24SVyacheslav Bocharov */
9abfaae24SVyacheslav Bocharov
10abfaae24SVyacheslav Bocharov/dts-v1/;
11abfaae24SVyacheslav Bocharov
12abfaae24SVyacheslav Bocharov#include "meson-gxl.dtsi"
13abfaae24SVyacheslav Bocharov
14abfaae24SVyacheslav Bocharov/ {
15abfaae24SVyacheslav Bocharov	compatible = "jethome,jethub-j80", "amlogic,s905w", "amlogic,meson-gxl";
16abfaae24SVyacheslav Bocharov	model = "JetHome JetHub J80";
17abfaae24SVyacheslav Bocharov	memory@0 {
18abfaae24SVyacheslav Bocharov		device_type = "memory";
19abfaae24SVyacheslav Bocharov		reg = <0x0 0x0 0x0 0x40000000>;
20abfaae24SVyacheslav Bocharov	};
21abfaae24SVyacheslav Bocharov
22abfaae24SVyacheslav Bocharov	reserved-memory {
23abfaae24SVyacheslav Bocharov		linux,cma {
24abfaae24SVyacheslav Bocharov			size = <0x0 0x1000000>;
25abfaae24SVyacheslav Bocharov		};
26abfaae24SVyacheslav Bocharov	};
27abfaae24SVyacheslav Bocharov
28abfaae24SVyacheslav Bocharov	aliases {
29abfaae24SVyacheslav Bocharov		serial0 = &uart_AO;   /* Console */
30abfaae24SVyacheslav Bocharov		serial1 = &uart_A;    /* Bluetooth */
31abfaae24SVyacheslav Bocharov		serial2 = &uart_AO_B; /* Wireless module 1 */
32abfaae24SVyacheslav Bocharov		serial3 = &uart_C;    /* Wireless module 2 */
33abfaae24SVyacheslav Bocharov		ethernet0 = &ethmac;
34abfaae24SVyacheslav Bocharov	};
35abfaae24SVyacheslav Bocharov
36abfaae24SVyacheslav Bocharov	chosen {
37abfaae24SVyacheslav Bocharov		stdout-path = "serial0:115200n8";
38abfaae24SVyacheslav Bocharov	};
39abfaae24SVyacheslav Bocharov
40abfaae24SVyacheslav Bocharov	vddio_ao18: regulator-vddio_ao18 {
41abfaae24SVyacheslav Bocharov		compatible = "regulator-fixed";
42abfaae24SVyacheslav Bocharov		regulator-name = "VDDIO_AO18";
43abfaae24SVyacheslav Bocharov		regulator-min-microvolt = <1800000>;
44abfaae24SVyacheslav Bocharov		regulator-max-microvolt = <1800000>;
45abfaae24SVyacheslav Bocharov	};
46abfaae24SVyacheslav Bocharov
47abfaae24SVyacheslav Bocharov	vddio_boot: regulator-vddio_boot {
48abfaae24SVyacheslav Bocharov		compatible = "regulator-fixed";
49abfaae24SVyacheslav Bocharov		regulator-name = "VDDIO_BOOT";
50abfaae24SVyacheslav Bocharov		regulator-min-microvolt = <1800000>;
51abfaae24SVyacheslav Bocharov		regulator-max-microvolt = <1800000>;
52abfaae24SVyacheslav Bocharov	};
53abfaae24SVyacheslav Bocharov
54abfaae24SVyacheslav Bocharov	vddao_3v3: regulator-vddao_3v3 {
55abfaae24SVyacheslav Bocharov		compatible = "regulator-fixed";
56abfaae24SVyacheslav Bocharov		regulator-name = "VDDAO_3V3";
57abfaae24SVyacheslav Bocharov		regulator-min-microvolt = <3300000>;
58abfaae24SVyacheslav Bocharov		regulator-max-microvolt = <3300000>;
59abfaae24SVyacheslav Bocharov	};
60abfaae24SVyacheslav Bocharov
61abfaae24SVyacheslav Bocharov	vcc_3v3: regulator-vcc_3v3 {
62abfaae24SVyacheslav Bocharov		compatible = "regulator-fixed";
63abfaae24SVyacheslav Bocharov		regulator-name = "VCC_3V3";
64abfaae24SVyacheslav Bocharov		regulator-min-microvolt = <3300000>;
65abfaae24SVyacheslav Bocharov		regulator-max-microvolt = <3300000>;
66abfaae24SVyacheslav Bocharov	};
67abfaae24SVyacheslav Bocharov
68abfaae24SVyacheslav Bocharov	emmc_pwrseq: emmc-pwrseq {
69abfaae24SVyacheslav Bocharov		compatible = "mmc-pwrseq-emmc";
70abfaae24SVyacheslav Bocharov		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
71abfaae24SVyacheslav Bocharov	};
72abfaae24SVyacheslav Bocharov
73abfaae24SVyacheslav Bocharov	wifi32k: wifi32k {
74abfaae24SVyacheslav Bocharov		compatible = "pwm-clock";
75abfaae24SVyacheslav Bocharov		#clock-cells = <0>;
76abfaae24SVyacheslav Bocharov		clock-frequency = <32768>;
77abfaae24SVyacheslav Bocharov		pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
78abfaae24SVyacheslav Bocharov	};
79abfaae24SVyacheslav Bocharov
80abfaae24SVyacheslav Bocharov	sdio_pwrseq: sdio-pwrseq {
81abfaae24SVyacheslav Bocharov		compatible = "mmc-pwrseq-simple";
82abfaae24SVyacheslav Bocharov		reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
83abfaae24SVyacheslav Bocharov		clocks = <&wifi32k>;
84abfaae24SVyacheslav Bocharov		clock-names = "ext_clock";
85abfaae24SVyacheslav Bocharov	};
86abfaae24SVyacheslav Bocharov};
87abfaae24SVyacheslav Bocharov
88abfaae24SVyacheslav Bocharov&efuse {
89*cb199de1SMartin Blumenstingl	bt_mac: bt-mac@6 {
90abfaae24SVyacheslav Bocharov		reg = <0x6 0x6>;
91abfaae24SVyacheslav Bocharov	};
92abfaae24SVyacheslav Bocharov
93f95acdb2SMartin Blumenstingl	wifi_mac: wifi-mac@c {
94abfaae24SVyacheslav Bocharov		reg = <0xc 0x6>;
95abfaae24SVyacheslav Bocharov	};
96abfaae24SVyacheslav Bocharov};
97abfaae24SVyacheslav Bocharov
98abfaae24SVyacheslav Bocharov&sn {
99abfaae24SVyacheslav Bocharov	reg = <0x32 0x20>;
100abfaae24SVyacheslav Bocharov};
101abfaae24SVyacheslav Bocharov
102abfaae24SVyacheslav Bocharov&eth_mac {
103abfaae24SVyacheslav Bocharov	reg = <0x0 0x6>;
104abfaae24SVyacheslav Bocharov};
105abfaae24SVyacheslav Bocharov
106abfaae24SVyacheslav Bocharov&bid {
107abfaae24SVyacheslav Bocharov	reg = <0x12 0x20>;
108abfaae24SVyacheslav Bocharov};
109abfaae24SVyacheslav Bocharov
110abfaae24SVyacheslav Bocharov&usb {
111abfaae24SVyacheslav Bocharov	status = "okay";
112abfaae24SVyacheslav Bocharov	dr_mode = "host";
113abfaae24SVyacheslav Bocharov};
114abfaae24SVyacheslav Bocharov
115abfaae24SVyacheslav Bocharov&pwm_ef {
116abfaae24SVyacheslav Bocharov	status = "okay";
117abfaae24SVyacheslav Bocharov	pinctrl-0 = <&pwm_e_pins>;
118abfaae24SVyacheslav Bocharov	pinctrl-names = "default";
119abfaae24SVyacheslav Bocharov	clocks = <&clkc CLKID_FCLK_DIV4>;
120abfaae24SVyacheslav Bocharov	clock-names = "clkin0";
121abfaae24SVyacheslav Bocharov};
122abfaae24SVyacheslav Bocharov
123abfaae24SVyacheslav Bocharov&saradc {
124abfaae24SVyacheslav Bocharov	status = "okay";
125abfaae24SVyacheslav Bocharov	vref-supply = <&vddio_ao18>;
126abfaae24SVyacheslav Bocharov};
127abfaae24SVyacheslav Bocharov
128abfaae24SVyacheslav Bocharov/* Wireless SDIO Module */
129abfaae24SVyacheslav Bocharov&sd_emmc_a {
130abfaae24SVyacheslav Bocharov	status = "okay";
131abfaae24SVyacheslav Bocharov	pinctrl-0 = <&sdio_pins>;
132abfaae24SVyacheslav Bocharov	pinctrl-1 = <&sdio_clk_gate_pins>;
133abfaae24SVyacheslav Bocharov	pinctrl-names = "default", "clk-gate";
134abfaae24SVyacheslav Bocharov	#address-cells = <1>;
135abfaae24SVyacheslav Bocharov	#size-cells = <0>;
136abfaae24SVyacheslav Bocharov
137abfaae24SVyacheslav Bocharov	bus-width = <4>;
138abfaae24SVyacheslav Bocharov	cap-sd-highspeed;
139abfaae24SVyacheslav Bocharov	max-frequency = <50000000>;
140abfaae24SVyacheslav Bocharov
141abfaae24SVyacheslav Bocharov	non-removable;
142abfaae24SVyacheslav Bocharov	disable-wp;
143abfaae24SVyacheslav Bocharov
144abfaae24SVyacheslav Bocharov	/* WiFi firmware requires power to be kept while in suspend */
145abfaae24SVyacheslav Bocharov	keep-power-in-suspend;
146abfaae24SVyacheslav Bocharov
147abfaae24SVyacheslav Bocharov	mmc-pwrseq = <&sdio_pwrseq>;
148abfaae24SVyacheslav Bocharov
149abfaae24SVyacheslav Bocharov	vmmc-supply = <&vddao_3v3>;
150abfaae24SVyacheslav Bocharov	vqmmc-supply = <&vddio_boot>;
151abfaae24SVyacheslav Bocharov};
152abfaae24SVyacheslav Bocharov
153abfaae24SVyacheslav Bocharov/* SD card */
154abfaae24SVyacheslav Bocharov&sd_emmc_b {
155abfaae24SVyacheslav Bocharov	status = "okay";
156abfaae24SVyacheslav Bocharov	pinctrl-0 = <&sdcard_pins>;
157abfaae24SVyacheslav Bocharov	pinctrl-1 = <&sdcard_clk_gate_pins>;
158abfaae24SVyacheslav Bocharov	pinctrl-names = "default", "clk-gate";
159abfaae24SVyacheslav Bocharov
160abfaae24SVyacheslav Bocharov	bus-width = <4>;
161abfaae24SVyacheslav Bocharov	cap-sd-highspeed;
162abfaae24SVyacheslav Bocharov	max-frequency = <50000000>;
163abfaae24SVyacheslav Bocharov	disable-wp;
164abfaae24SVyacheslav Bocharov
165abfaae24SVyacheslav Bocharov	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
166abfaae24SVyacheslav Bocharov
167abfaae24SVyacheslav Bocharov	vmmc-supply = <&vddao_3v3>;
168abfaae24SVyacheslav Bocharov	vqmmc-supply = <&vddio_boot>;
169abfaae24SVyacheslav Bocharov};
170abfaae24SVyacheslav Bocharov
171abfaae24SVyacheslav Bocharov/* eMMC */
172abfaae24SVyacheslav Bocharov&sd_emmc_c {
173abfaae24SVyacheslav Bocharov	status = "okay";
174abfaae24SVyacheslav Bocharov	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
175abfaae24SVyacheslav Bocharov	pinctrl-1 = <&emmc_clk_gate_pins>;
176abfaae24SVyacheslav Bocharov	pinctrl-names = "default", "clk-gate";
177abfaae24SVyacheslav Bocharov
178abfaae24SVyacheslav Bocharov	bus-width = <8>;
179abfaae24SVyacheslav Bocharov	cap-mmc-highspeed;
180abfaae24SVyacheslav Bocharov	max-frequency = <200000000>;
181abfaae24SVyacheslav Bocharov	non-removable;
182abfaae24SVyacheslav Bocharov	disable-wp;
183abfaae24SVyacheslav Bocharov	mmc-ddr-1_8v;
184abfaae24SVyacheslav Bocharov	mmc-hs200-1_8v;
185abfaae24SVyacheslav Bocharov
186abfaae24SVyacheslav Bocharov	mmc-pwrseq = <&emmc_pwrseq>;
187abfaae24SVyacheslav Bocharov	vmmc-supply = <&vcc_3v3>;
188abfaae24SVyacheslav Bocharov	vqmmc-supply = <&vddio_boot>;
189abfaae24SVyacheslav Bocharov};
190abfaae24SVyacheslav Bocharov
191abfaae24SVyacheslav Bocharov/* Console UART */
192abfaae24SVyacheslav Bocharov&uart_AO {
193abfaae24SVyacheslav Bocharov	status = "okay";
194abfaae24SVyacheslav Bocharov	pinctrl-0 = <&uart_ao_a_pins>;
195abfaae24SVyacheslav Bocharov	pinctrl-names = "default";
196abfaae24SVyacheslav Bocharov};
197abfaae24SVyacheslav Bocharov
198abfaae24SVyacheslav Bocharov/* S905W only has access to its internal PHY */
199abfaae24SVyacheslav Bocharov&ethmac {
200abfaae24SVyacheslav Bocharov	status = "okay";
201abfaae24SVyacheslav Bocharov	phy-mode = "rmii";
202abfaae24SVyacheslav Bocharov	phy-handle = <&internal_phy>;
203abfaae24SVyacheslav Bocharov};
204abfaae24SVyacheslav Bocharov
205abfaae24SVyacheslav Bocharov&internal_phy {
206abfaae24SVyacheslav Bocharov	status = "okay";
207abfaae24SVyacheslav Bocharov	pinctrl-0 = <&eth_link_led_pins>, <&eth_act_led_pins>;
208abfaae24SVyacheslav Bocharov	pinctrl-names = "default";
209abfaae24SVyacheslav Bocharov};
210abfaae24SVyacheslav Bocharov
211abfaae24SVyacheslav Bocharov&uart_A {
212abfaae24SVyacheslav Bocharov	status = "okay";
213abfaae24SVyacheslav Bocharov	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
214abfaae24SVyacheslav Bocharov	pinctrl-names = "default";
215abfaae24SVyacheslav Bocharov	uart-has-rtscts;
2162bda08dfSVyacheslav Bocharov
2172bda08dfSVyacheslav Bocharov	bluetooth {
2182bda08dfSVyacheslav Bocharov		compatible = "realtek,rtl8822cs-bt";
2192bda08dfSVyacheslav Bocharov		enable-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
2202bda08dfSVyacheslav Bocharov		host-wake-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>;
2212bda08dfSVyacheslav Bocharov       };
222abfaae24SVyacheslav Bocharov};
223abfaae24SVyacheslav Bocharov
224abfaae24SVyacheslav Bocharov&uart_C {
225abfaae24SVyacheslav Bocharov	status = "okay";
226abfaae24SVyacheslav Bocharov	pinctrl-0 = <&uart_c_pins>;
227abfaae24SVyacheslav Bocharov	pinctrl-names = "default";
228abfaae24SVyacheslav Bocharov};
229abfaae24SVyacheslav Bocharov
230abfaae24SVyacheslav Bocharov&uart_AO_B {
231abfaae24SVyacheslav Bocharov	status = "okay";
232abfaae24SVyacheslav Bocharov	pinctrl-0 = <&uart_ao_b_pins>, <&uart_ao_b_cts_rts_pins>;
233abfaae24SVyacheslav Bocharov	pinctrl-names = "default";
234abfaae24SVyacheslav Bocharov	uart-has-rtscts;
235abfaae24SVyacheslav Bocharov};
236abfaae24SVyacheslav Bocharov
237abfaae24SVyacheslav Bocharov&i2c_B {
238abfaae24SVyacheslav Bocharov	status = "okay";
239abfaae24SVyacheslav Bocharov	pinctrl-names = "default";
240abfaae24SVyacheslav Bocharov	pinctrl-0 = <&i2c_b_pins>;
241abfaae24SVyacheslav Bocharov
242abfaae24SVyacheslav Bocharov	pcf8563: pcf8563@51 {
243abfaae24SVyacheslav Bocharov		compatible = "nxp,pcf8563";
244abfaae24SVyacheslav Bocharov		reg = <0x51>;
245abfaae24SVyacheslav Bocharov		status = "okay";
246abfaae24SVyacheslav Bocharov	};
247abfaae24SVyacheslav Bocharov};
248