[PATCH v2 1/3] dt-bindings: PCI: imx6: convert the imx pcie controller to dtschema

Hongxing Zhu hongxing.zhu at nxp.com
Wed Jul 20 19:37:13 PDT 2022


> -----Original Message-----
> From: Bjorn Helgaas <helgaas at kernel.org>
> Sent: 2022年7月21日 5:03
> To: Hongxing Zhu <hongxing.zhu at nxp.com>
> Cc: robh at kernel.org; l.stach at pengutronix.de; galak at kernel.crashing.org;
> shawnguo at kernel.org; devicetree at vger.kernel.org;
> linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org;
> dl-linux-imx <linux-imx at nxp.com>; kernel at pengutronix.de
> Subject: Re: [PATCH v2 1/3] dt-bindings: PCI: imx6: convert the imx pcie
> controller to dtschema
> 
> On Wed, Jul 20, 2022 at 01:16:45AM +0000, Hongxing Zhu wrote:
> > > -----Original Message-----
> > > From: Bjorn Helgaas <helgaas at kernel.org>
> > > Sent: 2022年7月20日 2:00
> > > To: Hongxing Zhu <hongxing.zhu at nxp.com>
> > > Cc: robh at kernel.org; l.stach at pengutronix.de;
> > > galak at kernel.crashing.org; shawnguo at kernel.org;
> > > devicetree at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> > > linux-kernel at vger.kernel.org; dl-linux-imx <linux-imx at nxp.com>;
> > > kernel at pengutronix.de
> > > Subject: Re: [PATCH v2 1/3] dt-bindings: PCI: imx6: convert the imx
> > > pcie controller to dtschema
> > >
> > > On Fri, Aug 27, 2021 at 02:42:58PM +0800, Richard Zhu wrote:
> > > > Convert the fsl,imx6q-pcie.txt into a schema.
> > > > - ranges property should be grouped by region, with no functional
> > > >   changes.
> > > > - only one propert is allowed in the compatible string, remove
> > > >   "snps,dw-pcie".
> > > >
> > > > Signed-off-by: Richard Zhu <hongxing.zhu at nxp.com>
> > > > ---
> > > >  .../bindings/pci/fsl,imx6q-pcie.txt           | 100 ---------
> > > >  .../bindings/pci/fsl,imx6q-pcie.yaml          | 202
> > > ++++++++++++++++++
> > > >  MAINTAINERS                                   |   2 +-
> > > >  3 files changed, 203 insertions(+), 101 deletions(-)  delete mode
> > > > 100644 Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
> > > >  create mode 100644
> > > > Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
> > > > b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
> > >
> > > > -Optional properties:
> > > > -- fsl,tx-deemph-gen1: Gen1 De-emphasis value. Default: 0
> > > > -- fsl,tx-deemph-gen2-3p5db: Gen2 (3.5db) De-emphasis value. Default:
> > > > 0
> > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> > > > b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml
> > >
> > > > +  fsl,tx-deemph-gen1:
> > > > +    description: Gen1 De-emphasis value (optional required).
> > > > +    $ref: /schemas/types.yaml#/definitions/uint32
> > > > +    default: 0
> > > > +
> > > > +  fsl,tx-deemph-gen2-3p5db:
> > > > +    description: Gen2 (3.5db) De-emphasis value (optional required).
> > > > +    $ref: /schemas/types.yaml#/definitions/uint32
> > > > +    default: 0
> > >
> > > What does "optional required" mean in all these properties?
> > > "Optional" is the opposite of "required."
> >
> > Regarding my understands, the "optional required" means that these
> > properties  are not mandatory required. The default values are used if
> > there are no such  kind of properties. If HW board designers want to
> > shape their PCIe signals  (E.X eye diagram), they should define these
> properties.
> 
> That sounds like "optional" to me.
> 
> "Optional required" is meaningless.  A property can be either optional OR
> required, but not both at the same time.
> 
> If the driver can function without these properties, they are optional.  If
> designers can use these properties to optimize signal characteristics, the
> properties are still optional.
> 
> The properties you describe as "optional required" are:
> 
>   fsl,tx-deemph-gen1
>   fsl,tx-deemph-gen2-3p5db
>   fsl,tx-deemph-gen2-6db
>   fsl,tx-swing-full
>   fsl,tx-swing-low
>   fsl,max-link-speed
>   reset-gpio
>   reset-gpio-active-high
>   vpcie-supply
>   vph-supply
> 
> From reading the code, the driver uses default values for all the "fsl,"
> properties if they don't exist.  And the driver always checks whether the
> others exist before using them.
> 
> So I think you should describe all these as "optional".
> 
Yes it is.
I would clean them, and set them all "optional" later.
Thanks for your reminder.

Best Regards
Richard Zhu

> Bjorn


More information about the linux-arm-kernel mailing list