// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-/dts-v1/;
-
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/mtd/partitions/uimage.h>
/ {
compatible = "ralink,mt7620a-soc";
led-upgrade = &led_power;
};
- chosen {
- bootargs = "console=ttyS0,57600";
- };
-
keys {
compatible = "gpio-keys";
gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
+ };
- switch_high {
- label = "switch high";
- gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
- linux,code = <BTN_0>;
- linux,input-type = <EV_SW>;
+ lan {
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
};
- switch_off {
- label = "switch off";
- gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
- linux,code = <BTN_1>;
- linux,input-type = <EV_SW>;
+ wps {
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
};
};
};
read-only;
};
- factory: partition@40000 {
+ partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ eeprom_factory_0: eeprom@0 {
+ reg = <0x0 0x200>;
+ };
+
+ eeprom_factory_8000: eeprom@8000 {
+ reg = <0x8000 0x200>;
+ };
+
+ macaddr_factory_4: macaddr@4 {
+ compatible = "mac-base";
+ reg = <0x4 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+ };
};
partition@50000 {
};
partition@70000 {
- compatible = "edimax,uimage";
+ compatible = "openwrt,uimage", "denx,uimage";
+ openwrt,offset = <FW_EDIMAX_OFFSET>;
+ openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
label = "firmware";
reg = <0x00070000 0x00790000>;
};
};
};
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "i2c", "uartf", "nd_sd", "rgmii2";
- ralink,function = "gpio";
- };
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "nd_sd", "rgmii2";
+ function = "gpio";
};
+};
+&pinctrl {
phy_reset_pins: phy-reset {
gpio {
- ralink,group = "spi refclk";
- ralink,function = "gpio";
+ groups = "spi refclk";
+ function = "gpio";
};
};
};
ðernet {
-
- status = "okay";
- mtd-mac-address = <&factory 0x4>;
-
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins &phy_reset_pins>;
- mediatek,portmap = "l";
- mediatek,mdio-mode = <1>;
+ nvmem-cells = <&macaddr_factory_4 0>;
+ nvmem-cell-names = "mac-address";
phy-reset-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
phy-reset-duration = <30>;
};
&gsw {
- mediatek,port5 = "gmac";
+ mediatek,ephy-base = /bits/ 8 <8>;
};
&wmac {
- ralink,mtd-eeprom = <&factory 0>;
+ nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4 0>;
+ nvmem-cell-names = "eeprom", "mac-address";
};
&pcie {
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
- mediatek,mtd-eeprom = <&factory 0x8000>;
- mediatek,2ghz = <0>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_4 2>;
+ nvmem-cell-names = "eeprom", "mac-address";
};
};