Re: [PATCH v6 2/3] arm64: dts: qcom: eliza-evk: Add PCIe0 with M.2 E key connector

[email protected]
Newsgroups org.kernel.vger.linux-pci,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] W_DISABLE2# GPIO polarity is inconsistently configured as GPIO_ACTIVE_HIGH, likely inverting the intended PCIe M.2 power sequencing logic.
--

--- Patch [2]: [PATCH v6 2/3] arm64: dts: qcom: eliza-evk: Add PCIe0 with M.2 E key connector ---
commit b91f81c61ce6e56f3f53636edf8015143cf5ed8b
Author: Krishna Chaitanya Chundru <[email protected]>

arm64: dts: qcom: eliza-evk: Add PCIe0 with M.2 E key connector

The Eliza EVK board features an M.2 E key connector connected to PCIe0.
This commit enables the PCIe0 root port and its QMP PHY with the necessary
RPMH regulator supplies. It models the connector using the pcie-m2-e-connector
binding to support a WLAN card and a Bluetooth device.

> diff --git a/arch/arm64/boot/dts/qcom/eliza-evk.dtsi b/arch/arm64/boot/dts/qcom/eliza-evk.dtsi
> index e47b24f8b8277..b35fffb509765 100644
> --- a/arch/arm64/boot/dts/qcom/eliza-evk.dtsi
> +++ b/arch/arm64/boot/dts/qcom/eliza-evk.dtsi
[ ... ]
> +	connector-0 {
> +		compatible = "pcie-m2-e-connector";
> +		vpcie3v3-supply = <&vreg_pcie_m_3p3>;
> +		w-disable1-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
> +		w-disable2-gpios = <&pm8550vs_g_gpios 4 GPIO_ACTIVE_HIGH>;

[Severity: Medium]
Is the GPIO_ACTIVE_HIGH polarity for w-disable2-gpios correct here?

The pwrseq-pcie-m2 driver attempts to enable the Bluetooth UART interface
by setting the logical value of w-disable2-gpios to 0. Unless there is an
inverting level shifter involved for this specific PMIC GPIO, wouldn't an
active-high configuration invert the intended PCIe M.2 power sequencing logic?

This could cause the Bluetooth device to be disabled during the power-on
sequence and enabled when it should be disabled, which would break Bluetooth
functionality.

> +
> +		pinctrl-0 = <&m2_w_disable1>, <&m2_w_disable2>;
> +		pinctrl-names = "default";
[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.