[PATCH 11/11] arm64: dts: qcom: nord: Add PCIe endpoint nodes

sashiko-bot at kernel.org sashiko-bot at kernel.org
Sat Nov 21 19:17:02 PST 2026


Thank you for your contribution! Sashiko AI review found 6 potential
issues to consider:
- [High] arm64: dts: qcom: nord: overlapping atu and msix reg regions in
  pcie0_ep
- [High] arm64: dts: qcom: nord: non-power-of-2 msix BAR size in
  pcie0_ep
- [High] arm64: dts: qcom: nord: missing msix reg region in
  pcie1_ep..pcie3_ep
- [Medium] arm64: dts: qcom: nord: missing num-lanes = <8> property in
  pcie0_ep
- [Medium] arm64: dts: qcom: nord: 1 MB addr_space reg size in
  pcie1_ep..pcie3_ep
- [Low] arm64: dts: qcom: nord: missing gpio.h include in
  nord-embedded.dtsi
--

commit 2599e7213b15292427fa12c65b538dbb750cb433
Author: Krishna Chaitanya Chundru <krishna.chundru at oss.qualcomm.com>

arm64: dts: qcom: nord: Add PCIe endpoint nodes

This commit adds the pcie0_ep..pcie3_ep endpoint controller nodes and
their pin control states for the four PCIe instances on Nord.

> diff --git a/arch/arm64/boot/dts/qcom/nord-embedded.dtsi b/arch/arm64/boot/dts/qcom/nord-embedded.dtsi
> index e6d0bd21744e2..829fc63681c1d 100644
> --- a/arch/arm64/boot/dts/qcom/nord-embedded.dtsi
> +++ b/arch/arm64/boot/dts/qcom/nord-embedded.dtsi
> @@ -1638,6 +1638,287 @@ pcie_phy: phy at 1b00000 {
>  		status = "disabled";
>  	};
>  
> +	pcie0_ep: pcie-ep at 1b80000 {
> +		compatible = "qcom,nord-pcie-ep";
> +
> +		reg = <0x00 0x01b80000 0x00 0x00004000>,
> +		      <0x00 0x40000000 0x00 0x00000f20>,
> +		      <0x00 0x40000f20 0x00 0x000000a8>,
> +		      <0x00 0x40010000 0x00 0x00020000>,

[Severity: High]
Should the atu region size in pcie0_ep be 0x00010000 (like
pcie1_ep..pcie3_ep) instead of 0x00020000?

With a size of 0x00020000, the atu region spans 0x40010000..0x4002ffff and
overlaps the msix region at 0x40020000..0x400213ff.
dw_pcie_get_resources() claims the full range in iomem_resource via
devm_ioremap_resource() and sets pci->atu_size = 0x20000, which causes
dw_pcie_iatu_detect() to probe unrolled iATU indices 128..255 at
0x40020000..0x4002ffff and write test patterns (0x11110000) into the MSI-X
BAR memory space.

> +		      <0x00 0x40100000 0x00 0x0ff00000>,
> +		      <0x00 0x01b84000 0x00 0x00001000>,
> +		      <0x00 0x40030000 0x00 0x00010000>,
> +		      <0x00 0x40020000 0x00 0x00001400>;
> +		reg-names = "parf",
> +			    "dbi",
> +			    "elbi",
> +			    "atu",
> +			    "addr_space",
> +			    "mmio",
> +			    "dma",
> +			    "msix";

[Severity: High]
Does the 0x00001400 msix region size cause pci_epc_set_bar() to fail with
-EINVAL?

pci_epf_mhi_bind() records resource_size(res) of the "msix" resource as
epf_mhi->msix_size, and pci_epf_mhi_epc_init() passes that directly as
msix_bar->size to pci_epc_set_bar(), which requires a power-of-2 BAR size:

drivers/pci/endpoint/pci-epc-core.c:pci_epc_set_bar() {
    ...
	if (!is_power_of_2(epf_bar->size))
		return -EINVAL;
    ...
}

[ ... ]

> +		phys = <&pcie_phy 0>;
> +		phy-names = "pciephy";
> +
> +		reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
> +		wake-gpios = <&tlmm 0 GPIO_ACTIVE_LOW>;

[Severity: Low]
These nodes introduce the first uses of GPIO_ACTIVE_LOW in
nord-embedded.dtsi, but neither nord-embedded.dtsi nor nord.dtsi includes
<dt-bindings/gpio/gpio.h>.  Should nord-embedded.dtsi include
<dt-bindings/gpio/gpio.h> directly so it does not depend on inclusion order
in board .dts files?

> +
> +		pinctrl-0 = <&pcie0_ep_default>;
> +		pinctrl-names = "default";
> +
> +		linux,pci-domain = <0>;
> +
> +		status = "disabled";
> +	};

[Severity: Medium]
Is pcie0_ep missing num-lanes = <8>?

On Nord, pcie0 in nord.dtsi is the 8-lane port of the quadfurcated PHY and
specifies num-lanes = <8>, while pcie1_ep..pcie3_ep below specify
num-lanes = <4>, <2>, and <2>.  Without num-lanes on pcie0_ep,
dw_pcie_get_resources() leaves pci->num_lanes as 0 and
dw_pcie_link_set_max_link_width() skips programming PORT_LINK_CTRL,
LINK_WIDTH_SPEED_CTRL, and PCI_EXP_LNKCAP_MLW.

> +
> +	pcie1_ep: pcie-ep at 1b88000 {
> +		compatible = "qcom,nord-pcie-ep";
> +
> +		reg = <0x00 0x01b88000 0x00 0x00004000>,
> +		      <0x00 0x50000000 0x00 0x00000f20>,
> +		      <0x00 0x50000f20 0x00 0x000000a8>,
> +		      <0x00 0x50010000 0x00 0x00010000>,
> +		      <0x00 0x50100000 0x00 0x00100000>,

[Severity: Medium]
Should the addr_space size in pcie1_ep, pcie2_ep, and pcie3_ep be
0x0ff00000 (255 MB, matching pcie0_ep and the full outbound slave window in
nord.dtsi) instead of 0x00100000 (1 MB)?

dw_pcie_ep_init() passes the addr_space size to pci_epc_mem_init() as the
total outbound address pool, so a 1 MB size limits outbound iATU mappings on
pcie1_ep..pcie3_ep to 1020 KB after reserving ep->msi_mem.

> +		      <0x00 0x01b8c000 0x00 0x00001000>,
> +		      <0x00 0x50030000 0x00 0x00010000>;
> +		reg-names = "parf",
> +			    "dbi",
> +			    "elbi",
> +			    "atu",
> +			    "addr_space",
> +			    "mmio",
> +			    "dma";

[Severity: High]
Does omitting the "msix" reg entry on pcie1_ep, pcie2_ep, and pcie3_ep
cause pci_epf_mhi_epc_init() to fail with -EINVAL on those instances?

In drivers/pci/controller/dwc/pcie-qcom-ep.c, "qcom,nord-pcie-ep" maps to
cfg_nord with .msix_capable = true, and qcom_pcie_epc_get_features()
unconditionally reports msix_capable = true without checking whether an
"msix" resource exists.  When pci_epf_mhi is bound to pcie1_ep..pcie3_ep,
epf_mhi->msix_phys is 0 and pci_epf_mhi_epc_init() fails on PERST#
deassertion:

drivers/pci/endpoint/functions/pci-epf-mhi.c:pci_epf_mhi_epc_init() {
    ...
	if (epf_mhi->epc_features->msix_capable) {
		if (!epf_mhi->msix_phys) {
			dev_err(dev, "MSI-X BAR address not configured in DT\n");
			return -EINVAL;
		}
    ...
}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261122-nord_ep-v1-0-6d8839ffa9aa@oss.qualcomm.com?part=11



More information about the linux-phy mailing list