From 88bf53f5af28c2a5eee1f60554db1f49f665857f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Mork?= Date: Thu, 25 Sep 2025 07:29:19 +0200 Subject: [PATCH] mediatek: filogic: use nvmem for Unifi 6 Plus caldata MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Replace the hotplug script with nvmem now that loading data from emmc partitions is supported. Signed-off-by: Bjørn Mork Link: https://github.com/openwrt/openwrt/pull/20154 Signed-off-by: Hauke Mehrtens --- .../dts/mt7981a-ubnt-unifi-6-plus.dts | 29 +++++++++++++++++++ .../etc/hotplug.d/firmware/11-mt76-caldata | 3 -- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts b/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts index 9c1182e85d..b6a8f830ef 100644 --- a/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts +++ b/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts @@ -153,6 +153,33 @@ vmmc-supply = <®_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>; + }; + }; + }; + }; + }; + }; }; ð { @@ -171,6 +198,8 @@ }; &wifi { + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; #address-cells = <1>; #size-cells = <0>; status = "okay"; diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata index bfc0511164..c92b2926fe 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata @@ -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") -- 2.30.2