+// SPDX-License-Identifier: GPL-2.0-only
/*
- * Device Tree file for the Edimax BR-6478AC V2
- * based on Linksys E1700
- *
* Copyright (C) 2016 Rohan Murch <rohan.murch@gmail.com>
* Copyright (C) 2016 Hans Ulli Kroll <ulli.kroll@googlemail.com>
* Copyright (C) 2017 James McKenzie <openwrt@madingley.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>
+#include <dt-bindings/mtd/partitions/uimage.h>
/ {
compatible = "edimax,br-6478ac-v2", "ralink,mt7620a-soc";
led-upgrade = &led_power;
};
- chosen {
- bootargs = "console=ttyS0,57600";
- };
-
keys {
- compatible = "gpio-keys-polled";
- poll-interval = <20>;
+ compatible = "gpio-keys";
reset_wps {
label = "reset_wps";
compatible = "gpio-leds";
led_power: power {
- label = "br-6478ac-v2:white:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
+
internet {
- label = "br-6478ac-v2:blue:internet";
+ label = "blue:internet";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
+
wlan {
- label = "br-6478ac-v2:blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
+
usb {
- label = "br-6478ac-v2:blue:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
flash@0 {
compatible = "jedec,spi-nor";
- reg = <0 0>;
+ reg = <0>;
spi-max-frequency = <10000000>;
partitions {
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 {
+ reg = <0x4 0x6>;
+ };
+ };
};
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";
- ralink,function = "gpio";
- };
+&state_default {
+ gpio {
+ groups = "i2c", "uartf", "nd_sd";
+ function = "gpio";
};
};
ðernet {
- status = "okay";
- mtd-mac-address = <&factory 0x4>;
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
+
+ nvmem-cells = <&macaddr_factory_4>;
+ nvmem-cell-names = "mac-address";
+
mediatek,portmap = "wllll";
port@5 {
};
&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";
};
&pcie {
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
- mediatek,mtd-eeprom = <&factory 0x8000>;
- mediatek,2ghz = <0>;
+ nvmem-cells = <&eeprom_factory_8000>;
+ nvmem-cell-names = "eeprom";
+ ieee80211-freq-limit = <5000000 6000000>;
};
};