// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-/dts-v1/;
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "youku,yk-l2", "mediatek,mt7621-soc";
led-upgrade = &led_wps;
};
- memory@0 {
- device_type = "memory";
- reg = <0x0 0x10000000>;
- };
-
chosen {
bootargs = "console=ttyS0,115200";
};
compatible = "gpio-leds";
led_power: power {
- label = "yk-l2:blue:power";
- gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_wps: wps {
- label = "yk-l2:blue:wps";
- gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
usb {
- label = "yk-l2:blue:usb";
- gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_BLUE>;
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
};
keys {
- compatible = "gpio-keys-polled";
- poll-interval = <20>;
+ compatible = "gpio-keys";
reset {
label = "reset";
- gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
- gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
status = "okay";
};
-&xhci {
- status = "okay";
-};
-
&spi0 {
status = "okay";
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 0x400>;
+ };
+
+ eeprom_factory_8000: eeprom@8000 {
+ reg = <0x8000 0x200>;
+ };
+
+ macaddr_factory_e000: macaddr@e000 {
+ reg = <0xe000 0x6>;
+ };
+
+ macaddr_factory_e006: macaddr@e006 {
+ reg = <0xe006 0x6>;
+ };
+ };
};
partition@50000 {
- compatible = "denx,uimage";
+ compatible = "openwrt,uimage", "denx,uimage";
label = "firmware";
+ openwrt,ih-magic = <0x12291000>;
reg = <0x50000 0xfb0000>;
};
};
wifi@0,0 {
compatible = "pci14c3,7603";
reg = <0x0000 0 0 0 0>;
- mediatek,mtd-eeprom = <&factory 0x0000>;
+ nvmem-cells = <&eeprom_factory_0>;
+ nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <2400000 2500000>;
led {
led-active-low;
wifi@0,0 {
compatible = "pci14c3,7662";
reg = <0x0000 0 0 0 0>;
- mediatek,mtd-eeprom = <&factory 0x8000>;
+ nvmem-cells = <&eeprom_factory_8000>;
+ nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
led {
led-sources = <2>;
};
};
-ðernet {
- mtd-mac-address = <&factory 0xe000>;
+&gmac0 {
+ nvmem-cells = <&macaddr_factory_e000>;
+ nvmem-cell-names = "mac-address";
};
-&pinctrl {
- state_default: pinctrl0 {
- gpio {
- ralink,group = "jtag", "wdt";
- ralink,function = "gpio";
+&gmac1 {
+ status = "okay";
+ label = "wan";
+ phy-handle = <ðphy4>;
+
+ nvmem-cells = <&macaddr_factory_e006>;
+ nvmem-cell-names = "mac-address";
+};
+
+ðphy4 {
+ /delete-property/ interrupts;
+};
+
+&switch0 {
+ ports {
+ port@0 {
+ status = "okay";
+ label = "lan1";
+ };
+
+ port@1 {
+ status = "okay";
+ label = "lan2";
+ };
+
+ port@2 {
+ status = "okay";
+ label = "lan3";
+ };
+
+ port@3 {
+ status = "okay";
+ label = "lan4";
};
};
};
+
+&state_default {
+ gpio {
+ groups = "jtag", "wdt";
+ function = "gpio";
+ };
+};