[PATCH 13/15] arm64: dts: mediatek: mt7981b: Add wifi memory region

Sjoerd Simons posted 15 patches 3 months, 3 weeks ago
There is a newer version of this series
[PATCH 13/15] arm64: dts: mediatek: mt7981b: Add wifi memory region
Posted by Sjoerd Simons 3 months, 3 weeks ago
Add required memory region for the builtin wifi block. Disable the block
by default as it won't function properly without at least pin muxing.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
---
 arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
index c85fa0ddf2da8..fbccb63227e89 100644
--- a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
@@ -69,6 +69,11 @@ secmon_reserved: secmon@43000000 {
 			no-map;
 		};
 
+		wmcpu_emi: wmcpu-reserved@47c80000 {
+			reg = <0 0x47c80000 0 0x100000>;
+			no-map;
+		};
+
 		wo_emi0: wo-emi@47d80000 {
 			reg = <0 0x47d80000 0 0x40000>;
 			no-map;
@@ -494,6 +499,8 @@ wifi: wifi@18000000 {
 			clock-names = "mcu", "ap2conn";
 			resets = <&watchdog MT7986_TOPRGU_CONSYS_SW_RST>;
 			reset-names = "consys";
+			memory-region = <&wmcpu_emi>;
+			status = "disabled";
 		};
 	};
 

-- 
2.51.0
Re: [PATCH 13/15] arm64: dts: mediatek: mt7981b: Add wifi memory region
Posted by AngeloGioacchino Del Regno 3 months, 3 weeks ago
Il 16/10/25 12:08, Sjoerd Simons ha scritto:
> Add required memory region for the builtin wifi block. Disable the block
> by default as it won't function properly without at least pin muxing.
> 
> Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>

You should split this commit in two:
  - Add wifi memory region
  - Disable wifi by default

Regarding the second commit, you have to re-enable the wifi node in all of
the currently supported MT7981b devices, including:
  - Xiaomi AX3000T
  - Cudy WR3000 V1

While I agree that without pin muxing the wifi may not properly work, it is
unclear whether the aforementioned devices are pre-setting the pinmux in the
bootloader before booting Linux.

In case those do, you'd be "breaking" WiFi on two routers here.

Cheers,
Angelo
Re: [PATCH 13/15] arm64: dts: mediatek: mt7981b: Add wifi memory region
Posted by Sjoerd Simons 3 months, 1 week ago
On Thu, 2025-10-16 at 13:28 +0200, AngeloGioacchino Del Regno wrote:
> Il 16/10/25 12:08, Sjoerd Simons ha scritto:
> > Add required memory region for the builtin wifi block. Disable the block
> > by default as it won't function properly without at least pin muxing.
> > 
> > Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
> 
> You should split this commit in two:
>   - Add wifi memory region
>   - Disable wifi by default

Will split.

> Regarding the second commit, you have to re-enable the wifi node in all of
> the currently supported MT7981b devices, including:
>   - Xiaomi AX3000T
>   - Cudy WR3000 V1
> 
> While I agree that without pin muxing the wifi may not properly work, it is
> unclear whether the aforementioned devices are pre-setting the pinmux in the
> bootloader before booting Linux.
> 
> In case those do, you'd be "breaking" WiFi on two routers here.

Wifi will never have worked on those upstream; The driver hits an unconditional -EINVAL during probe
due to the  missing memory-region this patch adds. I'll make sure to note that in the new disable
patch.

-- 
Sjoerd Simons <sjoerd@collabora.com>