]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mediatek: filogic: use nvmem for Unifi 6 Plus caldata
authorBjørn Mork <bjorn@mork.no>
Thu, 25 Sep 2025 05:29:19 +0000 (07:29 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Fri, 26 Sep 2025 22:32:40 +0000 (00:32 +0200)
Replace the hotplug script with nvmem now that loading data from emmc
partitions is supported.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/20154
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts
target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata

index 9c1182e85dce3d494f7c5b69ef4c5ada061cbf55..b6a8f830ef1e30989a1ed86db8a016c8faee99a9 100644 (file)
        vmmc-supply = <&reg_3p3v>;
        non-removable;
        status = "okay";
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       card@0 {
+               compatible = "mmc-card";
+               reg = <0>;
+
+               block {
+                       compatible = "block-device";
+
+                       partitions {
+                               block-partition-factory {
+                                       partname = "factory";
+
+                                       nvmem: nvmem-layout {
+                                               compatible = "fixed-layout";
+                                               #address-cells = <1>;
+                                               #size-cells = <1>;
+
+                                               eeprom_factory_0: eeprom@0 {
+                                                       reg = <0x0 0x1000>;
+                                               };
+                                       };
+                               };
+                       };
+               };
+       };
 };
 
 &eth {
 };
 
 &wifi {
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
        #address-cells = <1>;
        #size-cells = <0>;
        status = "okay";
index bfc051116441c3675a0a6f334c3dd2650a4a4eb0..c92b2926fe1ae48a2db784697cb96dc987bf014a 100644 (file)
@@ -16,9 +16,6 @@ case "$FIRMWARE" in
        tplink,fr365-v1)
                ln -sf /tmp/wlan/radio /lib/firmware/$FIRMWARE
                ;;
-       ubnt,unifi-6-plus)
-               caldata_extract_mmc "factory" 0x0 0x1000
-               ;;
        esac
        ;;
 "mediatek/mt7986_eeprom_mt7975_dual.bin")