[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB6PR0402MB27580AF77ED738B995616EB5E06B9@DB6PR0402MB2758.eurprd04.prod.outlook.com>
Date: Tue, 16 Mar 2021 06:08:17 +0000
From: Kuldeep Singh <kuldeep.singh@....com>
To: Vladimir Oltean <olteanv@...il.com>
CC: "linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Mark Brown <broonie@...nel.org>,
Rob Herring <robh+dt@...nel.org>
Subject: RE: [EXT] Re: [PATCH] dt-bindings: spi: Convert Freescale DSPI to
json schema
Hi Vladimir,
> -----Original Message-----
> From: Vladimir Oltean <olteanv@...il.com>
> Sent: Tuesday, March 16, 2021 2:25 AM
> To: Kuldeep Singh <kuldeep.singh@....com>
> Cc: linux-spi@...r.kernel.org; devicetree@...r.kernel.org; linux-
> kernel@...r.kernel.org; Mark Brown <broonie@...nel.org>; Rob Herring
> <robh+dt@...nel.org>
> Subject: [EXT] Re: [PATCH] dt-bindings: spi: Convert Freescale DSPI to json schema
>
> Caution: EXT Email
>
> Hi Kuldeep,
>
> On Mon, Mar 15, 2021 at 05:45:18PM +0530, Kuldeep Singh wrote:
> > Convert the Freescale DSPI binding to DT schema format using json-schema.
> >
> > Signed-off-by: Kuldeep Singh <kuldeep.singh@....com>
> > ---
[...]
> > +
> > +allOf:
> > + - $ref: "spi-controller.yaml#"
> > +
> > +properties:
> > + compatible:
> > + oneOf:
> > + - enum:
> > + - fsl,vf610-dspi
> > + - fsl,ls1021a-v1.0-dspi
> > + - fsl,ls1028a-dspi
> > + - fsl,ls2085a-dspi
> > + - fsl,lx2160a-dspi
> > + - items:
> > + - enum:
> > + - fsl,ls1012a-dspi
> > + - fsl,ls1028a-dspi
> > + - fsl,ls1043a-dspi
> > + - fsl,ls1046a-dspi
> > + - fsl,ls1088a-dspi
> > + - const: fsl,ls1021a-v1.0-dspi
> > + - items:
> > + - enum:
> > + - fsl,ls2080a-dspi
> > + - fsl,lx2160a-dspi
> > + - const: fsl,ls2085a-dspi
>
> Can this simply be:
> compatible:
> oneOf:
> - enum:
> - fsl,vf610-dspi
> - fsl,ls1021a-v1.0-dspi
> - fsl,ls1012a-dspi
> - fsl,ls1028a-dspi
> - fsl,ls1043a-dspi
> - fsl,ls1046a-dspi
> - fsl,ls1088a-dspi
> - fsl,ls2080a-dspi
> - fsl,ls2085a-dspi
> - fsl,lx2160a-dspi
> ?
Compatible entries in conjugation require enum and const pair.
For example, ls1012a.dtsi uses compatible = "fsl,ls1012a-dspi","fsl,ls1021a-v1.0-dspi";
Same goes for LS1028 as well.
Therefore, can't mention the compatible entry as single entity otherwise
it may fail "make dt_binding_check" and "make dtbs_check".
>
> > +examples:
> > + - |
> > + #include <dt-bindings/clock/fsl,qoriq-clockgen.h>
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +
> > + soc {
> > + #address-cells = <2>;
> > + #size-cells = <2>;
> > +
> > + spi@...0000 {
> > + compatible = "fsl,ls1028a-dspi", "fsl,ls1021a-v1.0-dspi";
>
> This doesn't need the "fsl,ls1021a-v1.0-dspi" compatible, can you please remove
> it?
I have taken this example from LS1028a.dtsi and it uses these compatibles in conjugation.
If "fsl,ls1021a-v1.0-dspi" is not required, then it should also be removed from device-tree
As well as from bindings both.
>
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + reg = <0x0 0x2100000 0x0 0x10000>;
> > + interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
> > + clock-names = "dspi";
> > + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
> QORIQ_CLK_PLL_DIV(2)>;
> > + dmas = <&edma0 0 62>, <&edma0 0 60>;
> > + dma-names = "tx", "rx";
> > + spi-num-chipselects = <4>;
> > + little-endian;
> > +
> > + flash@0 {
> > + compatible = "jedec,spi-nor";
> > + spi-max-frequency = <10000000>;
> > + reg = <0>;
> > + };
> > + };
> > + };
>
> (...)
>
> > -Optional property:
> > -- big-endian: If present the dspi device's registers are implemented
> > - in big endian mode.
>
> I don't see "big-endian" being covered in any common yaml, could you please not
> delete it? The driver calls of_device_is_big_endian.
Thanks for mentioning.
Will consider this in next version after receiving feedback on other thread.
Regards
Kuldeep
Powered by blists - more mailing lists