Skip to content

Commit

Permalink
mediatek: filogic: convert Acer Predator W6 to use NVMEM framework
Browse files Browse the repository at this point in the history
Read WiFi calibration data via NVMEM framework. The MAC addresses are
stored inside a file on a filesystem and hence still have to be
extracted in userspace.

WiFI EEPROM extraction has already accidentally been partially removed
by commit 3e6de5d ("mediatek: use NVMEM framework on all Adtran
devices").

Fixes: 3e6de5d ("mediatek: use NVMEM framework on all Adtran devices")
Signed-off-by: Daniel Golle <[email protected]>
  • Loading branch information
dangowrt committed Oct 18, 2024
1 parent f9f2dd1 commit dbc2923
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 8 deletions.
44 changes: 43 additions & 1 deletion target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,12 @@
};

&wifi {
status = "okay";
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
pinctrl-names = "default", "dbdc";
pinctrl-0 = <&wf_2g_5g_pins>;
pinctrl-1 = <&wf_dbdc_pins>;
status = "okay";
};

&trng {
Expand Down Expand Up @@ -494,12 +496,52 @@
non-removable;
no-sd;
no-sdio;

card@0 {
compatible = "mmc-card";
reg = <0>;

block {
compatible = "block-device";

partitions {
block-partition-factory {
partname = "factory";

nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;

eeprom_factory_0: eeprom@0 {
reg = <0x0 0x1000>;
};

eeprom_factory_a0000: eeprom@a0000 {
reg = <0xa0000 0x1000>;
};
};
};
};
};
};
};

&pcie {
pinctrl-names = "default";
pinctrl-0 = <&pcie_pins>;
status = "okay";

slot0: pcie@0,0 {
reg = <0x0000 0 0 0 0>;

radio0: mt7915@0,0 {
reg = <0x0000 0 0 0 0>;

nvmem-cells = <&eeprom_factory_a0000>;
nvmem-cell-names = "eeprom";
};
};
};

&pcie_phy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ case "$FIRMWARE" in
;;
esac
;;
"mediatek/mt7986_eeprom_mt7976.bin")
case "$board" in
acer,predator-w6)
caldata_extract_mmc "factory" 0x0 0x1000
;;
esac
;;
*)
exit 1
;;
Expand Down

0 comments on commit dbc2923

Please sign in to comment.