#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "storylink,sap-g3200u3", "mediatek,mt7621-soc";
compatible = "gpio-leds";
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
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_e006: macaddr@e006 {
+ compatible = "mac-base";
+ reg = <0xe006 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+ };
};
partition@50000 {
&pcie0 {
mt76@0,0 {
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>;
};
};
&pcie1 {
mt76@0,0 {
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>;
};
};
&gmac0 {
- nvmem-cells = <&macaddr_factory_e006>;
+ nvmem-cells = <&macaddr_factory_e006 0>;
nvmem-cell-names = "mac-address";
};
label = "wan";
phy-handle = <ðphy4>;
- nvmem-cells = <&macaddr_factory_e006>;
+ nvmem-cells = <&macaddr_factory_e006 1>;
nvmem-cell-names = "mac-address";
- mac-address-increment = <1>;
};
&mdio {
function = "gpio";
};
};
-
-&factory {
- compatible = "nvmem-cells";
- #address-cells = <1>;
- #size-cells = <1>;
-
- macaddr_factory_e006: macaddr@e006 {
- reg = <0xe006 0x6>;
- };
-};