Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mrinmay Sarkar" <mrinmay.sarkar@oss.qualcomm.com>
Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/2] arm64: dts: qcom: nord: Enable PCIe controllers for GearVM variant
Date: Mon, 30 Nov 2026 12:53:32 +0000	[thread overview]
Message-ID: <sashiko-outbox-241102@kernel.org> (raw)
In-Reply-To: <20261130-nord-pcie-fw-dt-v1-2-117d03dedb1c@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] arm64: dts: qcom: nord-gearvm: invalid PCI I/O bus address in
  ranges
--

commit ad0f5ff027365730c5e407ace2981b409b13d1de
Author: Mrinmay Sarkar <mrinmay.sarkar@oss.qualcomm.com>

arm64: dts: qcom: nord: Enable PCIe controllers for GearVM variant

This commit adds GearVM-specific overrides for the Nord PCIe controllers,
expands the soc@0 address translation range, and enables PCIe0 and PCIe1
along with their SCMI power domains on the Nord RIDE platform.

> diff --git a/arch/arm64/boot/dts/qcom/nord-gearvm.dtsi b/arch/arm64/boot/dts/qcom/nord-gearvm.dtsi
> index 5514f9a6f49f5..b71f48e09d517 100644
> --- a/arch/arm64/boot/dts/qcom/nord-gearvm.dtsi
> +++ b/arch/arm64/boot/dts/qcom/nord-gearvm.dtsi
> @@ -2098,6 +2098,54 @@ &i2c20 {
>  			     "perf";
>  };
>  
> +&pcie0 {
> +	/delete-property/ num-lanes;
> +	/delete-property/ reg-names;
> +
> +	compatible = "qcom,nord-pcie-fw", "qcom,pcie-sa8255p";
> +	reg = <0x50 0x00000000 0x0 0x10000000>;
> +	ranges = <0x01000000 0x0 0x40000000 0x0 0x40000000 0x0 0x100000>,
> +		 <0x02000000 0x0 0x40100000 0x0 0x40100000 0x0 0x7000000>,
> +		 <0x43000000 0x50 0x10100000 0x50 0x10100000 0x8 0x00000000>;
> +	power-domains = <&scmi5_pd 0>;
> +};
> +
> +&pcie1 {
> +	/delete-property/ num-lanes;
> +	/delete-property/ reg-names;
> +
> +	compatible = "qcom,nord-pcie-fw", "qcom,pcie-sa8255p";
> +	reg = <0x48 0x00000000 0x0 0x10000000>;
> +	ranges = <0x01000000 0x0 0x50000000 0x0 0x50000000 0x0 0x100000>,
> +		 <0x02000000 0x0 0x50100000 0x0 0x50100000 0x0 0x7000000>,
> +		 <0x43000000 0x48 0x10100000 0x48 0x10100000 0x4 0x00000000>;
> +	power-domains = <&scmi6_pd 0>;
> +};
> +
> +&pcie2 {
> +	/delete-property/ num-lanes;
> +	/delete-property/ reg-names;
> +
> +	compatible = "qcom,nord-pcie-fw", "qcom,pcie-sa8255p";
> +	reg = <0x40 0x00000000 0x0 0x10000000>;
> +	ranges = <0x01000000 0x0 0x60000000 0x0 0x60000000 0x0 0x100000>,
> +		 <0x02000000 0x0 0x60100000 0x0 0x60100000 0x0 0x7000000>,
> +		 <0x43000000 0x40 0x10100000 0x40 0x10100000 0x4 0x00000000>;
> +	power-domains = <&scmi32_pd 0>;
> +};
> +
> +&pcie3 {
> +	/delete-property/ num-lanes;
> +	/delete-property/ reg-names;
> +
> +	compatible = "qcom,nord-pcie-fw", "qcom,pcie-sa8255p";
> +	reg = <0x4 0x00000000 0x0 0x10000000>;
> +	ranges = <0x01000000 0x0 0x70000000 0x0 0x70000000 0x0 0x100000>,
> +		 <0x02000000 0x0 0x70100000 0x0 0x70100000 0x0 0x7000000>,
> +		 <0x43000000 0x4 0x10100000 0x4 0x10100000 0x0 0x80000000>;
> +	power-domains = <&scmi33_pd 0>;
> +};

[Severity: Medium]
Should the PCI bus address in the I/O space (0x01000000) ranges entries
for pcie0 through pcie3 be 0x0 0x00000000 (as in nord.dtsi) instead of
matching the CPU physical address (0x40000000..0x70000000)?

When devm_of_pci_get_host_bridge_resources() parses an IORESOURCE_IO
range, of_pci_range_to_resource() converts range.cpu_addr into a logical
PIO port resource and pci_add_resource_offset() records the window offset
as res->start - range.pci_addr.  Setting the PCI child address to
0x40000000..0x70000000 causes pcibios_resource_to_bus() to translate
logical PIO resources to PCI bus I/O addresses starting at
0x40000000..0x70000000 rather than 0x0..0xfffff, breaking I/O port BAR
and bridge window assignment.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261130-nord-pcie-fw-dt-v1-0-117d03dedb1c@oss.qualcomm.com?part=2

      reply	other threads:[~2026-11-30 12:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 12:36 [PATCH 0/2] arm64: dts: qcom: Add PCIe support for Nord GearVM platforms Mrinmay Sarkar
2026-11-30 12:36 ` [PATCH 1/2] dt-bindings: PCI: qcom,pcie-sa8255p: Document Nord firmware-managed PCIe Mrinmay Sarkar
2026-11-30 12:36 ` [PATCH 2/2] arm64: dts: qcom: nord: Enable PCIe controllers for GearVM variant Mrinmay Sarkar
2026-11-30 12:53   ` 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=sashiko-outbox-241102@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mrinmay.sarkar@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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