| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- /dts-v1/;
- #include "mt7981.dtsi"
- / {
- model = "GL.iNet GL-MT3000";
- compatible = "glinet,gl-mt3000", "mediatek,mt7981";
- aliases {
- label-mac-device = &gmac0;
- led-boot = &led_lightblue;
- led-failsafe = &led_lightblue;
- led-running = &led_white;
- led-upgrade = &led_lightblue;
- serial0 = &uart0;
- };
- chosen {
- stdout-path = "serial0:115200n8";
- };
- gpio-keys {
- compatible = "gpio-keys";
- reset {
- label = "reset";
- linux,code = <KEY_RESTART>;
- gpios = <&pio 1 GPIO_ACTIVE_LOW>;
- };
- mode {
- label = "mode";
- linux,input-type = <EV_SW>;
- linux,code = <BTN_0>;
- gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
- debounce-interval = <60>;
- };
- };
- leds {
- compatible = "gpio-leds";
- led_lightblue: led@0 {
- label = "blue:run";
- gpios = <&pio 31 GPIO_ACTIVE_LOW>;
- };
- led_white: led@1 {
- label = "white:system";
- gpios = <&pio 30 GPIO_ACTIVE_LOW>;
- };
- };
- fan_5v: regulator-fan-5v {
- compatible = "regulator-fixed";
- regulator-name = "fan";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&pio 28 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- regulator-boot-on;
- };
- usb_vbus: regulator-usb-vbus {
- compatible = "regulator-fixed";
- regulator-name = "usb_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&pio 12 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- regulator-boot-on;
- };
- };
- &uart0 {
- status = "okay";
- };
- &watchdog {
- status = "okay";
- };
- ð {
- pinctrl-names = "default";
- pinctrl-0 = <&mdio_pins>;
- status = "okay";
- gmac0: mac@0 {
- compatible = "mediatek,eth-mac";
- reg = <0>;
- phy-mode = "2500base-x";
- phy-handle = <&phy0>;
- nvmem-cells = <&macaddr>;
- nvmem-cell-names = "mac-address";
- };
- gmac1: mac@1 {
- compatible = "mediatek,eth-mac";
- reg = <1>;
- phy-mode = "gmii";
- phy-handle = <&int_gbe_phy>;
- nvmem-cells = <&macaddr>;
- nvmem-cell-names = "mac-address";
- mac-address-increment = <1>;
- };
- };
- &mdio_bus {
- reset-gpios = <&pio 14 GPIO_ACTIVE_LOW>;
- reset-delay-us = <600>;
- reset-post-delay-us = <20000>;
- phy0: ethernet-phy@5 {
- reg = <5>;
- compatible = "ethernet-phy-ieee802.3-c45";
- phy-mode = "2500base-x";
- };
- };
- &pwm {
- pinctrl-names = "default";
- pinctrl-0 = <&pwm_pins>;
- status = "okay";
- };
- &fan {
- pwms = <&pwm 0 40000 0>;
- fan-supply = <&fan_5v>;
- interrupt-parent = <&pio>;
- interrupts = <29 IRQ_TYPE_EDGE_RISING>;
- status = "okay";
- };
- &spi0 {
- pinctrl-names = "default";
- pinctrl-0 = <&spi0_flash_pins>;
- status = "okay";
- spi_nand: flash@0 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "spi-nand";
- reg = <0>;
- spi-max-frequency = <52000000>;
- spi-cal-enable;
- spi-cal-mode = "read-data";
- spi-cal-datalen = <7>;
- spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
- spi-cal-addrlen = <5>;
- spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
- spi-tx-bus-width = <4>;
- spi-rx-bus-width = <4>;
- mediatek,nmbm;
- mediatek,bmt-max-ratio = <1>;
- mediatek,bmt-max-reserved-blocks = <64>;
- partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
- partition@0 {
- label = "BL2";
- reg = <0x00000 0x0100000>;
- read-only;
- };
- partition@100000 {
- label = "u-boot-env";
- reg = <0x0100000 0x0080000>;
- };
- factory: partition@180000 {
- label = "Factory";
- reg = <0x180000 0x0200000>;
- read-only;
- nvmem-layout {
- compatible = "fixed-layout";
- #address-cells = <1>;
- #size-cells = <1>;
- macaddr: macaddr@a {
- reg = <0xa 0x6>;
- };
- };
- };
- partition@380000 {
- label = "FIP";
- reg = <0x380000 0x0200000>;
- read-only;
- };
- partition@580000 {
- label = "log";
- reg = <0x580000 0x0040000>;
- };
- partition@5c0000 {
- label = "ubi";
- reg = <0x5c0000 0xf640000>;
- compatible = "linux,ubi";
- };
- };
- };
- };
- &pio {
- spi0_flash_pins: spi0-pins {
- mux {
- function = "spi";
- groups = "spi0", "spi0_wp_hold";
- };
- };
- pwm_pins: pwm0-pins {
- mux {
- function = "pwm";
- groups = "pwm0_1";
- };
- };
- };
- &usb_phy {
- status = "okay";
- };
- &xhci {
- vbus-supply = <&usb_vbus>;
- status = "okay";
- };
- &wifi {
- mediatek,mtd-eeprom = <&factory 0x0>;
- status = "okay";
- };
|