arm64: dts: qcom: Fix PCIe wake GPIO polarity
Subsystems (4)
v2 cover arm64: dts: qcom: Fix PCIe wake GPIO polarity
PCIe wake is active low signal as per the PCIe base spec, Several Qualcomm platform devicetrees incorrectly describe wake-gpios as GPIO_ACTIVE_HIGH.
The PCIe PHY references and PERST/WAKE GPIO properties are defined on a per-root-port basis and do not belong to the PCIe controller (RC) node. Keeping these properties at the controller level makes the description less accurate and prevents clean per-port customization.
This series moves the PHY references (phys, phy-names) from the PCIe controller node to the corresponding root port nodes (pcie@0), namely pcie0_port0, pcie1_port0, and pcie2_port0. Labels are added to these port nodes to enable board-level overrides where required.
Additionally, the PERST and WAKE GPIO properties are relocated from controller-level board overrides to their respective root port nodes in the board DTS files. As part of this change, 'perst-gpios' is renamed to 'reset-gpios' to align with the binding used in the PCIe root port context.
This restructuring improves DT correctness by properly associating resources with their respective hardware blocks and aligns with the expectations defined in the PCIe binding.
Tested on Talos Ride & lemans evk platform.
No Fixes tag is added as no functional issue has been observed.
---
Changes in v2:
- Move phy, perst & wake properties to the root port node.
- Rebased the code
- Link to v1: https://patch.msgid.link/[email protected]
---
Krishna Chaitanya Chundru (37):
ARM: dts: qcom: sdx55: Fix PCIe wake GPIO polarity
arm64: dts: qcom: msm8996: Fix PCIe wake GPIO polarity
arm64: dts: qcom: sdm845: Fix PCIe wake GPIO polarity
arm64: dts: qcom: sc8180x: Fix PCIe wake GPIO polarity
arm64: dts: qcom: sm8150: Fix PCIe wake GPIO polarity
arm64: dts: qcom: sm8250: Fix PCIe wake GPIO polarity
arm64: dts: qcom: sm8350: Fix PCIe wake GPIO polarity
arm64: dts: qcom: sm8450: Fix PCIe wake GPIO polarity
arm64: dts: qcom: sm8550: Fix PCIe wake GPIO polarity
arm64: dts: qcom: sm8650: Fix PCIe wake GPIO polarity
arm64: dts: qcom: sm8750: Fix PCIe wake GPIO polarity
arm64: dts: qcom: kaanapali: Fix PCIe wake GPIO polarity
arm64: dts: qcom: sar2130p: Fix PCIe wake GPIO polarity
arm64: dts: qcom: monaco: Fix PCIe wake GPIO polarity
arm64: dts: qcom: lemans: Fix PCIe wake GPIO polarity
arm64: dts: qcom: sa8540p-ride: Fix PCIe wake GPIO polarity
arm64: dts: qcom: kodiak: Fix PCIe wake GPIO polarity
arm64: dts: qcom: talos: Fix PCIe wake GPIO polarity
arm64: dts: qcom: lemans: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: msm8998: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: qcs404: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: qcs8550: Move PCIe GPIOs to root port node
arm64: dts: qcom: sa8295p: Move PCIe GPIOs to root port node
arm64: dts: qcom: sa8540p: Move PCIe GPIOs to root port node
arm64: dts: qcom: sar2130p: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: sc8180x: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: sc8280xp: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: sdm845: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: sm8150: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: sm8250: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: sm8350: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: sm8450: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: sm8550: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: talos: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: sm8650: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: kodiak: Move PCIe phy and GPIOs to root port node
arm64: dts: qcom: msm8996: Move PCIe phy and GPIOs to root port node
arch/arm/boot/dts/qcom/qcom-sdx55-t55.dts | 2 +- arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 15 ++++++++-- arch/arm64/boot/dts/qcom/kaanapali-mtp.dts | 2 +- arch/arm64/boot/dts/qcom/kodiak.dtsi | 10 +++---- arch/arm64/boot/dts/qcom/lemans-evk.dts | 16 ++++++---- arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi | 16 ++++++---- arch/arm64/boot/dts/qcom/lemans.dtsi | 12 ++++---- arch/arm64/boot/dts/qcom/monaco-evk.dts | 4 +-- .../boot/dts/qcom/msm8996-oneplus-common.dtsi | 5 +++- .../boot/dts/qcom/msm8996-sony-xperia-tone.dtsi | 7 +++-- .../arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi | 6 ++-- arch/arm64/boot/dts/qcom/msm8996.dtsi | 21 ++++++------- arch/arm64/boot/dts/qcom/msm8998.dtsi | 8 ++--- .../boot/dts/qcom/qcm6490-particle-tachyon.dts | 15 ++++++---- arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 6 ++-- arch/arm64/boot/dts/qcom/qcs404.dtsi | 7 ++--- arch/arm64/boot/dts/qcom/qcs615-ride.dts | 8 +++-- .../boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts | 16 ++++++---- .../qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso | 4 +-- arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 4 +-- .../dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts | 14 +++++---- .../boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts | 16 ++++++---- arch/arm64/boot/dts/qcom/qcs8300-ride.dts | 4 +-- arch/arm64/boot/dts/qcom/qcs8550-aim300.dtsi | 16 ++++++---- arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 32 ++++++++++++-------- arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 16 ++++++---- arch/arm64/boot/dts/qcom/sar2130p-qar2130p.dts | 6 ++-- arch/arm64/boot/dts/qcom/sar2130p.dtsi | 12 ++++---- arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 5 +++- arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 5 +++- .../arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts | 7 +++-- arch/arm64/boot/dts/qcom/sc8180x-primus.dts | 7 +++-- arch/arm64/boot/dts/qcom/sc8180x.dtsi | 24 +++++++-------- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 24 +++++++++------ .../boot/dts/qcom/sc8280xp-huawei-gaokun3.dts | 14 +++++---- .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 22 ++++++++------ .../boot/dts/qcom/sc8280xp-microsoft-arcata.dts | 22 ++++++++------ .../boot/dts/qcom/sc8280xp-microsoft-blackrock.dts | 14 +++++---- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 25 +++++++--------- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 13 ++++++--- arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 12 +++++--- arch/arm64/boot/dts/qcom/sdm845.dtsi | 14 ++++----- arch/arm64/boot/dts/qcom/sm8150.dtsi | 21 ++++++------- arch/arm64/boot/dts/qcom/sm8250.dtsi | 34 +++++++++------------- arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 16 ++++++---- arch/arm64/boot/dts/qcom/sm8350.dtsi | 14 ++++----- arch/arm64/boot/dts/qcom/sm8450.dtsi | 22 ++++++-------- arch/arm64/boot/dts/qcom/sm8550-hdk.dts | 14 +++++---- arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 16 ++++++---- arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 6 ++-- arch/arm64/boot/dts/qcom/sm8550-samsung-q5q.dts | 7 +++-- .../dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts | 8 +++-- arch/arm64/boot/dts/qcom/sm8550.dtsi | 12 ++++---- .../boot/dts/qcom/sm8650-ayaneo-pocket-s2.dts | 14 +++++---- arch/arm64/boot/dts/qcom/sm8650-hdk.dts | 14 +++++---- arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 16 ++++++---- arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 6 ++-- arch/arm64/boot/dts/qcom/sm8650.dtsi | 10 +++---- arch/arm64/boot/dts/qcom/sm8750-mtp.dts | 2 +- arch/arm64/boot/dts/qcom/talos-evk-som.dtsi | 8 +++-- arch/arm64/boot/dts/qcom/talos.dtsi | 5 ++-- 61 files changed, 420 insertions(+), 333 deletions(-)
---
base-commit: 9716c086c8e8b141d35aa61f2e96a2e83de212a7
change-id: 20260514-wake-1dfbdedcd173
Best regards,
Signature · 1 line
Krishna Chaitanya Chundru <[email protected]>
PATCH v2 1/37 ARM: dts: qcom: sdx55: Fix PCIe wake GPIO polarity
The PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm/boot/dts/qcom/qcom-sdx55-t55.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom/qcom-sdx55-t55.dts +1 -1
@@ -251,7 +251,7 @@ &pcie_phy { &pcie_rc { perst-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 53 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 53 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie_default>; pinctrl-names = "default";
Signature · 1 line
2.34.1
PATCH v2 2/37 arm64: dts: qcom: msm8996: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi | 2 +- arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi +1 -1
@@ -192,7 +192,7 @@ &mmcc { &pcie0 { perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; vddpe-3v3-supply = <&wlan_en>; vdda-supply = <&pm8994_l28>; status = "okay";
arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi +1 -1
@@ -280,7 +280,7 @@ &pcie0 { vdda-supply = <&vreg_l28a_0p925>; perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; }; &pcie_phy {
Signature · 1 line
2.34.1
PATCH v2 3/37 arm64: dts: qcom: sdm845: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm845-db845c.dts +1 -1
@@ -619,7 +619,7 @@ &mss_pil { &pcie0 { status = "okay"; perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 134 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 134 GPIO_ACTIVE_LOW>; vddpe-3v3-supply = <&pcie0_3p3v_dual>;
Signature · 1 line
2.34.1
PATCH v2 4/37 arm64: dts: qcom: sc8180x: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts | 2 +- arch/arm64/boot/dts/qcom/sc8180x-primus.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts +1 -1
@@ -458,7 +458,7 @@ &mdss_edp_out { &pcie3 { perst-gpios = <&tlmm 178 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 180 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 180 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie3_default_state>; pinctrl-names = "default";
arch/arm64/boot/dts/qcom/sc8180x-primus.dts +1 -1
@@ -559,7 +559,7 @@ &mdss_edp_out { &pcie1 { perst-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 177 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 177 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pcie2_default_state>;
Signature · 1 line
2.34.1
PATCH v2 5/37 arm64: dts: qcom: sm8150: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8150.dtsi +1 -1
@@ -1905,7 +1905,7 @@ pcie0: pcie@1c00000 { phy-names = "pciephy"; perst-gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>; - wake-gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pcie0_default_state>;
Signature · 1 line
2.34.1
PATCH v2 6/37 arm64: dts: qcom: sm8250: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/qcom/sm8250.dtsi +3 -3
@@ -2202,7 +2202,7 @@ pcie0: pcie@1c00000 { phy-names = "pciephy"; perst-gpios = <&tlmm 79 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 81 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 81 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pcie0_default_state>;
@@ -2329,7 +2329,7 @@ pcie1: pcie@1c08000 { phy-names = "pciephy"; perst-gpios = <&tlmm 82 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 84 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 84 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pcie1_default_state>;
@@ -2456,7 +2456,7 @@ pcie2: pcie@1c10000 { phy-names = "pciephy"; perst-gpios = <&tlmm 85 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 87 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pcie2_default_state>;
Signature · 1 line
2.34.1
PATCH v2 7/37 arm64: dts: qcom: sm8350: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sm8350-hdk.dts +2 -2
@@ -494,7 +494,7 @@ &pcie0 { pinctrl-0 = <&pcie0_default_state>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; status = "okay"; };
@@ -508,7 +508,7 @@ &pcie0_phy { &pcie1 { perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 99 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pcie1_default_state>;
Signature · 1 line
2.34.1
PATCH v2 8/37 arm64: dts: qcom: sm8450: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/sm8450.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sm8450.dtsi +2 -2
@@ -2035,7 +2035,7 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, phy-names = "pciephy"; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pcie0_default_state>;
@@ -2200,7 +2200,7 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, phy-names = "pciephy"; perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 99 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pcie1_default_state>;
Signature · 1 line
2.34.1
PATCH v2 9/37 arm64: dts: qcom: sm8550: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/qcs8550-aim300.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sm8550-hdk.dts | 4 ++-- arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 4 ++-- arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 2 +- arch/arm64/boot/dts/qcom/sm8550-samsung-q5q.dts | 2 +- arch/arm64/boot/dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-)
arch/arm64/boot/dts/qcom/qcs8550-aim300.dtsi +2 -2
@@ -336,7 +336,7 @@ &mdss_dsi0_phy { &pcie0 { perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default";
@@ -349,7 +349,7 @@ &pcie0_phy { &pcie1 { perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 99 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie1_default_state>; pinctrl-names = "default";
arch/arm64/boot/dts/qcom/sm8550-hdk.dts +2 -2
@@ -1003,7 +1003,7 @@ &mdss_dp0 { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_default_state>;
@@ -1037,7 +1037,7 @@ &pcie0_phy { }; &pcie1 { - wake-gpios = <&tlmm 99 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie1_default_state>;
arch/arm64/boot/dts/qcom/sm8550-mtp.dts +2 -2
@@ -739,7 +739,7 @@ &mdss_dp0 { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; pinctrl-names = "default";
@@ -756,7 +756,7 @@ &pcie0_phy { }; &pcie1 { - wake-gpios = <&tlmm 99 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; pinctrl-names = "default";
arch/arm64/boot/dts/qcom/sm8550-qrd.dts +1 -1
@@ -903,7 +903,7 @@ &mdss_dp0 { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_default_state>;
arch/arm64/boot/dts/qcom/sm8550-samsung-q5q.dts +1 -1
@@ -510,7 +510,7 @@ &i2c_master_hub_0 { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default";
arch/arm64/boot/dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts +1 -1
@@ -584,7 +584,7 @@ cirrus,gpio-ctrl2 { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_default_state>;
Signature · 1 line
2.34.1
PATCH v2 10/37 arm64: dts: qcom: sm8650: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/sm8650-ayaneo-pocket-s2.dts | 4 ++-- arch/arm64/boot/dts/qcom/sm8650-hdk.dts | 4 ++-- arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 4 ++-- arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-)
arch/arm64/boot/dts/qcom/sm8650-ayaneo-pocket-s2.dts +2 -2
@@ -1074,7 +1074,7 @@ &mdss_dp0_out { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_default_state>;
@@ -1108,7 +1108,7 @@ &pcie0_phy { }; &pcie1 { - wake-gpios = <&tlmm 99 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie1_default_state>;
arch/arm64/boot/dts/qcom/sm8650-hdk.dts +2 -2
@@ -942,7 +942,7 @@ &mdss_dp0 { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_default_state>;
@@ -976,7 +976,7 @@ &pcie0_phy { }; &pcie1 { - wake-gpios = <&tlmm 99 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie1_default_state>;
arch/arm64/boot/dts/qcom/sm8650-mtp.dts +2 -2
@@ -642,7 +642,7 @@ &mdss_dsi0_phy { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_default_state>;
@@ -659,7 +659,7 @@ &pcie0_phy { }; &pcie1 { - wake-gpios = <&tlmm 99 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie1_default_state>;
arch/arm64/boot/dts/qcom/sm8650-qrd.dts +1 -1
@@ -936,7 +936,7 @@ &mdss_dp0 { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_default_state>;
Signature · 1 line
2.34.1
PATCH v2 11/37 arm64: dts: qcom: sm8750: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/sm8750-mtp.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8750-mtp.dts +1 -1
@@ -1119,7 +1119,7 @@ &pcie0_phy { }; &pcieport0 { - wake-gpios = <&tlmm 104 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 104 GPIO_ACTIVE_LOW>; reset-gpios = <&tlmm 102 GPIO_ACTIVE_LOW>; wifi@0 {
Signature · 1 line
2.34.1
PATCH v2 12/37 arm64: dts: qcom: kaanapali: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/kaanapali-mtp.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/kaanapali-mtp.dts +1 -1
@@ -933,7 +933,7 @@ &pcie0_phy { }; &pcie_port0 { - wake-gpios = <&tlmm 104 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 104 GPIO_ACTIVE_LOW>; reset-gpios = <&tlmm 102 GPIO_ACTIVE_LOW>; wifi@0 {
Signature · 1 line
2.34.1
PATCH v2 13/37 arm64: dts: qcom: sar2130p: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/sar2130p-qar2130p.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sar2130p-qar2130p.dts +1 -1
@@ -358,7 +358,7 @@ &i2c10 { &pcie0 { perst-gpios = <&tlmm 55 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 57 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default";
Signature · 1 line
2.34.1
PATCH v2 14/37 arm64: dts: qcom: monaco: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/monaco-evk.dts | 4 ++-- arch/arm64/boot/dts/qcom/qcs8300-ride.dts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/qcom/monaco-evk.dts +2 -2
@@ -643,12 +643,12 @@ &pcie1_phy { &pcieport0 { reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 0 GPIO_ACTIVE_LOW>; }; &pcieport1 { reset-gpios = <&tlmm 23 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 21 GPIO_ACTIVE_LOW>; }; &pmm8620au_0_gpios {
arch/arm64/boot/dts/qcom/qcs8300-ride.dts +2 -2
@@ -615,7 +615,7 @@ &pcie0 { &pcieport0 { reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 0 GPIO_ACTIVE_LOW>; wifi@0 { compatible = "pci17cb,1103";
@@ -651,7 +651,7 @@ &pcie1 { &pcieport1 { reset-gpios = <&tlmm 23 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 21 GPIO_ACTIVE_LOW>; }; &pcie1_phy {
Signature · 1 line
2.34.1
PATCH v2 15/37 arm64: dts: qcom: lemans: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/lemans-evk.dts | 4 ++-- arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/qcom/lemans-evk.dts +2 -2
@@ -703,7 +703,7 @@ &mdss0_dp1_phy { &pcie0 { perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 0 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default";
@@ -720,7 +720,7 @@ &pcie0_phy { &pcie1 { perst-gpios = <&tlmm 4 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 5 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie1_default_state>; pinctrl-names = "default";
arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi +2 -2
@@ -854,7 +854,7 @@ wake-pins { &pcie0 { perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 0 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pcie0_default_state>;
@@ -864,7 +864,7 @@ &pcie0 { &pcie1 { perst-gpios = <&tlmm 4 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 5 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pcie1_default_state>;
Signature · 1 line
2.34.1
PATCH v2 16/37 arm64: dts: qcom: sa8540p-ride: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sa8540p-ride.dts +2 -2
@@ -367,7 +367,7 @@ &pcie2a { <0x03000000 0x5 0x00000000 0x5 0x00000000 0x1 0x00000000>; perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 145 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pcie2a_default>;
@@ -388,7 +388,7 @@ &pcie3a { <0x03000000 0x6 0x00000000 0x6 0x00000000 0x2 0x00000000>; perst-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 56 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 56 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pcie3a_default>;
Signature · 1 line
2.34.1
PATCH v2 17/37 arm64: dts: qcom: kodiak: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts | 2 +- arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts | 4 ++-- arch/arm64/boot/dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts | 4 ++-- arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts +1 -1
@@ -546,7 +546,7 @@ &mdss_dp_out { &pcie0 { perst-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_reset_n>, <&pcie0_wake_n>, <&pcie0_clkreq_n>; pinctrl-names = "default";
arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts +2 -2
@@ -523,7 +523,7 @@ &lpass_va_macro { &pcie0 { perst-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_clkreq_n>, <&pcie0_reset_n>, <&pcie0_wake_n>; pinctrl-names = "default";
@@ -540,7 +540,7 @@ &pcie0_phy { &pcie1 { perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie1_clkreq_n>, <&pcie1_reset_n>, <&pcie1_wake_n>; pinctrl-names = "default";
arch/arm64/boot/dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts +2 -2
@@ -685,7 +685,7 @@ &mdss_dsi_phy { &pcie0 { perst-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_clkreq_n>, <&pcie0_reset_n>,
@@ -704,7 +704,7 @@ &pcie0_phy { &pcie1 { perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie1_clkreq_n>, <&pcie1_reset_n>,
arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts +1 -1
@@ -813,7 +813,7 @@ &mdss_dsi_phy { &pcie0 { perst-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_clkreq_n>, <&pcie0_reset_n>,
Signature · 1 line
2.34.1
PATCH v2 18/37 arm64: dts: qcom: talos: Fix PCIe wake GPIO polarity
In reply to Krishna Chaitanya ChundruThe PCIe WAKE# signal is active-low as defined in the PCIe Base Specification. Fix the wake-gpios polarity by using GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH.
--- arch/arm64/boot/dts/qcom/qcs615-ride.dts | 2 +- arch/arm64/boot/dts/qcom/talos-evk-som.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/qcs615-ride.dts +1 -1
@@ -445,7 +445,7 @@ &mdss_dsi0_phy { &pcie { perst-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 100 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 100 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie_default_state>; pinctrl-names = "default";
arch/arm64/boot/dts/qcom/talos-evk-som.dtsi +1 -1
@@ -359,7 +359,7 @@ &mdss_dsi0_phy { &pcie { perst-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 100 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 100 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie_default_state>; pinctrl-names = "default";
Signature · 1 line
2.34.1
PATCH v2 19/37 arm64: dts: qcom: lemans: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys from the controller to pcieport0 and pcieport1. Add the missing pcieport1 label to the pcie1 root port node to allow board-level overrides. Move perst-gpios/wake-gpios from the &pcie0/&pcie1 controller overrides to the respective &pcieport0/ &pcieport1 nodes in the board files, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/lemans-evk.dts | 16 ++++++++++------ arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi | 16 ++++++++++------ arch/arm64/boot/dts/qcom/lemans.dtsi | 12 +++++------- 3 files changed, 25 insertions(+), 19 deletions(-)
arch/arm64/boot/dts/qcom/lemans-evk.dts +10 -6
@@ -702,15 +702,17 @@ &mdss0_dp1_phy { }; &pcie0 { - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 0 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default"; status = "okay"; }; +&pcieport0 { + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 0 GPIO_ACTIVE_LOW>; +}; + &pcie0_phy { vdda-phy-supply = <&vreg_l5a>; vdda-pll-supply = <&vreg_l1c>;
@@ -719,15 +721,17 @@ &pcie0_phy { }; &pcie1 { - perst-gpios = <&tlmm 4 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 5 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie1_default_state>; pinctrl-names = "default"; status = "okay"; }; +&pcieport1 { + reset-gpios = <&tlmm 4 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 5 GPIO_ACTIVE_LOW>; +}; + &pcie1_phy { vdda-phy-supply = <&vreg_l5a>; vdda-pll-supply = <&vreg_l1c>;
arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi +10 -6
@@ -853,25 +853,29 @@ wake-pins { }; &pcie0 { - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 0 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie0_default_state>; status = "okay"; }; -&pcie1 { - perst-gpios = <&tlmm 4 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 5 GPIO_ACTIVE_LOW>; +&pcieport0 { + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 0 GPIO_ACTIVE_LOW>; +}; +&pcie1 { pinctrl-names = "default"; pinctrl-0 = <&pcie1_default_state>; status = "okay"; }; +&pcieport1 { + reset-gpios = <&tlmm 4 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 5 GPIO_ACTIVE_LOW>; +}; + &pcie0_phy { vdda-phy-supply = <&vreg_l5a>; vdda-pll-supply = <&vreg_l1c>;
arch/arm64/boot/dts/qcom/lemans.dtsi +5 -7
@@ -8678,9 +8678,6 @@ pcie0: pcie@1c00000 { power-domains = <&gcc PCIE_0_GDSC>; - phys = <&pcie0_phy>; - phy-names = "pciephy"; - eq-presets-8gts = /bits/ 16 <0x5555 0x5555>; eq-presets-16gts = /bits/ 8 <0x55 0x55>;
@@ -8691,6 +8688,8 @@ pcieport0: pcie@0 { reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>; + phys = <&pcie0_phy>; + #address-cells = <3>; #size-cells = <2>; ranges;
@@ -8851,19 +8850,18 @@ pcie1: pcie@1c10000 { power-domains = <&gcc PCIE_1_GDSC>; - phys = <&pcie1_phy>; - phy-names = "pciephy"; - eq-presets-8gts = /bits/ 16 <0x5555 0x5555 0x5555 0x5555>; eq-presets-16gts = /bits/ 8 <0x55 0x55 0x55 0x55>; status = "disabled"; - pcie@0 { + pcieport1: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>; + phys = <&pcie1_phy>; + #address-cells = <3>; #size-cells = <2>; ranges;
Signature · 1 line
2.34.1
PATCH v2 20/37 arm64: dts: qcom: msm8998: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst GPIO property are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys, phy-names, and perst-gpios from the controller to pcie0_port0, adding a label to this node to allow board-level overrides, and renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/msm8998.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/qcom/msm8998.dtsi +4 -4
@@ -928,8 +928,6 @@ pcie0: pcie@1c00000 { #address-cells = <3>; #size-cells = <2>; num-lanes = <1>; - phys = <&pcie_phy>; - phy-names = "pciephy"; status = "disabled"; ranges = <0x01000000 0x0 0x00000000 0x1b200000 0x0 0x100000>,
@@ -969,9 +967,8 @@ pcie0: pcie@1c00000 { power-domains = <&gcc PCIE_0_GDSC>; iommu-map = <0x100 &anoc1_smmu 0x1480 1>; - perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; - pcie@0 { + pcie0_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -979,6 +976,9 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie_phy>; + reset-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; }; };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 20/37] arm64: dts: qcom: msm8998: Move PCIe phy and GPIOs to root port node
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The patch completely drops `phy-names` instead of moving it to the root port node as claimed by the…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch completely drops phy-names instead of moving it to the root port node as claimed by the commit message. --
commit ed76b5fde29c9cdbab990c6d9d7c1352cdfa8910
Author: Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: msm8998: Move PCIe phy and GPIOs to root port node
This commit updates the device tree for MSM8998 by shifting the PCIe phy and perst GPIO properties from the root complex controller node to the root port child node. It also renames perst-gpios to reset-gpios to align with the root port binding schema.
Quoted 3 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi +0
-0
[ ... ]
Quoted 7 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi +0
-2@@ -928,8 +928,6 @@ pcie0: pcie@1c00000 { #address-cells = <3>; #size-cells = <2>; num-lanes = <1>; - phys = <&pcie_phy>; - phy-names = "pciephy"; status = "disabled";
[ ... ]
Quoted 12 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi +1
-2@@ -969,9 +967,8 @@ pcie0: pcie@1c00000 { power-domains = <&gcc PCIE_0_GDSC>; iommu-map = <0x100 &anoc1_smmu 0x1480 1>; - perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; - pcie@0 { + pcie0_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
arch/arm64/boot/dts/qcom/msm8998.dtsi pcie@0 { · line 981
Quoted 6 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi +3
-0@@ -979,6 +976,9 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie_phy>; + reset-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
[Severity: Low]
The commit message explicitly states: "Move phys, phy-names, and perst-gpios from the controller to pcie0_port0". However, it looks like phy-names was dropped from the parent node and not added to this child node as described.
While the kernel driver's root port parsing might ignore the phy-names property anyway, does this omission unintentionally violate the behavior described in the commit message?
Quoted 2 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi +0
-0}; };
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=20
PATCH v2 21/37 arm64: dts: qcom: qcs404: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst GPIO property are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys and phy-names from the controller to pcie0_port0, adding a label to this node to allow board-level overrides. Move perst-gpios from the &pcie controller override to &pcie0_port0 in the board file, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 6 ++++-- arch/arm64/boot/dts/qcom/qcs404.dtsi | 7 +++---- 2 files changed, 7 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/qcom/qcs404-evb.dtsi +4 -2
@@ -101,12 +101,14 @@ pms405_s3: s3 { &pcie { status = "okay"; - perst-gpios = <&tlmm 43 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&perst_state>; }; +&pcie0_port0 { + reset-gpios = <&tlmm 43 GPIO_ACTIVE_LOW>; +}; + &pcie_phy { status = "okay";
arch/arm64/boot/dts/qcom/qcs404.dtsi +3 -4
@@ -1517,12 +1517,9 @@ pcie: pcie@10000000 { "pwr", "ahb"; - phys = <&pcie_phy>; - phy-names = "pciephy"; - status = "disabled"; - pcie@0 { + pcie0_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -1530,6 +1527,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie_phy>; }; }; };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 21/37] arm64: dts: qcom: qcs404: Move PCIe phy and GPIOs to root port node
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [Medium] The commit message inaccurately claims to move phy-names to pcie0_port0, but the property is actually removed entirely.
Pre-existing issues:
- [High] Moving to the modern DT layout exposes a phy_init leak on -EPROBE_DEFER in the PCIe driver. --
commit 496473598a57288f328fa2236e944d3bb666608e
Author: Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: qcs404: Move PCIe phy and GPIOs to root port node
The PCIe phy reference and the perst GPIO property are per root port and belong in the root port node (pcie@0), not in the RC controller node.
Quoted 2 lines
Move phys and phy-names from the controller to
pcie0_port0, adding a label to this node to allow board-level overrides.
[Severity: Medium]
This isn't a bug, but the commit message states that phy-names is moved to pcie0_port0, while the patch actually drops the property entirely. Could the commit message be updated to accurately reflect that phy-names is being removed?
[ ... ]
Quoted 6 lines
arch/arm64/boot/dts/qcom/qcs404-evb.dtsi +0
-0@@ -101,12 +101,14 @@ pms405_s3: s3 { &pcie {
arch/arm64/boot/dts/qcom/qcs404-evb.dtsi pms405_s3: s3 { · line 109
Quoted 10 lines
arch/arm64/boot/dts/qcom/qcs404-evb.dtsi +2
-2status = "okay"; - perst-gpios = <&tlmm 43 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&perst_state>; }; +&pcie0_port0 { + reset-gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
[Severity: High]
This isn't a bug introduced by this patch, but does moving to this modern DT layout expose a resource leak in the PCIe driver?
In drivers/pci/controller/dwc/pcie-qcom.c:qcom_pcie_parse_port():
ret = phy_init(phy); if (ret) return ret; INIT_LIST_HEAD(&port->perst); ret = qcom_pcie_parse_perst(pcie, port, node); if (ret) return ret;
If qcom_pcie_parse_perst() returns an error like -EPROBE_DEFER when requesting reset-gpios, does this leak the phy initialization since phy_exit() isn't called on this failure path?
Quoted 1 line
arch/arm64/boot/dts/qcom/qcs404-evb.dtsi +1
-0+};
[ ... ]
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=21
PATCH v2 22/37 arm64: dts: qcom: qcs8550: Move PCIe GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe perst/wake GPIO properties are per root port and belong in the root port node, not in the RC controller node. Move perst-gpios/ wake-gpios from the &pcie0/&pcie1 controller overrides to the respective &pcieport0/&pcie1_port0 nodes, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/qcs8550-aim300.dtsi | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/qcom/qcs8550-aim300.dtsi +10 -6
@@ -335,26 +335,30 @@ &mdss_dsi0_phy { }; &pcie0 { - perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default"; }; +&pcieport0 { + reset-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; +}; + &pcie0_phy { vdda-phy-supply = <&vreg_l1e_0p88>; vdda-pll-supply = <&vreg_l3e_1p2>; }; &pcie1 { - perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie1_default_state>; pinctrl-names = "default"; }; +&pcie1_port0 { + reset-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; +}; + &pcie1_phy { vdda-phy-supply = <&vreg_l3c_0p9>; vdda-pll-supply = <&vreg_l3e_1p2>;
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 22/37] arm64: dts: qcom: qcs8550: Move PCIe GPIOs to root port node
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The commit introduces a build failure by referencing an undefined Device Tree label `&pcie1_port0`.…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The commit introduces a build failure by referencing an undefined Device Tree label &pcie1_port0. --
commit 9033bf5c4daddefb447ddf13a1046f9e3fb9d91c
Author: Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: qcs8550: Move PCIe GPIOs to root port node
The commit moves PCIe GPIO properties from the Root Complex controller node to the respective root port nodes in the qcs8550-aim300 device tree. It also renames the perst-gpios property to reset-gpios to match the bindings for the root port context.
Quoted 4 lines
arch/arm64/boot/dts/qcom/qcs8550-aim300.dtsi +0
-0
[ ... ]
arch/arm64/boot/dts/qcom/qcs8550-aim300.dtsi &mdss_dsi0_phy { · line 357
Quoted 9 lines
&pcie1 {
arch/arm64/boot/dts/qcom/qcs8550-aim300.dtsi +1
-3- perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie1_default_state>; pinctrl-names = "default"; }; +&pcie1_port0 {
[Severity: Low]
Will this cause a build failure during dtc compilation?
The &pcie1_port0 label does not appear to be defined in sm8550.dtsi or any included file at this point in the git history.
While this is fixed later in the patch series by commit 0b50a2794d4f364375fa966171b8c7483fa1b1b6 ("arm64: dts: qcom: sm8550: Move PCIe phy and GPIOs to root port node"), does ordering the board patch before the base SoC dtsi patch break kernel bisectability?
Quoted 3 lines
arch/arm64/boot/dts/qcom/qcs8550-aim300.dtsi +3
-0+ reset-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; +};
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=22
PATCH v2 23/37 arm64: dts: qcom: sa8295p: Move PCIe GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe perst/wake GPIO properties are per root port and belong in the root port node, not in the RC controller node. Move perst-gpios/ wake-gpios from the &pcie2a, &pcie3a, &pcie3b, and &pcie4 controller overrides to the respective &pcie2a_port0, &pcie3a_port0, &pcie3b_port0, and &pcie4_port0 nodes, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-)
arch/arm64/boot/dts/qcom/sa8295p-adp.dts +20 -12
@@ -453,15 +453,17 @@ &mdss1_dp3_phy { }; &pcie2a { - perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie2a_default>; status = "okay"; }; +&pcie2a_port0 { + reset-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; +}; + &pcie2a_phy { vdda-phy-supply = <&vreg_l11a>; vdda-pll-supply = <&vreg_l3a>;
@@ -472,15 +474,17 @@ &pcie2a_phy { &pcie3a { num-lanes = <2>; - perst-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 56 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie3a_default>; status = "okay"; }; +&pcie3a_port0 { + reset-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 56 GPIO_ACTIVE_LOW>; +}; + &pcie3a_phy { vdda-phy-supply = <&vreg_l11a>; vdda-pll-supply = <&vreg_l3a>;
@@ -489,15 +493,17 @@ &pcie3a_phy { }; &pcie3b { - perst-gpios = <&tlmm 153 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 130 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie3b_default>; status = "okay"; }; +&pcie3b_port0 { + reset-gpios = <&tlmm 153 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 130 GPIO_ACTIVE_LOW>; +}; + &pcie3b_phy { vdda-phy-supply = <&vreg_l11a>; vdda-pll-supply = <&vreg_l3a>;
@@ -506,15 +512,17 @@ &pcie3b_phy { }; &pcie4 { - perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie4_default>; status = "okay"; }; +&pcie4_port0 { + reset-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; +}; + &pcie4_phy { vdda-phy-supply = <&vreg_l11a>; vdda-pll-supply = <&vreg_l3a>;
Signature · 1 line
2.34.1
Re: [PATCH v2 23/37] arm64: dts: qcom: sa8295p: Move PCIe GPIOs to root port node
Quoted 9 lines · Krishna Chaitanya Chundru
The perst/wake GPIO properties are per root port and belong in the root port node, not in the RC controller node. Move perst-gpios/ wake-gpios from the &pcie2a, &pcie3a, &pcie3b, and &pcie4 controller overrides to the respective
&pcie2a_port0,&pcie3a_port0,&pcie3b_port0, and&pcie4_port0nodes, renaming perst-gpios to reset-gpios to match the binding used in the root port context.Signed-off-by Krishna Chaitanya Chundru <[email protected]>---
The other 8280 SKUs should also be converted (and the phys reference moved to the port node) - sa8540, sa8295 and sc8280 - they can be done in a single commit
On a sidenote, extending the scope of your series looks "odd" (mildly related changes) and may delay it getting merged (perhaps not now since we're at rc7 so no more merging for some 3-4 weeks..) as the new pieces may spark lots of review comments
Konrad
PATCH v2 24/37 arm64: dts: qcom: sa8540p: Move PCIe GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe perst/wake GPIO properties are per root port and belong in the root port node, not in the RC controller node. Move perst-gpios/ wake-gpios from the &pcie2a and &pcie3a controller overrides to the respective &pcie2a_port0 and &pcie3a_port0 nodes, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/qcom/sa8540p-ride.dts +10 -6
@@ -366,15 +366,17 @@ &pcie2a { <0x02000000 0x0 0x3c300000 0x0 0x3c300000 0x0 0x1d00000>, <0x03000000 0x5 0x00000000 0x5 0x00000000 0x1 0x00000000>; - perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie2a_default>; status = "disabled"; }; +&pcie2a_port0 { + reset-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; +}; + &pcie2a_phy { vdda-phy-supply = <&vreg_l11a>; vdda-pll-supply = <&vreg_l3a>;
@@ -387,15 +389,17 @@ &pcie3a { <0x02000000 0x0 0x40300000 0x0 0x40300000 0x0 0x20000000>, <0x03000000 0x6 0x00000000 0x6 0x00000000 0x2 0x00000000>; - perst-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 56 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie3a_default>; status = "okay"; }; +&pcie3a_port0 { + reset-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 56 GPIO_ACTIVE_LOW>; +}; + &pcie3a_phy { vdda-phy-supply = <&vreg_l11a>; vdda-pll-supply = <&vreg_l3a>;
Signature · 1 line
2.34.1
PATCH v2 25/37 arm64: dts: qcom: sar2130p: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys and phy-names from the controller to the existing pcieport0 and newly labeled pcie1_port0, allowing board-level overrides. Move perst-gpios/wake-gpios from the &pcie0 controller override to &pcieport0 in the board file, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/sar2130p-qar2130p.dts | 6 +++--- arch/arm64/boot/dts/qcom/sar2130p.dtsi | 12 +++++------- 2 files changed, 8 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/qcom/sar2130p-qar2130p.dts +3 -3
@@ -357,9 +357,6 @@ &i2c10 { }; &pcie0 { - perst-gpios = <&tlmm 55 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default";
@@ -367,6 +364,9 @@ &pcie0 { }; &pcieport0 { + reset-gpios = <&tlmm 55 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>; + wifi@0 { compatible = "pci17cb,1107"; reg = <0x10000 0x0 0x0 0x0 0x0>;
arch/arm64/boot/dts/qcom/sar2130p.dtsi +5 -7
@@ -1337,9 +1337,6 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, power-domains = <&gcc PCIE_0_GDSC>; - phys = <&pcie0_phy>; - phy-names = "pciephy"; - status = "disabled"; pcieport0: pcie@0 {
@@ -1350,6 +1347,8 @@ pcieport0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; }; };
@@ -1464,12 +1463,9 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, power-domains = <&gcc PCIE_1_GDSC>; - phys = <&pcie1_phy>; - phy-names = "pciephy"; - status = "disabled"; - pcie@0 { + pcie1_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -1477,6 +1473,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie1_phy>; }; };
Signature · 1 line
2.34.1
PATCH v2 26/37 arm64: dts: qcom: sc8180x: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys and phy-names from the controller to pcie0_port0, pcie1_port0, pcie2_port0, and pcie3_port0, adding labels to these nodes to allow board-level overrides. Move perst-gpios/wake-gpios from the controller overrides to the respective port nodes in the board files, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- .../arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts | 7 +++++-- arch/arm64/boot/dts/qcom/sc8180x-primus.dts | 7 +++++-- arch/arm64/boot/dts/qcom/sc8180x.dtsi | 24 +++++++++++----------- 3 files changed, 22 insertions(+), 16 deletions(-)
arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts +5 -2
@@ -457,14 +457,17 @@ &mdss_edp_out { }; &pcie3 { - perst-gpios = <&tlmm 178 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 180 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie3_default_state>; pinctrl-names = "default"; status = "okay"; }; +&pcie3_port0 { + reset-gpios = <&tlmm 178 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 180 GPIO_ACTIVE_LOW>; +}; + &pcie3_phy { vdda-phy-supply = <&vreg_l5e_0p88>; vdda-pll-supply = <&vreg_l3c_1p2>;
arch/arm64/boot/dts/qcom/sc8180x-primus.dts +5 -2
@@ -558,14 +558,17 @@ &mdss_edp_out { }; &pcie1 { - perst-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 177 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pcie2_default_state>; status = "okay"; }; +&pcie1_port0 { + reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 177 GPIO_ACTIVE_LOW>; +}; + &pcie1_phy { vdda-phy-supply = <&vreg_l5e_0p88>; vdda-pll-supply = <&vreg_l3c_1p2>;
arch/arm64/boot/dts/qcom/sc8180x.dtsi +12 -12
@@ -1779,13 +1779,11 @@ pcie0: pcie@1c00000 { <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_PCIE_0 0>; interconnect-names = "pcie-mem", "cpu-pcie"; - phys = <&pcie0_phy>; - phy-names = "pciephy"; dma-coherent; status = "disabled"; - pcie@0 { + pcie0_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -1793,6 +1791,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; }; };
@@ -1898,13 +1898,11 @@ pcie3: pcie@1c08000 { <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_PCIE_3 0>; interconnect-names = "pcie-mem", "cpu-pcie"; - phys = <&pcie3_phy>; - phy-names = "pciephy"; dma-coherent; status = "disabled"; - pcie@0 { + pcie3_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -1912,6 +1910,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie3_phy>; }; };
@@ -2018,13 +2018,11 @@ pcie1: pcie@1c10000 { <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_PCIE_1 0>; interconnect-names = "pcie-mem", "cpu-pcie"; - phys = <&pcie1_phy>; - phy-names = "pciephy"; dma-coherent; status = "disabled"; - pcie@0 { + pcie1_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -2032,6 +2030,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie1_phy>; }; };
@@ -2138,13 +2138,11 @@ pcie2: pcie@1c18000 { <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_PCIE_2 0>; interconnect-names = "pcie-mem", "cpu-pcie"; - phys = <&pcie2_phy>; - phy-names = "pciephy"; dma-coherent; status = "disabled"; - pcie@0 { + pcie2_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -2152,6 +2150,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie2_phy>; }; };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 26/37] arm64: dts: qcom: sc8180x: Move PCIe phy and GPIOs to root port node
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Commit message and code mismatch regarding the `phy-names` property. --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Commit message and code mismatch regarding the phy-names property. --
commit 3bba776bd4c695d8130ddad562efe19bc319bd91
Author: Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: sc8180x: Move PCIe phy and GPIOs to root port node
This patch relocates the PCIe PHY references and perst/wake GPIO properties from the root complex controller nodes to the root port nodes. It also assigns labels to the root port nodes and updates the respective board files.
Quoted 3 lines
arch/arm64/boot/dts/qcom/sc8180x.dtsi +0
-0
[ ... ]
Quoted 16 lines
arch/arm64/boot/dts/qcom/sc8180x.dtsi +1
-3@@ -1779,13 +1779,11 @@ pcie0: pcie@1c00000 { <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_PCIE_0 0>; interconnect-names = "pcie-mem", "cpu-pcie"; - phys = <&pcie0_phy>; - phy-names = "pciephy"; dma-coherent; status = "disabled"; - pcie@0 { + pcie0_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
arch/arm64/boot/dts/qcom/sc8180x.dtsi pcie@0 { · line 1796
Quoted 6 lines
arch/arm64/boot/dts/qcom/sc8180x.dtsi +2
-0@@ -1793,6 +1791,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; };
[Severity: Medium]
The commit message mentions "Move phys and phy-names from the controller to pcie0_port0, pcie1_port0, pcie2_port0, and pcie3_port0...", but does this actually move the phy-names property?
It looks like phy-names is removed entirely from the controller and not added alongside phys in the pcie0_port0 node (or the other port nodes).
If dropping phy-names is intentional because it is no longer required for single-PHY nodes, could the commit message be updated to clarify that it is being removed rather than moved?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=26
Re: [PATCH v2 26/37] arm64: dts: qcom: sc8180x: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruQuoted 11 lines · Krishna Chaitanya Chundru
The PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys and phy-names from the controller to
pcie0_port0,pcie1_port0,pcie2_port0, andpcie3_port0, adding labels to these nodes to allow board-level overrides. Move perst-gpios/wake-gpios from the controller overrides to the respective port nodes in the board files, renaming perst-gpios to reset-gpios to match the binding used in the root port context.Signed-off-by Krishna Chaitanya Chundru <[email protected]>---
[...]
Quoted 16 lines
arch/arm64/boot/dts/qcom/sc8180x.dtsi +1
-3@@ -1779,13 +1779,11 @@ pcie0: pcie@1c00000 { <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_PCIE_0 0>; interconnect-names = "pcie-mem", "cpu-pcie"; - phys = <&pcie0_phy>; - phy-names = "pciephy"; dma-coherent; status = "disabled"; - pcie@0 { + pcie0_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
arch/arm64/boot/dts/qcom/sc8180x.dtsi pcie@0 { · line 1795
Quoted 5 lines
arch/arm64/boot/dts/qcom/sc8180x.dtsi +2
-0@@ -1793,6 +1791,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>;
Other DTs put this between bus-range and address-cells, e.g. hamoa:
pcie3_port0: pcie@0 {
device_type = "pci";
compatible = "pciclass,0604";
reg = <0x0 0x0 0x0 0x0 0x0>;
bus-range = <0x01 0xff>;
phys = <&pcie3_phy>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
};Please follow this style
Konrad
PATCH v2 27/37 arm64: dts: qcom: sc8280xp: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys and phy-names from the controller to the existing pcie2a_port0, pcie2b_port0, pcie3a_port0, pcie3b_port0, and pcie4_port0 nodes. Move perst-gpios/wake-gpios from the controller overrides to the respective port nodes in the board files, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 24 +++++++++++++-------- .../boot/dts/qcom/sc8280xp-huawei-gaokun3.dts | 14 ++++++------ .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 22 +++++++++++-------- .../boot/dts/qcom/sc8280xp-microsoft-arcata.dts | 22 +++++++++++-------- .../boot/dts/qcom/sc8280xp-microsoft-blackrock.dts | 14 ++++++------ arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 25 +++++++++------------- 6 files changed, 67 insertions(+), 54 deletions(-)
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +15 -9
@@ -628,9 +628,6 @@ keyboard@68 { }; &pcie2a { - perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; - vddpe-3v3-supply = <&vreg_nvme>; pinctrl-names = "default";
@@ -639,6 +636,11 @@ &pcie2a { status = "okay"; }; +&pcie2a_port0 { + reset-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; +}; + &pcie2a_phy { vdda-phy-supply = <&vreg_l6d>; vdda-pll-supply = <&vreg_l4d>;
@@ -647,9 +649,6 @@ &pcie2a_phy { }; &pcie3a { - perst-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>; - vddpe-3v3-supply = <&vreg_wwan>; pinctrl-names = "default";
@@ -658,6 +657,11 @@ &pcie3a { status = "okay"; }; +&pcie3a_port0 { + reset-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>; +}; + &pcie3a_phy { vdda-phy-supply = <&vreg_l6d>; vdda-pll-supply = <&vreg_l4d>;
@@ -668,9 +672,6 @@ &pcie3a_phy { &pcie4 { max-link-speed = <2>; - perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; - vddpe-3v3-supply = <&vreg_wlan>; pinctrl-names = "default";
@@ -679,6 +680,11 @@ &pcie4 { status = "okay"; }; +&pcie4_port0 { + reset-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; +}; + &pcie4_phy { vdda-phy-supply = <&vreg_l6d>; vdda-pll-supply = <&vreg_l4d>;
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts +8 -6
@@ -739,9 +739,6 @@ &mdss0_dp1_out { }; &pcie2a { - perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; - vddpe-3v3-supply = <&vreg_nvme>; pinctrl-0 = <&pcie2a_default>;
@@ -750,6 +747,11 @@ &pcie2a { status = "okay"; }; +&pcie2a_port0 { + reset-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; +}; + &pcie2a_phy { vdda-phy-supply = <&vreg_l6d>; vdda-pll-supply = <&vreg_l4d>;
@@ -760,9 +762,6 @@ &pcie2a_phy { &pcie4 { max-link-speed = <2>; - perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; - vddpe-3v3-supply = <&vreg_wlan>; pinctrl-0 = <&pcie4_default>;
@@ -772,6 +771,9 @@ &pcie4 { }; &pcie4_port0 { + reset-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; + wifi@0 { compatible = "pci17cb,1103"; reg = <0x10000 0x0 0x0 0x0 0x0>;
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +13 -9
@@ -933,9 +933,6 @@ keyboard@68 { }; &pcie2a { - perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; - vddpe-3v3-supply = <&vreg_nvme>; pinctrl-names = "default";
@@ -944,6 +941,11 @@ &pcie2a { status = "okay"; }; +&pcie2a_port0 { + reset-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; +}; + &pcie2a_phy { vdda-phy-supply = <&vreg_l6d>; vdda-pll-supply = <&vreg_l4d>;
@@ -952,9 +954,6 @@ &pcie2a_phy { }; &pcie3a { - perst-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>; - vddpe-3v3-supply = <&vreg_wwan>; pinctrl-names = "default";
@@ -963,6 +962,11 @@ &pcie3a { status = "okay"; }; +&pcie3a_port0 { + reset-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>; +}; + &pcie3a_phy { vdda-phy-supply = <&vreg_l6d>; vdda-pll-supply = <&vreg_l4d>;
@@ -973,9 +977,6 @@ &pcie3a_phy { &pcie4 { max-link-speed = <2>; - perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; - vddpe-3v3-supply = <&vreg_wlan>; pinctrl-names = "default";
@@ -985,6 +986,9 @@ &pcie4 { }; &pcie4_port0 { + reset-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; + wifi@0 { compatible = "pci17cb,1103"; reg = <0x10000 0x0 0x0 0x0 0x0>;
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts +13 -9
@@ -486,9 +486,6 @@ &mdss0_dp1_out { }; &pcie2a { - perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; - vddpe-3v3-supply = <&vreg_nvme>; pinctrl-0 = <&pcie2a_default>;
@@ -497,6 +494,11 @@ &pcie2a { status = "okay"; }; +&pcie2a_port0 { + reset-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; +}; + &pcie2a_phy { vdda-phy-supply = <&vreg_l6d>; vdda-pll-supply = <&vreg_l4d>;
@@ -505,9 +507,6 @@ &pcie2a_phy { }; &pcie3a { - perst-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>; - vddpe-3v3-supply = <&vreg_wwan>; pinctrl-0 = <&pcie3a_default>;
@@ -516,6 +515,11 @@ &pcie3a { status = "okay"; }; +&pcie3a_port0 { + reset-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>; +}; + &pcie3a_phy { vdda-phy-supply = <&vreg_l6d>; vdda-pll-supply = <&vreg_l4d>;
@@ -526,9 +530,6 @@ &pcie3a_phy { &pcie4 { max-link-speed = <2>; - perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; - vddpe-3v3-supply = <&vreg_wlan>; pinctrl-0 = <&pcie4_default>;
@@ -538,6 +539,9 @@ &pcie4 { }; &pcie4_port0 { + reset-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; + wifi@0 { compatible = "pci17cb,1103"; reg = <0x10000 0x0 0x0 0x0 0x0>;
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts +8 -6
@@ -624,9 +624,6 @@ &mdss0_dp2_phy { }; &pcie2a { - perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; - vddpe-3v3-supply = <&vreg_nvme>; pinctrl-0 = <&pcie2a_default>;
@@ -635,6 +632,11 @@ &pcie2a { status = "okay"; }; +&pcie2a_port0 { + reset-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; +}; + &pcie2a_phy { vdda-phy-supply = <&vreg_l4d>; vdda-pll-supply = <&vreg_l6d>;
@@ -645,9 +647,6 @@ &pcie2a_phy { &pcie4 { max-link-speed = <2>; - perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; - vddpe-3v3-supply = <&vreg_wlan>; pinctrl-0 = <&pcie4_default>;
@@ -657,6 +656,9 @@ &pcie4 { }; &pcie4_port0 { + reset-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>; + wifi@0 { compatible = "pci17cb,1103"; reg = <0x10000 0x0 0x0 0x0 0x0>;
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +10 -15
@@ -2220,9 +2220,6 @@ pcie4: pcie@1c00000 { power-domains = <&gcc PCIE_4_GDSC>; required-opps = <&rpmhpd_opp_nom>; - phys = <&pcie4_phy>; - phy-names = "pciephy"; - status = "disabled"; pcie4_port0: pcie@0 {
@@ -2233,6 +2230,8 @@ pcie4_port0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie4_phy>; }; };
@@ -2331,9 +2330,6 @@ pcie3b: pcie@1c08000 { power-domains = <&gcc PCIE_3B_GDSC>; required-opps = <&rpmhpd_opp_nom>; - phys = <&pcie3b_phy>; - phy-names = "pciephy"; - status = "disabled"; pcie3b_port0: pcie@0 {
@@ -2344,6 +2340,8 @@ pcie3b_port0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie3b_phy>; }; };
@@ -2442,9 +2440,6 @@ pcie3a: pcie@1c10000 { power-domains = <&gcc PCIE_3A_GDSC>; required-opps = <&rpmhpd_opp_nom>; - phys = <&pcie3a_phy>; - phy-names = "pciephy"; - status = "disabled"; pcie3a_port0: pcie@0 {
@@ -2455,6 +2450,8 @@ pcie3a_port0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie3a_phy>; }; };
@@ -2556,9 +2553,6 @@ pcie2b: pcie@1c18000 { power-domains = <&gcc PCIE_2B_GDSC>; required-opps = <&rpmhpd_opp_nom>; - phys = <&pcie2b_phy>; - phy-names = "pciephy"; - status = "disabled"; pcie2b_port0: pcie@0 {
@@ -2569,6 +2563,8 @@ pcie2b_port0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie2b_phy>; }; };
@@ -2667,9 +2663,6 @@ pcie2a: pcie@1c20000 { power-domains = <&gcc PCIE_2A_GDSC>; required-opps = <&rpmhpd_opp_nom>; - phys = <&pcie2a_phy>; - phy-names = "pciephy"; - status = "disabled"; pcie2a_port0: pcie@0 {
@@ -2680,6 +2673,8 @@ pcie2a_port0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie2a_phy>; }; };
Signature · 1 line
2.34.1
PATCH v2 28/37 arm64: dts: qcom: sdm845: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys and phy-names from the controller to pcie0_port0 and pcie1_port0, adding labels to these nodes to allow board-level overrides. Move perst-gpios/wake-gpios from the controller overrides to the respective port nodes in the board files, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 13 +++++++++---- arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 12 ++++++++---- arch/arm64/boot/dts/qcom/sdm845.dtsi | 14 ++++++-------- 3 files changed, 23 insertions(+), 16 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-db845c.dts +9 -4
@@ -618,15 +618,17 @@ &mss_pil { &pcie0 { status = "okay"; - perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 134 GPIO_ACTIVE_LOW>; - vddpe-3v3-supply = <&pcie0_3p3v_dual>; pinctrl-names = "default"; pinctrl-0 = <&pcie0_default_state>; }; +&pcie0_port0 { + reset-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 134 GPIO_ACTIVE_LOW>; +}; + &pcie0_phy { status = "okay";
@@ -636,12 +638,15 @@ &pcie0_phy { &pcie1 { status = "okay"; - perst-gpios = <&tlmm 102 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pcie1_default_state>; }; +&pcie1_port0 { + reset-gpios = <&tlmm 102 GPIO_ACTIVE_LOW>; +}; + &pcie1_phy { status = "okay";
arch/arm64/boot/dts/qcom/sdm845-mtp.dts +8 -4
@@ -510,14 +510,16 @@ &mss_pil { }; &pcie0 { - perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default"; status = "okay"; }; +&pcie0_port0 { + reset-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; +}; + &pcie0_phy { vdda-phy-supply = <&vreg_l1a_0p875>; vdda-pll-supply = <&vreg_l26a_1p2>;
@@ -526,14 +528,16 @@ &pcie0_phy { }; &pcie1 { - perst-gpios = <&tlmm 102 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie1_default_state>; status = "okay"; }; +&pcie1_port0 { + reset-gpios = <&tlmm 102 GPIO_ACTIVE_LOW>; +}; + &pcie1_phy { status = "okay";
arch/arm64/boot/dts/qcom/sdm845.dtsi +6 -8
@@ -2394,12 +2394,9 @@ pcie0: pcie@1c00000 { power-domains = <&gcc PCIE_0_GDSC>; - phys = <&pcie0_phy>; - phy-names = "pciephy"; - status = "disabled"; - pcie@0 { + pcie0_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -2407,6 +2404,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; }; };
@@ -2524,12 +2523,9 @@ pcie1: pcie@1c08000 { power-domains = <&gcc PCIE_1_GDSC>; - phys = <&pcie1_phy>; - phy-names = "pciephy"; - status = "disabled"; - pcie@0 { + pcie1_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -2537,6 +2533,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie1_phy>; }; };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 28/37] arm64: dts: qcom: sdm845: Move PCIe phy and GPIOs to root port node
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The commit message explicitly claims to 'Move phys and phy-names' to the port node, but the…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit message explicitly claims to 'Move phys and phy-names' to the port node, but the phy-names property is entirely dropped from the device tree. --
commit 40936f38e877a6fb54a0e3819f9826330b1bb090
Author: Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: sdm845: Move PCIe phy and GPIOs to root port node
This commit moves PCIe PHY references and perst/wake GPIO properties from the RC controller node to the root port node. It also renames perst-gpios to reset-gpios to match the root port binding context.
Quoted 4 lines
The PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys and phy-names from the controller to
pcie0_port0andpcie1_port0, adding labels to these nodes to allow
[Severity: Medium]
The commit message explicitly mentions moving phy-names to the port nodes, but looking at the device tree changes below, this property is completely dropped. Was the intention to keep phy-names in the port nodes as described here?
Quoted 5 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +0
-0@@ -2394,12 +2394,9 @@ pcie0: pcie@1c00000 {
[ ... ]
Quoted 7 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1
-4- phys = <&pcie0_phy>; - phy-names = "pciephy"; - status = "disabled"; - pcie@0 { + pcie0_port0: pcie@0 {
[ ... ]
arch/arm64/boot/dts/qcom/sdm845.dtsi pcie@0 { · line 2409
Quoted 6 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +2
-0#address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; };
[Severity: Medium]
Is this missing the phy-names = "pciephy"; property that was removed from the controller node above?
[ ... ]
Quoted 1 line
arch/arm64/boot/dts/qcom/sdm845.dtsi +0
-0@@ -2524,12 +2523,9 @@ pcie1: pcie@1c08000 {
[ ... ]
Quoted 7 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +1
-4- phys = <&pcie1_phy>; - phy-names = "pciephy"; - status = "disabled"; - pcie@0 { + pcie1_port0: pcie@0 {
[ ... ]
arch/arm64/boot/dts/qcom/sdm845.dtsi pcie@0 { · line 2538
Quoted 6 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +2
-0#address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie1_phy>; };
[Severity: Medium]
Similarly here, the phy-names property is removed from the controller node but not added to the pcie1_port0 node as the commit message describes. Does this node also need the phy-names property?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=28
PATCH v2 29/37 arm64: dts: qcom: sm8150: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys, phy-names, perst-gpios, and wake-gpios from the controller to pcie0_port0 and pcie1_port0, adding labels to these nodes to allow board-level overrides, and renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/sm8150.dtsi | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)
arch/arm64/boot/dts/qcom/sm8150.dtsi +9 -12
@@ -1901,18 +1901,12 @@ pcie0: pcie@1c00000 { power-domains = <&gcc PCIE_0_GDSC>; - phys = <&pcie0_phy>; - phy-names = "pciephy"; - - perst-gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>; - wake-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie0_default_state>; status = "disabled"; - pcie@0 { + pcie0_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -1920,6 +1914,10 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; + reset-gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; }; };
@@ -2019,10 +2017,6 @@ pcie1: pcie@1c08000 { power-domains = <&gcc PCIE_1_GDSC>; - phys = <&pcie1_phy>; - phy-names = "pciephy"; - - perst-gpios = <&tlmm 102 GPIO_ACTIVE_HIGH>; enable-gpio = <&tlmm 104 GPIO_ACTIVE_HIGH>; pinctrl-names = "default";
@@ -2030,7 +2024,7 @@ pcie1: pcie@1c08000 { status = "disabled"; - pcie@0 { + pcie1_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -2038,6 +2032,9 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie1_phy>; + reset-gpios = <&tlmm 102 GPIO_ACTIVE_HIGH>; }; };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 29/37] arm64: dts: qcom: sm8150: Move PCIe phy and GPIOs to root port node
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [Low] The commit message inaccurately describes the changes made to the phy-names and wake-gpios properties.
Pre-existing issues:
- [High] Missing phy_exit() in qcom_pcie_parse_port() error path leads to PHY initialization count leak on probe deferral. --
commit 3689731d2937c49dccd016d5e1e8e1fca305198c
Author: Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: sm8150: Move PCIe phy and GPIOs to root port node
This patch moves the PCIe phys, perst-gpios, and wake-gpios properties from the PCIe root complex controller node to the root port node (pcie@0) for pcie0 and pcie1. It also renames perst-gpios to reset-gpios.
Quoted 4 lines
The PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys, phy-names, perst-gpios, and wake-gpios from the controller to
pcie0_port0andpcie1_port0, adding labels to
[Severity: Low]
The commit message states phy-names and wake-gpios are moved to both pcie0_port0 and pcie1_port0.
However, in the diff, phy-names is removed entirely rather than moved, and wake-gpios is only added to pcie0_port0 since it wasn't originally present in pcie1.
Should the commit message be updated to accurately reflect the changes made?
Quoted 9 lines
these nodes to allow board-level overrides, and renaming perst-gpios to reset-gpios to match the binding used in the root port context.
Signed-off-by Krishna Chaitanya Chundru <[email protected]>arch/arm64/boot/dts/qcom/sm8150.dtsi +0
-0
[ ... ]
arch/arm64/boot/dts/qcom/sm8150.dtsi pcie@0 { · line 1923
Quoted 11 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +4
-0@@ -1920,6 +1914,10 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; + reset-gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>; + wake-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; }; };
[Severity: High]
This is a pre-existing issue, but moving the phys property to the pcie@0 root port node causes the sm8150 device tree to now utilize the qcom_pcie_parse_port() code path in the pcie-qcom driver.
Does this expose a resource leak on probe deferral?
drivers/pci/controller/dwc/pcie-qcom.c:qcom_pcie_parse_port() {
...
ret = phy_init(phy); if (ret) return ret; INIT_LIST_HEAD(&port->perst); ret = qcom_pcie_parse_perst(pcie, port, node); if (ret) return ret;
...
}
If qcom_pcie_parse_perst() returns -EPROBE_DEFER, will this code leak the PHY initialization count because phy_exit(phy) is not called before returning?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=29
PATCH v2 30/37 arm64: dts: qcom: sm8250: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys, phy-names, perst-gpios, and wake-gpios from the controller to the existing pcieport0 and newly labeled pcie1_port0 and pcie2_port0, allowing board-level overrides. Rename perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-)
arch/arm64/boot/dts/qcom/sm8250.dtsi +14 -20
@@ -2198,12 +2198,6 @@ pcie0: pcie@1c00000 { power-domains = <&gcc PCIE_0_GDSC>; - phys = <&pcie0_phy>; - phy-names = "pciephy"; - - perst-gpios = <&tlmm 79 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 81 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie0_default_state>; dma-coherent;
@@ -2218,6 +2212,10 @@ pcieport0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; + reset-gpios = <&tlmm 79 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 81 GPIO_ACTIVE_LOW>; }; };
@@ -2325,19 +2323,13 @@ pcie1: pcie@1c08000 { power-domains = <&gcc PCIE_1_GDSC>; - phys = <&pcie1_phy>; - phy-names = "pciephy"; - - perst-gpios = <&tlmm 82 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 84 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie1_default_state>; dma-coherent; status = "disabled"; - pcie@0 { + pcie1_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -2345,6 +2337,10 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie1_phy>; + reset-gpios = <&tlmm 82 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 84 GPIO_ACTIVE_LOW>; }; };
@@ -2452,19 +2448,13 @@ pcie2: pcie@1c10000 { power-domains = <&gcc PCIE_2_GDSC>; - phys = <&pcie2_phy>; - phy-names = "pciephy"; - - perst-gpios = <&tlmm 85 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie2_default_state>; dma-coherent; status = "disabled"; - pcie@0 { + pcie2_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -2472,6 +2462,10 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie2_phy>; + reset-gpios = <&tlmm 85 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; }; };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 30/37] arm64: dts: qcom: sm8250: Move PCIe phy and GPIOs to root port node
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
New issues:
- [Medium] The commit message claims to move phy-names to the root port nodes, but the property is actually deleted and not added.
- [Medium] wake-gpios is moved to the root port child node, but it is not permitted by the qcom,pcie-common.yaml schema for child nodes.
Pre-existing issues:
- [High] Missing phy_exit() on error paths in qcom_pcie_parse_port() and qcom_pcie_parse_legacy_binding() leading to PHY resource leaks. --
commit b2d52b29841e8c337d148f97ebcff12f728d5a5f
Author: Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: sm8250: Move PCIe phy and GPIOs to root port node
The PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node.
Quoted 3 lines
Move phys, phy-names, perst-gpios, and wake-gpios
from the controller to the existing pcieport0 and newly labeledpcie1_port0andpcie2_port0, allowing board-level overrides. Rename
[Severity: Medium]
The commit message explicitly states that phy-names is being moved to the root port nodes. However, the diff shows it is being deleted from the parent controller nodes but never added to the destination root port child nodes.
While omitting phy-names might be structurally correct according to the bindings, does the implementation contradicting the stated intent in the commit message represent a regression?
Quoted 18 lines
arch/arm64/boot/dts/qcom/sm8250.dtsi +0
-6@@ -2198,12 +2198,6 @@ pcie0: pcie@1c00000 { power-domains = <&gcc PCIE_0_GDSC>; - phys = <&pcie0_phy>; - phy-names = "pciephy"; - - perst-gpios = <&tlmm 79 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 81 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie0_default_state>; dma-coherent;
arch/arm64/boot/dts/qcom/sm8250.dtsi pcieport0: pcie@0 { · line 2218
Quoted 7 lines
arch/arm64/boot/dts/qcom/sm8250.dtsi +4
-0@@ -2218,6 +2212,10 @@ pcieport0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; + reset-gpios = <&tlmm 79 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 81 GPIO_ACTIVE_LOW>;
[Severity: Medium]
Could moving wake-gpios to the pcie@0 child node introduce a schema validation regression?
In Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml, the patternProperties for ^pcie@ has unevaluatedProperties: false and only explicitly permits reg and phys. If wake-gpios is not a standard property defined in /schemas/pci/pci-pci-bridge.yaml#, might this fail dt_binding_check?
[Severity: High]
This is a pre-existing issue, but missing phy_exit() on error paths in qcom_pcie_parse_port() and qcom_pcie_parse_legacy_binding() appears to lead to PHY resource leaks.
In qcom_pcie_parse_port():
drivers/pci/controller/dwc/pcie-qcom.c:qcom_pcie_parse_port() {
...
ret = phy_init(phy);
if (ret)
return ret;
INIT_LIST_HEAD(&port->perst);
ret = qcom_pcie_parse_perst(pcie, port, node);
if (ret)
return ret;
...
}If qcom_pcie_parse_perst() fails (e.g., returning -EPROBE_DEFER when failing to acquire the reset GPIO), the function returns the error immediately without calling phy_exit(phy).
Because the newly allocated port has not yet been added to the pcie->ports list, the error handling path in qcom_pcie_parse_ports() will not see this PHY. Does this repeatedly leak clocks and regulators on probe deferral, preventing power domains from collapsing?
The same pattern exists in qcom_pcie_parse_legacy_binding():
drivers/pci/controller/dwc/pcie-qcom.c:qcom_pcie_parse_legacy_binding() {
...
ret = phy_init(phy);
if (ret)
return ret;
port = devm_kzalloc(dev, sizeof(*port), GFP_KERNEL);
if (!port)
return -ENOMEM;
perst = devm_kzalloc(dev, sizeof(*perst), GFP_KERNEL);
if (!perst)
return -ENOMEM;
...
}Could these devm_kzalloc() calls also fail and leak the initialized PHY?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=30
PATCH v2 31/37 arm64: dts: qcom: sm8350: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys and phy-names from the controller to pcie0_port0 and pcie1_port0, adding labels to these nodes to allow board-level overrides. Move perst-gpios/wake-gpios from the controller overrides to the respective port nodes in the board file, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 16 ++++++++++------ arch/arm64/boot/dts/qcom/sm8350.dtsi | 14 ++++++-------- 2 files changed, 16 insertions(+), 14 deletions(-)
arch/arm64/boot/dts/qcom/sm8350-hdk.dts +10 -6
@@ -493,12 +493,14 @@ &pcie0 { pinctrl-names = "default"; pinctrl-0 = <&pcie0_default_state>; - perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; - status = "okay"; }; +&pcie0_port0 { + reset-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; +}; + &pcie0_phy { vdda-phy-supply = <&vreg_l5b_0p88>; vdda-pll-supply = <&vreg_l6b_1p2>;
@@ -507,15 +509,17 @@ &pcie0_phy { }; &pcie1 { - perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie1_default_state>; status = "okay"; }; +&pcie1_port0 { + reset-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; +}; + &pcie1_phy { status = "okay"; vdda-phy-supply = <&vreg_l5b_0p88>;
arch/arm64/boot/dts/qcom/sm8350.dtsi +6 -8
@@ -1583,12 +1583,9 @@ pcie0: pcie@1c00000 { power-domains = <&gcc PCIE_0_GDSC>; - phys = <&pcie0_phy>; - phy-names = "pciephy"; - status = "disabled"; - pcie@0 { + pcie0_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -1596,6 +1593,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; }; };
@@ -1692,12 +1691,9 @@ pcie1: pcie@1c08000 { power-domains = <&gcc PCIE_1_GDSC>; - phys = <&pcie1_phy>; - phy-names = "pciephy"; - status = "disabled"; - pcie@0 { + pcie1_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -1705,6 +1701,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie1_phy>; }; };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 31/37] arm64: dts: qcom: sm8350: Move PCIe phy and GPIOs to root port node
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [Medium] The commit message explicitly claims to move phy-names to the port nodes, but the property was completely removed.
Pre-existing issues:
- [High] qcom_pcie_phy_power_on() blindly calls qcom_pcie_phy_power_off() on error, leading to unbalanced regulator disables. --
commit 8e84d69b909c92cf7a61c9817d6f72fae667daff
Author: Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: sm8350: Move PCIe phy and GPIOs to root port node
This commit moves the PCIe PHY references and perst/wake GPIO properties from the root complex controller nodes to their respective root port nodes. It also renames the perst-gpios property to reset-gpios to conform with the root port bindings.
Quoted 1 line
Move phys and phy-names from the controller to
pcie0_port0andpcie1_port0, adding labels to these nodes to allow board-level overrides.
[Severity: Medium]
It appears "phy-names" was only deleted from the parent controller nodes and never added back to the port nodes.
Was the intention to drop "phy-names" entirely, or should it be added to pcie0_port0 and pcie1_port0?
Quoted 19 lines
arch/arm64/boot/dts/qcom/sm8350.dtsi +1
-4@@ -1583,12 +1583,9 @@ pcie0: pcie@1c00000 { power-domains = <&gcc PCIE_0_GDSC>; - phys = <&pcie0_phy>; - phy-names = "pciephy"; - status = "disabled"; - pcie@0 { + pcie0_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
arch/arm64/boot/dts/qcom/sm8350.dtsi pcie@0 { · line 1597
Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8350.dtsi +2
-0@@ -1596,6 +1593,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>;
[Severity: Medium]
Should phy-names = "pciephy" be added here to match the commit message?
[ ... ]
[Severity: High]
This is a pre-existing issue, but I noticed a potential flaw in the driver's error handling path that could lead to unbalanced regulator disables.
If phy_power_on() fails in drivers/pci/controller/dwc/pcie-qcom.c, the error handling blindly calls qcom_pcie_phy_power_off():
drivers/pci/controller/dwc/pcie-qcom.c:qcom_pcie_phy_power_on() {
...
if (ret)
qcom_pcie_phy_power_off(pcie);
...
}This unconditionally iterates over all parsed ports to call phy_power_off():
drivers/pci/controller/dwc/pcie-qcom.c:qcom_pcie_phy_power_off() {
...
list_for_each_entry(port, &pcie->ports, list)
phy_power_off(port->phy);
...
}This includes the port that just failed to power on (where power_count is 0) as well as any subsequent ports in the list that haven't been attempted.
Calling phy_power_off() on an unpowered PHY decrements its power_count to -1 and unconditionally calls phy_pm_runtime_put() and regulator_disable().
Could this trigger a warning in the core regulator framework and inadvertently cut power to other devices sharing the regulator?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=31
PATCH v2 32/37 arm64: dts: qcom: sm8450: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys, phy-names, perst-gpios, and wake-gpios from the controller to the existing pcieport0 and newly labeled pcie1_port0, allowing board-level overrides. Rename perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/sm8450.dtsi | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-)
arch/arm64/boot/dts/qcom/sm8450.dtsi +9 -13
@@ -2031,12 +2031,6 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, power-domains = <&gcc PCIE_0_GDSC>; - phys = <&pcie0_phy>; - phy-names = "pciephy"; - - perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie0_default_state>;
@@ -2080,6 +2074,10 @@ pcieport0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; + reset-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; }; };
@@ -2196,12 +2194,6 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, power-domains = <&gcc PCIE_1_GDSC>; - phys = <&pcie1_phy>; - phy-names = "pciephy"; - - perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie1_default_state>;
@@ -2277,7 +2269,7 @@ opp-32000000-4 { }; }; - pcie@0 { + pcie1_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -2285,6 +2277,10 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie1_phy>; + reset-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; }; };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 32/37] arm64: dts: qcom: sm8450: Move PCIe phy and GPIOs to root port node
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The commit message claims to move `phy-names` to the root port node, but the property is…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit message claims to move phy-names to the root port node, but the property is completely removed instead. --
commit 9d7dd05726a6daa00789e9da0c80d284e0e6db66
Author: Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: sm8450: Move PCIe phy and GPIOs to root port node
This commit moves the PCIe PHY reference and perst/wake GPIO properties from the RC controller node to the root port nodes. It also renames perst-gpios to reset-gpios to match the bindings.
Quoted 6 lines
The PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys, phy-names, perst-gpios, and wake-gpios from the controller to the existing pcieport0 and newly labeled
pcie1_port0, allowing board-level overrides. Rename perst-gpios to reset-gpios to match the binding used in the root port context.
[Severity: Medium]
The commit message states that phy-names is being moved from the controller to the root port nodes. However, looking at the diff below, the property is removed from the controller but does not seem to be added to the destination nodes. Should the commit message be updated to reflect the removal, or was the property supposed to be added to the root ports?
Quoted 17 lines
arch/arm64/boot/dts/qcom/sm8450.dtsi +0
-6@@ -2031,12 +2031,6 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, power-domains = <&gcc PCIE_0_GDSC>; - phys = <&pcie0_phy>; - phy-names = "pciephy"; - - perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie0_default_state>;
arch/arm64/boot/dts/qcom/sm8450.dtsi pcieport0: pcie@0 { · line 2082
Quoted 9 lines
arch/arm64/boot/dts/qcom/sm8450.dtsi +4
-0@@ -2080,6 +2074,10 @@ pcieport0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; + reset-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; }; };
[Severity: Medium]
Does pcieport0 need phy-names = "pciephy"; added here, as suggested by the commit message?
[ ... ]
arch/arm64/boot/dts/qcom/sm8450.dtsi pcie@0 { · line 2285
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8450.dtsi +4
-0@@ -2285,6 +2277,10 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie1_phy>; + reset-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; }; };
[Severity: Medium]
Similarly, should phy-names be added here to pcie1_port0?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=32
PATCH v2 33/37 arm64: dts: qcom: sm8550: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys and phy-names from the controller to the existing pcieport0 and newly labeled pcie1_port0, allowing board-level overrides. Move perst-gpios/wake-gpios from the controller overrides to the respective port nodes in the board files, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/sm8550-hdk.dts | 14 ++++++++------ arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 16 ++++++++++------ arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 6 +++--- arch/arm64/boot/dts/qcom/sm8550-samsung-q5q.dts | 7 +++++-- .../boot/dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts | 8 +++++--- arch/arm64/boot/dts/qcom/sm8550.dtsi | 12 +++++------- 6 files changed, 36 insertions(+), 27 deletions(-)
arch/arm64/boot/dts/qcom/sm8550-hdk.dts +8 -6
@@ -1003,9 +1003,6 @@ &mdss_dp0 { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default";
@@ -1013,6 +1010,9 @@ &pcie0 { }; &pcieport0 { + reset-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; + wifi@0 { compatible = "pci17cb,1107"; reg = <0x10000 0x0 0x0 0x0 0x0>;
@@ -1037,15 +1037,17 @@ &pcie0_phy { }; &pcie1 { - wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie1_default_state>; pinctrl-names = "default"; status = "okay"; }; +&pcie1_port0 { + reset-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; +}; + &pcie1_phy { vdda-phy-supply = <&vreg_l3c_0p9>; vdda-pll-supply = <&vreg_l3e_1p2>;
arch/arm64/boot/dts/qcom/sm8550-mtp.dts +10 -6
@@ -739,15 +739,17 @@ &mdss_dp0 { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie0_default_state>; status = "okay"; }; +&pcieport0 { + reset-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; +}; + &pcie0_phy { vdda-phy-supply = <&vreg_l1e_0p88>; vdda-pll-supply = <&vreg_l3e_1p2>;
@@ -756,15 +758,17 @@ &pcie0_phy { }; &pcie1 { - wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; pinctrl-0 = <&pcie1_default_state>; status = "okay"; }; +&pcie1_port0 { + reset-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; +}; + &pcie1_phy { vdda-phy-supply = <&vreg_l3c_0p91>; vdda-pll-supply = <&vreg_l3e_1p2>;
arch/arm64/boot/dts/qcom/sm8550-qrd.dts +3 -3
@@ -903,9 +903,6 @@ &mdss_dp0 { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default";
@@ -913,6 +910,9 @@ &pcie0 { }; &pcieport0 { + reset-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; + wifi@0 { compatible = "pci17cb,1107"; reg = <0x10000 0x0 0x0 0x0 0x0>;
arch/arm64/boot/dts/qcom/sm8550-samsung-q5q.dts +5 -2
@@ -510,13 +510,16 @@ &i2c_master_hub_0 { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default"; status = "okay"; }; +&pcieport0 { + reset-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; +}; + &pcie0_phy { vdda-phy-supply = <&vreg_l1e_0p88>; vdda-pll-supply = <&vreg_l3e_1p2>;
arch/arm64/boot/dts/qcom/sm8550-sony-xperia-yodo-pdx234.dts +5 -3
@@ -584,15 +584,17 @@ cirrus,gpio-ctrl2 { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default"; status = "okay"; }; +&pcieport0 { + reset-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; +}; + &pcie0_phy { vdda-phy-supply = <&pm8550vs_2_l1>; vdda-pll-supply = <&pm8550vs_2_l3>;
arch/arm64/boot/dts/qcom/sm8550.dtsi +5 -7
@@ -2033,9 +2033,6 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, power-domains = <&gcc PCIE_0_GDSC>; - phys = <&pcie0_phy>; - phy-names = "pciephy"; - operating-points-v2 = <&pcie0_opp_table>; status = "disabled";
@@ -2100,6 +2097,8 @@ pcieport0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; }; };
@@ -2213,9 +2212,6 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, power-domains = <&gcc PCIE_1_GDSC>; - phys = <&pcie1_phy>; - phy-names = "pciephy"; - operating-points-v2 = <&pcie1_opp_table>; status = "disabled";
@@ -2288,7 +2284,7 @@ opp-32000000-4 { }; }; - pcie@0 { + pcie1_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -2296,6 +2292,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie1_phy>; }; };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 33/37] arm64: dts: qcom: sm8550: Move PCIe phy and GPIOs to root port node
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The commit message claims that the `phy-names` property is moved to the root port nodes, but the…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit message claims that the phy-names property is moved to the root port nodes, but the property is actually deleted. --
commit 0b50a2794d4f364375fa966171b8c7483fa1b1b6
Author: Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: sm8550: Move PCIe phy and GPIOs to root port node
This patch moves the PCIe phy reference and the perst/wake GPIO properties from the root complex controller node to the root port node. It updates several sm8550-based device tree files to reflect these moves and renames perst-gpios to reset-gpios.
Quoted 2 lines
Move phys and phy-names from the controller to
the existing pcieport0 and newly labeledpcie1_port0, allowing
[Severity: Medium]
The commit message states that both phys and phy-names are moved to the root port nodes. However, phy-names was removed from the controller but never re-added to the port nodes. Does this omission introduce a regression, or was the property intentionally dropped?
Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8550.dtsi +0
-0
[ ... ]
arch/arm64/boot/dts/qcom/sm8550.dtsi pcieport0: pcie@0 { · line 2101
Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8550.dtsi +2
-0@@ -2100,6 +2097,8 @@ pcieport0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>;
[Severity: Medium]
Should phy-names be included here to match the commit message, or should the commit message be updated to reflect that phy-names is intentionally dropped?
[ ... ]
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8550.dtsi +1
-1@@ -2288,7 +2284,7 @@ opp-32000000-4 { }; }; - pcie@0 { + pcie1_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
arch/arm64/boot/dts/qcom/sm8550.dtsi pcie@0 { · line 2296
Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8550.dtsi +2
-0@@ -2296,6 +2292,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie1_phy>;
[Severity: Medium]
Similarly for pcie1_port0, should phy-names be added here as well?
Quoted 2 lines
arch/arm64/boot/dts/qcom/sm8550.dtsi +0
-0}; };
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=33
PATCH v2 34/37 arm64: dts: qcom: talos: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys from the controller to pcie_port0, and move perst-gpios/wake-gpios from the &pcie controller overrides to the &pcie_port0 node in the board files, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/qcs615-ride.dts | 8 +++++--- arch/arm64/boot/dts/qcom/talos-evk-som.dtsi | 8 +++++--- arch/arm64/boot/dts/qcom/talos.dtsi | 5 ++--- 3 files changed, 12 insertions(+), 9 deletions(-)
arch/arm64/boot/dts/qcom/qcs615-ride.dts +5 -3
@@ -444,15 +444,17 @@ &mdss_dsi0_phy { }; &pcie { - perst-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 100 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie_default_state>; pinctrl-names = "default"; status = "okay"; }; +&pcie_port0 { + reset-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 100 GPIO_ACTIVE_LOW>; +}; + &pcie_phy { vdda-phy-supply = <&vreg_l5a>; vdda-pll-supply = <&vreg_l12a>;
arch/arm64/boot/dts/qcom/talos-evk-som.dtsi +5 -3
@@ -358,15 +358,17 @@ &mdss_dsi0_phy { }; &pcie { - perst-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 100 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie_default_state>; pinctrl-names = "default"; status = "okay"; }; +&pcie_port0 { + reset-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 100 GPIO_ACTIVE_LOW>; +}; + &pcie_phy { vdda-phy-supply = <&vreg_l5a>; vdda-pll-supply = <&vreg_l12a>;
arch/arm64/boot/dts/qcom/talos.dtsi +2 -3
@@ -1337,9 +1337,6 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, power-domains = <&gcc PCIE_0_GDSC>; - phys = <&pcie_phy>; - phy-names = "pciephy"; - max-link-speed = <2>; operating-points-v2 = <&pcie_opp_table>;
@@ -1371,6 +1368,8 @@ pcie_port0: pcie@0 { #size-cells = <2>; ranges; bus-range = <0x01 0xff>; + + phys = <&pcie_phy>; }; };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 34/37] arm64: dts: qcom: talos: Move PCIe phy and GPIOs to root port node
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] A preexisting error-handling flaw in qcom_pcie_parse_port() causes a resource leak of the initialized PHY. This leak will now be frequently triggered due to this commit moving reset-gpios to the port node. --
commit 689313d243e7ec1e4f35d3db8dcb7b5d6e32d186
Author: Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: talos: Move PCIe phy and GPIOs to root port node
Moves the PCIe phy reference and the perst/wake GPIO properties from the RC controller node to the root port node. Also renames perst-gpios to reset-gpios to match the root port binding context.
Quoted 3 lines
arch/arm64/boot/dts/qcom/qcs615-ride.dts +0
-0
[ ... ]
Quoted 5 lines
arch/arm64/boot/dts/qcom/qcs615-ride.dts +0
-1@@ -444,15 +444,17 @@ &mdss_dsi0_phy { }; &pcie { - perst-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>;
arch/arm64/boot/dts/qcom/qcs615-ride.dts &mdss_dsi0_phy { · line 454
Quoted 10 lines
arch/arm64/boot/dts/qcom/qcs615-ride.dts +2
-2- wake-gpios = <&tlmm 100 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie_default_state>; pinctrl-names = "default"; status = "okay"; }; +&pcie_port0 { + reset-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>;
[Severity: High]
This is a pre-existing issue, but will moving these GPIOs here make it highly likely to trigger a PHY resource leak during probe deferral?
In drivers/pci/controller/dwc/pcie-qcom.c, qcom_pcie_parse_port() initializes the PHY before parsing the perst GPIOs:
drivers/pci/controller/dwc/pcie-qcom.c:qcom_pcie_parse_port() {
...
ret = phy_init(phy);
if (ret)
return ret;
INIT_LIST_HEAD(&port->perst);
ret = qcom_pcie_parse_perst(pcie, port, node);
if (ret)
return ret;
port->phy = phy;
INIT_LIST_HEAD(&port->list);
list_add_tail(&port->list, &pcie->ports);
}If the newly moved reset-gpios cause qcom_pcie_parse_perst() to return -EPROBE_DEFER, the function exits before adding the newly allocated port to the pcie->ports list.
Since the cleanup routine qcom_pcie_parse_ports() iterates over the pcie->ports list to call phy_exit(), does this mean the initialized PHY reference (and its underlying clocks/regulators) will be permanently leaked on every probe deferral?
Quoted 3 lines
arch/arm64/boot/dts/qcom/qcs615-ride.dts +3
-0+ wake-gpios = <&tlmm 100 GPIO_ACTIVE_LOW>; +}; +
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=34
PATCH v2 35/37 arm64: dts: qcom: sm8650: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys and phy-names from the controller to the existing pcieport0 and pcie1_port0, allowing board-level overrides. Move perst-gpios/wake-gpios from the controller overrides to the respective port nodes in the board files, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/sm8650-ayaneo-pocket-s2.dts | 14 ++++++++------ arch/arm64/boot/dts/qcom/sm8650-hdk.dts | 14 ++++++++------ arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 16 ++++++++++------ arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 6 +++--- arch/arm64/boot/dts/qcom/sm8650.dtsi | 10 ++++------ 5 files changed, 33 insertions(+), 27 deletions(-)
arch/arm64/boot/dts/qcom/sm8650-ayaneo-pocket-s2.dts +8 -6
@@ -1074,9 +1074,6 @@ &mdss_dp0_out { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default";
@@ -1084,6 +1081,9 @@ &pcie0 { }; &pcieport0 { + reset-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; + wifi@0 { compatible = "pci17cb,1107"; reg = <0x10000 0x0 0x0 0x0 0x0>;
@@ -1108,15 +1108,17 @@ &pcie0_phy { }; &pcie1 { - wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie1_default_state>; pinctrl-names = "default"; status = "okay"; }; +&pcie1_port0 { + reset-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; +}; + &pcie1_port0 { /* Renesas μPD720201 PCIe USB3.0 HOST CONTROLLER */ usb-controller@0 {
arch/arm64/boot/dts/qcom/sm8650-hdk.dts +8 -6
@@ -942,9 +942,6 @@ &mdss_dp0 { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default";
@@ -952,6 +949,9 @@ &pcie0 { }; &pcieport0 { + reset-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; + wifi@0 { compatible = "pci17cb,1107"; reg = <0x10000 0x0 0x0 0x0 0x0>;
@@ -976,15 +976,17 @@ &pcie0_phy { }; &pcie1 { - wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie1_default_state>; pinctrl-names = "default"; status = "okay"; }; +&pcie1_port0 { + reset-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; +}; + &pcie1_phy { vdda-phy-supply = <&vreg_l3e_0p9>; vdda-pll-supply = <&vreg_l3i_1p2>;
arch/arm64/boot/dts/qcom/sm8650-mtp.dts +10 -6
@@ -642,15 +642,17 @@ &mdss_dsi0_phy { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default"; status = "okay"; }; +&pcieport0 { + reset-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; +}; + &pcie0_phy { vdda-phy-supply = <&vreg_l1i_0p88>; vdda-pll-supply = <&vreg_l3i_1p2>;
@@ -659,15 +661,17 @@ &pcie0_phy { }; &pcie1 { - wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie1_default_state>; pinctrl-names = "default"; status = "okay"; }; +&pcie1_port0 { + reset-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; +}; + &pcie1_phy { vdda-phy-supply = <&vreg_l3e_0p9>; vdda-pll-supply = <&vreg_l3i_1p2>;
arch/arm64/boot/dts/qcom/sm8650-qrd.dts +3 -3
@@ -936,9 +936,6 @@ &mdss_dp0 { }; &pcie0 { - wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_default_state>; pinctrl-names = "default";
@@ -946,6 +943,9 @@ &pcie0 { }; &pcieport0 { + reset-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_LOW>; + wifi@0 { compatible = "pci17cb,1107"; reg = <0x10000 0x0 0x0 0x0 0x0>;
arch/arm64/boot/dts/qcom/sm8650.dtsi +4 -6
@@ -3644,9 +3644,6 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, num-lanes = <2>; bus-range = <0 0xff>; - phys = <&pcie0_phy>; - phy-names = "pciephy"; - #address-cells = <3>; #size-cells = <2>; ranges = <0x01000000 0 0x00000000 0 0x60200000 0 0x100000>,
@@ -3716,6 +3713,8 @@ pcieport0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; }; };
@@ -3837,9 +3836,6 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, num-lanes = <2>; bus-range = <0 0xff>; - phys = <&pcie1_phy>; - phy-names = "pciephy"; - dma-coherent; #address-cells = <3>;
@@ -3925,6 +3921,8 @@ pcie1_port0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie1_phy>; }; };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 35/37] arm64: dts: qcom: sm8650: Move PCIe phy and GPIOs to root port node
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] Commit message inaccuracy: `phy-names` is deleted rather than moved. - [Low] Duplicate…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Commit message inaccuracy: phy-names is deleted rather than moved.
- [Low] Duplicate &pcie1_port0 node override blocks in sm8650-ayaneo-pocket-s2.dts. --
commit b4d125e6d9f71b5d8465461d136dd4a316c95248
Author: Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: sm8650: Move PCIe phy and GPIOs to root port node
This commit moves PCIe PHY references and perst/wake GPIO properties from the RC controller node to the root port nodes across several sm8650 device trees. It also renames perst-gpios to reset-gpios to match the bindings.
Quoted 4 lines
The PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys and phy-names from the controller to the existing pcieport0 and
pcie1_port0, allowing board-level
[Severity: Medium]
The commit message states that both phys and phy-names are moved to the port nodes. However, looking at the diff for sm8650.dtsi below, the phy-names property is deleted from the controller but never added to the port node.
Could the commit message be updated to reflect that phy-names is being dropped, or should phy-names also be added to the port nodes?
Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8650-ayaneo-pocket-s2.dts +0
-0
[ ... ]
Quoted 11 lines
arch/arm64/boot/dts/qcom/sm8650-ayaneo-pocket-s2.dts +0
-3@@ -1108,15 +1108,17 @@ &pcie0_phy { }; &pcie1 { - wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; - perst-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie1_default_state>; pinctrl-names = "default"; status = "okay";
arch/arm64/boot/dts/qcom/sm8650-ayaneo-pocket-s2.dts &pcie0_phy { · line 1124
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8650-ayaneo-pocket-s2.dts +5
-0}; +&pcie1_port0 { + reset-gpios = <&tlmm 97 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; +}; + &pcie1_port0 { /* Renesas μPD720201 PCIe USB3.0 HOST CONTROLLER */ usb-controller@0 {
[Severity: Low]
This isn't a functional bug since the device tree compiler will merge these blocks, but does this leave two adjacent &pcie1_port0 override blocks?
Would it be better to consolidate the reset-gpios and wake-gpios into the existing &pcie1_port0 block right below this to keep the tree tidy?
Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8650.dtsi +0
-0
[ ... ]
Quoted 18 lines
arch/arm64/boot/dts/qcom/sm8650.dtsi +2
-3@@ -3644,9 +3644,6 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, num-lanes = <2>; bus-range = <0 0xff>; - phys = <&pcie0_phy>; - phy-names = "pciephy"; - #address-cells = <3>; #size-cells = <2>; ranges = <0x01000000 0 0x00000000 0 0x60200000 0 0x100000>,@@ -3716,6 +3713,8 @@ pcieport0: pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pcie0_phy>; }; };
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=35
PATCH v2 36/37 arm64: dts: qcom: kodiak: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst/wake GPIO properties are per-root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys from the controller to pcie0_port and pcie1_port0, and move perst-gpios/wake-gpios from the &pcie0/&pcie1 controller overrides to the respective &pcie0_port/&pcie1_port0 nodes in the board files, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/kodiak.dtsi | 10 ++++------ arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts | 15 ++++++++++----- arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts | 16 ++++++++++------ .../dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso | 4 ++-- arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 4 ++-- .../boot/dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts | 14 ++++++++------ .../arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts | 16 ++++++++++------ arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 5 ++++- arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 5 ++++- 9 files changed, 54 insertions(+), 35 deletions(-)
arch/arm64/boot/dts/qcom/kodiak.dtsi +4 -6
@@ -2286,9 +2286,6 @@ pcie0: pcie@1c00000 { power-domains = <&gcc GCC_PCIE_0_GDSC>; - phys = <&pcie0_phy>; - phy-names = "pciephy"; - pinctrl-names = "default"; pinctrl-0 = <&pcie0_clkreq_n>; dma-coherent;
@@ -2300,6 +2297,8 @@ pcie0_port: pcie@0 { reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>; + phys = <&pcie0_phy>; + #address-cells = <3>; #size-cells = <2>; ranges;
@@ -2416,9 +2415,6 @@ pcie1: pcie@1c08000 { power-domains = <&gcc GCC_PCIE_1_GDSC>; - phys = <&pcie1_phy>; - phy-names = "pciephy"; - pinctrl-names = "default"; pinctrl-0 = <&pcie1_clkreq_n>;
@@ -2434,6 +2430,8 @@ pcie1_port0: pcie@0 { reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>; + phys = <&pcie1_phy>; + #address-cells = <3>; #size-cells = <2>; ranges;
arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts +10 -5
@@ -545,15 +545,17 @@ &mdss_dp_out { }; &pcie0 { - perst-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_reset_n>, <&pcie0_wake_n>, <&pcie0_clkreq_n>; pinctrl-names = "default"; status = "okay"; }; +&pcie0_port { + reset-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; +}; + &pcie0_phy { vdda-phy-supply = <&vreg_l10c_0p88>; vdda-pll-supply = <&vreg_l6b_1p2>;
@@ -562,8 +564,6 @@ &pcie0_phy { }; &pcie1 { - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie1_reset_n>, <&pcie1_wake_n>, <&pcie1_clkreq_n>; pinctrl-names = "default";
@@ -572,6 +572,11 @@ &pcie1 { status = "okay"; }; +&pcie1_port0 { + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>; +}; + &pcie1_phy { vdda-phy-supply = <&vreg_l10c_0p88>; vdda-pll-supply = <&vreg_l6b_1p2>;
arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts +10 -6
@@ -522,15 +522,17 @@ &lpass_va_macro { }; &pcie0 { - perst-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_clkreq_n>, <&pcie0_reset_n>, <&pcie0_wake_n>; pinctrl-names = "default"; status = "okay"; }; +&pcie0_port { + reset-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>; +}; + &pcie0_phy { vdda-phy-supply = <&vreg_l10c_0p88>; vdda-pll-supply = <&vreg_l6b_1p2>;
@@ -539,9 +541,6 @@ &pcie0_phy { }; &pcie1 { - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie1_clkreq_n>, <&pcie1_reset_n>, <&pcie1_wake_n>; pinctrl-names = "default";
@@ -559,6 +558,11 @@ &pcie1 { status = "okay"; }; +&pcie1_port0 { + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>; +}; + &pcie1_phy { vdda-phy-supply = <&vreg_l10c_0p88>; vdda-pll-supply = <&vreg_l6b_1p2>;
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine.dtso +2 -2
@@ -49,8 +49,6 @@ st33htpm0: tpm@0 { }; &pcie0 { - perst-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_reset_n>, <&pcie0_wake_n>, <&pcie0_clkreq_n>; pinctrl-names = "default";
@@ -75,6 +73,8 @@ &pcie0_phy { }; &pcie0_port { + reset-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; + #address-cells = <3>; #size-cells = <2>;
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +2 -2
@@ -824,8 +824,6 @@ &mdss_edp_phy { }; &pcie1 { - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie1_reset_n>, <&pcie1_wake_n>, <&pcie1_clkreq_n>; pinctrl-names = "default";
@@ -850,6 +848,8 @@ &pcie1_phy { }; &pcie1_port0 { + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; + pcie@0,0 { compatible = "pci1179,0623"; reg = <0x10000 0x0 0x0 0x0 0x0>;
arch/arm64/boot/dts/qcom/qcs6490-thundercomm-minipc-g1iot.dts +8 -6
@@ -684,9 +684,6 @@ &mdss_dsi_phy { }; &pcie0 { - perst-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_clkreq_n>, <&pcie0_reset_n>, <&pcie0_wake_n>;
@@ -695,6 +692,11 @@ &pcie0 { status = "okay"; }; +&pcie0_port { + reset-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; +}; + &pcie0_phy { vdda-phy-supply = <&vreg_l10c_0p88>; vdda-pll-supply = <&vreg_l6b_1p2>;
@@ -703,9 +705,6 @@ &pcie0_phy { }; &pcie1 { - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie1_clkreq_n>, <&pcie1_reset_n>, <&pcie1_wake_n>;
@@ -732,6 +731,9 @@ &pcie1_phy { }; &pcie1_port0 { + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>; + pcie@0,0 { compatible = "pci1179,0623"; reg = <0x10000 0x0 0x0 0x0 0x0>;
arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts +10 -6
@@ -812,9 +812,6 @@ &mdss_dsi_phy { }; &pcie0 { - perst-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie0_clkreq_n>, <&pcie0_reset_n>, <&pcie0_wake_n>;
@@ -823,6 +820,11 @@ &pcie0 { status = "okay"; }; +&pcie0_port { + reset-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; +}; + &pcie0_phy { vdda-phy-supply = <&vreg_l10c_0p88>; vdda-pll-supply = <&vreg_l6b_1p2>;
@@ -831,9 +833,6 @@ &pcie0_phy { }; &pcie1 { - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie1_clkreq_n>, <&pcie1_reset_n>, <&pcie1_wake_n>;
@@ -842,6 +841,11 @@ &pcie1 { status = "okay"; }; +&pcie1_port0 { + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>; +}; + &pcie1_phy { vdda-phy-supply = <&vreg_l10c_0p88>; vdda-pll-supply = <&vreg_l6b_1p2>;
arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi +4 -1
@@ -472,10 +472,13 @@ &pcie1 { pinctrl-names = "default"; pinctrl-0 = <&pcie1_clkreq_n>, <&ssd_rst_l>, <&pe_wake_odl>; - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; vddpe-3v3-supply = <&pp3300_ssd>; }; +&pcie1_port0 { + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; +}; + &pm8350c_pwm { status = "okay"; };
arch/arm64/boot/dts/qcom/sc7280-idp.dtsi +4 -1
@@ -418,7 +418,6 @@ &lpass_va_macro { &pcie1 { status = "okay"; - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; vddpe-3v3-supply = <&nvme_3v3_regulator>;
@@ -426,6 +425,10 @@ &pcie1 { pinctrl-0 = <&pcie1_reset_n>, <&pcie1_wake_n>; }; +&pcie1_port0 { + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; +}; + &pcie1_phy { status = "okay";
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 36/37] arm64: dts: qcom: kodiak: Move PCIe phy and GPIOs to root port node
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Accidental reversion of PCIe wake GPIO polarity and undocumented property addition during…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Accidental reversion of PCIe wake GPIO polarity and undocumented property addition during relocation. --
commit cfdfc7bf6f1000a6c06f30a3d29926ca3f427856
Author: Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: kodiak: Move PCIe phy and GPIOs to root port node
This commit moves PCIe phy references and the perst/wake GPIO properties from the PCIe RC controller nodes to the root port nodes across several Qualcomm devicetrees, renaming perst-gpios to reset-gpios.
[ ... ]
Quoted 4 lines
arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts +0
-0
[ ... ]
Quoted 10 lines
arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts +0
-2@@ -562,8 +564,6 @@ &pcie0_phy { }; &pcie1 { - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&pcie1_reset_n>, <&pcie1_wake_n>, <&pcie1_clkreq_n>; pinctrl-names = "default";
arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts &pcie1 { · line 577
Quoted 6 lines
arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts +3
-0@@ -572,6 +572,11 @@ &pcie1 { status = "okay"; }; +&pcie1_port0 { + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>;
[Severity: Medium]
Was this new wake-gpios property intended here? The original pcie1 node did not define wake-gpios before the relocation.
Quoted 3 lines
arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts +2
-0+}; + &pcie1_phy {
[ ... ]
Quoted 10 lines
arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts +0
-2@@ -522,15 +522,17 @@ &lpass_va_macro { }; &pcie0 { - perst-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>;
arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts &lpass_va_macro { · line 533
Quoted 10 lines
arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts +3
-1- pinctrl-0 = <&pcie0_clkreq_n>, <&pcie0_reset_n>, <&pcie0_wake_n>; pinctrl-names = "default"; status = "okay"; }; +&pcie0_port { + reset-gpios = <&tlmm 87 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>;
[Severity: Medium]
Does this accidentally revert the wake-gpios polarity? The removed property specified GPIO_ACTIVE_LOW, but this new node specifies GPIO_ACTIVE_HIGH.
Quoted 3 lines
arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts +2
-0+}; + &pcie0_phy {
[ ... ]
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=36
PATCH v2 37/37 arm64: dts: qcom: msm8996: Move PCIe phy and GPIOs to root port node
In reply to Krishna Chaitanya ChundruThe PCIe phy reference and the perst/wake GPIO properties are per root port and belong in the root port node (pcie@0), not in the RC controller node. Move phys and phy-names from the controller to pcie0_port0, pcie1_port0, and pcie2_port0, adding labels to these nodes to allow board-level overrides. Move perst-gpios/wake-gpios from the controller overrides to the respective port nodes in the board files, renaming perst-gpios to reset-gpios to match the binding used in the root port context.
--- arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 15 ++++++++++++--- .../arm64/boot/dts/qcom/msm8996-oneplus-common.dtsi | 5 ++++- .../boot/dts/qcom/msm8996-sony-xperia-tone.dtsi | 7 +++++-- arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi | 4 +++- arch/arm64/boot/dts/qcom/msm8996.dtsi | 21 +++++++++------------ 5 files changed, 33 insertions(+), 19 deletions(-)
arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi +12 -3
@@ -458,23 +458,32 @@ hdmi_ddc_suspend: hdmi-ddc-suspend-state { &pcie0 { status = "okay"; - perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; vddpe-3v3-supply = <&wlan_en>; vdda-supply = <&vreg_l28a_0p925>; }; +&pcie0_port0 { + reset-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; +}; + &pcie1 { status = "okay"; - perst-gpios = <&tlmm 130 GPIO_ACTIVE_LOW>; vdda-supply = <&vreg_l28a_0p925>; }; +&pcie1_port0 { + reset-gpios = <&tlmm 130 GPIO_ACTIVE_LOW>; +}; + &pcie2 { status = "okay"; - perst-gpios = <&tlmm 114 GPIO_ACTIVE_LOW>; vdda-supply = <&vreg_l28a_0p925>; }; +&pcie2_port0 { + reset-gpios = <&tlmm 114 GPIO_ACTIVE_LOW>; +}; + &pcie_phy { status = "okay";
arch/arm64/boot/dts/qcom/msm8996-oneplus-common.dtsi +4 -1
@@ -210,12 +210,15 @@ &mss_pil { }; &pcie0 { - perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; vddpe-3v3-supply = <&wlan_en>; vdda-supply = <&vreg_l28a_0p925>; status = "okay"; }; +&pcie0_port0 { + reset-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; +}; + &pcie_phy { vdda-phy-supply = <&vreg_l28a_0p925>; vdda-pll-supply = <&vreg_l12a_1p8>;
arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi +5 -2
@@ -191,13 +191,16 @@ &mmcc { }; &pcie0 { - perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; vddpe-3v3-supply = <&wlan_en>; vdda-supply = <&pm8994_l28>; status = "okay"; }; +&pcie0_port0 { + reset-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; +}; + &pcie_phy { vdda-phy-supply = <&pm8994_l28>; vdda-pll-supply = <&pm8994_l12>;
arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi +3 -1
@@ -278,8 +278,10 @@ &pcie0 { /* Supplied by vdd_3v3, but choose wlan_en to drive enable pin high */ vddpe-3v3-supply = <&wlan_en>; vdda-supply = <&vreg_l28a_0p925>; +}; - perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; +&pcie0_port0 { + reset-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; };
arch/arm64/boot/dts/qcom/msm8996.dtsi +9 -12
@@ -1900,9 +1900,6 @@ pcie0: pcie@600000 { <0x0c100000 0x100000>; reg-names = "parf", "dbi", "elbi","config"; - phys = <&pciephy_0>; - phy-names = "pciephy"; - #address-cells = <3>; #size-cells = <2>; ranges = <0x01000000 0x0 0x00000000 0x0c200000 0x0 0x100000>,
@@ -1951,7 +1948,7 @@ pcie0: pcie@600000 { "bus_master", "bus_slave"; - pcie@0 { + pcie0_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -1959,6 +1956,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pciephy_0>; }; };
@@ -1977,9 +1976,6 @@ pcie1: pcie@608000 { reg-names = "parf", "dbi", "elbi","config"; - phys = <&pciephy_1>; - phy-names = "pciephy"; - #address-cells = <3>; #size-cells = <2>; ranges = <0x01000000 0x0 0x00000000 0x0d200000 0x0 0x100000>,
@@ -2028,7 +2024,7 @@ pcie1: pcie@608000 { "bus_master", "bus_slave"; - pcie@0 { + pcie1_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -2036,6 +2032,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pciephy_1>; }; };
@@ -2052,9 +2050,6 @@ pcie2: pcie@610000 { reg-names = "parf", "dbi", "elbi","config"; - phys = <&pciephy_2>; - phy-names = "pciephy"; - #address-cells = <3>; #size-cells = <2>; ranges = <0x01000000 0x0 0x00000000 0x0e200000 0x0 0x100000>,
@@ -2102,7 +2097,7 @@ pcie2: pcie@610000 { "bus_master", "bus_slave"; - pcie@0 { + pcie2_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
@@ -2110,6 +2105,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pciephy_2>; }; }; };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 37/37] arm64: dts: qcom: msm8996: Move PCIe phy and GPIOs to root port node
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The commit message claims to move both the 'phys' and 'phy-names' properties to the root port…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit message claims to move both the 'phys' and 'phy-names' properties to the root port nodes, but the patch actually deletes 'phy-names' entirely. --
commit baa70baca6b8bb3dd12472bf021f252ebb1f4c9c
Author: Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: msm8996: Move PCIe phy and GPIOs to root port node
This patch moves the PCIe phy reference and GPIO properties to the root port node from the RC controller node. It adjusts the device tree nodes and adds labels to allow board-level overrides for the root port context.
Quoted 14 lines
arch/arm64/boot/dts/qcom/msm8996.dtsi +0
-3@@ -1900,9 +1900,6 @@ pcie0: pcie@600000 { <0x0c100000 0x100000>; reg-names = "parf", "dbi", "elbi","config"; - phys = <&pciephy_0>; - phy-names = "pciephy"; - #address-cells = <3>; #size-cells = <2>; ranges = <0x01000000 0x0 0x00000000 0x0c200000 0x0 0x100000>,
[ ... ]
Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8996.dtsi +1
-1@@ -1951,7 +1948,7 @@ pcie0: pcie@600000 { "bus_master", "bus_slave"; - pcie@0 { + pcie0_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
arch/arm64/boot/dts/qcom/msm8996.dtsi pcie@0 { · line 1961
Quoted 6 lines
arch/arm64/boot/dts/qcom/msm8996.dtsi +2
-0@@ -1959,6 +1956,8 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + + phys = <&pciephy_0>; };
[Severity: Medium]
The commit message states "Move phys and phy-names from the controller to pcie0_port0, pcie1_port0, and pcie2_port0".
However, looking at the removal in pcie0 and the addition in pcie0_port0, it appears phy-names was deleted but not added to the new port nodes. The same pattern is present for pcie1_port0 and pcie2_port0.
Is the intention to drop the phy-names property completely because it is no longer needed by the new bindings? If so, could the commit message be updated to reflect that phy-names was removed rather than moved?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=37