ath79: gl-e750: use nvmem for mac addresses
authorRosen Penev <rosenp@gmail.com>
Sun, 16 Jun 2024 19:48:40 +0000 (12:48 -0700)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 8 Dec 2024 22:36:24 +0000 (23:36 +0100)
This is a simple conversion to dts.

68ac3f2cddab states that the 5ghz wifi address is calculated from ART 0
+ 2.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17066
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac

index ba1291557039f63e2a4a8c58821de960d29ddaa3..e4b5f1ea6c31f39cb6961d6324a72956316c3af0 100644 (file)
 
 &pcie0 {
        status = "okay";
+
+       wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0x0000 0 0 0 0>;
+               nvmem-cells = <&macaddr_art_0 2>;
+               nvmem-cell-names = "mac-address";
+       };
 };
 
 &usb0 {
@@ -90,7 +97,9 @@
                                        #size-cells = <1>;
 
                                        macaddr_art_0: macaddr@0 {
+                                               compatible = "mac-base";
                                                reg = <0x0 0x6>;
+                                               #nvmem-cell-cells = <1>;
                                        };
 
                                        cal_art_1000: calibration@1000 {
 
        phy-handle = <&swphy4>;
 
-       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cells = <&macaddr_art_0 0>;
        nvmem-cell-names = "mac-address";
 };
 
index 5a933df501a7abad9528ce3ff775ef85944d82af..989791b64fc64f101d725a1c49ca274dca1b7982 100644 (file)
@@ -10,11 +10,6 @@ PHYNBR=${DEVPATH##*/phy}
 board=$(board_name)
 
 case $board in
-       glinet,gl-e750)
-               # Set mac address for 5g device
-               [ "$PHYNBR" -eq 0 ] && \
-                       macaddr_add $(mtd_get_mac_binary art 0x0) 2 > /sys${DEVPATH}/macaddress
-               ;;
        zyxel,emg2926-q10a|\
        zyxel,nbg6716)
                ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr)