ath79: aruba,ap115: use nvmem
authorRosen Penev <rosenp@gmail.com>
Mon, 27 Nov 2023 19:40:48 +0000 (11:40 -0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 19 Oct 2024 21:16:20 +0000 (23:16 +0200)
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16284
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/dts/qca9558_aruba_ap-115.dts
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom

index a5318b6cdd1876b36daf4664ec548956aaa2cbfd..7a59bda6eb22df9a7134617f9906196abefb6ec6 100644 (file)
        ath9k: wifi@0,0 {
                compatible = "pci168c,0033";
                reg = <0x0000 0 0 0 0>;
-               qca,no-eeprom;
 
-               nvmem-cells = <&macaddr_oemdata_1d 1>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&macaddr_oemdata_1d 1>, <&cal_oemdata_5000>;
+               nvmem-cell-names = "mac-address", "calibration";
        };
 };
 
                                reg = <0x100000 0xe00000>;
                        };
 
-                       oemdata: partition@fe0000 {
+                       partition@fe0000 {
                                label = "oemdata";
                                reg = <0xfe0000 0x010000>;
                                read-only;
                                                reg = <0x1d 0x6>;
                                                #nvmem-cell-cells = <1>;
                                        };
+
+                                       cal_oemdata_1000: calibration@1000 {
+                                               reg = <0x1000 0x440>;
+                                       };
+
+                                       cal_oemdata_5000: calibration@5000 {
+                                               reg = <0x5000 0x440>;
+                                       };
                                };
                        };
 
 &wmac {
        status = "okay";
 
-       qca,no-eeprom;
-       nvmem-cells = <&macaddr_oemdata_1d 0>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_oemdata_1d 0>, <&cal_oemdata_1000>;
+       nvmem-cell-names = "mac-address", "calibration";
 };
 
 &mdio0 {
index 6341c56a8be086e4e9a124da34628deaa2c63758..17639ad439e5b3942fe03e7b689fa9451ebb7d34 100644 (file)
@@ -9,9 +9,6 @@ board=$(board_name)
 case "$FIRMWARE" in
 "ath9k-eeprom-ahb-18100000.wmac.bin")
        case $board in
-       aruba,ap-115)
-               caldata_extract "oemdata" 0x1000 0x440
-               ;;
        asus,pl-ac56|\
        asus,rp-ac51|\
        asus,rp-ac66)
@@ -73,9 +70,6 @@ case "$FIRMWARE" in
        ;;
 "ath9k-eeprom-pci-0000:00:00.0.bin")
        case $board in
-       aruba,ap-115)
-               caldata_extract "oemdata" 0x5000 0x440
-               ;;
        avm,fritz300e)
                caldata_extract_reverse "urloader" 0x1541 0x440
                ;;