#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "TP-Link Archer A9 v6";
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
default-state = "on";
};
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
trigger-sources = <&hub_port0>;
linux,default-trigger = "usbport";
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
wan_orange {
- label = "orange:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
};
};
phy-mode = "sgmii";
phy-handle = <&phy0>;
- nvmem-cells = <&macaddr_info_8>;
+ nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address";
};
compatible = "pci168c,0046";
reg = <0 0 0 0 0>;
- nvmem-cells = <&macaddr_info_8>, <&precal_art_5000>;
+ nvmem-cells = <&macaddr_info_8 (-1)>, <&precal_art_5000>;
nvmem-cell-names = "mac-address", "pre-calibration";
-
- mac-address-increment = <(-1)>;
};
};
reg = <0x050000 0x010000>;
read-only;
- compatible = "nvmem-cells";
- #address-cells = <1>;
- #size-cells = <1>;
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
- cal_art_1000: cal@1000 {
- reg = <0x1000 0x440>;
- };
+ cal_art_1000: cal@1000 {
+ reg = <0x1000 0x440>;
+ };
- precal_art_5000: precal@5000 {
- reg = <0x5000 0x2f20>;
+ precal_art_5000: precal@5000 {
+ reg = <0x5000 0x2f20>;
+ };
};
};
reg = <0x060000 0x020000>;
read-only;
- compatible = "nvmem-cells";
- #address-cells = <1>;
- #size-cells = <1>;
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
- macaddr_info_8: macaddr@8 {
- reg = <0x8 0x6>;
+ macaddr_info_8: macaddr@8 {
+ compatible = "mac-base";
+ reg = <0x8 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
};
};
};
&usb0 {
- #address-cells = <1>;
- #size-cells = <0>;
status = "okay";
-
- hub_port0: port@1 {
- reg = <1>;
- #trigger-source-cells = <0>;
- };
};
&wmac {
/* TODO: missing support in ath9k */
status = "disabled";
- nvmem-cells = <&cal_art_1000>, <&macaddr_info_8>;
+ nvmem-cells = <&cal_art_1000>, <&macaddr_info_8 0>;
nvmem-cell-names = "calibration", "mac-address";
};