+// SPDX-License-Identifier: GPL-2.0-only
/*
- * Device Tree file for the Linksys E1700
- *
* Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
*/
-/dts-v1/;
-
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "linksys,e1700", "ralink,mt7620a-soc";
};
keys {
- compatible = "gpio-keys-polled";
- poll-interval = <20>;
+ compatible = "gpio-keys";
reset {
label = "reset";
compatible = "gpio-leds";
led_power: power {
- label = "e1700:green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
wan {
- label = "e1700:green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
};
};
&spi0 {
status = "okay";
- m25p80@0 {
+ flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
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>;
+ };
+
+ macaddr_factory_28: macaddr@28 {
+ reg = <0x28 0x6>;
+ };
+ };
};
partition@50000 {
};
};
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "i2c", "uartf";
- ralink,function = "gpio";
- };
+&state_default {
+ gpio {
+ groups = "i2c", "uartf";
+ function = "gpio";
};
};
ðernet {
- status = "okay";
- mtd-mac-address = <&factory 0x28>;
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+ nvmem-cells = <&macaddr_factory_28>;
+ nvmem-cell-names = "mac-address";
+
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
};
&gsw {
- mediatek,port4 = "gmac";
+ mediatek,ephy-base = /bits/ 8 <12>;
};
&wmac {
- ralink,mtd-eeprom = <&factory 0>;
+ nvmem-cells = <&eeprom_factory_0>;
+ nvmem-cell-names = "eeprom";
};