Skip to content

Commit

Permalink
ath79: nec,wX1200cr: use nvmem
Browse files Browse the repository at this point in the history
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <[email protected]>
Link: openwrt/openwrt#16245
Signed-off-by: Hauke Mehrtens <[email protected]>
  • Loading branch information
neheb authored and hauke committed Aug 29, 2024
1 parent 9232fde commit 51f9627
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
7 changes: 6 additions & 1 deletion target/linux/ath79/dts/qca9561_nec_wf1200cr.dts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
#address-cells = <1>;
#size-cells = <1>;

cal_art_1000: calibration@1000 {
reg = <0x1000 0x440>;
};

precal_art_5000: pre-calibration@5000 {
reg = <0x5000 0x2f20>;
};
Expand Down Expand Up @@ -177,5 +181,6 @@
&wmac {
status = "okay";

qca,no-eeprom;
nvmem-cells = <&cal_art_1000>;
nvmem-cell-names = "calibration";
};
7 changes: 6 additions & 1 deletion target/linux/ath79/dts/qca9563_nec_wg1200cr.dts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@
#address-cells = <1>;
#size-cells = <1>;

cal_art_1000: calibration@1000 {
reg = <0x1000 0x440>;
};

precal_art_5000: pre-calibration@5000 {
reg = <0x5000 0x2f20>;
};
Expand Down Expand Up @@ -178,5 +182,6 @@
&wmac {
status = "okay";

qca,no-eeprom;
nvmem-cells = <&cal_art_1000>;
nvmem-cell-names = "calibration";
};
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ case "$FIRMWARE" in
dlink,dir-842-c1|\
dlink,dir-842-c2|\
dlink,dir-842-c3|\
nec,wf1200cr|\
nec,wg1200cr|\
wd,mynet-n600|\
wd,mynet-n750)
caldata_extract "art" 0x1000 0x440
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,16 @@ case "$board" in
[ "$PHYNBR" -eq 1 ] && \
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
;;
qihoo,c301)
[ "$PHYNBR" -eq 0 ] && \
mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress
;;
nec,wf1200cr|\
nec,wg1200cr|\
qihoo,c301)
[ "$PHYNBR" -eq 0 ] && \
mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress
[ "$PHYNBR" -eq 1 ] && \
mtd_get_mac_ascii devdata wlan24mac > /sys${DEVPATH}/macaddress
;;
phicomm,k2t)
[ "$PHYNBR" -eq 0 ] && \
Expand Down

0 comments on commit 51f9627

Please sign in to comment.