From: Frank Li <Frank.li@nxp.com>
To: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
lpieralisi@kernel.org, kwilczynski@kernel.org, mani@kernel.org,
bhelgaas@google.com, linux-arm-kernel@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, yuji2.ishikawa@toshiba.co.jp
Subject: Re: [PATCH v2 1/2] arm64: dts: toshiba: Update SoC and PCIe ranges to reflect hardware behavior
Date: Tue, 5 Aug 2025 12:44:30 -0400 [thread overview]
Message-ID: <aJI07hBmKNrsGFv9@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <1754358421-12578-2-git-send-email-nobuhiro1.iwamatsu@toshiba.co.jp>
On Tue, Aug 05, 2025 at 10:47:00AM +0900, Nobuhiro Iwamatsu wrote:
> From: Frank Li <Frank.Li@nxp.com>
>
> tmpv7708 trim address bit[31:30] in tmpv7708 before passing to the PCIe
> controller. Since only PCIe controller needs to convert the address range
> 0x40000000 - 0x80000000, add a bus definition, describe the ranges in it,
> and move the PCIe definition.
>
> Prepare for the removal of the driver’s cpu_addr_fixup().
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> Suggested-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> ---
> v2:
> Update commit message.
> Fix range.
> Set true to use_parent_dt_ranges in pcie-visconti.c.
> move pcie under the dedicated sub-bus.
>
> arch/arm64/boot/dts/toshiba/tmpv7708.dtsi | 75 +++++++++++++---------
> drivers/pci/controller/dwc/pcie-visconti.c | 2 +
> 2 files changed, 47 insertions(+), 30 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/toshiba/tmpv7708.dtsi b/arch/arm64/boot/dts/toshiba/tmpv7708.dtsi
> index 39806f0ae5133..b754965a76ca6 100644
> --- a/arch/arm64/boot/dts/toshiba/tmpv7708.dtsi
> +++ b/arch/arm64/boot/dts/toshiba/tmpv7708.dtsi
> @@ -478,37 +478,52 @@ pwm: pwm@241c0000 {
> status = "disabled";
> };
>
> - pcie: pcie@28400000 {
> - compatible = "toshiba,visconti-pcie";
> - reg = <0x0 0x28400000 0x0 0x00400000>,
> - <0x0 0x70000000 0x0 0x10000000>,
> - <0x0 0x28050000 0x0 0x00010000>,
> - <0x0 0x24200000 0x0 0x00002000>,
> - <0x0 0x24162000 0x0 0x00001000>;
> - reg-names = "dbi", "config", "ulreg", "smu", "mpu";
> - device_type = "pci";
> - bus-range = <0x00 0xff>;
> - num-lanes = <2>;
> - num-viewport = <8>;
> -
> - #address-cells = <3>;
> + pcie_bus: bus@24000000 {
> + compatible = "simple-bus";
> + #address-cells = <2>;
> #size-cells = <2>;
> - #interrupt-cells = <1>;
> - ranges = <0x81000000 0 0x40000000 0 0x40000000 0 0x00010000
> - 0x82000000 0 0x50000000 0 0x50000000 0 0x20000000>;
> - interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
> - <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
> - interrupt-names = "msi", "intr";
> - interrupt-map-mask = <0 0 0 7>;
> - interrupt-map =
> - <0 0 0 1 &gic GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH
> - 0 0 0 2 &gic GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH
> - 0 0 0 3 &gic GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH
> - 0 0 0 4 &gic GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
> - max-link-speed = <2>;
> - clocks = <&extclk100mhz>, <&pismu TMPV770X_CLK_PCIE_MSTR>, <&pismu TMPV770X_CLK_PCIE_AUX>;
> - clock-names = "ref", "core", "aux";
> - status = "disabled";
> + ranges = /* register 1:1 map */
> + <0x0 0x24000000 0x0 0x24000000 0x0 0x0C000000>,
> + /*
> + * bus fabric mask address bit 30 and 31 to 0
> + * before send to PCIe controller.
> + *
> + * PCIe map address 0 to cpu's 0x40000000
> + */
> + <0x0 0x00000000 0x0 0x40000000 0x0 0x40000000>;
> +
> + pcie: pcie@28400000 {
> + compatible = "toshiba,visconti-pcie";
> + reg = <0x0 0x28400000 0x0 0x00400000>,
> + <0x0 0x30000000 0x0 0x10000000>,
> + <0x0 0x28050000 0x0 0x00010000>,
> + <0x0 0x24200000 0x0 0x00002000>,
> + <0x0 0x24162000 0x0 0x00001000>;
> + reg-names = "dbi", "config", "ulreg", "smu", "mpu";
> + device_type = "pci";
> + bus-range = <0x00 0xff>;
> + num-lanes = <2>;
> + num-viewport = <8>;
> +
> + #address-cells = <3>;
> + #size-cells = <2>;
> + #interrupt-cells = <1>;
> + ranges = <0x81000000 0 0x00000000 0 0x00000000 0 0x00010000
> + 0x82000000 0 0x10000000 0 0x10000000 0 0x20000000>;
> + interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "msi", "intr";
> + interrupt-map-mask = <0 0 0 7>;
> + interrupt-map =
> + <0 0 0 1 &gic GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH
> + 0 0 0 2 &gic GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH
> + 0 0 0 3 &gic GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH
> + 0 0 0 4 &gic GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
> + max-link-speed = <2>;
> + clocks = <&extclk100mhz>, <&pismu TMPV770X_CLK_PCIE_MSTR>, <&pismu TMPV770X_CLK_PCIE_AUX>;
> + clock-names = "ref", "core", "aux";
> + status = "disabled";
> + };
> };
> };
> };
> diff --git a/drivers/pci/controller/dwc/pcie-visconti.c b/drivers/pci/controller/dwc/pcie-visconti.c
> index cdeac6177143c..2a724ab587f78 100644
> --- a/drivers/pci/controller/dwc/pcie-visconti.c
> +++ b/drivers/pci/controller/dwc/pcie-visconti.c
> @@ -310,6 +310,8 @@ static int visconti_pcie_probe(struct platform_device *pdev)
>
> platform_set_drvdata(pdev, pcie);
>
> + pci->use_parent_dt_ranges = true;
> +
This change belong to PATCH 2. It still works with old driver after add
pci-bus in dts, just a warning will print.
Frank
> return visconti_add_pcie_port(pcie, pdev);
> }
>
> --
> 2.49.0
>
>
next prev parent reply other threads:[~2025-08-05 17:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 1:46 [PATCH v2 0/2] pci: clean up cpu_addr_fixup() for visconti Nobuhiro Iwamatsu
2025-08-05 1:47 ` [PATCH v2 1/2] arm64: dts: toshiba: Update SoC and PCIe ranges to reflect hardware behavior Nobuhiro Iwamatsu
2025-08-05 16:44 ` Frank Li [this message]
2025-09-08 1:01 ` nobuhiro.iwamatsu.x90
2025-08-05 1:47 ` [PATCH v2 2/2] PCI: dwc: visconti: Remove cpu_addr_fix() after DTS fix ranges Nobuhiro Iwamatsu
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=aJI07hBmKNrsGFv9@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=bhelgaas@google.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=nobuhiro1.iwamatsu@toshiba.co.jp \
--cc=robh@kernel.org \
--cc=yuji2.ishikawa@toshiba.co.jp \
/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