]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
lantiq: vr200: switch to nvmem eeprom 23115/head
authorRosen Penev <rosenp@gmail.com>
Mon, 27 Apr 2026 02:47:59 +0000 (19:47 -0700)
committerRobert Marko <robimarko@gmail.com>
Sat, 9 May 2026 12:08:12 +0000 (14:08 +0200)
mediatek,mtd-eeprom predates nvmem and is being phased out.

At first glance, it looks like it's doing something useful with its
big-endian binding. However on further inspection, big-endian is handled
in the same function that mediatek,mtd-eeprom is handled. In addition,
the older mtd_read way of extracting the firmware byteswaps the data
on big endian hosts which big-endian byteswaps back. nvmem does not do
such byteswapping.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23115
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/lantiq/dts/vr9_tplink_vr200.dtsi

index bb934b6448bac19eac620ee7912776199ec03a71..54c2302e90bcb4f7dcee5bae984344c2f2ce0c1d 100644 (file)
                device_type = "pci";
 
                wifi@0,0 {
+                       compatible = "mediatek,mt76";
                        reg = <0 0 0 0 0>;
-                       mediatek,mtd-eeprom = <&radio 0x0000>;
-                       big-endian;
                        ieee80211-freq-limit = <5000000 6000000>;
-                       nvmem-cells = <&macaddr_romfile_f100 2>;
-                       nvmem-cell-names = "mac-address";
+                       nvmem-cells = <&eeprom_radio_0>, <&macaddr_romfile_f100 2>;
+                       nvmem-cell-names = "eeprom", "mac-address";
                };
        };
 };
                                read-only;
                        };
 
-                       radio: partition@ff0000 {
+                       partition@ff0000 {
                                reg = <0xff0000 0x10000>;
                                label = "radio";
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       eeprom_radio_0: eeprom@0 {
+                                               reg = <0x0 0x200>;
+                                       };
+                               };
                        };
                };
        };