123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
- /*
- * Copyright (C) 2023 Tianling Shen <[email protected]>
- */
- /dts-v1/;
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/input/input.h>
- #include <dt-bindings/leds/common.h>
- #include "mt7981.dtsi"
- / {
- model = "CMCC RAX3000M";
- compatible = "cmcc,rax3000m", "mediatek,mt7981";
- aliases {
- led-boot = &red_led;
- led-failsafe = &red_led;
- led-running = &green_led;
- led-upgrade = &green_led;
- serial0 = &uart0;
- };
- chosen {
- stdout-path = "serial0:115200n8";
- };
- memory {
- reg = <0 0x40000000 0 0x20000000>;
- };
- gpio-keys {
- compatible = "gpio-keys";
- button-reset {
- label = "reset";
- linux,code = <KEY_RESTART>;
- gpios = <&pio 1 GPIO_ACTIVE_LOW>;
- };
- button-mesh {
- label = "mesh";
- linux,code = <BTN_9>;
- linux,input-type = <EV_SW>;
- gpios = <&pio 0 GPIO_ACTIVE_LOW>;
- };
- };
- gpio-leds {
- compatible = "gpio-leds";
- green_led: led-0 {
- function = LED_FUNCTION_STATUS;
- color = <LED_COLOR_ID_GREEN>;
- gpios = <&pio 9 GPIO_ACTIVE_LOW>;
- };
- led-1 {
- function = LED_FUNCTION_STATUS;
- color = <LED_COLOR_ID_BLUE>;
- gpios = <&pio 12 GPIO_ACTIVE_LOW>;
- };
- red_led: led-2 {
- function = LED_FUNCTION_STATUS;
- color = <LED_COLOR_ID_RED>;
- gpios = <&pio 35 GPIO_ACTIVE_LOW>;
- };
- };
- };
- ð {
- status = "okay";
- gmac0: mac@0 {
- compatible = "mediatek,eth-mac";
- reg = <0>;
- phy-mode = "2500base-x";
- fixed-link {
- speed = <2500>;
- full-duplex;
- pause;
- };
- };
- gmac1: mac@1 {
- compatible = "mediatek,eth-mac";
- reg = <1>;
- phy-mode = "gmii";
- phy-handle = <&int_gbe_phy>;
- };
- };
- &mdio_bus {
- switch: switch@1f {
- compatible = "mediatek,mt7531";
- reg = <31>;
- reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
- interrupt-controller;
- #interrupt-cells = <1>;
- interrupt-parent = <&pio>;
- interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
- };
- };
- &switch {
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
- port@0 {
- reg = <0>;
- label = "lan3";
- };
- port@1 {
- reg = <1>;
- label = "lan2";
- };
- port@2 {
- reg = <2>;
- label = "lan1";
- };
- port@6 {
- reg = <6>;
- ethernet = <&gmac0>;
- phy-mode = "2500base-x";
- fixed-link {
- speed = <2500>;
- full-duplex;
- pause;
- };
- };
- };
- };
- &uart0 {
- status = "okay";
- };
- &usb_phy {
- status = "okay";
- };
- &watchdog {
- status = "okay";
- };
- &wifi {
- status = "okay";
- };
- &xhci {
- status = "okay";
- };
|