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-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 = ðmac; 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 158 onewire { 159 compatible = "w1-gpio"; 160 gpios = <&gpio GPIOA_14 GPIO_ACTIVE_HIGH>; 161 #gpio-cells = <1>; 162 }; 163}; 164 165&efuse { 166 sn: sn@32 { 167 reg = <0x32 0x20>; 168 }; 169 170 eth_mac: eth_mac@0 { 171 reg = <0x0 0x6>; 172 }; 173 174 bt_mac: bt_mac@6 { 175 reg = <0x6 0x6>; 176 }; 177 178 wifi_mac: wifi_mac@c { 179 reg = <0xc 0x6>; 180 }; 181 182 bid: bid@12 { 183 reg = <0x12 0x20>; 184 }; 185}; 186 187ðmac { 188 status = "okay"; 189 pinctrl-0 = <ð_rmii_x_pins>; 190 pinctrl-names = "default"; 191 phy-handle = <ð_phy0>; 192 phy-mode = "rmii"; 193 194 mdio { 195 compatible = "snps,dwmac-mdio"; 196 #address-cells = <1>; 197 #size-cells = <0>; 198 199 /* ICPlus IP101A/G Ethernet PHY (vendor_id=0x0243, model_id=0x0c54) */ 200 eth_phy0: ethernet-phy@0 { 201 /* compatible = "ethernet-phy-id0243.0c54";*/ 202 max-speed = <100>; 203 reg = <0>; 204 205 reset-assert-us = <10000>; 206 reset-deassert-us = <10000>; 207 reset-gpios = <&gpio GPIOZ_5 GPIO_ACTIVE_LOW>; 208 }; 209 }; 210}; 211 212/* Internal I2C bus (on CPU module) */ 213&i2c1 { 214 status = "okay"; 215 pinctrl-0 = <&i2c1_z_pins>; 216 pinctrl-names = "default"; 217 218 /* RTC */ 219 pcf8563: pcf8563@51 { 220 compatible = "nxp,pcf8563"; 221 reg = <0x51>; 222 status = "okay"; 223 }; 224}; 225 226/* Peripheral I2C bus (on motherboard) */ 227&i2c_AO { 228 status = "okay"; 229 pinctrl-0 = <&i2c_ao_sck_10_pins>, <&i2c_ao_sda_11_pins>; 230 pinctrl-names = "default"; 231}; 232 233&pwm_ab { 234 status = "okay"; 235 pinctrl-0 = <&pwm_a_x20_pins>; 236 pinctrl-names = "default"; 237}; 238 239/* wifi module */ 240&sd_emmc_b { 241 status = "okay"; 242 #address-cells = <1>; 243 #size-cells = <0>; 244 245 pinctrl-0 = <&sdio_pins>; 246 pinctrl-1 = <&sdio_clk_gate_pins>; 247 pinctrl-names = "default", "clk-gate"; 248 249 bus-width = <4>; 250 cap-sd-highspeed; 251 sd-uhs-sdr104; 252 max-frequency = <200000000>; 253 non-removable; 254 disable-wp; 255 256 mmc-pwrseq = <&sdio_pwrseq>; 257 258 vmmc-supply = <&vddao_3v3>; 259 vqmmc-supply = <&vddio_boot>; 260 261 brcmf: wifi@1 { 262 reg = <1>; 263 compatible = "brcm,bcm4329-fmac"; 264 }; 265}; 266 267/* emmc storage */ 268&sd_emmc_c { 269 status = "okay"; 270 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; 271 pinctrl-1 = <&emmc_clk_gate_pins>; 272 pinctrl-names = "default", "clk-gate"; 273 274 bus-width = <8>; 275 cap-mmc-highspeed; 276 max-frequency = <200000000>; 277 non-removable; 278 disable-wp; 279 mmc-ddr-1_8v; 280 mmc-hs200-1_8v; 281 282 mmc-pwrseq = <&emmc_pwrseq>; 283 284 vmmc-supply = <&vcc_3v3>; 285 vqmmc-supply = <&vddio_boot>; 286}; 287 288/* UART Bluetooth */ 289&uart_B { 290 status = "okay"; 291 pinctrl-0 = <&uart_b_z_pins>, <&uart_b_z_cts_rts_pins>; 292 pinctrl-names = "default"; 293 uart-has-rtscts; 294 295 bluetooth { 296 compatible = "brcm,bcm43438-bt"; 297 shutdown-gpios = <&gpio GPIOZ_7 GPIO_ACTIVE_HIGH>; 298 }; 299}; 300 301/* UART Console */ 302&uart_AO { 303 status = "okay"; 304 pinctrl-0 = <&uart_ao_a_pins>; 305 pinctrl-names = "default"; 306}; 307 308/* UART Wireless module */ 309&uart_AO_B { 310 status = "okay"; 311 pinctrl-0 = <&uart_ao_b_pins>; 312 pinctrl-names = "default"; 313}; 314 315&usb { 316 status = "okay"; 317 phy-supply = <&usb_pwr>; 318}; 319 320&spicc1 { 321 status = "okay"; 322 pinctrl-0 = <&spi1_x_pins>, <&spi1_ss0_x_pins>; 323 pinctrl-names = "default"; 324}; 325 326&gpio { 327 gpio-line-names = 328 "", "", "", "", "", // 0 - 4 329 "", "", "", "", "", // 5 - 9 330 "UserButton", "", "", "", "", // 10 - 14 331 "", "", "", "", "", // 15 - 19 332 "", "", "", "", "", // 20 - 24 333 "", "LedRed", "LedGreen", "Output3", "Output2", // 25 - 29 334 "Output1", "", "", "", "", // 30 - 34 335 "", "ZigBeeBOOT", "", "", "", // 35 - 39 336 "1Wire", "ZigBeeRESET", "", "Input4", "Input3", // 40 - 44 337 "Input2", "Input1", "", "", "", // 45 - 49 338 "", "", "", "", "", // 50 - 54 339 "", "", "", "", "", // 55 - 59 340 "", "", "", "", "", // 60 - 64 341 "", "", "", "", "", // 65 - 69 342 "", "", "", "", "", // 70 - 74 343 "", "", "", "", "", // 75 - 79 344 "", "", "", "", "", // 80 - 84 345 "", ""; // 85-86 346}; 347 348&cpu0 { 349 #cooling-cells = <2>; 350}; 351 352&cpu1 { 353 #cooling-cells = <2>; 354}; 355 356&cpu2 { 357 #cooling-cells = <2>; 358}; 359 360&cpu3 { 361 #cooling-cells = <2>; 362}; 363