Devicetree
 help / color / mirror / Atom feed
* [PATCH v3] arm64: dts: qcom: arduino-monza: add WLAN enable and rfkill GPIO
@ 2026-05-11  8:48 Qian Zhang via B4 Relay
  2026-05-12  1:09 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Qian Zhang via B4 Relay @ 2026-05-11  8:48 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Qian Zhang

From: Qian Zhang <qian.zhang@oss.qualcomm.com>

The QCNFA765 M.2 PCIe WLAN module requires GPIO56 (wlan_en) to be
asserted before PCIe enumeration, and GPIO54 to control the RF kill
line.

Model GPIO56 as a regulator-fixed node (wlan_en) referenced from the
PCIe node via vddpe-3v3-supply to ensure correct power sequencing.
Model GPIO54 as a rfkill-gpio node to allow the rfkill subsystem to
manage RF state.

Signed-off-by: Qian Zhang <qian.zhang@oss.qualcomm.com>
---
The Arduino VENTUNO Q board uses a QCNFA765 M.2 PCIe WLAN module
connected to PCIe0. Two GPIOs are required for proper WLAN operation:

- GPIO56 (wlan_en): The WLAN module enable line. It must be asserted
  before PCIe enumeration begins, otherwise the module is not detected
  by the PCIe root complex. This is modeled as a regulator-fixed node
  (wlan_en) referenced from the PCIe node via vddpe-3v3-supply, which
  ensures the GPIO is asserted with a 20ms startup delay before PCIe
  enumeration starts.

- GPIO54 (rfkill): The RF kill line. It is modeled as a rfkill-gpio
  node so that the rfkill subsystem can properly manage RF state,
  including software-triggered airplane mode.

Testing:
- WLAN module (QCNFA765) successfully enumerated on PCIe after boot
- WiFi scan detects available networks
- rfkill block/unblock correctly toggles GPIO54
- GPIO56 remains high throughout rfkill block/unblock
---
Changes in v3:
- Replace regulator-fixed with rfkill-gpio for GPIO54 (rfkill)
- Reference wlan_en from PCIe node via vddpe-3v3-supply
- Fix subject prefix
- Link to v2: https://lore.kernel.org/r/20260501051918.1990713-1-qian.zhang@oss.qualcomm.com
---
 arch/arm64/boot/dts/qcom/monaco-arduino-monza.dts | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/monaco-arduino-monza.dts b/arch/arm64/boot/dts/qcom/monaco-arduino-monza.dts
index ca14f0ea4dae..e0ffe87bba90 100644
--- a/arch/arm64/boot/dts/qcom/monaco-arduino-monza.dts
+++ b/arch/arm64/boot/dts/qcom/monaco-arduino-monza.dts
@@ -153,6 +153,25 @@ vreg_nvme: regulator-3p3-m2 {
 		enable-active-high;
 		startup-delay-us = <20000>;
 	};
+
+	rfkill-wlan {
+		compatible = "rfkill-gpio";
+		label = "wlan";
+		radio-type = "wlan";
+		shutdown-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
+	};
+
+	wlan_reg_3v3: wlan-3v3-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "wlan_en";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&vdc_3v3>;
+		gpio = <&tlmm 56 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		startup-delay-us = <20000>;
+		regulator-boot-on;
+	};
 };
 
 &ethernet0 {
@@ -326,7 +345,7 @@ &pcie0 {
 	pinctrl-0 = <&pcie0_default_state>;
 	pinctrl-names = "default";
 
-	vddpe-3v3-supply = <&vdc_3v3>;
+	vddpe-3v3-supply = <&wlan_reg_3v3>;
 };
 
 &pcie1 {

---
base-commit: e98d21c170b01ddef366f023bbfcf6b31509fa83
change-id: 20260511-linux-next-0846ad58ba18

Best regards,
-- 
Qian Zhang <qian.zhang@oss.qualcomm.com>



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] arm64: dts: qcom: arduino-monza: add WLAN enable and rfkill GPIO
  2026-05-11  8:48 [PATCH v3] arm64: dts: qcom: arduino-monza: add WLAN enable and rfkill GPIO Qian Zhang via B4 Relay
@ 2026-05-12  1:09 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-05-12  1:09 UTC (permalink / raw)
  To: Qian Zhang via B4 Relay; +Cc: devicetree, robh, conor+dt, krzk+dt

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Hardware backpowering flaw during system suspend due to uncoordinated W_DISABLE# GPIO and M.2 power supply.
- [Medium] Missing `pinctrl` definitions for newly added GPIOs.
- [Low] Devicetree schema violation for the fixed regulator node name.
--

commit ea2590eabdbe9514777a7849913aa724f8e8c30b
Author: Qian Zhang <qian.zhang@oss.qualcomm.com>

arm64: dts: qcom: arduino-monza: add WLAN enable and rfkill GPIO

This patch adds support for the QCNFA765 M.2 PCIe WLAN module by modeling
GPIO56 as a fixed regulator for wlan_en, and GPIO54 as an rfkill-gpio node.
The regulator is linked to the PCIe node to provide power sequencing.

> diff --git a/arch/arm64/boot/dts/qcom/monaco-arduino-monza.dts b/arch/arm64/boot/dts/qcom/monaco-arduino-monza.dts
> index ca14f0ea4dae6..e0ffe87bba90c 100644
> --- a/arch/arm64/boot/dts/qcom/monaco-arduino-monza.dts
> +++ b/arch/arm64/boot/dts/qcom/monaco-arduino-monza.dts
> @@ -153,6 +153,25 @@ vreg_nvme: regulator-3p3-m2 {
[ ... ]
> +	rfkill-wlan {
> +		compatible = "rfkill-gpio";
> +		label = "wlan";
> +		radio-type = "wlan";
> +		shutdown-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;

If the bootloader leaves the pin in an alternate function or undefined state,
the kernel might fail to control the RF kill state reliably.

Does this node require pinctrl properties to ensure GPIO 54 is muxed correctly
and has the appropriate bias and drive strength?

Additionally, the PCIe controller's vddpe-3v3-supply is disabled by the
pcie-qcom driver during system suspend, dropping power to the M.2 slot.
However, the rfkill-gpio driver lacks PM suspend/resume callbacks.

If the radio is unblocked, the SoC will continue driving GPIO 54 HIGH during
suspend while the M.2 module is unpowered.

Could this inject a logic HIGH into the unpowered module, causing current
leakage that prevents deep sleep states or damages the hardware?

Would it be better to synchronize the power sequence to safely deassert the
W_DISABLE# pin before dropping power, perhaps using the pwrseq-pci framework?

> +	};
> +
> +	wlan_reg_3v3: wlan-3v3-regulator {

This isn't a bug, but the node name wlan-3v3-regulator appears to violate the
fixed-regulator device tree schema.

According to Documentation/devicetree/bindings/regulator/fixed-regulator.yaml,
fixed regulator node names should match the pattern
^regulator(-[0-9]+v[0-9]+|-[0-9a-z-]+)?$.

Should this be renamed to something like regulator-wlan-3v3?

> +		compatible = "regulator-fixed";
> +		regulator-name = "wlan_en";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		vin-supply = <&vdc_3v3>;
> +		gpio = <&tlmm 56 GPIO_ACTIVE_HIGH>;

Similar to the rfkill node, does this regulator need a pinctrl reference to
configure GPIO 56 properly?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260511-linux-next-v3-1-3e22737e71eb@oss.qualcomm.com?part=1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-12  1:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11  8:48 [PATCH v3] arm64: dts: qcom: arduino-monza: add WLAN enable and rfkill GPIO Qian Zhang via B4 Relay
2026-05-12  1:09 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox