blob: 5783732dc6f69195d3132092c6c3cdfdb094e500 [file] [log] [blame]
Vyacheslav Bocharov7f301d32021-09-20 11:40:15 +03001// 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-axg.dtsi"
13#include <dt-bindings/input/input.h>
14#include <dt-bindings/thermal/thermal.h>
15
16/ {
17 compatible = "jethome,jethub-j100", "amlogic,a113d", "amlogic,meson-axg";
18 model = "JetHome JetHub J100";
19 aliases {
20 serial0 = &uart_AO; /* Console */
21 serial1 = &uart_AO_B; /* External UART (Wireless Module) */
22 ethernet0 = &ethmac;
23 };
24
25 chosen {
26 stdout-path = "serial0:115200n8";
27 };
28
29 /* 1024MB RAM */
30 memory@0 {
31 device_type = "memory";
32 reg = <0x0 0x0 0x0 0x40000000>;
33 };
34
35 reserved-memory {
36 linux,cma {
37 size = <0x0 0x400000>;
38 };
39 };
40
41 emmc_pwrseq: emmc-pwrseq {
42 compatible = "mmc-pwrseq-emmc";
43 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
44 };
45
46 vcc_3v3: regulator-vcc_3v3 {
47 compatible = "regulator-fixed";
48 regulator-name = "VCC_3V3";
49 regulator-min-microvolt = <3300000>;
50 regulator-max-microvolt = <3300000>;
51 vin-supply = <&vddao_3v3>;
52 regulator-always-on;
53 };
54
55 vcc_5v: regulator-vcc_5v {
56 compatible = "regulator-fixed";
57 regulator-name = "VCC5V";
58 regulator-min-microvolt = <5000000>;
59 regulator-max-microvolt = <5000000>;
60 regulator-always-on;
61 };
62
63 vddao_3v3: regulator-vddao_3v3 {
64 compatible = "regulator-fixed";
65 regulator-name = "VDDAO_3V3";
66 regulator-min-microvolt = <3300000>;
67 regulator-max-microvolt = <3300000>;
68 vin-supply = <&vcc_5v>;
69 regulator-always-on;
70 };
71
72 vddio_ao18: regulator-vddio_ao18 {
73 compatible = "regulator-fixed";
74 regulator-name = "VDDIO_AO18";
75 regulator-min-microvolt = <1800000>;
76 regulator-max-microvolt = <1800000>;
77 vin-supply = <&vddao_3v3>;
78 regulator-always-on;
79 };
80
81 vddio_boot: regulator-vddio_boot {
82 compatible = "regulator-fixed";
83 regulator-name = "VDDIO_BOOT";
84 regulator-min-microvolt = <1800000>;
85 regulator-max-microvolt = <1800000>;
86 vin-supply = <&vddao_3v3>;
87 regulator-always-on;
88 };
89
90 usb_pwr: regulator-usb_pwr {
91 compatible = "regulator-fixed";
92 regulator-name = "USB_PWR";
93 regulator-min-microvolt = <5000000>;
94 regulator-max-microvolt = <5000000>;
95 vin-supply = <&vcc_5v>;
96 regulator-always-on;
97 };
98
99 sdio_pwrseq: sdio-pwrseq {
100 compatible = "mmc-pwrseq-simple";
101 reset-gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>;
102 clocks = <&wifi32k>;
103 clock-names = "ext_clock";
104 };
105
106 wifi32k: wifi32k {
107 compatible = "pwm-clock";
108 #clock-cells = <0>;
109 clock-frequency = <32768>;
110 pwms = <&pwm_ab 0 30518 0>; /* PWM_A at 32.768KHz */
111 };
112
113 thermal-zones {
114 cpu_thermal: cpu-thermal {
115 polling-delay-passive = <250>;
116 polling-delay = <1000>;
117 thermal-sensors = <&scpi_sensors 0>;
118 trips {
119 cpu_passive: cpu-passive {
120 temperature = <70000>; /* millicelsius */
121 hysteresis = <2000>; /* millicelsius */
122 type = "passive";
123 };
124
125 cpu_hot: cpu-hot {
126 temperature = <80000>; /* millicelsius */
127 hysteresis = <2000>; /* millicelsius */
128 type = "hot";
129 };
130
131 cpu_critical: cpu-critical {
132 temperature = <100000>; /* millicelsius */
133 hysteresis = <2000>; /* millicelsius */
134 type = "critical";
135 };
136 };
137 };
138
139 cpu_cooling_maps: cooling-maps {
140 map0 {
141 trip = <&cpu_passive>;
142 cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
143 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
144 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
145 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
146 };
147
148 map1 {
149 trip = <&cpu_hot>;
150 cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
151 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
152 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
153 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
154 };
155 };
156 };
157 onewire {
158 compatible = "w1-gpio";
159 gpios = <&gpio GPIOA_14 GPIO_ACTIVE_HIGH>;
160 #gpio-cells = <1>;
161 };
162};
163
164&efuse {
165 sn: sn@32 {
166 reg = <0x32 0x20>;
167 };
168
169 eth_mac: eth_mac@0 {
170 reg = <0x0 0x6>;
171 };
172
173 bt_mac: bt_mac@6 {
174 reg = <0x6 0x6>;
175 };
176
177 wifi_mac: wifi_mac@c {
178 reg = <0xc 0x6>;
179 };
180
181 bid: bid@12 {
182 reg = <0x12 0x20>;
183 };
184};
185
186&ethmac {
187 status = "okay";
188 pinctrl-0 = <&eth_rmii_x_pins>;
189 pinctrl-names = "default";
190 phy-handle = <&eth_phy0>;
191 phy-mode = "rmii";
192
193 mdio {
194 compatible = "snps,dwmac-mdio";
195 #address-cells = <1>;
196 #size-cells = <0>;
197
198 /* ICPlus IP101A/G Ethernet PHY (vendor_id=0x0243, model_id=0x0c54) */
199 eth_phy0: ethernet-phy@0 {
200 /* compatible = "ethernet-phy-id0243.0c54";*/
201 max-speed = <100>;
202 reg = <0>;
203
204 reset-assert-us = <10000>;
205 reset-deassert-us = <10000>;
206 reset-gpios = <&gpio GPIOZ_5 GPIO_ACTIVE_LOW>;
207 };
208 };
209};
210
211/* Internal I2C bus (on CPU module) */
212&i2c1 {
213 status = "okay";
214 pinctrl-0 = <&i2c1_z_pins>;
215 pinctrl-names = "default";
216
217 /* RTC */
218 pcf8563: pcf8563@51 {
219 compatible = "nxp,pcf8563";
220 reg = <0x51>;
221 status = "okay";
222 };
223};
224
225/* Peripheral I2C bus (on motherboard) */
226&i2c_AO {
227 status = "okay";
228 pinctrl-0 = <&i2c_ao_sck_10_pins>, <&i2c_ao_sda_11_pins>;
229 pinctrl-names = "default";
230};
231
232&pwm_ab {
233 status = "okay";
234 pinctrl-0 = <&pwm_a_x20_pins>;
235 pinctrl-names = "default";
236};
237
238/* wifi module */
239&sd_emmc_b {
240 status = "okay";
241 #address-cells = <1>;
242 #size-cells = <0>;
243
244 pinctrl-0 = <&sdio_pins>;
245 pinctrl-1 = <&sdio_clk_gate_pins>;
246 pinctrl-names = "default", "clk-gate";
247
248 bus-width = <4>;
249 cap-sd-highspeed;
250 sd-uhs-sdr104;
251 max-frequency = <200000000>;
252 non-removable;
253 disable-wp;
254
255 mmc-pwrseq = <&sdio_pwrseq>;
256
257 vmmc-supply = <&vddao_3v3>;
258 vqmmc-supply = <&vddio_boot>;
259
260 brcmf: wifi@1 {
261 reg = <1>;
262 compatible = "brcm,bcm4329-fmac";
263 };
264};
265
266/* emmc storage */
267&sd_emmc_c {
268 status = "okay";
269 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
270 pinctrl-1 = <&emmc_clk_gate_pins>;
271 pinctrl-names = "default", "clk-gate";
272
273 bus-width = <8>;
274 cap-mmc-highspeed;
275 max-frequency = <200000000>;
276 non-removable;
277 disable-wp;
278 mmc-ddr-1_8v;
279 mmc-hs200-1_8v;
280
281 mmc-pwrseq = <&emmc_pwrseq>;
282
283 vmmc-supply = <&vcc_3v3>;
284 vqmmc-supply = <&vddio_boot>;
285};
286
287/* UART Bluetooth */
288&uart_B {
289 status = "okay";
290 pinctrl-0 = <&uart_b_z_pins>, <&uart_b_z_cts_rts_pins>;
291 pinctrl-names = "default";
292 uart-has-rtscts;
293
294 bluetooth {
295 compatible = "brcm,bcm43438-bt";
296 shutdown-gpios = <&gpio GPIOZ_7 GPIO_ACTIVE_HIGH>;
297 };
298};
299
300/* UART Console */
301&uart_AO {
302 status = "okay";
303 pinctrl-0 = <&uart_ao_a_pins>;
304 pinctrl-names = "default";
305};
306
307/* UART Wireless module */
308&uart_AO_B {
309 status = "okay";
310 pinctrl-0 = <&uart_ao_b_pins>;
311 pinctrl-names = "default";
312};
313
314&usb {
315 status = "okay";
316 phy-supply = <&usb_pwr>;
317};
318
319&spicc1 {
320 status = "okay";
321 pinctrl-0 = <&spi1_x_pins>, <&spi1_ss0_x_pins>;
322 pinctrl-names = "default";
323};
324
325&gpio {
326 gpio-line-names =
327 "", "", "", "", "", // 0 - 4
328 "", "", "", "", "", // 5 - 9
329 "UserButton", "", "", "", "", // 10 - 14
330 "", "", "", "", "", // 15 - 19
331 "", "", "", "", "", // 20 - 24
332 "", "LedRed", "LedGreen", "Output3", "Output2", // 25 - 29
333 "Output1", "", "", "", "", // 30 - 34
334 "", "ZigBeeBOOT", "", "", "", // 35 - 39
335 "", "ZigBeeRESET", "", "Input4", "Input3", // 40 - 44
336 "Input2", "Input1", "", "", "", // 45 - 49
337 "", "", "", "", "", // 50 - 54
338 "", "", "", "", "", // 55 - 59
339 "", "", "", "", "", // 60 - 64
340 "", "", "", "", "", // 65 - 69
341 "", "", "", "", "", // 70 - 74
342 "", "", "", "", "", // 75 - 79
343 "", "", "", "", "", // 80 - 84
344 "", ""; // 85-86
345};
346
347&cpu0 {
348 #cooling-cells = <2>;
349};
350
351&cpu1 {
352 #cooling-cells = <2>;
353};
354
355&cpu2 {
356 #cooling-cells = <2>;
357};
358
359&cpu3 {
360 #cooling-cells = <2>;
361};