Skip to content

Commit 191ed4e

Browse files
ivanusevantonhauke
authored andcommitted
ramips: mt76x8: fixs for Keenetic Air (KN-1613) and Extra (KN-1713)
A new syntax for LEDs was used, and migration of the LEDs configuration was added. Used lower case hex characters for the addresses. Fixed a USB port power issue. Signed-off-by: Anton Yu. Ivanusev <ivanusevanton@yandex.ru> Link: openwrt/openwrt#17521 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
1 parent 9685058 commit 191ed4e

File tree

3 files changed

+39
-18
lines changed

3 files changed

+39
-18
lines changed

target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,21 @@
3030
};
3131

3232
internet {
33-
label = "green:internet";
33+
function = LED_FUNCTION_WAN;
34+
color = <LED_COLOR_ID_GREEN>;
3435
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
3536
};
3637

3738
wifi2 {
38-
label = "green:wifi2";
39+
function = LED_FUNCTION_WLAN_2GHZ;
40+
color = <LED_COLOR_ID_GREEN>;
3941
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
4042
linux,default-trigger = "phy0tpt";
4143
};
4244

4345
wifi5 {
44-
label = "green:wifi5";
46+
function = LED_FUNCTION_WLAN_5GHZ;
47+
color = <LED_COLOR_ID_GREEN>;
4548
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
4649
linux,default-trigger = "phy1tpt";
4750
};

target/linux/ramips/dts/mt7628an_keenetic_kn-1713.dts

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
regulator-max-microvolt = <5000000>;
2828
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
2929
enable-active-high;
30+
regulator-always-on;
3031
};
3132

3233
leds {
@@ -44,17 +45,18 @@
4445
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
4546
};
4647

47-
fn {
48-
function = LED_FUNCTION_USB;
48+
wifi2 {
49+
function = LED_FUNCTION_WLAN_2GHZ;
4950
color = <LED_COLOR_ID_GREEN>;
5051
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
52+
linux,default-trigger = "phy0tpt";
5153
};
5254

53-
wifi {
54-
function = LED_FUNCTION_WLAN;
55+
wifi5 {
56+
function = LED_FUNCTION_WLAN_5GHZ;
5557
color = <LED_COLOR_ID_GREEN>;
5658
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
57-
linux,default-trigger = "phy0tpt","phy1tpt";
59+
linux,default-trigger = "phy1tpt";
5860
};
5961
};
6062

@@ -93,7 +95,7 @@
9395
partition@0 {
9496
compatible = "denx,uimage";
9597
label = "firmware";
96-
reg = <0x0 0x1CC0000>;
98+
reg = <0x0 0x1cc0000>;
9799
};
98100
};
99101
};
@@ -160,21 +162,21 @@
160162
reg = <0x50000 0xe60000>;
161163
};
162164

163-
partition@EB0000 {
165+
partition@eb0000 {
164166
label = "config_1";
165-
reg = <0xEB0000 0x40000>;
167+
reg = <0xeb0000 0x40000>;
166168
read-only;
167169
};
168170

169-
partition@EF0000 {
171+
partition@ef0000 {
170172
label = "storage";
171-
reg = <0xEF0000 0x100000>;
173+
reg = <0xef0000 0x100000>;
172174
read-only;
173175
};
174176

175-
partition@FF0000 {
177+
partition@ff0000 {
176178
label = "dump";
177-
reg = <0xFF0000 0x10000>;
179+
reg = <0xff0000 0x10000>;
178180
read-only;
179181
};
180182

@@ -198,12 +200,12 @@
198200

199201
firmware2: partition@1050000 {
200202
label = "firmware_2";
201-
reg = <0x1050000 0xE60000>;
203+
reg = <0x1050000 0xe60000>;
202204
};
203205

204-
partition@1EB0000 {
206+
partition@1eb0000 {
205207
label = "Config_2";
206-
reg = <0x1EB0000 0x40000>;
208+
reg = <0x1eb0000 0x40000>;
207209
read-only;
208210
};
209211
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
. /lib/functions.sh
2+
. /lib/functions/migrations.sh
3+
4+
board=$(board_name)
5+
6+
case "$board" in
7+
keenetic,kn-1613)
8+
migrate_leds 'green:internet=green:wan'
9+
;;
10+
esac
11+
12+
remove_devicename_leds
13+
14+
migrations_apply system
15+
16+
exit 0

0 commit comments

Comments
 (0)