aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ramips/dts/mt7621_cudy_x6.dts29
-rw-r--r--target/linux/ramips/image/mt7621.mk1
-rw-r--r--target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac5
3 files changed, 19 insertions, 16 deletions
diff --git a/target/linux/ramips/dts/mt7621_cudy_x6.dts b/target/linux/ramips/dts/mt7621_cudy_x6.dts
index 6cff9c25f3..5d5bb5150c 100644
--- a/target/linux/ramips/dts/mt7621_cudy_x6.dts
+++ b/target/linux/ramips/dts/mt7621_cudy_x6.dts
@@ -11,9 +11,9 @@
aliases {
led-boot = &led_internet_blue;
- led-failsafe = &led_internet_blue;
+ led-failsafe = &led_internet_red;
led-running = &led_internet_blue;
- led-upgrade = &led_internet_blue;
+ led-upgrade = &led_internet_red;
label-mac-device = &gmac0;
};
@@ -45,7 +45,7 @@
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
- internet_red {
+ led_internet_red: internet_red {
label = "red:internet";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
@@ -102,10 +102,18 @@
read-only;
};
- bdinfo: partition@1ff0000 {
+ partition@1ff0000 {
label = "bdinfo";
reg = <0x1ff0000 0x10000>;
read-only;
+
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_bdinfo_de00: macaddr@de00 {
+ reg = <0xde00 0x6>;
+ };
};
};
};
@@ -121,6 +129,9 @@
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
mediatek,disable-radar-background;
+
+ nvmem-cells = <&macaddr_bdinfo_de00>;
+ nvmem-cell-names = "mac-address";
};
};
@@ -175,13 +186,3 @@
function = "gpio";
};
};
-
-&bdinfo {
- compatible = "nvmem-cells";
- #address-cells = <1>;
- #size-cells = <1>;
-
- macaddr_bdinfo_de00: macaddr@de00 {
- reg = <0xde00 0x6>;
- };
-};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index d46d84e6ce..df89877c9a 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -527,6 +527,7 @@ define Device/cudy_x6
DEVICE_MODEL := X6
UIMAGE_NAME := R13
DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools
+ SUPPORTED_DEVICES += R13
endef
TARGET_DEVICES += cudy_x6
diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 30a10423ad..b6337f397b 100644
--- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -28,8 +28,9 @@ case "$board" in
[ "$PHYNBR" = "1" ] && macaddr_setbit_la $hw_mac_addr > /sys${DEVPATH}/macaddress
;;
cudy,x6)
- hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
- macaddr_add $hw_mac_addr "$PHYNBR" > /sys${DEVPATH}/macaddress
+ hw_mac_addr="$(mtd_get_mac_binary bdinfo 0xde00)"
+ [ "$PHYNBR" = "1" ] && \
+ macaddr_setbit_la "$(macaddr_add $hw_mac_addr 0x100000)" > /sys${DEVPATH}/macaddress
;;
dlink,dap-x1860-a1)
hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"