// SPDX-License-Identifier: GPL-2.0-or-later OR MIT #include "mt7621.dtsi" #include #include #include / { compatible = "hatlab,gateboard-one", "mediatek,mt7621-soc"; model = "HATLab GateBoard-One"; aliases { led-boot = &led_sys; led-failsafe = &led_sys; led-running = &led_sys; led-upgrade = &led_sys; }; chosen { bootargs = "console=ttyS0,115200"; }; leds { compatible = "gpio-leds"; led_sys: sys { label = "green:sys"; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; }; usb { label = "blue:usb"; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; }; }; keys { compatible = "gpio-keys"; reset { label = "reset"; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; linux,code = ; }; }; gpio_export { compatible = "gpio-export"; #size-cells = <0>; power_peripheral { gpio-export,name = "power_peripheral"; gpio-export,output = <0>; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; }; cpu_fan: cpu_fan { compatible = "gpio-fan"; gpios = <&gpio 13 GPIO_ACTIVE_HIGH &gpio 14 GPIO_ACTIVE_HIGH>; gpio-fan,speed-map = < 0 0 2000 1 4000 2 6000 3>; #cooling-cells = <2>; }; thermal-zones { cpu-thermal { polling-delay = <1000>; polling-delay-passive = <250>; thermal-sensors = <&cpu_sensor>; trips { cpu_warm: cpu-warm { temperature = <26000>; hysteresis = <2000>; type = "passive"; }; cpu_hot: cpu-hot { temperature = <37000>; hysteresis = <2000>; type = "active"; }; cpu_alert: cpu-alert { temperature = <75000>; hysteresis = <2000>; type = "hot"; }; cpu_crit: cpu-crit { temperature = <80000>; hysteresis = <2000>; type = "critical"; }; }; cooling-maps { map0 { trip = <&cpu_warm>; cooling-device = <&cpu_fan THERMAL_NO_LIMIT 2>; }; map1 { trip = <&cpu_hot>; cooling-device = <&cpu_fan 3 THERMAL_NO_LIMIT>; }; }; }; }; i2c_sfp: i2c-sfp { compatible = "i2c-gpio"; #address-cells = <1>; #size-cells = <0>; sda-gpios = <&expender0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; scl-gpios = <&expender0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; }; sfp: sfp { compatible = "sff,sfp"; i2c-bus = <&i2c_sfp>; maximum-power-milliwatt = <5000>; mod-def0-gpios = <&expender0 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; }; }; &spi0 { status = "okay"; spi-nor@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <50000000>; partitions@0 { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "u-boot"; reg = <0x0 0x40000>; read-only; }; partition@40000 { label = "u-boot-env"; reg = <0x40000 0x10000>; }; factory: partition@50000 { label = "factory"; reg = <0x50000 0x10000>; }; }; }; }; &i2c { status = "okay"; expender0: pcf8574a@38 { compatible = "nxp,pcf8574a"; reg = <0x38>; gpio-controller; #gpio-cells = <2>; interrupt-parent = <&gpio>; interrupts = <15 IRQ_TYPE_EDGE_FALLING>; interrupt-controller; #interrupt-cells = <2>; }; cpu_sensor: lm75@4f { compatible = "national,lm75"; reg = <0x4f>; #thermal-sensor-cells = <0>; }; rtc@51 { compatible = "nxp,pcf8563"; reg = <0x51>; }; }; &mdio { ephy7: ethernet-phy@7 { reg = <7>; eee-broken-1000t; }; }; &gmac0 { label = "dsa"; mtd-mac-address = <&factory 0x0>; }; &gmac1 { status = "okay"; label = "eth5"; phy-handle = <&ephy7>; phy-mode = "rgmii-rxid"; mtd-mac-address = <&factory 0x0>; mtd-mac-address-increment = <6>; }; &switch0 { ports { port@0 { status = "okay"; label = "eth0"; mtd-mac-address = <&factory 0x0>; mtd-mac-address-increment = <1>; }; port@1 { status = "okay"; label = "eth1"; mtd-mac-address = <&factory 0x0>; mtd-mac-address-increment = <2>; }; port@2 { status = "okay"; label = "eth2"; mtd-mac-address = <&factory 0x0>; mtd-mac-address-increment = <3>; }; port@3 { status = "okay"; label = "eth3"; mtd-mac-address = <&factory 0x0>; mtd-mac-address-increment = <4>; }; port@4 { status = "okay"; label = "eth4"; mtd-mac-address = <&factory 0x0>; mtd-mac-address-increment = <5>; }; }; }; &pcie { status = "okay"; }; &sdhci { status = "okay"; max-frequency = <20000000>; }; &state_default { gpio { groups = "wdt", "jtag"; function = "gpio"; }; }; &uartlite2 { status = "okay"; }; &uartlite3 { status = "okay"; };