Skip to content

Commit 2f30e14

Browse files
nehebhauke
authored andcommitted
ath79: convert pcie gpios to led-sources
Simpler dts. Signed-off-by: Rosen Penev <[email protected]> Link: openwrt/openwrt#19860 Signed-off-by: Hauke Mehrtens <[email protected]>
1 parent 099807b commit 2f30e14

File tree

6 files changed

+52
-106
lines changed

6 files changed

+52
-106
lines changed

target/linux/ath79/dts/ar7161_aruba_ap-105.dts

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,6 @@
4949
};
5050
};
5151

52-
ath9k-leds {
53-
compatible = "gpio-leds";
54-
55-
wifi_2g_green {
56-
label = "green:wlan2g";
57-
gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
58-
linux,default-trigger = "phy0tpt";
59-
};
60-
61-
wifi_5g_green {
62-
label = "green:wlan5g";
63-
gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
64-
linux,default-trigger = "phy1tpt";
65-
};
66-
};
67-
6852
keys {
6953
compatible = "gpio-keys";
7054

@@ -97,22 +81,28 @@
9781
&pcie0 {
9882
status = "okay";
9983

100-
ath9k0: wifi@11,0 { /* 2.4 GHz */
84+
wifi@11,0 { /* 2.4 GHz */
10185
compatible = "pci168c,0029";
86+
reg = <0x8800 0 0 0 0>;
10287
nvmem-cells = <&macaddr_hwinfo_1c 1>;
10388
nvmem-cell-names = "mac-address";
104-
reg = <0x8800 0 0 0 0>;
105-
#gpio-cells = <2>;
106-
gpio-controller;
89+
90+
led {
91+
led-sources = <5>;
92+
led-active-low;
93+
};
10794
};
10895

109-
ath9k1: wifi@12,0 { /* 5 GHz */
96+
wifi@12,0 { /* 5 GHz */
11097
compatible = "pci168c,0029";
98+
reg = <0x9000 0 0 0 0>;
11199
nvmem-cells = <&macaddr_hwinfo_1c 2>;
112100
nvmem-cell-names = "mac-address";
113-
reg = <0x9000 0 0 0 0>;
114-
#gpio-cells = <2>;
115-
gpio-controller;
101+
102+
led {
103+
led-sources = <5>;
104+
led-active-low;
105+
};
116106
};
117107
};
118108

target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,6 @@
5858
};
5959
};
6060

61-
ath9k-leds {
62-
compatible = "gpio-leds";
63-
64-
wlan2g {
65-
label = "blue:wlan2g";
66-
gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
67-
linux,default-trigger = "phy0tpt";
68-
};
69-
70-
wlan5g {
71-
label = "blue:wlan5g";
72-
gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
73-
linux,default-trigger = "phy1tpt";
74-
};
75-
};
76-
7761
keys {
7862
compatible = "gpio-keys";
7963

@@ -146,17 +130,23 @@
146130
reg = <0x8800 0 0 0 0>;
147131
nvmem-cells = <&macaddr_lan 0>, <&cal_art_1000>;
148132
nvmem-cell-names = "mac-address", "calibration";
149-
#gpio-cells = <2>;
150-
gpio-controller;
133+
134+
led {
135+
led-sources = <5>;
136+
led-active-low;
137+
};
151138
};
152139

153140
ath9k1: wifi@12,0 {
154141
compatible = "pci168c,0029";
155142
reg = <0x9000 0 0 0 0>;
156143
nvmem-cells = <&macaddr_wan 1>, <&cal_art_5000>;
157144
nvmem-cell-names = "mac-address", "calibration";
158-
#gpio-cells = <2>;
159-
gpio-controller;
145+
146+
led {
147+
led-sources = <5>;
148+
led-active-low;
149+
};
160150
};
161151
};
162152

target/linux/ath79/dts/ar7161_netgear_wndap360.dts

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,6 @@
2727
};
2828
};
2929

30-
ath9k-leds {
31-
compatible = "gpio-leds";
32-
33-
wifi_2g_green {
34-
label = "green:wlan2g";
35-
gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
36-
linux,default-trigger = "phy0tpt";
37-
};
38-
39-
wifi_5g_green {
40-
label = "green:wlan5g";
41-
gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
42-
linux,default-trigger = "phy1tpt";
43-
};
44-
};
45-
4630
keys {
4731
compatible = "gpio-keys";
4832

@@ -149,21 +133,27 @@
149133
&pcie0 {
150134
status = "okay";
151135

152-
ath9k0: wifi@11,0 {
136+
wifi@11,0 {
153137
compatible = "pci168c,0029";
154138
reg = <0x8800 0 0 0 0>;
155139
nvmem-cells = <&macaddr_art_120c>, <&calibration_art_1000>;
156140
nvmem-cell-names = "mac-address", "calibration";
157-
#gpio-cells = <2>;
158-
gpio-controller;
141+
142+
led {
143+
led-sources = <5>;
144+
led-active-low;
145+
};
159146
};
160147

161-
ath9k1: wifi@12,0 {
148+
wifi@12,0 {
162149
compatible = "pci168c,0029";
163150
reg = <0x9000 0 0 0 0>;
164151
nvmem-cells = <&macaddr_art_520c 1>, <&calibration_art_5000>;
165152
nvmem-cell-names = "mac-address", "calibration";
166-
#gpio-cells = <2>;
167-
gpio-controller;
153+
154+
led {
155+
led-sources = <5>;
156+
led-active-low;
157+
};
168158
};
169159
};

target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,6 @@
9090
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
9191
};
9292
};
93-
94-
ath9k-leds {
95-
compatible = "gpio-leds";
96-
97-
wlan {
98-
function = LED_FUNCTION_WLAN;
99-
color = <LED_COLOR_ID_GREEN>;
100-
gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
101-
linux,default-trigger = "phy0tpt";
102-
};
103-
};
10493
};
10594

10695
&spi {
@@ -160,13 +149,16 @@
160149
&pcie {
161150
status = "okay";
162151

163-
ath9k: wifi@0,0 {
152+
wifi@0,0 {
164153
compatible = "pci168c,002e";
165154
reg = <0x0000 0 0 0 0>;
166155
nvmem-cells = <&cal_art_1000>;
167156
nvmem-cell-names = "calibration";
168-
#gpio-cells = <2>;
169-
gpio-controller;
157+
158+
led {
159+
led-sources = <1>;
160+
led-actice-low;
161+
};
170162
};
171163
};
172164

target/linux/ath79/dts/ar7240_tplink.dtsi

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,6 @@
4949
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
5050
};
5151
};
52-
53-
ath9k-leds {
54-
compatible = "gpio-leds";
55-
56-
wlan {
57-
function = LED_FUNCTION_WLAN;
58-
color = <LED_COLOR_ID_GREEN>;
59-
gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
60-
linux,default-trigger = "phy0tpt";
61-
};
62-
};
6352
};
6453

6554
&spi {
@@ -128,8 +117,11 @@
128117
reg = <0x0000 0 0 0 0>;
129118
nvmem-cells = <&macaddr_uboot_1fc00 0>, <&calibration_art_1000>;
130119
nvmem-cell-names = "mac-address", "calibration";
131-
#gpio-cells = <2>;
132-
gpio-controller;
120+
121+
led {
122+
led-sources = <1>;
123+
led-active-low;
124+
};
133125
};
134126
};
135127

target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,6 @@
5757
};
5858
};
5959

60-
ath9k-leds {
61-
compatible = "gpio-leds";
62-
63-
wlan {
64-
function = LED_FUNCTION_WLAN;
65-
color = <LED_COLOR_ID_GREEN>;
66-
gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
67-
linux,default-trigger = "phy0tpt";
68-
};
69-
};
70-
7160
gpio-export {
7261
compatible = "gpio-export";
7362

@@ -149,10 +138,13 @@
149138
ath9k: wifi@0,0 {
150139
compatible = "pci168c,002e";
151140
reg = <0x0000 0 0 0 0>;
152-
#gpio-cells = <2>;
153-
gpio-controller;
154141
nvmem-cells = <&macaddr_uboot_1fc00 0>, <&cal_art_1000>;
155142
nvmem-cell-names = "mac-address", "calibration";
143+
144+
led {
145+
led-sources = <0>;
146+
led-active-low;
147+
};
156148
};
157149
};
158150

0 commit comments

Comments
 (0)