ath79: convert boards based on senao_ap-dual.dtsi WiFis to nvmem-cells
authorNick Hainke <vincent@systemli.org>
Thu, 15 Dec 2022 08:44:55 +0000 (09:44 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Thu, 15 Dec 2022 14:08:09 +0000 (15:08 +0100)
Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
target/linux/ath79/dts/ar9344_engenius_eap600.dts
target/linux/ath79/dts/ar9344_engenius_ecb600.dts
target/linux/ath79/dts/ar9344_senao_ap-dual.dtsi
target/linux/ath79/dts/ar9344_watchguard_ap100.dts
target/linux/ath79/dts/ar9344_watchguard_ap200.dts
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom

index 50e0674be48f2fd24a6a627c57cada1a536d51fe..618660802c09e77dd944ebb7ce8e85b110f13f6e 100644 (file)
 
 &pcie {
        wifi@0,0,0 {
-               nvmem-cells = <&macaddr_art_0>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&macaddr_art_0>, <&calibration_art_5000>;
+               nvmem-cell-names = "mac-address", "calibration";
        };
 };
 
 &wmac {
-       nvmem-cells = <&macaddr_art_0>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>;
+       nvmem-cell-names = "mac-address", "calibration";
        mac-address-increment = <(-1)>;
 };
 
        macaddr_art_0: macaddr@0 {
                reg = <0x0 0x6>;
        };
+
+       calibration_art_1000: calibration@1000 {
+               reg = <0x1000 0x440>;
+       };
+
+       calibration_art_5000: calibration@5000 {
+               reg = <0x5000 0x440>;
+       };
 };
index ad32dc9e392a3f07e41a33b2c89adf3e8700630c..5f6ffb130d79a8fdd2b2570efe0c73722ea91206 100644 (file)
 
 &pcie {
        wifi@0,0,0 {
-               nvmem-cells = <&macaddr_art_0>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&macaddr_art_0>, <&calibration_art_5000>;
+               nvmem-cell-names = "mac-address", "calibration";
                mac-address-increment = <(-2)>;
        };
 };
 
 &wmac {
-       nvmem-cells = <&macaddr_art_0>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>;
+       nvmem-cell-names = "mac-address", "calibration";
        mac-address-increment = <(-1)>;
 };
 
        macaddr_art_0: macaddr@0 {
                reg = <0x0 0x6>;
        };
+
+       calibration_art_1000: calibration@1000 {
+               reg = <0x1000 0x440>;
+       };
+
+       calibration_art_5000: calibration@5000 {
+               reg = <0x5000 0x440>;
+       };
 };
index c963138f6a118cbc7a85a020d245ccd1c325fa9d..c0e95065d5ae6f75544609875c21a447a4179b24 100644 (file)
@@ -63,7 +63,6 @@
                compatible = "pci168c,0030";
                reg = <0x0 0 0 0 0>;
                ieee80211-freq-limit = <2402000 2482000>;
-               qca,no-eeprom;
                #gpio-cells = <2>;
                gpio-controller;
        };
@@ -73,6 +72,4 @@
        status = "okay";
 
        ieee80211-freq-limit = <4900000 5990000>;
-
-       mtd-cal-data = <&art 0x1000>;
 };
index d2ebe14979d4a18b4dae378af787c8d6238ddefa..3cd3fb70e60db1739b1403d27b16a213dc852b4c 100644 (file)
 
 &pcie {
        status = "disabled";
+
+       wifi@0,0,0 {
+               nvmem-cells = <&calibration_art_5000>;
+               nvmem-cell-names = "calibration";
+       };
 };
 
 &wmac {
        /delete-property/ qca,disable-2ghz;
 
-       nvmem-cells = <&macaddr_art_0>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>;
+       nvmem-cell-names = "mac-address", "calibration";
        mac-address-increment = <(-2)>;
 };
 
        macaddr_art_0: macaddr@0 {
                reg = <0x0 0x6>;
        };
+
+       calibration_art_1000: calibration@1000 {
+               reg = <0x1000 0x440>;
+       };
+
+       calibration_art_5000: calibration@5000 {
+               reg = <0x5000 0x440>;
+       };
 };
index 0cd966476c2e3c3f0290139313c550b2a2c86e5f..88c7637fc9b11fef34fa56b3f2afcb83f513b52b 100644 (file)
 
 &pcie {
        wifi@0,0,0 {
-               nvmem-cells = <&macaddr_art_0>;
-               nvmem-cell-names = "mac-address";
+               nvmem-cells = <&macaddr_art_0>, <&calibration_art_5000>;
+               nvmem-cell-names = "mac-address", "calibration";
                mac-address-increment = <(-1)>;
        };
 };
 
 &wmac {
-       nvmem-cells = <&macaddr_art_0>;
-       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>;
+       nvmem-cell-names = "mac-address", "calibration";
        mac-address-increment = <(-2)>;
 };
 
        macaddr_art_0: macaddr@0 {
                reg = <0x0 0x6>;
        };
+
+       calibration_art_1000: calibration@1000 {
+               reg = <0x1000 0x440>;
+       };
+
+       calibration_art_5000: calibration@5000 {
+               reg = <0x5000 0x440>;
+       };
 };
index 0001fa159070d0be53739351729b0cdcdb536ce5..9ded116e9dd6f0f46a2dfd4dfcbde83f6f2007c6 100644 (file)
@@ -83,13 +83,9 @@ case "$FIRMWARE" in
        ;;
 "ath9k-eeprom-pci-0000:00:00.0.bin")
        case $board in
-       engenius,eap600|\
-       engenius,ecb600|\
        mercury,mw4530r-v1|\
        ocedo,raccoon|\
        ubnt,unifi-ap-pro|\
-       watchguard,ap100|\
-       watchguard,ap200|\
        winchannel,wb2000)
                caldata_extract "art" 0x5000 0x440
                ;;