#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "jcg,q20", "mediatek,mt7621-soc";
compatible = "gpio-leds";
led_status_red: status_red {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
};
led_status_blue: status_blue {
- label = "blue:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
};
reg = <0x80000 0x80000>;
};
- factory: partition@100000 {
+ partition@100000 {
label = "Factory";
reg = <0x100000 0x80000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ eeprom_factory_0: eeprom@0 {
+ reg = <0x0 0xe00>;
+ };
+
+ macaddr_factory_3fff4: macaddr@3fff4 {
+ reg = <0x3fff4 0x6>;
+ };
+
+ macaddr_factory_3fffa: macaddr@3fffa {
+ reg = <0x3fffa 0x6>;
+ };
+ };
};
partition@180000 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
- mediatek,mtd-eeprom = <&factory 0x0>;
+ nvmem-cells = <&eeprom_factory_0>;
+ nvmem-cell-names = "eeprom";
+ mediatek,disable-radar-background;
};
};
&gmac0 {
- mtd-mac-address = <&factory 0x3fff4>;
+ nvmem-cells = <&macaddr_factory_3fff4>;
+ nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+ status = "okay";
+ label = "wan";
+ phy-handle = <ðphy0>;
+
+ nvmem-cells = <&macaddr_factory_3fffa>;
+ nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+ ethphy0: ethernet-phy@0 {
+ reg = <0>;
+ };
};
&switch0 {
ports {
- port@0 {
- status = "okay";
- label = "wan";
- mtd-mac-address = <&factory 0x3fffa>;
- };
-
port@1 {
status = "okay";
label = "lan1";