diff mbox series

[V2,4/5] dt-bindings: spi: spi-nxp-fspi: Add support for imx8mm, imx8qxp

Message ID 20200202125950.1825013-4-aford173@gmail.com (mailing list archive)
State New, archived
Headers show
Series [V2,1/5] spi: fspi: enable fspi on imx8qxp and imx8mm | expand

Commit Message

Adam Ford Feb. 2, 2020, 12:59 p.m. UTC
Add support for nxp,imx8qxp-fspi and nxp,imx8mm-fspi do the bindings
document.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
V2: No change

Comments

Rob Herring (Arm) Feb. 6, 2020, 6:40 p.m. UTC | #1
On Sun, Feb 02, 2020 at 06:59:49AM -0600, Adam Ford wrote:
> Add support for nxp,imx8qxp-fspi and nxp,imx8mm-fspi do the bindings

s/do/to/

> document.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---
> V2: No change
> 
> diff --git a/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt b/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
> index 2cd67eb727d4..7ac60d9fe357 100644
> --- a/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
> +++ b/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
> @@ -2,6 +2,9 @@
>  
>  Required properties:
>    - compatible : Should be "nxp,lx2160a-fspi"
> +			    "nxp,imx8qxp-fspi"
> +			    "nxp,imx8mm-fspi"

All 3 are different and no compatibility?

> +
>    - reg :        First contains the register location and length,
>                   Second contains the memory mapping address and length
>    - reg-names :  Should contain the resource reg names:
> -- 
> 2.24.0
>
Adam Ford Feb. 11, 2020, 10:49 a.m. UTC | #2
On Thu, Feb 6, 2020 at 2:46 PM Rob Herring <robh@kernel.org> wrote:
>
> On Sun, Feb 02, 2020 at 06:59:49AM -0600, Adam Ford wrote:
> > Add support for nxp,imx8qxp-fspi and nxp,imx8mm-fspi do the bindings
>
> s/do/to/

Oops.  Thanks for catching that.

>
> > document.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> > ---
> > V2: No change
> >
> > diff --git a/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt b/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
> > index 2cd67eb727d4..7ac60d9fe357 100644
> > --- a/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
> > +++ b/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
> > @@ -2,6 +2,9 @@
> >
> >  Required properties:
> >    - compatible : Should be "nxp,lx2160a-fspi"
> > +                         "nxp,imx8qxp-fspi"
> > +                         "nxp,imx8mm-fspi"
>
> All 3 are different and no compatibility?

This was all based on a series from NXP's repo where they have some
data tables all associated to the various compatible entries, and they
created a place holder for quirks.  Based on an older NXP repo, it
seems like there might be some quirks associated to the different
families, but the newer repo where I got this patch series didn't
implement them, however, it's possible the quirks may enhance
functionality later. If that's true, I think this is the best solution
for future enhancements without having to change the compatibility
names down the road.  Maybe someone from NXP can comment?  I am just
trying to help push things upstream so we can support QSPI flash.  I
would prefer to keep them separate for now, because we might have
these improvements later. However, I'll do what you request.  Do you
want me to drop the additional compatible flags and just use the
original, or create a new one that's a bit more generic?

adam


adam
>
> > +
> >    - reg :        First contains the register location and length,
> >                   Second contains the memory mapping address and length
> >    - reg-names :  Should contain the resource reg names:
> > --
> > 2.24.0
> >
Rob Herring (Arm) Feb. 11, 2020, 6:05 p.m. UTC | #3
On Tue, Feb 11, 2020 at 4:49 AM Adam Ford <aford173@gmail.com> wrote:
>
> On Thu, Feb 6, 2020 at 2:46 PM Rob Herring <robh@kernel.org> wrote:
> >
> > On Sun, Feb 02, 2020 at 06:59:49AM -0600, Adam Ford wrote:
> > > Add support for nxp,imx8qxp-fspi and nxp,imx8mm-fspi do the bindings
> >
> > s/do/to/
>
> Oops.  Thanks for catching that.
>
> >
> > > document.
> > >
> > > Signed-off-by: Adam Ford <aford173@gmail.com>
> > > ---
> > > V2: No change
> > >
> > > diff --git a/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt b/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
> > > index 2cd67eb727d4..7ac60d9fe357 100644
> > > --- a/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
> > > +++ b/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
> > > @@ -2,6 +2,9 @@
> > >
> > >  Required properties:
> > >    - compatible : Should be "nxp,lx2160a-fspi"
> > > +                         "nxp,imx8qxp-fspi"
> > > +                         "nxp,imx8mm-fspi"
> >
> > All 3 are different and no compatibility?
>
> This was all based on a series from NXP's repo where they have some
> data tables all associated to the various compatible entries, and they
> created a place holder for quirks.  Based on an older NXP repo, it
> seems like there might be some quirks associated to the different
> families, but the newer repo where I got this patch series didn't
> implement them, however, it's possible the quirks may enhance
> functionality later. If that's true, I think this is the best solution
> for future enhancements without having to change the compatibility
> names down the road.  Maybe someone from NXP can comment?  I am just
> trying to help push things upstream so we can support QSPI flash.  I
> would prefer to keep them separate for now, because we might have
> these improvements later. However, I'll do what you request.  Do you
> want me to drop the additional compatible flags and just use the
> original, or create a new one that's a bit more generic?

Neither.

If you already know that they have differences, then as-is is fine.

If they are believed to be 'the same', then you do:

compatible = "nxp,imx8qxp-fspi", "nxp,imx8mm-fspi";

assuming i.MX8MM was the first version.

This allows a MX8QXP to work without OS changes if the driver already
supports the previous chip. And if any quirks are found, then the OS
can handle them without a DT change.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt b/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
index 2cd67eb727d4..7ac60d9fe357 100644
--- a/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
+++ b/Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt
@@ -2,6 +2,9 @@ 
 
 Required properties:
   - compatible : Should be "nxp,lx2160a-fspi"
+			    "nxp,imx8qxp-fspi"
+			    "nxp,imx8mm-fspi"
+
   - reg :        First contains the register location and length,
                  Second contains the memory mapping address and length
   - reg-names :  Should contain the resource reg names: