From: Niklas Cassel <cassel@kernel.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Jesper Nilsson" <jesper.nilsson@axis.com>,
"Frank Li" <Frank.Li@nxp.com>,
"Lars Persson" <lars.persson@axis.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
linux-arm-kernel@axis.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH RFC NOT TESTED 0/2] PCI: artpec6: Try to clean up artpec6_pcie_cpu_addr_fixup()
Date: Tue, 18 Mar 2025 10:01:48 +0100 [thread overview]
Message-ID: <Z9k2fLFU3UCubK97@ryzen> (raw)
In-Reply-To: <20250317175419.GA933527@bhelgaas>
Hello Bjorn, Jesper,
On Mon, Mar 17, 2025 at 12:54:19PM -0500, Bjorn Helgaas wrote:
> On Mon, Mar 10, 2025 at 05:47:03PM +0100, Jesper Nilsson wrote:
> > I've now tested this patch-set together with your v9 on-top of the
> > next-branch of the pci tree, and seems to be working good on my
> > ARTPEC-6 set as RC:
> >
> > # lspci
> > 00:00.0 PCI bridge: Renesas Technology Corp. Device 0024
> > 01:00.0 PCI bridge: Pericom Semiconductor PI7C9X2G304 EL/SL PCIe2 3-Port/4-Lane Packet Switch (rev 05)
> > 02:01.0 PCI bridge: Pericom Semiconductor PI7C9X2G304 EL/SL PCIe2 3-Port/4-Lane Packet Switch (rev 05)
> > 02:02.0 PCI bridge: Pericom Semiconductor PI7C9X2G304 EL/SL PCIe2 3-Port/4-Lane Packet Switch (rev 05)
> > 03:00.0 Non-Volatile memory controller: Phison Electronics Corporation E18 PCIe4 NVMe Controller (rev 01)
> >
> > However, when running as EP, I found that the DT setup for pcie_ep
> > wasn't correct:
> >
> > diff --git a/arch/arm/boot/dts/axis/artpec6.dtsi b/arch/arm/boot/dts/axis/artpec6.dtsi
> > index 399e87f72865..6d52f60d402d 100644
> > --- a/arch/arm/boot/dts/axis/artpec6.dtsi
> > +++ b/arch/arm/boot/dts/axis/artpec6.dtsi
> > @@ -195,8 +195,8 @@ pcie: pcie@f8050000 {
> >
> > pcie_ep: pcie_ep@f8050000 {
> > compatible = "axis,artpec6-pcie-ep", "snps,dw-pcie";
> > - reg = <0xf8050000 0x2000
> > - 0xf8051000 0x2000
> > + reg = <0xf8050000 0x1000
> > + 0xf8051000 0x1000
> > 0xf8040000 0x1000
> > 0x00000000 0x20000000>;
> > reg-names = "dbi", "dbi2", "phy", "addr_space";
> >
> > Even with this fix, I get a panic in dw_pcie_read_dbi() in EP-setup,
> > both with and without:
Your fix looks correct to me.
You should even be able keep dbi as 0x2000, and simply remove the dbi2
from "reg" and "reg-names", as the driver should be able to infer dbi2
automatically:
https://github.com/torvalds/linux/blob/v6.14-rc7/drivers/pci/controller/dwc/pcie-designware.c#L119-L128
But your fix seems more correct.
You should probably also change the size of "dbi" to 0x1000 in the RC node.
For the panic, could you please share the stack trace?
(Perhaps we can help)
> >
> > "PCI: artpec6: Use use_parent_dt_ranges and clean up artpec6_pcie_cpu_addr_fixup()"
> >
> > so it looks like the ARTPEC-6 EP functionality wasn't completely tested
> > with this config.
> >
> > The ARTPEC-7 variant does work as EP with our local config, I'll try
> > to see what I can do to correct ARTPEC-6 using the setup for ARTPEC-7,
> > and test your patchset on the ARTPEC-7.
>
> Where are we at with this?
My recommendation would be to:
1) Get artpec6 EP mode working with v6.14-rc7
2) Try v6.14-rc7 + v12 of Frank's series
3) Try v6.14-rc7 + v12 of Frank's series + this series
>
> First priority: I plan to merge v12 of Frank's series [1] for v6.15.
> I hope this works with existing DTs on artpec6, both for RC and EP.
> If not, we need to figure it out ASAP.
>
> Second priority: For this series of:
>
> ARM: dts: artpec6: Move PCIe nodes under bus@c0000000
> PCI: artpec6: Use use_parent_dt_ranges and clean up artpec6_pcie_cpu_addr_fixup()
>
> it looks like there's an open issue with the dts patch that Rob
> noticed [2]. It would be great if we could fix that issue and get it
> queued up if it's safe to merge independently of Frank's v12 series.
Rob's bot is simply complaining that there is no DT schema.
This is because the DT schema for axis,artpec6-pcie has not been
converted to YAML.
It would be nice to convert it, but I don't think it should stop
other improvements for this driver.
> It looks like the artpec6_pcie_cpu_addr_fixup() removal probably needs
> to be delayed until we know all DTs in the field are fixed? This
> might mean that we can *never* remove artpec6_pcie_cpu_addr_fixup()
> unless we can identify and work around the broken DTs in the kernel.
Jesper should be able to answer this, but as far as I know, artpec6 is only
used in-house, so they have full control of the DTBs.
(i.e. artpec6_pcie_cpu_addr_fixup() can probably be killed quite quickly,
once "v6.14-rc7 + v12 of Frank's series + this series" gets working.)
Kind regards,
Niklas
next prev parent reply other threads:[~2025-03-18 9:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 17:49 [PATCH RFC NOT TESTED 0/2] PCI: artpec6: Try to clean up artpec6_pcie_cpu_addr_fixup() Frank Li
2025-03-04 17:49 ` [PATCH RFC NOT TESTED 1/2] ARM: dts: artpec6: Move PCIe nodes under bus@c0000000 Frank Li
2025-03-04 17:49 ` [PATCH RFC NOT TESTED 2/2] PCI: artpec6: Use use_parent_dt_ranges and clean up artpec6_pcie_cpu_addr_fixup() Frank Li
2025-03-04 19:08 ` Bjorn Helgaas
2025-03-04 20:12 ` Frank Li
2025-03-04 20:31 ` Bjorn Helgaas
2025-03-04 21:02 ` Frank Li
2025-03-05 11:18 ` [PATCH RFC NOT TESTED 0/2] PCI: artpec6: Try to " Niklas Cassel
2025-03-05 11:26 ` Niklas Cassel
2025-03-05 15:33 ` Jesper Nilsson
2025-03-10 16:47 ` Jesper Nilsson
2025-03-10 20:45 ` Frank Li
2025-03-17 17:54 ` Bjorn Helgaas
2025-03-18 9:01 ` Niklas Cassel [this message]
2025-03-20 21:54 ` Bjorn Helgaas
2025-03-21 17:17 ` Jesper Nilsson
2025-03-21 17:54 ` Bjorn Helgaas
2025-03-11 15:19 ` Rob Herring (Arm)
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=Z9k2fLFU3UCubK97@ryzen \
--to=cassel@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=bhelgaas@google.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=helgaas@kernel.org \
--cc=jesper.nilsson@axis.com \
--cc=krzk+dt@kernel.org \
--cc=kw@linux.com \
--cc=lars.persson@axis.com \
--cc=linux-arm-kernel@axis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=robh@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).