Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Varadarajan Narayanan" <varadarajan.narayanan@oss.qualcomm.com>
Cc: krzk+dt@kernel.org, devicetree@vger.kernel.org,
	linux-pci@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH 2/2] arm64: dts: qcom: ipq5210: Enable PCIe support
Date: Thu, 14 May 2026 12:33:40 +0000	[thread overview]
Message-ID: <20260514123341.36928C2BCB3@smtp.kernel.org> (raw)
In-Reply-To: <20260514-pci-ipq5210-v1-2-a09436200b35@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] The 'phys' property is incorrectly placed in the PCIe Root Port child node rather than the main PCIe controller node.
- [Medium] Dummy fixed clocks are used for the PCIe pipe clocks instead of the actual PHY nodes.
- [Medium] The `ranges` property in `pcie0` and `pcie1` incorrectly sets the child PCI address for I/O space to match the CPU address.
- [Low] The `pcie0` and `pcie1` nodes define `pinctrl-0` but omit the `pinctrl-names` property.
--

commit 6a61b5c948b9e28a9b86554a5e888347a3c559ab
Author: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>

arm64: dts: qcom: ipq5210: Enable PCIe support

Add DT entries to enable the PCIe controllers found in ipq5210.

> diff --git a/arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts b/arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts
> index 941f866ecfe95..5e599a1cea3f4 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts
> +++ b/arch/arm64/boot/dts/qcom/ipq5210-rdp504.dts
[ ... ]
> @@ -20,6 +21,32 @@ chosen {
>  	};
>  };
>  
> +&pcie0_phy {
> +	status = "okay";
> +};
> +
> +&pcie0_rp {
> +	reset-gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
> +};
> +
> +&pcie0 {
> +	pinctrl-0 = <&pcie0_default_state>;

Should this node also include a pinctrl-names property?

Omitting pinctrl-names = "default" might trigger validation warnings, even
if the pinctrl core falls back to index 0.

> +	status = "okay";
> +};
> +
> +&pcie1_phy {
> +	status = "okay";
> +};
> +
> +&pcie1_rp {
> +	reset-gpios = <&tlmm 29 GPIO_ACTIVE_LOW>;
> +};
> +
> +&pcie1 {
> +	pinctrl-0 = <&pcie1_default_state>;

Similarly, should pinctrl-names = "default" be added here?

> +	status = "okay";
> +};
> +
>  &sdhc {
>  	max-frequency = <192000000>;
>  	bus-width = <4>;
> diff --git a/arch/arm64/boot/dts/qcom/ipq5210.dtsi b/arch/arm64/boot/dts/qcom/ipq5210.dtsi
> index 3761eb03ab246..ec1c9a8c08e0a 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5210.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq5210.dtsi
[ ... ]
> @@ -13,6 +14,18 @@ / {
>  	interrupt-parent = <&intc>;
>  
>  	clocks {
> +		pcie30_phy0_pipe_clk: pcie30_phy0_pipe_clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <250000000>;
> +			#clock-cells = <0>;
> +		};
> +
> +		pcie30_phy1_pipe_clk: pcie30_phy1_pipe_clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <250000000>;
> +			#clock-cells = <0>;
> +		};
> +

Is it intentional to use dummy fixed clocks for the PCIe pipe clocks here?

The PCIe PHY nodes below (pcie0_phy, pcie1_phy) are correctly configured as
clock providers (#clock-cells = <0> and clock-output-names).

Hardcoding these as fixed clocks severs the dependency graph, so the GCC might
not establish a parent-child relationship with the PHY. Could this allow the
clock to be enabled without the PHY being powered on?

[ ... ]
> +		pcie1: pcie@50000000 {
[ ... ]
> +			#size-cells = <2>;
> +
> +			ranges = <0x81000000 0x0 0x50200000 0x0 0x50200000 0x0 0x00100000>,

Does this I/O space mapping correctly set the PCI child address?

This maps the CPU address 0x50200000 to PCI I/O address 0x50200000, but standard
PCI architectures typically expect the I/O port address space to start at
address 0 on the PCI bus side.

Should it translate the CPU I/O base address to the PCI I/O address 0?

> +				 <0x82000000 0x0 0x50300000 0x0 0x50300000 0x0 0x0fd00000>;
[ ... ]
> +			pcie1_rp: pcie@0 {
> +				device_type = "pci";
> +				reg = <0x0 0x0 0x0 0x0 0x0>;
> +				bus-range = <0x01 0xff>;
> +				phys = <&pcie1_phy>;

Should the phys property be placed in the main PCIe controller node instead
of the Root Port child node?

The Qualcomm PCIe controller driver expects to find the phys property in the
main controller node using devm_phy_optional_get(dev, "pciephy").

If it is placed in the child node, devm_phy_optional_get() might return NULL
and silently bypass PHY initialization.

> +
> +				#address-cells = <3>;
> +				#size-cells = <2>;
> +				ranges;
> +			};
> +		};
> +
> +		pcie0: pcie@70000000 {
[ ... ]
> +			#size-cells = <2>;
> +
> +			ranges = <0x81000000 0x0 0x70200000 0x0 0x70200000 0x0 0x00100000>,

Similar to pcie1, should this I/O space mapping translate the CPU I/O base
address to the PCI I/O address 0 instead of matching the CPU address?

> +				 <0x82000000 0x0 0x70300000 0x0 0x70300000 0x0 0x0fd00000>;
[ ... ]
> +			pcie0_rp: pcie@0 {
> +				device_type = "pci";
> +				reg = <0x0 0x0 0x0 0x0 0x0>;
> +				bus-range = <0x01 0xff>;
> +				phys = <&pcie0_phy>;

Also similarly here, should this phys property belong to the parent pcie0
node instead of the pcie0_rp child node?

> +
> +				#address-cells = <3>;
> +				#size-cells = <2>;
> +				ranges;
> +			};
> +		};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260514-pci-ipq5210-v1-0-a09436200b35@oss.qualcomm.com?part=2

      reply	other threads:[~2026-05-14 12:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14  4:13 [PATCH 0/2] Enable PCIe controllers present in Qualcomm ipq5210 Varadarajan Narayanan
2026-05-14  4:13 ` [PATCH 1/2] dt-bindings: PCI: qcom,pcie-ipq9574: Document the ipq5210 pcie controller Varadarajan Narayanan
2026-05-14  4:13 ` [PATCH 2/2] arm64: dts: qcom: ipq5210: Enable PCIe support Varadarajan Narayanan
2026-05-14 12:33   ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260514123341.36928C2BCB3@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=varadarajan.narayanan@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox