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