2015-12-24 11:08:51

by Yuan Yao

[permalink] [raw]
Subject: [PATCH v2 1/4] Documentation: fsl-quadspi: Add fsl,ls2080a-dspi compatible string

new compatible string: "fsl,ls2080a-qspi".

Signed-off-by: Yuan Yao <[email protected]>
---
Changed in v2:
Update my email to <[email protected]>
---
Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
index fa77f87..2fe51d6 100644
--- a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
+++ b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
@@ -1,7 +1,8 @@
ARM Freescale DSPI controller

Required properties:
-- compatible : "fsl,vf610-dspi", "fsl,ls1021a-v1.0-dspi", "fsl,ls2085a-dspi"
+- compatible : "fsl,vf610-dspi", "fsl,ls1021a-v1.0-dspi",
+ "fsl,ls2085a-dspi", "fsl,ls2080a-dspi"
- reg : Offset and length of the register set for the device
- interrupts : Should contain SPI controller interrupt
- clocks: from common clock binding: handle to dspi clock.
--
2.1.0.27.g96db324


2015-12-24 11:09:32

by Yuan Yao

[permalink] [raw]
Subject: [PATCH v2 2/4] Documentation: fsl-quadspi: Add fsl, ls2080a-qspi compatible string

new compatible string: "fsl,ls2080a-qspi".

Signed-off-by: Yuan Yao <[email protected]>
---
Changed in v2:
Update my email to <[email protected]>
---
Documentation/devicetree/bindings/mtd/fsl-quadspi.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
index 6585ac7..2bef0dc 100644
--- a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
+++ b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
@@ -3,7 +3,7 @@
Required properties:
- compatible : Should be "fsl,vf610-qspi", "fsl,imx6sx-qspi",
"fsl,imx7d-qspi", "fsl,imx6ul-qspi",
- "fsl,ls1021-qspi"
+ "fsl,ls1021a-qspi", "fsl,ls2080a-qspi"
- reg : the first contains the register location and length,
the second contains the memory mapping address and length
- reg-names: Should contain the reg names "QuadSPI" and "QuadSPI-memory"
--
2.1.0.27.g96db324

2015-12-24 11:24:11

by Yuan Yao

[permalink] [raw]
Subject: [PATCH v2 3/4] dts/ls2080a: update the DTS for QSPI and DSPI support

Signed-off-by: Yuan Yao <[email protected]>
---
Changed in v2:
Update my email to <[email protected]>
---
arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts | 9 ++++++++-
arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 4 ++--
2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts
index 4cb996d..e8801fa 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts
@@ -178,7 +178,14 @@

&qspi {
status = "okay";
- qflash0: s25fl008k {
+ flash0: s25fl256s1@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "st,m25p80";
+ spi-max-frequency = <20000000>;
+ reg = <0>;
+ };
+ flash2: s25fl256s1@2 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "st,m25p80";
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
index e81cd48..7a80666 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
@@ -250,7 +250,7 @@

dspi: dspi@2100000 {
status = "disabled";
- compatible = "fsl,vf610-dspi";
+ compatible = "fsl,ls2085a-dspi", "fsl,ls2080a-dspi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x0 0x2100000 0x0 0x10000>;
@@ -371,7 +371,7 @@

qspi: quadspi@20c0000 {
status = "disabled";
- compatible = "fsl,vf610-qspi";
+ compatible = "fsl,ls2080a-qspi", "fsl,ls1021a-qspi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x0 0x20c0000 0x0 0x10000>,
--
2.1.0.27.g96db324

2015-12-24 11:09:01

by Yuan Yao

[permalink] [raw]
Subject: [PATCH 4/4] Documentation: fsl-quadspi: Add optional properties

Add optional properties for QSPI:
big-endian
if the register is big endian on this platform.

Signed-off-by: Yuan Yao <[email protected]>
---
Documentation/devicetree/bindings/mtd/fsl-quadspi.txt | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
index 2bef0dc..1371612 100644
--- a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
+++ b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
@@ -19,6 +19,7 @@ Optional properties:
But if there are two NOR flashes connected to the
bus, you should enable this property.
(Please check the board's schematic.)
+ - big-endian : That means the IP register is big endian

Example:

--
2.1.0.27.g96db324

2015-12-29 18:35:05

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] Documentation: fsl-quadspi: Add fsl, ls2080a-qspi compatible string

On Thu, Dec 24, 2015 at 07:01:01PM +0800, Yuan Yao wrote:
> new compatible string: "fsl,ls2080a-qspi".
>
> Signed-off-by: Yuan Yao <[email protected]>
> ---
> Changed in v2:
> Update my email to <[email protected]>
> ---
> Documentation/devicetree/bindings/mtd/fsl-quadspi.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
> index 6585ac7..2bef0dc 100644
> --- a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
> +++ b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
> @@ -3,7 +3,7 @@
> Required properties:
> - compatible : Should be "fsl,vf610-qspi", "fsl,imx6sx-qspi",
> "fsl,imx7d-qspi", "fsl,imx6ul-qspi",
> - "fsl,ls1021-qspi"
> + "fsl,ls1021a-qspi", "fsl,ls2080a-qspi"

You should explain what combinations of compatible strings are valid.

Rob

2015-12-29 18:35:08

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 4/4] Documentation: fsl-quadspi: Add optional properties

On Thu, Dec 24, 2015 at 07:01:03PM +0800, Yuan Yao wrote:
> Add optional properties for QSPI:
> big-endian
> if the register is big endian on this platform.
>
> Signed-off-by: Yuan Yao <[email protected]>
> ---
> Documentation/devicetree/bindings/mtd/fsl-quadspi.txt | 1 +
> 1 file changed, 1 insertion(+)

Acked-by: Rob Herring <[email protected]>

2015-12-29 18:35:54

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v2 1/4] Documentation: fsl-quadspi: Add fsl,ls2080a-dspi compatible string

On Thu, Dec 24, 2015 at 07:01:00PM +0800, Yuan Yao wrote:
> new compatible string: "fsl,ls2080a-qspi".
>
> Signed-off-by: Yuan Yao <[email protected]>
> ---
> Changed in v2:
> Update my email to <[email protected]>
> ---
> Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
> index fa77f87..2fe51d6 100644
> --- a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
> +++ b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
> @@ -1,7 +1,8 @@
> ARM Freescale DSPI controller
>
> Required properties:
> -- compatible : "fsl,vf610-dspi", "fsl,ls1021a-v1.0-dspi", "fsl,ls2085a-dspi"
> +- compatible : "fsl,vf610-dspi", "fsl,ls1021a-v1.0-dspi",
> + "fsl,ls2085a-dspi", "fsl,ls2080a-dspi"

You should explain what combinations of compatible strings are valid.

Rob

2015-12-30 04:52:35

by Yao Yuan

[permalink] [raw]
Subject: RE: [PATCH v2 1/4] Documentation: fsl-quadspi: Add fsl,ls2080a-dspi compatible string

Hi Rob,

Thanks for your review.
So you mean that I should add the commit message for why I add this new compatible?

Best Regards,
Yuan Yao

On Wed, Dec 30, 2015 at 02:35AM, Rob Herring wrote:
> On Thu, Dec 24, 2015 at 07:01:00PM +0800, Yuan Yao wrote:
> > new compatible string: "fsl,ls2080a-qspi".
> >
> > Signed-off-by: Yuan Yao <[email protected]>
> > ---
> > Changed in v2:
> > Update my email to <[email protected]>
> > ---
> > Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
> b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
> > index fa77f87..2fe51d6 100644
> > --- a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
> > +++ b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
> > @@ -1,7 +1,8 @@
> > ARM Freescale DSPI controller
> >
> > Required properties:
> > -- compatible : "fsl,vf610-dspi", "fsl,ls1021a-v1.0-dspi", "fsl,ls2085a-dspi"
> > +- compatible : "fsl,vf610-dspi", "fsl,ls1021a-v1.0-dspi",
> > + "fsl,ls2085a-dspi", "fsl,ls2080a-dspi"
>
> You should explain what combinations of compatible strings are valid.
>
> Rob

2015-12-30 15:19:55

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v2 1/4] Documentation: fsl-quadspi: Add fsl,ls2080a-dspi compatible string

On Tue, Dec 29, 2015 at 9:17 PM, Yao Yuan <[email protected]> wrote:
> Hi Rob,
>
> Thanks for your review.
> So you mean that I should add the commit message for why I add this new compatible?

Please don't top post on the lists.

No, the binding doc should explain what are valid combinations of
compatible strings and the order when the dts can have multiple
strings. For example, is this valid:

compatible = "fsl,vf610-dspi", "fsl,ls2080a-dspi";

In other words, I should be able to check a dts file against what the
binding doc says.

Rob

> On Wed, Dec 30, 2015 at 02:35AM, Rob Herring wrote:
>> On Thu, Dec 24, 2015 at 07:01:00PM +0800, Yuan Yao wrote:
>> > new compatible string: "fsl,ls2080a-qspi".
>> >
>> > Signed-off-by: Yuan Yao <[email protected]>
>> > ---
>> > Changed in v2:
>> > Update my email to <[email protected]>
>> > ---
>> > Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt | 3 ++-
>> > 1 file changed, 2 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
>> b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
>> > index fa77f87..2fe51d6 100644
>> > --- a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
>> > +++ b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
>> > @@ -1,7 +1,8 @@
>> > ARM Freescale DSPI controller
>> >
>> > Required properties:
>> > -- compatible : "fsl,vf610-dspi", "fsl,ls1021a-v1.0-dspi", "fsl,ls2085a-dspi"
>> > +- compatible : "fsl,vf610-dspi", "fsl,ls1021a-v1.0-dspi",
>> > + "fsl,ls2085a-dspi", "fsl,ls2080a-dspi"
>>
>> You should explain what combinations of compatible strings are valid.
>>
>> Rob

2015-12-31 02:35:16

by Yao Yuan

[permalink] [raw]
Subject: RE: [PATCH v2 1/4] Documentation: fsl-quadspi: Add fsl,ls2080a-dspi compatible string

On Wed, Dec 30, 2015 at 11:20 PM, Rob Herring wrote:
> On Tue, Dec 29, 2015 at 9:17 PM, Yao Yuan <[email protected]> wrote:
> > Hi Rob,
> >
> > Thanks for your review.
> > So you mean that I should add the commit message for why I add this new
> compatible?
>
> Please don't top post on the lists.
>
> No, the binding doc should explain what are valid combinations of compatible
> strings and the order when the dts can have multiple strings. For example, is
> this valid:
>
> compatible = "fsl,vf610-dspi", "fsl,ls2080a-dspi";
>
> In other words, I should be able to check a dts file against what the binding doc
> says.
>
> Rob

OK, I got it.
The "fsl,vf610-dspi", "fsl,ls1021a-v1.0-dspi", "fsl,ls2085a-dspi" is valid and used in driver.
But "fsl,ls2080a-dspi" is just used for platform flag.
Could you help to give an example that how can I explain it in Documents?
Or should I not write this compatible in Document.

I find that many compatible strings like this (not valid just a platform flag) for other driver are not record in document.

Thanks.

Yuan Yao

>
> > On Wed, Dec 30, 2015 at 02:35AM, Rob Herring wrote:
> >> On Thu, Dec 24, 2015 at 07:01:00PM +0800, Yuan Yao wrote:
> >> > new compatible string: "fsl,ls2080a-qspi".
> >> >
> >> > Signed-off-by: Yuan Yao <[email protected]>
> >> > ---
> >> > Changed in v2:
> >> > Update my email to <[email protected]>
> >> > ---
> >> > Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt | 3 ++-
> >> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >> >
> >> > diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
> >> b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
> >> > index fa77f87..2fe51d6 100644
> >> > --- a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
> >> > +++ b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
> >> > @@ -1,7 +1,8 @@
> >> > ARM Freescale DSPI controller
> >> >
> >> > Required properties:
> >> > -- compatible : "fsl,vf610-dspi", "fsl,ls1021a-v1.0-dspi", "fsl,ls2085a-dspi"
> >> > +- compatible : "fsl,vf610-dspi", "fsl,ls1021a-v1.0-dspi",
> >> > + "fsl,ls2085a-dspi", "fsl,ls2080a-dspi"
> >>
> >> You should explain what combinations of compatible strings are valid.
> >>
> >> Rob
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?