Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2021 Vyacheslav Bocharov <adeep@lexina.in>
0004  * Copyright (c) 2020 JetHome
0005  * Author: Aleksandr Kazantsev <ak@tvip.ru>
0006  * Author: Alexey Shevelkin <ash@tvip.ru>
0007  * Author: Vyacheslav Bocharov <adeep@lexina.in>
0008  */
0009 
0010 /dts-v1/;
0011 
0012 #include "meson-axg.dtsi"
0013 #include <dt-bindings/input/input.h>
0014 #include <dt-bindings/thermal/thermal.h>
0015 
0016 / {
0017         compatible = "jethome,jethub-j100", "amlogic,a113d", "amlogic,meson-axg";
0018         model = "JetHome JetHub J100";
0019         aliases {
0020                 serial0 = &uart_AO;   /* Console */
0021                 serial2 = &uart_AO_B; /* External UART (Wireless Module) */
0022                 ethernet0 = &ethmac;
0023         };
0024 
0025         chosen {
0026                 stdout-path = "serial0:115200n8";
0027         };
0028 
0029         /* 1024MB RAM */
0030         memory@0 {
0031                 device_type = "memory";
0032                 reg = <0x0 0x0 0x0 0x40000000>;
0033         };
0034 
0035         reserved-memory {
0036                 linux,cma {
0037                         size = <0x0 0x400000>;
0038                 };
0039         };
0040 
0041         emmc_pwrseq: emmc-pwrseq {
0042                 compatible = "mmc-pwrseq-emmc";
0043                 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
0044         };
0045 
0046         vcc_3v3: regulator-vcc_3v3 {
0047                 compatible = "regulator-fixed";
0048                 regulator-name = "VCC_3V3";
0049                 regulator-min-microvolt = <3300000>;
0050                 regulator-max-microvolt = <3300000>;
0051                 vin-supply = <&vddao_3v3>;
0052                 regulator-always-on;
0053         };
0054 
0055         vcc_5v: regulator-vcc_5v {
0056                 compatible = "regulator-fixed";
0057                 regulator-name = "VCC5V";
0058                 regulator-min-microvolt = <5000000>;
0059                 regulator-max-microvolt = <5000000>;
0060                 regulator-always-on;
0061         };
0062 
0063         vddao_3v3: regulator-vddao_3v3 {
0064                 compatible = "regulator-fixed";
0065                 regulator-name = "VDDAO_3V3";
0066                 regulator-min-microvolt = <3300000>;
0067                 regulator-max-microvolt = <3300000>;
0068                 vin-supply = <&vcc_5v>;
0069                 regulator-always-on;
0070         };
0071 
0072         vddio_ao18: regulator-vddio_ao18 {
0073                 compatible = "regulator-fixed";
0074                 regulator-name = "VDDIO_AO18";
0075                 regulator-min-microvolt = <1800000>;
0076                 regulator-max-microvolt = <1800000>;
0077                 vin-supply = <&vddao_3v3>;
0078                 regulator-always-on;
0079         };
0080 
0081         vddio_boot: regulator-vddio_boot {
0082                 compatible = "regulator-fixed";
0083                 regulator-name = "VDDIO_BOOT";
0084                 regulator-min-microvolt = <3300000>;
0085                 regulator-max-microvolt = <3300000>;
0086                 vin-supply = <&vddao_3v3>;
0087                 regulator-always-on;
0088         };
0089 
0090         vccq_1v8: regulator-vccq_1v8 {
0091                 compatible = "regulator-fixed";
0092                 regulator-name = "VCCQ_1V8";
0093                 regulator-min-microvolt = <1800000>;
0094                 regulator-max-microvolt = <1800000>;
0095                 vin-supply = <&vddao_3v3>;
0096                 regulator-always-on;
0097         };
0098 
0099         usb_pwr: regulator-usb_pwr {
0100                 compatible = "regulator-fixed";
0101                 regulator-name = "USB_PWR";
0102                 regulator-min-microvolt = <5000000>;
0103                 regulator-max-microvolt = <5000000>;
0104                 vin-supply = <&vcc_5v>;
0105                 regulator-always-on;
0106         };
0107 
0108         sdio_pwrseq: sdio-pwrseq {
0109                 compatible = "mmc-pwrseq-simple";
0110                 reset-gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>;
0111                 clocks = <&wifi32k>;
0112                 clock-names = "ext_clock";
0113         };
0114 
0115         wifi32k: wifi32k {
0116                 compatible = "pwm-clock";
0117                 #clock-cells = <0>;
0118                 clock-frequency = <32768>;
0119                 pwms = <&pwm_ab 0 30518 0>; /* PWM_A at 32.768KHz */
0120         };
0121 
0122         thermal-zones {
0123                 cpu_thermal: cpu-thermal {
0124                         polling-delay-passive = <250>;
0125                         polling-delay = <1000>;
0126                         thermal-sensors = <&scpi_sensors 0>;
0127                         trips {
0128                                 cpu_passive: cpu-passive {
0129                                         temperature = <70000>; /* millicelsius */
0130                                         hysteresis = <2000>; /* millicelsius */
0131                                         type = "passive";
0132                                 };
0133 
0134                                 cpu_hot: cpu-hot {
0135                                         temperature = <80000>; /* millicelsius */
0136                                         hysteresis = <2000>; /* millicelsius */
0137                                         type = "hot";
0138                                 };
0139 
0140                                 cpu_critical: cpu-critical {
0141                                         temperature = <100000>; /* millicelsius */
0142                                         hysteresis = <2000>; /* millicelsius */
0143                                         type = "critical";
0144                                 };
0145                         };
0146 
0147                         cpu_cooling_maps: cooling-maps {
0148                                 map0 {
0149                                         trip = <&cpu_passive>;
0150                                         cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
0151                                                         <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
0152                                                         <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
0153                                                         <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
0154                                 };
0155 
0156                                 map1 {
0157                                         trip = <&cpu_hot>;
0158                                         cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
0159                                                         <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
0160                                                         <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
0161                                                         <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
0162                                 };
0163                         };
0164                 };
0165         };
0166 
0167         onewire {
0168                 compatible = "w1-gpio";
0169                 gpios = <&gpio GPIOA_14 GPIO_ACTIVE_HIGH>;
0170                 #gpio-cells = <1>;
0171         };
0172 };
0173 
0174 &efuse {
0175         sn: sn@32 {
0176                 reg = <0x32 0x20>;
0177         };
0178 
0179         eth_mac: eth_mac@0 {
0180                 reg = <0x0 0x6>;
0181         };
0182 
0183         bt_mac: bt_mac@6 {
0184                 reg = <0x6 0x6>;
0185         };
0186 
0187         wifi_mac: wifi_mac@c {
0188                 reg = <0xc 0x6>;
0189         };
0190 
0191         bid: bid@12 {
0192                 reg = <0x12 0x20>;
0193         };
0194 };
0195 
0196 &ethmac {
0197         status = "okay";
0198         pinctrl-0 = <&eth_rmii_x_pins>;
0199         pinctrl-names = "default";
0200         phy-handle = <&eth_phy0>;
0201         phy-mode = "rmii";
0202 
0203         mdio {
0204                 compatible = "snps,dwmac-mdio";
0205                 #address-cells = <1>;
0206                 #size-cells = <0>;
0207 
0208                 /* ICPlus IP101A/G Ethernet PHY (vendor_id=0x0243, model_id=0x0c54) */
0209                 eth_phy0: ethernet-phy@0 {
0210                         /* compatible = "ethernet-phy-id0243.0c54";*/
0211                         max-speed = <100>;
0212                         reg = <0>;
0213 
0214                         reset-assert-us = <10000>;
0215                         reset-deassert-us = <10000>;
0216                         reset-gpios = <&gpio GPIOZ_5 GPIO_ACTIVE_LOW>;
0217                 };
0218         };
0219 };
0220 
0221 /* Internal I2C bus (on CPU module) */
0222 &i2c1 {
0223         status = "okay";
0224         pinctrl-0 = <&i2c1_z_pins>;
0225         pinctrl-names = "default";
0226 
0227         /* RTC */
0228         pcf8563: pcf8563@51 {
0229                 compatible = "nxp,pcf8563";
0230                 reg = <0x51>;
0231                 status = "okay";
0232         };
0233 };
0234 
0235 /* Peripheral I2C bus (on motherboard) */
0236 &i2c_AO {
0237         status = "okay";
0238         pinctrl-0 = <&i2c_ao_sck_10_pins>, <&i2c_ao_sda_11_pins>;
0239         pinctrl-names = "default";
0240 };
0241 
0242 &pwm_ab {
0243         status = "okay";
0244         pinctrl-0 = <&pwm_a_x20_pins>;
0245         pinctrl-names = "default";
0246 };
0247 
0248 /* wifi module */
0249 &sd_emmc_b {
0250         status = "okay";
0251         #address-cells = <1>;
0252         #size-cells = <0>;
0253 
0254         pinctrl-0 = <&sdio_pins>;
0255         pinctrl-1 = <&sdio_clk_gate_pins>;
0256         pinctrl-names = "default", "clk-gate";
0257 
0258         bus-width = <4>;
0259         cap-sd-highspeed;
0260         max-frequency = <50000000>;
0261         non-removable;
0262         disable-wp;
0263 
0264         mmc-pwrseq = <&sdio_pwrseq>;
0265 
0266         vmmc-supply = <&vddao_3v3>;
0267         vqmmc-supply = <&vddio_boot>;
0268 
0269         brcmf: wifi@1 {
0270                 reg = <1>;
0271                 compatible = "brcm,bcm4329-fmac";
0272         };
0273 };
0274 
0275 /* emmc storage */
0276 &sd_emmc_c {
0277         status = "okay";
0278         pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
0279         pinctrl-1 = <&emmc_clk_gate_pins>;
0280         pinctrl-names = "default", "clk-gate";
0281 
0282         bus-width = <8>;
0283         cap-mmc-highspeed;
0284         max-frequency = <200000000>;
0285         non-removable;
0286         disable-wp;
0287         mmc-ddr-1_8v;
0288         mmc-hs200-1_8v;
0289 
0290         mmc-pwrseq = <&emmc_pwrseq>;
0291 
0292         vmmc-supply = <&vcc_3v3>;
0293         vqmmc-supply = <&vccq_1v8>;
0294 };
0295 
0296 /* UART Bluetooth */
0297 &uart_B {
0298         status = "okay";
0299         pinctrl-0 = <&uart_b_z_pins>, <&uart_b_z_cts_rts_pins>;
0300         pinctrl-names = "default";
0301         uart-has-rtscts;
0302 
0303         bluetooth {
0304                 compatible = "brcm,bcm43438-bt";
0305                 shutdown-gpios = <&gpio GPIOZ_7 GPIO_ACTIVE_HIGH>;
0306         };
0307 };
0308 
0309 /* UART Console */
0310 &uart_AO {
0311         status = "okay";
0312         pinctrl-0 = <&uart_ao_a_pins>;
0313         pinctrl-names = "default";
0314 };
0315 
0316 /* UART Wireless module */
0317 &uart_AO_B {
0318         status = "okay";
0319         pinctrl-0 = <&uart_ao_b_pins>;
0320         pinctrl-names = "default";
0321 };
0322 
0323 &usb {
0324         status = "okay";
0325         phy-supply = <&usb_pwr>;
0326 };
0327 
0328 &spicc1 {
0329         status = "okay";
0330         pinctrl-0 = <&spi1_x_pins>, <&spi1_ss0_x_pins>;
0331         pinctrl-names = "default";
0332 };
0333 
0334 &gpio {
0335         gpio-line-names =
0336                 "", "", "", "", "", // 0 - 4
0337                 "", "", "", "", "", // 5 - 9
0338                 "UserButton", "", "", "", "", // 10 - 14
0339                 "", "", "", "", "", // 15 - 19
0340                 "", "", "", "", "", // 20 - 24
0341                 "", "LedRed", "LedGreen", "Output3", "Output2", // 25 - 29
0342                 "Output1", "", "", "", "", // 30 - 34
0343                 "", "ZigBeeBOOT", "", "", "", // 35 - 39
0344                 "1Wire", "ZigBeeRESET", "", "Input4", "Input3", // 40 - 44
0345                 "Input2", "Input1", "", "", "", // 45 - 49
0346                 "", "", "", "", "", // 50 - 54
0347                 "", "", "", "", "", // 55 - 59
0348                 "", "", "", "", "", // 60 - 64
0349                 "", "", "", "", "", // 65 - 69
0350                 "", "", "", "", "", // 70 - 74
0351                 "", "", "", "", "", // 75 - 79
0352                 "", "", "", "", "", // 80 - 84
0353                 "", ""; // 85-86
0354 };
0355 
0356 &cpu0 {
0357         #cooling-cells = <2>;
0358 };
0359 
0360 &cpu1 {
0361         #cooling-cells = <2>;
0362 };
0363 
0364 &cpu2 {
0365         #cooling-cells = <2>;
0366 };
0367 
0368 &cpu3 {
0369         #cooling-cells = <2>;
0370 };