All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: "Serge Semin" <Sergey.Semin@baikalelectronics.ru>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	"Jingoo Han" <jingoohan1@gmail.com>,
	"Gustavo Pimentel" <gustavo.pimentel@synopsys.com>,
	"Alexey Malahov" <Alexey.Malahov@baikalelectronics.ru>,
	"Pavel Parkhomenko" <Pavel.Parkhomenko@baikalelectronics.ru>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Frank Li" <Frank.Li@nxp.com>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	PCI <linux-pci@vger.kernel.org>,
	devicetree@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 12/17] dt-bindings: PCI: dwc: Add Baikal-T1 PCIe Root Port bindings
Date: Tue, 9 Aug 2022 14:06:16 -0600	[thread overview]
Message-ID: <CAL_JsqJGvZnaV+kRazsb953+RtXadFxhEkw_uSjwR9PUXQeAAw@mail.gmail.com> (raw)
In-Reply-To: <20220809192846.ozixf6kgs242dbvl@mobilestation>

On Tue, Aug 9, 2022 at 1:28 PM Serge Semin <fancer.lancer@gmail.com> wrote:
>
> On Tue, Aug 09, 2022 at 09:12:31AM -0600, Rob Herring wrote:
> > On Mon, Aug 8, 2022 at 10:01 AM Serge Semin <fancer.lancer@gmail.com> wrote:
> > >
> > > On Mon, Aug 01, 2022 at 12:13:11PM -0600, Rob Herring wrote:
> > > > On Thu, Jul 28, 2022 at 05:34:22PM +0300, Serge Semin wrote:
> > > > > Baikal-T1 SoC is equipped with DWC PCIe v4.60a Root Port controller, which
> > > > > link can be trained to work on up to Gen.3 speed over up to x4 lanes. The
> > > > > controller is supposed to be fed up with four clock sources: DBI
> > > > > peripheral clock, AXI application Tx/Rx clocks and external PHY/core
> > > > > reference clock generating the 100MHz signal. In addition to that the
> > > > > platform provide a way to reset each part of the controller:
> > > > > sticky/non-sticky bits, host controller core, PIPE interface, PCS/PHY and
> > > > > Hot/Power reset signal. The Root Port controller is equipped with multiple
> > > > > IRQ lines like MSI, system AER, PME, HP, Bandwidth change, Link
> > > > > equalization request and eDMA ones. The registers space is accessed over
> > > > > the DBI interface. There can be no more than four inbound or outbound iATU
> > > > > windows configured.
> > > > >
> > > > > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > > > >

[...]

> > > > > +  reg-names:
> > > > > +    minItems: 3
> > > > > +    maxItems: 3
> > > > > +    items:
> > > > > +      enum: [ dbi, dbi2, config ]
> > > >
> > >
> > > > Define the order. Here, and the rest.
> > >
> > > Ok. I will, but please answer to my question, I asked you in the
> > > previous email thread:
> > >
> > > Serge Semin wrote:
> > > > Rob Herring wrote:
> > > > > ...
> > > > > Tell me why you need random order.
> > > >
> > > > Because I don't see a need in constraining the order. If we get to set
> > > > the order requirement, then why do we need to have the "*-names"
> > > > property at all?
> >
> > Originally, it was for cases where you have a variable number of
> > entries and can't determine what each entry is. IOW, when you have
> > optional entries in the middle of required entries. But then everyone
> > *loves* -names even when not needed or useful such as 'phy-names =
> > "pcie"' (the phy subsys requiring names was part of the problem there,
> > but that's been fixed).
> >

> > > > IMO having "reg" with max/minItems restriction plus generic
> > > > description and "reg-names" with possible values enumerated seems very
> > > > suitable pattern in this case. Don't you think?
> >
> > No, I think this is just as concise and defines the order too:
> >
> > reg-names:
> >   items:
> >     - const: dbi
> >     - const: dbi2
> >     - const: config
> >
> > >
> > > In addition to that what about optional names? How would you suggest
> > > to handle such case without the non-ordered pattern?
> >
>
> > Sorry, I don't follow.
>
> I meant exactly the case you've described as the main goal of the
> named properties. My worry was that by using the pattern:
>
> reg-names:
>   items:
>     - const: name
>     - const: another_name
>     - const: one_more_name
>
> you get to fix the names order, which they were invented to get rid
> from. If you get to use that pattern the only optional names could be
> the names at the tail of the array, which isn't always applicable. In
> that case you'd have no choice but to use the pattern suggested by
> me.

For this binding, we use reg-names because the order and what's
present varies by platform. But for a given platform the order is
fixed.

Rob

  reply	other threads:[~2022-08-09 20:07 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28 14:34 [PATCH v4 00/17] PCI: dwc: Add generic resources and Baikal-T1 support Serge Semin
2022-07-28 14:34 ` [PATCH v4 01/17] dt-bindings: PCI: dwc: Detach common RP/EP DT bindings Serge Semin
2022-08-01 17:30   ` Rob Herring
2022-07-28 14:34 ` [PATCH v4 02/17] dt-bindings: PCI: dwc: Remove bus node from the examples Serge Semin
2022-07-28 14:34 ` [PATCH v4 03/17] dt-bindings: PCI: dwc: Add phys/phy-names common properties Serge Semin
2022-08-01 17:56   ` Rob Herring
2022-08-08 10:36     ` Serge Semin
2022-08-08 15:58       ` Rob Herring
2022-07-28 14:34 ` [PATCH v4 04/17] dt-bindings: PCI: dwc: Add max-link-speed common property Serge Semin
2022-08-01 17:56   ` Rob Herring
2022-07-28 14:34 ` [PATCH v4 05/17] dt-bindings: PCI: dwc: Stop selecting generic bindings by default Serge Semin
2022-07-28 14:34   ` Serge Semin
2022-07-28 14:34   ` Serge Semin
2022-07-28 22:37   ` Rob Herring
2022-07-28 22:37     ` Rob Herring
2022-07-28 22:37     ` Rob Herring
2022-07-28 14:34 ` [PATCH v4 06/17] dt-bindings: PCI: dwc: Add max-functions EP property Serge Semin
2022-07-28 14:34 ` [PATCH v4 07/17] dt-bindings: PCI: dwc: Add interrupts/interrupt-names common properties Serge Semin
2022-07-28 14:34 ` [PATCH v4 08/17] dt-bindings: PCI: dwc: Add reg/reg-names " Serge Semin
2022-07-28 14:34 ` [PATCH v4 09/17] dt-bindings: PCI: dwc: Add clocks/resets " Serge Semin
2022-07-28 14:34   ` Serge Semin
2022-07-28 14:34 ` [PATCH v4 10/17] dt-bindings: PCI: dwc: Add dma-coherent property Serge Semin
2022-07-28 14:34 ` [PATCH v4 11/17] dt-bindings: PCI: dwc: Apply common schema to Rockchip DW PCIe nodes Serge Semin
2022-07-28 14:34   ` Serge Semin
2022-07-28 14:34   ` Serge Semin
2022-07-28 22:37   ` Rob Herring
2022-07-28 22:37     ` Rob Herring
2022-07-28 22:37     ` Rob Herring
2022-07-28 14:34 ` [PATCH v4 12/17] dt-bindings: PCI: dwc: Add Baikal-T1 PCIe Root Port bindings Serge Semin
2022-08-01 18:13   ` Rob Herring
2022-08-08 16:01     ` Serge Semin
2022-08-09 15:12       ` Rob Herring
2022-08-09 19:28         ` Serge Semin
2022-08-09 20:06           ` Rob Herring [this message]
2022-08-09 20:17             ` Serge Semin
2022-07-28 14:34 ` [PATCH v4 13/17] PCI: dwc: Introduce generic controller capabilities interface Serge Semin
2022-07-28 14:34 ` [PATCH v4 14/17] PCI: dwc: Introduce generic resources getter Serge Semin
2022-07-28 14:34 ` [PATCH v4 15/17] PCI: dwc: Combine iATU detection procedures Serge Semin
2022-07-28 14:34 ` [PATCH v4 16/17] PCI: dwc: Introduce generic platform clocks and resets Serge Semin
2022-07-28 14:34 ` [PATCH v4 17/17] PCI: dwc: Add Baikal-T1 PCIe controller support Serge Semin

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=CAL_JsqJGvZnaV+kRazsb953+RtXadFxhEkw_uSjwR9PUXQeAAw@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=Alexey.Malahov@baikalelectronics.ru \
    --cc=Frank.Li@nxp.com \
    --cc=Pavel.Parkhomenko@baikalelectronics.ru \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=fancer.lancer@gmail.com \
    --cc=gustavo.pimentel@synopsys.com \
    --cc=jingoohan1@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=manivannan.sadhasivam@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.