From: Bjorn Helgaas <helgaas@kernel.org>
To: zhangsenchuan <zhangsenchuan@eswincomputing.com>
Cc: bhelgaas@google.com, lpieralisi@kernel.org,
kwilczynski@kernel.org, mani@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, p.zabel@pengutronix.de,
johan+linaro@kernel.org, quic_schintav@quicinc.com,
shradha.t@samsung.com, cassel@kernel.org,
thippeswamy.havalige@amd.com, mayank.rana@oss.qualcomm.com,
inochiama@gmail.com, ningyu@eswincomputing.com,
linmin@eswincomputing.com, pinkesh.vaghela@einfochips.com
Subject: Re: Re: [PATCH v2 1/2] dt-bindings: PCI: eic7700: Add Eswin eic7700 PCIe host controller
Date: Thu, 18 Sep 2025 12:13:31 -0500 [thread overview]
Message-ID: <20250918171331.GA1911330@bhelgaas> (raw)
In-Reply-To: <3e54d23b.14bf.1995b523ddf.Coremail.zhangsenchuan@eswincomputing.com>
On Thu, Sep 18, 2025 at 01:35:40PM +0800, zhangsenchuan wrote:
> > -----Original Messages-----
> > From: "Bjorn Helgaas" <helgaas@kernel.org>
> > On Fri, Aug 29, 2025 at 04:22:37PM +0800, zhangsenchuan@eswincomputing.com wrote:
> > > From: Senchuan Zhang <zhangsenchuan@eswincomputing.com>
> > >
> > > Add Device Tree binding documentation for the ESWIN EIC7700
> > > PCIe controller module,the PCIe controller enables the core
> > > to correctly initialize and manage the PCIe bus and connected
> > > devices.
> > > + resets = <&reset 8 (1 << 0)>,
> > > + <&reset 8 (1 << 1)>,
> > > + <&reset 8 (1 << 2)>;
> > > + reset-names = "cfg", "powerup", "pwren";
> > > + interrupts = <220>, <179>, <180>, <181>, <182>, <183>, <184>, <185>, <186>;
> > > + interrupt-names = "msi", "inta", "intb", "intc", "intd",
> > > + "inte", "intf", "intg", "inth";
> > > + interrupt-parent = <&plic>;
> > > + interrupt-map-mask = <0x0 0x0 0x0 0x7>;
> > > + interrupt-map = <0x0 0x0 0x0 0x1 &plic 179>,
> > > + <0x0 0x0 0x0 0x2 &plic 180>,
> > > + <0x0 0x0 0x0 0x3 &plic 181>,
> > > + <0x0 0x0 0x0 0x4 &plic 182>;
> > > + device_type = "pci";
> > > + num-lanes = <0x4>;
> >
> > num-lanes and perst are per-Root Port items. Please put anything
> > related specifically to the Root Port in its own stanza to make it
> > easier to support multiple Root Ports in future versions of the
> > hardware.
> >
> > See
> > https://lore.kernel.org/linux-pci/20250625221653.GA1590146@bhelgaas/
> > for examples of how to do this.
>
> Thank you very much for your review.
> I think the suggestions you put forward are very good,I placed
> perst in the root port as per your suggestion.
>
> I'm a bit confused about the "num-lanes" attribute. The "num-lanes"
> attribute will be parsed in the "pcie-designware.c" file. In the
> "pcie-designware-host.c" file, When our driver calls the
> dw_pcie_host_init function for initialization, the attribute
> "num_lanes" will be judged. If the attribute is available, use the
> value parsed from the device tree. If the attribute cannot be
> obtained from the node, the lanes supported by the hardware default
> will be obtained by reading the register.Can I avoid reparsing the
> num-lanes attribute?
>
> I saw vendors based on Synopsys implementation. They separated the
> root port node and did not place "num-lanes" in the root port node.
> For examples:
> hisilicon,kirin-pcie.yaml
> qcom,pcie-sc7280.yaml
> qcom,pcie-sa8255p.yaml
This is currently a problem because the DWC core doesn't know to look
for "num-lanes" in a Root Port node. Similar situation in the NXP
driver: https://lore.kernel.org/r/20250917212833.GA1873293@bhelgaas
Would it work for you to add a Root Port parser in eic7700, similar to
mvebu_pcie_parse_port() or qcom_pcie_parse_port() that would get
"num-lanes"?
It looks like that would keep the DWC core from setting num-lanes.
Eventually the DWC core should look first for a Root Port node before
falling back to the current behavior of looking in the host bridge
node. If/when that happens, we should be able to remove the num-lanes
parsing in eic7700 and similar drivers.
I'd like to separate the per-Root Port things in the devicetree from
the beginning because once devicetrees are out in the world, we
basically have to support their structure forever.
Bjorn
next prev parent reply other threads:[~2025-09-18 17:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 8:20 [PATCH v2 0/2] Add driver support for Eswin EIC7700 SoC PCIe controller zhangsenchuan
2025-08-29 8:22 ` [PATCH v2 1/2] dt-bindings: PCI: eic7700: Add Eswin eic7700 PCIe host controller zhangsenchuan
2025-09-01 5:19 ` Krzysztof Kozlowski
2025-09-18 3:15 ` zhangsenchuan
2025-09-19 4:41 ` Krzysztof Kozlowski
2025-09-01 6:04 ` Manivannan Sadhasivam
2025-09-04 8:10 ` zhangsenchuan
2025-09-08 7:15 ` Manivannan Sadhasivam
2025-09-04 16:06 ` Bjorn Helgaas
2025-09-18 5:35 ` zhangsenchuan
2025-09-18 17:13 ` Bjorn Helgaas [this message]
2025-08-29 8:24 ` [PATCH v2 2/2] PCI: eic7700: Add Eswin eic7700 PCIe host controller driver zhangsenchuan
2025-09-01 6:40 ` Manivannan Sadhasivam
2025-09-04 8:57 ` zhangsenchuan
2025-09-08 7:25 ` Manivannan Sadhasivam
2025-09-04 16:01 ` Bjorn Helgaas
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=20250918171331.GA1911330@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=inochiama@gmail.com \
--cc=johan+linaro@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linmin@eswincomputing.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=mayank.rana@oss.qualcomm.com \
--cc=ningyu@eswincomputing.com \
--cc=p.zabel@pengutronix.de \
--cc=pinkesh.vaghela@einfochips.com \
--cc=quic_schintav@quicinc.com \
--cc=robh@kernel.org \
--cc=shradha.t@samsung.com \
--cc=thippeswamy.havalige@amd.com \
--cc=zhangsenchuan@eswincomputing.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;
as well as URLs for NNTP newsgroup(s).