lantiq: xrx200: convert FritzBox 7360v2's wifi to nvmem
authorChristian Lamparter <chunkeey@gmail.com>
Mon, 13 Mar 2023 21:49:50 +0000 (22:49 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 26 Mar 2023 14:39:37 +0000 (16:39 +0200)
this was thoroughly tested (warm and cold boots). on a
real 7360v2. This is because there have been documented
hick-ups with other lantiq devices that need the
owl-loader too.

It's likely that the 7360(sl) could be converted in the
same way as well. However the 7362sl uses a reversed
caldata format, so the "qca,no-eeprom" stays in place.

The patch also moves the urloader nvmem partition
definition into the partition section.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi
target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom

index 063d6dca5e0d25c962a2658b5e13ec2933a60c8e..a30746cde2b4307ce8d8a4c125dcbce0c489a619 100644 (file)
                                label = "urlader";
                                reg = <0x00000 0x20000>;
                                read-only;
+
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               cal_urlader_985: cal@985 {
+                                       reg = <0x985 0x440>;
+                               };
+
+                               macaddr_urlader_a91: macaddr@a91 {
+                                       reg = <0xa91 0x6>;
+                               };
                        };
 
                        partition@20000 {
        reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
 };
 
-&urlader {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_urlader_a91: macaddr@a91 {
-               reg = <0xa91 0x6>;
-       };
+&wifi {
+       /delete-property/ qca,no-eeprom;
+       nvmem-cells = <&cal_urlader_985>;
+       nvmem-cell-names = "calibration";
 };
index 73f6e152bfac3eebfd54d50962d16efec1c2d0be..7324127d2a8ece874e9041e6b99febc03d6f8073 100644 (file)
                #address-cells = <2>;
                device_type = "pci";
 
-               wifi@168c,002e {
+               wifi: wifi@168c,002e {
                        compatible = "pci168c,002e";
                        reg = <0 0 0 0 0>;
                        qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */
index c6bacb8d3c1629c6ebd290ac9d0ccccd18a0f86c..eefc39b30b463e431eecc46fb0bd6f5c4bab4a43 100644 (file)
@@ -19,8 +19,7 @@ case "$FIRMWARE" in
                        avm,fritz3390)
                                caldata_extract_reverse "urlader" 0x2546 0x440
                                ;;
-                       avm,fritz7360sl|\
-                       avm,fritz7360-v2)
+                       avm,fritz7360sl)
                                caldata_extract "urlader" 0x985 0x1000
                                ;;
                        avm,fritz7412|\