mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-02-15 17:49:06 +01:00
ath79: trendnet,tew-823dru: use nvmem
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Removes deprecated userspace handling. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16287 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
749fa79e01
commit
132b6862a0
3 changed files with 34 additions and 15 deletions
|
|
@ -11,6 +11,7 @@
|
|||
model = "TRENDNET TEW-823DRU";
|
||||
|
||||
aliases {
|
||||
label-mac-device = ð1;
|
||||
led-boot = &led_power_green;
|
||||
led-failsafe = &led_power_green;
|
||||
led-running = &led_power_green;
|
||||
|
|
@ -64,6 +65,13 @@
|
|||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0 0 0 0 0>;
|
||||
nvmem-cells = <&maccaddr_mac_wan 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
|
|
@ -133,6 +141,24 @@
|
|||
label = "mac";
|
||||
reg = <0xfe0000 0x010000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
maccaddr_mac_lan: macaddr@4 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x4 0x11>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
|
||||
maccaddr_mac_wan: macaddr@18 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x18 0x11>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@ff0000 {
|
||||
|
|
@ -172,6 +198,9 @@
|
|||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&maccaddr_mac_lan 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
phy-handle = <&phy0>;
|
||||
pll-data = <0x56000000 0x00000101 0x00001616>;
|
||||
|
||||
|
|
@ -184,6 +213,9 @@
|
|||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&maccaddr_mac_wan 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
pll-data = <0x03000101 0x00000101 0x00001616>;
|
||||
|
||||
fixed-link {
|
||||
|
|
@ -195,6 +227,6 @@
|
|||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&cal_art_1000>;
|
||||
nvmem-cell-names = "calibration";
|
||||
nvmem-cells = <&cal_art_1000>, <&maccaddr_mac_lan 0>;
|
||||
nvmem-cell-names = "calibration", "mac-address";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -846,11 +846,6 @@ ath79_setup_macs()
|
|||
base_mac=$(mtd_get_mac_binary info 0x8)
|
||||
wan_mac=$(macaddr_add "$base_mac" 1)
|
||||
;;
|
||||
trendnet,tew-823dru)
|
||||
lan_mac=$(mtd_get_mac_text mac 0x4)
|
||||
wan_mac=$(mtd_get_mac_text mac 0x18)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
ubnt,powerbridge-m|\
|
||||
ubnt,rocket-m|\
|
||||
ubnt,unifi)
|
||||
|
|
|
|||
|
|
@ -112,14 +112,6 @@ case "$board" in
|
|||
[ "$PHYNBR" -eq 1 ] && \
|
||||
macaddr_add $base_mac 1 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
trendnet,tew-823dru)
|
||||
# set the 2.4G interface mac address to LAN MAC
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
mtd_get_mac_text mac 4 > /sys${DEVPATH}/macaddress
|
||||
# set the 5G interface mac address to WAN MAC + 1
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
macaddr_add "$(mtd_get_mac_text mac 0x18)" 1 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
zyxel,nwa1123-ac)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
mtd_get_mac_text mib0 0x66 > /sys${DEVPATH}/macaddress
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue