ath79: ar9344: use led-sources for ath9k

The ath9k driver creates an ath9k LED by default. Instead of having a
non functional LED, configure it properly and remove the extra as it's
not needed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19865
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Rosen Penev 2025-05-25 14:20:28 -07:00 committed by Hauke Mehrtens
parent 5629e06cf2
commit 579d4654c7
19 changed files with 102 additions and 147 deletions

View File

@ -70,13 +70,6 @@
label = "green:signal3";
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};
wlan {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
watchdog {
@ -174,4 +167,10 @@
nvmem-cells = <&cal_art_1000>;
nvmem-cell-names = "calibration";
led {
led-sources = <12>;
led-active-low;
};
};

View File

@ -35,13 +35,6 @@
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};
wlan {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
rssilow {
label = "red:rssilow";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
@ -163,4 +156,9 @@
nvmem-cells = <&cal_art_1000>;
nvmem-cell-names = "calibration";
led {
led-sources = <0>;
led-active-low;
};
};

View File

@ -17,13 +17,6 @@
leds {
compatible = "gpio-leds";
wlan {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
led_dlan_white: dlan_white {
label = "white:dlan";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
@ -164,6 +157,11 @@
nvmem-cells = <&cal_art_1000>;
nvmem-cell-names = "calibration";
led {
led-sources = <12>;
led-active-low;
};
};
&pcie {

View File

@ -43,12 +43,6 @@
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wifi2g {
label = "amber:wifi2g";
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
virtual_flash {
@ -73,6 +67,11 @@
nvmem-cells = <&calibration_wmac>, <&macaddr_uboot_3ff80 1>;
nvmem-cell-names = "calibration", "mac-address";
led {
led-sources = <19>;
led-active-low;
};
};
&art {

View File

@ -191,7 +191,7 @@
&pcie {
status = "okay";
ath9k: wifi@0,0 {
wifi@0,0 {
compatible = "pci168c,0033";
reg = <0x0000 0 0 0 0>;
gpio-controller;

View File

@ -21,13 +21,6 @@
leds: leds {
compatible = "gpio-leds";
wlan2g {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
led_system: system {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_BLUE>;
@ -138,6 +131,11 @@
nvmem-cells = <&cal_art_1000>;
nvmem-cell-names = "calibration";
led {
led-sources = <13>;
led-active-low;
};
};
&gpio {

View File

@ -65,17 +65,6 @@
los-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <1000>;
};
leds {
compatible = "gpio-leds";
led-0 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_WLAN_2GHZ;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
};
&ref {
@ -341,4 +330,9 @@
status = "okay";
qca,no-eeprom;
led {
led-sources = <4>;
led-active-low;
};
};

View File

@ -87,13 +87,6 @@
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
wlan {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
};
@ -235,4 +228,9 @@
nvmem-cells = <&cal_ath9k>;
nvmem-cell-names = "calibration";
led {
led-sources = <0>;
led-active-low;
};
};

View File

@ -61,12 +61,6 @@
default-state = "keep";
};
wlan2g_green {
label = "green:wlan2g";
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wlan5g_blue {
label = "blue:wlan5g";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
@ -273,6 +267,11 @@
nvmem-cells = <&macaddr_caldata_0>, <&cal_art_1000>;
nvmem-cell-names = "mac-address", "calibration";
led {
led-sources = <11>;
led-active-low;
};
};
&pcie {

View File

@ -31,28 +31,12 @@
default-state = "on";
};
wlan2g {
label = "yellow:wlan24";
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
led_system: system {
label = "blue:sys";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
};
ath9k-leds {
compatible = "gpio-leds";
wlan5g {
label = "red:wlan5";
gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
keys {
compatible = "gpio-keys";
@ -149,13 +133,16 @@
&pcie {
status = "okay";
ath9k: wifi@0,0 {
wifi@0,0 {
compatible = "pci168c,0030";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&macaddr_art_c>, <&calibration_art_5000>;
nvmem-cell-names = "mac-address", "calibration";
#gpio-cells = <2>;
gpio-controller;
led {
led-sources = <0>;
led-active-low;
};
};
};
@ -164,6 +151,11 @@
nvmem-cells = <&macaddr_art_6>, <&calibration_art_1000>;
nvmem-cell-names = "mac-address", "calibration";
led {
led-sources = <12>;
led-active-low;
};
};
&mdio0 {

View File

@ -54,13 +54,6 @@
linux,default-trigger = "phy1tpt";
};
wlan_green {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
lan_amber {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_AMBER>;
@ -142,8 +135,8 @@
&pcie {
status = "okay";
ath9k: wifi@0,0 {
compatible = "168c,0030";
wifi@0,0 {
compatible = "pci168c,0030";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&macaddr_art_0 (-2)>, <&cal_art_5000>;
nvmem-cell-names = "mac-address", "calibration";
@ -159,6 +152,11 @@
ieee80211-freq-limit = <4900000 5990000>;
nvmem-cells = <&macaddr_art_0 (-1)>, <&cal_art_1000>;
nvmem-cell-names = "mac-address", "calibration";
led {
led-sources = <18>;
led-active-low;
};
};
&mdio0 {

View File

@ -49,13 +49,6 @@
default-state = "on";
};
wlan2g {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wps_white {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_WHITE>;
@ -137,7 +130,7 @@
&pcie {
status = "okay";
ath9k: wifi@0,0 {
wifi@0,0 {
compatible = "pci168c,0030";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&macaddr_art_5002>;
@ -224,4 +217,9 @@
nvmem-cells = <&cal_art_1000>;
nvmem-cell-names = "calibration";
led {
led-sources = <14>;
led-active-low;
};
};

View File

@ -44,13 +44,6 @@
label = "green:sig2";
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
};
wlan {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
};
@ -129,4 +122,9 @@
nvmem-cells = <&cal_art_1000>;
nvmem-cell-names = "calibration";
led {
led-sources = <21>;
led-active-low;
};
};

View File

@ -55,13 +55,6 @@
label = "white:repeater";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
wlan {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
};
@ -175,4 +168,9 @@
nvmem-cells = <&cal_art_1000>;
nvmem-cell-names = "calibration";
led {
led-sources = <12>;
led-active-low;
};
};

View File

@ -25,16 +25,6 @@
linux,code = <KEY_RESTART>;
};
};
ath9k-leds {
compatible = "gpio-leds";
wifi2g {
label = "blue:wifi2g";
gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
};
&mdio0 {
@ -59,12 +49,15 @@
&pcie {
status = "okay";
ath9k: wifi@0,0 {
wifi@0,0 {
compatible = "pci168c,0030";
reg = <0x0 0 0 0 0>;
ieee80211-freq-limit = <2402000 2482000>;
#gpio-cells = <2>;
gpio-controller;
led {
led-sources = <0>;
led-active-low;
};
};
};

View File

@ -63,13 +63,6 @@
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
wlan {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
led_system: system {
label = "green:system";
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
@ -159,6 +152,11 @@
nvmem-cells = <&macaddr_uboot_1fc00 0>, <&cal_art_1000>;
nvmem-cell-names = "mac-address", "calibration";
led {
led-sources = <21>;
led-active-low;
};
};
&eth0 {

View File

@ -41,12 +41,6 @@
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
wifi_amber {
label = "amber:wifi";
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wifi_green {
label = "green:wifi";
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
@ -78,6 +72,11 @@
nvmem-cells = <&macaddr_art_0 (-2)>, <&calibration_art_1000>;
nvmem-cell-names = "mac-address", "calibration";
led {
led-sources = <19>;
led-active-low;
};
};
&art {

View File

@ -41,12 +41,6 @@
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
wifi_amber {
label = "amber:wifi";
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wifi_green {
label = "green:wifi";
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
@ -74,6 +68,11 @@
&wmac {
nvmem-cells = <&macaddr_art_0 (-2)>, <&calibration_art_1000>;
nvmem-cell-names = "mac-address", "calibration";
led {
led-sources = <19>;
led-active-low;
};
};
&art {

View File

@ -43,12 +43,6 @@
pinctrl-names = "default";
pinctrl-0 = <&enable_gpio20_gpio22>;
wifi {
label = "green:wifi";
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
lan1 {
label = "orange:lan1";
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
@ -162,6 +156,11 @@
nvmem-cells = <&cal_art_1000>;
nvmem-cell-names = "calibration";
led {
led-sources = <12>;
led-active-low;
};
};
&pinmux {