#include "mt7620a_hiwifi_hc5x61.dtsi"
/ {
- compatible = "hiwifi,hc5661", "hiwifi,hc5x61", "ralink,mt7620a-soc";
+ compatible = "hiwifi,hc5661", "ralink,mt7620a-soc";
model = "HiWiFi HC5661";
aliases {
label-mac-device = ðernet;
- led-boot = &led_system;
- led-failsafe = &led_system;
- led-running = &led_system;
- led-upgrade = &led_system;
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
};
leds {
compatible = "gpio-leds";
- led_system: system {
- label = "blue:system";
+ led_status: led-0 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_STATUS;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
- internet {
- label = "blue:internet";
+ led-1 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WAN;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
- wlan2g {
- label = "blue:wlan2g";
+ led-2 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WLAN;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
};
+
+&usbphy {
+ status = "disabled";
+};
#include "mt7620a_hiwifi_hc5x61.dtsi"
/ {
- compatible = "hiwifi,hc5761", "hiwifi,hc5x61", "ralink,mt7620a-soc";
+ compatible = "hiwifi,hc5761", "ralink,mt7620a-soc";
model = "HiWiFi HC5761";
aliases {
label-mac-device = ðernet;
- led-boot = &led_system;
- led-failsafe = &led_system;
- led-running = &led_system;
- led-upgrade = &led_system;
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
};
leds {
compatible = "gpio-leds";
- led_system: system {
- label = "blue:system";
+ led_status: led-0 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_STATUS;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
- internet {
- label = "blue:internet";
+ led-1 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WAN;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
- wlan2g {
- label = "blue:wlan2g";
+ led-2 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WLAN_2GHZ;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
- wlan5g {
- label = "blue:wlan5g";
+ led-3 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WLAN_5GHZ;
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
&pcie0 {
- mt76@0,0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_bdinfo_18a 0>;
nvmem-cell-names = "eeprom", "mac-address";
#include "mt7620a_hiwifi_hc5x61.dtsi"
/ {
- compatible = "hiwifi,hc5861", "hiwifi,hc5x61", "ralink,mt7620a-soc";
+ compatible = "hiwifi,hc5861", "ralink,mt7620a-soc";
model = "HiWiFi HC5861";
aliases {
label-mac-device = ðernet;
- led-boot = &led_system;
- led-failsafe = &led_system;
- led-running = &led_system;
- led-upgrade = &led_system;
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
};
leds {
compatible = "gpio-leds";
- led_system: system {
- label = "blue:system";
+ led_status: led-0 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_STATUS;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
- wlan2g {
- label = "blue:wlan2g";
+ led-1 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WLAN_2GHZ;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
- internet {
- label = "blue:internet";
+ led-2 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WAN;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
- wlan5g {
- label = "blue:wlan5g";
+ led-3 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WLAN_5GHZ;
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
- turbo {
- label = "blue:turbo";
+ led-4 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_USB;
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "usbport";
+ trigger-sources = <&ohci_port1>, <&ehci_port1>;
};
};
&pcie0 {
wifi@0,0 {
- compatible = "pci14c3,7662";
+ compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_bdinfo_18a 0>;
nvmem-cell-names = "eeprom", "mac-address";
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
- compatible = "hiwifi,hc5x61", "ralink,mt7620a-soc";
-
chosen {
bootargs = "console=ttyS0,115200";
};
aliases {
label-mac-device = &gmac0;
- led-boot = &led_system;
- led-failsafe = &led_system;
- led-running = &led_status;
- led-upgrade = &led_status;
+ led-boot = &led_status_red;
+ led-failsafe = &led_status_red;
+ led-running = &led_status_white;
+ led-upgrade = &led_status_white;
};
chosen {
leds {
compatible = "gpio-leds";
- led_status: status {
- function = LED_FUNCTION_STATUS;
+ led_status_white: led-0 {
color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_STATUS;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
- led_system: system {
- label = "red:system";
+ led_status_red: led-1 {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_STATUS;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
panic-indicator;
};
};
&pcie0 {
- mt76@0,0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_0>, <&macaddr_bdinfo_18a 0>;
nvmem-cell-names = "eeprom", "mac-address";
};
&pcie1 {
- mt76@0,0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_bdinfo_18a 0>;
nvmem-cell-names = "eeprom", "mac-address";
compatible = "hiwifi,hc5611", "mediatek,mt7628an-soc";
model = "HiWiFi HC5611";
+ aliases {
+ label-mac-device = ðernet;
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
leds {
compatible = "gpio-leds";
- led_system: system {
- label = "green:system";
+ led_status: led-0 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
- internet {
- label = "red:internet";
+ led-1 {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_WAN;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
};
compatible = "hiwifi,hc5661a", "mediatek,mt7628an-soc";
model = "HiWiFi HC5661A";
+ aliases {
+ label-mac-device = ðernet;
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
leds {
compatible = "gpio-leds";
- led_system: system {
- label = "blue:system";
+ led_status: led-0 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_STATUS;
gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
};
- internet {
- label = "blue:internet";
+ led-1 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WAN;
gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
};
- wlan2g {
- label = "blue:wlan2g";
+ led-2 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WLAN;
gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
};
};
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,portdisable = <0x20>;
+};
+
&pinctrl {
ephy-analog;
&ohci {
status = "disabled";
};
+
+&usbphy {
+ status = "disabled";
+};
compatible = "hiwifi,hc5761a", "mediatek,mt7628an-soc";
model = "HiWiFi HC5761A";
+ aliases {
+ label-mac-device = ðernet;
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
leds {
compatible = "gpio-leds";
- led_system: system {
- label = "blue:system";
+ led_status: led-0 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_STATUS;
gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
};
- internet {
- label = "blue:internet";
+ led-1 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WAN;
gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
};
- wlan2g {
- label = "blue:wlan2g";
+ led-2 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WLAN_2GHZ;
gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
- wlan5g {
- label = "blue:wlan5g";
+ led-3 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WLAN_5GHZ;
gpios = <&gpio 40 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy1tpt";
};
};
};
+&esw {
+ mediatek,portmap = <0x2f>;
+ mediatek,portdisable = <0x2c>;
+};
+
&pinctrl {
ephy-analog;
&pcie0 {
wifi@0,0 {
+ compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_bdinfo_18a 0>;
nvmem-cell-names = "eeprom", "mac-address";
compatible = "hiwifi,hc5861b", "mediatek,mt7628an-soc";
model = "HiWiFi HC5861B";
+ aliases {
+ label-mac-device = ðernet;
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-running = &led_status;
+ led-upgrade = &led_status;
+ };
+
leds {
compatible = "gpio-leds";
- led_system: system {
- label = "green:system";
+ led_status: led-0 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
};
- wlan2g {
- label = "green:wlan2g";
+ led-1 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_WLAN_2GHZ;
gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
};
+&esw {
+ mediatek,portmap = <0x3e>;
+ mediatek,portdisable = <0x20>;
+};
+
&state_default {
gpio {
groups = "refclk", "wdt", "wled_an";
status = "disabled";
};
+&usbphy {
+ status = "disabled";
+};
+
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
+ compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_bdinfo_18a 0>;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
- compatible = "hiwifi,hc5x61a", "mediatek,mt7628an-soc";
-
- aliases {
- label-mac-device = ðernet;
- led-boot = &led_system;
- led-failsafe = &led_system;
- led-running = &led_system;
- led-upgrade = &led_system;
- };
-
chosen {
bootargs = "console=ttyS0,115200";
};
;;
hiwifi,hc5661|\
hiwifi,hc5761)
- ucidef_set_led_switch "internet" "internet" "blue:internet" "switch0" "0x01"
+ ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x01"
;;
hiwifi,hc5861)
- ucidef_set_led_switch "internet" "internet" "blue:internet" "switch0" "0x20"
+ ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x20"
;;
hnet,c108)
ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
;;
hiwifi,hc5611)
- ucidef_set_led_netdev "internet" "internet" "red:internet" "br-lan" "tx rx"
+ ucidef_set_led_netdev "wan" "WAN" "red:wan" "br-lan" "tx rx"
;;
hiwifi,hc5661a|\
hiwifi,hc5761a)
- ucidef_set_led_switch "internet" "internet" "blue:internet" "switch0" "0x10"
+ ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x10"
;;
keenetic,kn-1221|\
keenetic,kn-1613|\