2016-12-08 10:10:28

by Yuan Yao

[permalink] [raw]
Subject: [PATCH 0/5] arm64: dts: ls1012a: add the DTS node for QSPI/DSPI support

From: Yuan Yao <[email protected]>

LS1012A also support QSPI and DSPI.
This patch set is used to add the QSPI/DSPI node for LS1012A.

This patch set is depend on the patch for add LS1012A platform dts support:
arm64: Add DTS support for FSL's LS1012A SoC

The patchwork link:
https://patchwork.kernel.org/patch/9462399/

Yuan Yao (5):
arm64: dts: ls1012a: add the DTS node for DSPI support
Documentation: fsl: dspi: Add fsl,ls1012a-dspi compatible string
Documentation: dt: mtd: add chip support for "jedec, spi-nor"
arm64: dts: ls1012a: add the DTS node for QSPI support
Documentation: fsl-quadspi: Add fsl,ls1012a-qspi compatible string

.../devicetree/bindings/mtd/fsl-quadspi.txt | 1 +
.../devicetree/bindings/mtd/jedec,spi-nor.txt | 2 +
.../devicetree/bindings/spi/spi-fsl-dspi.txt | 1 +
arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts | 14 +++++++
arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts | 48 ++++++++++++++++++++++
arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts | 15 +++++++
arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 28 +++++++++++++
7 files changed, 109 insertions(+)

--
2.1.0.27.g96db324


2016-12-08 09:52:20

by Yuan Yao

[permalink] [raw]
Subject: [PATCH 3/5] Documentation: dt: mtd: add chip support for "jedec, spi-nor"

From: Yuan Yao <[email protected]>

"sst25wf040b" and "en25s64" are also chip compatible with SPI NOR flash.

Signed-off-by: Yuan Yao <[email protected]>
---
Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
index 2c91c03..86614ee 100644
--- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
+++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
@@ -13,6 +13,7 @@ Required properties:
at25df321a
at25df641
at26df081a
+ en25s64
mr25h256
mx25l4005a
mx25l1606e
@@ -29,6 +30,7 @@ Required properties:
s25fl008k
s25fl064k
sst25vf040b
+ sst25wf040b
m25p40
m25p80
m25p16
--
2.1.0.27.g96db324

2016-12-08 10:10:43

by Yuan Yao

[permalink] [raw]
Subject: [PATCH 4/5] arm64: dts: ls1012a: add the DTS node for QSPI support

From: Yuan Yao <[email protected]>

There is a s25fs512s qspi flash on QDS, RDB and FRDM board.

Signed-off-by: Yuan Yao <[email protected]>
---
arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts | 14 ++++++++++++++
arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts | 15 +++++++++++++++
arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts | 15 +++++++++++++++
arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 15 +++++++++++++++
4 files changed, 59 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts b/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts
index 81bd689..34f9e76 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts
@@ -110,6 +110,20 @@
};
};

+&qspi {
+ num-cs = <2>;
+ bus-num = <0>;
+ status = "okay";
+
+ qflash0: s25fs512s@0 {
+ compatible = "spansion,m25p80";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <20000000>;
+ reg = <0>;
+ };
+};
+
&sai2 {
status = "okay";
};
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts
index 3d32c76..0e5befa 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts
@@ -156,6 +156,21 @@
};
};

+&qspi {
+ num-cs = <2>;
+ bus-num = <0>;
+ status = "okay";
+
+ qflash0: s25fs512s@0 {
+ compatible = "spansion,m25p80";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <20000000>;
+ m25p,fast-read;
+ reg = <0>;
+ };
+};
+
&sai2 {
status = "okay";
};
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
index 62c5c71..c20bfd3 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
@@ -57,3 +57,18 @@
&i2c0 {
status = "okay";
};
+
+&qspi {
+ num-cs = <2>;
+ bus-num = <0>;
+ status = "okay";
+
+ qflash0: s25fs512s@0 {
+ compatible = "spansion,m25p80";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <20000000>;
+ m25p,fast-read;
+ reg = <0>;
+ };
+};
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi
index c917a87..72e61c5 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi
@@ -195,6 +195,21 @@
#interrupt-cells = <2>;
};

+ qspi: quadspi@1550000 {
+ compatible = "fsl,ls1012a-qspi", "fsl,ls1021a-qspi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0 0x1550000 0x0 0x10000>,
+ <0x0 0x40000000 0x0 0x10000000>;
+ reg-names = "QuadSPI", "QuadSPI-memory";
+ interrupts = <0 99 IRQ_TYPE_LEVEL_HIGH>;
+ clock-names = "qspi_en", "qspi";
+ clocks = <&clockgen 4 0>, <&clockgen 4 0>;
+ big-endian;
+ fsl,qspi-has-second-chip;
+ status = "disabled";
+ };
+
wdog0: wdog@2ad0000 {
compatible = "fsl,ls1012a-wdt",
"fsl,imx21-wdt";
--
2.1.0.27.g96db324

2016-12-08 10:10:58

by Yuan Yao

[permalink] [raw]
Subject: [PATCH 1/5] arm64: dts: ls1012a: add the DTS node for DSPI support

From: Yuan Yao <[email protected]>

Signed-off-by: Yuan Yao <[email protected]>
---
arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts | 33 +++++++++++++++++++++++
arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 13 +++++++++
2 files changed, 46 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts
index b841251..3d32c76 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts
@@ -93,6 +93,39 @@
};
};

+&dspi {
+ bus-num = <0>;
+ status = "okay";
+
+ flash@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "n25q128a11", "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+ };
+
+ flash@1 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "sst25wf040b", "jedec,spi-nor";
+ spi-cpol;
+ spi-cpha;
+ reg = <1>;
+ spi-max-frequency = <10000000>;
+ };
+
+ flash@2 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "en25s64", "jedec,spi-nor";
+ spi-cpol;
+ spi-cpha;
+ reg = <2>;
+ spi-max-frequency = <10000000>;
+ };
+};
+
&duart0 {
status = "okay";
};
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi
index 92e64f3..c917a87 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi
@@ -148,6 +148,19 @@
status = "disabled";
};

+ dspi: dspi@2100000 {
+ compatible = "fsl,ls1012a-dspi", "fsl,ls1021a-v1.0-dspi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0 0x2100000 0x0 0x10000>;
+ interrupts = <0 64 IRQ_TYPE_LEVEL_HIGH>;
+ clock-names = "dspi";
+ clocks = <&clockgen 4 0>;
+ spi-num-chipselects = <5>;
+ big-endian;
+ status = "disabled";
+ };
+
duart0: serial@21c0500 {
compatible = "fsl,ns16550", "ns16550a";
reg = <0x00 0x21c0500 0x0 0x100>;
--
2.1.0.27.g96db324

2016-12-08 10:11:11

by Yuan Yao

[permalink] [raw]
Subject: [PATCH 5/5] Documentation: fsl-quadspi: Add fsl,ls1012a-qspi compatible string

From: Yuan Yao <[email protected]>

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

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 c34aa6f..a2ed621 100644
--- a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
+++ b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
@@ -7,6 +7,7 @@ Required properties:
or
"fsl,ls2080a-qspi" followed by "fsl,ls1021a-qspi",
"fsl,ls1043a-qspi" followed by "fsl,ls1021a-qspi"
+ "fsl,ls1012a-qspi" followed by "fsl,ls1021a-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

2016-12-08 10:11:57

by Yuan Yao

[permalink] [raw]
Subject: [PATCH 2/5] Documentation: fsl: dspi: Add fsl,ls1012a-dspi compatible string

From: Yuan Yao <[email protected]>

new compatible string: "fsl,ls1012a-dspi".

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

diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
index ff5893d..800c483 100644
--- a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
+++ b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
@@ -5,6 +5,7 @@ Required properties:
"fsl,ls2085a-dspi"
or
"fsl,ls2080a-dspi" followed by "fsl,ls2085a-dspi"
+ "fsl,ls1012a-dspi" followed by "fsl,ls1021a-v1.0-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

2016-12-12 17:08:14

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 2/5] Documentation: fsl: dspi: Add fsl, ls1012a-dspi compatible string

On Thu, Dec 08, 2016 at 05:23:01PM +0800, Yuan Yao wrote:
> From: Yuan Yao <[email protected]>
>
> new compatible string: "fsl,ls1012a-dspi".
>
> Signed-off-by: Yuan Yao <[email protected]>
> ---
> Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt | 1 +
> 1 file changed, 1 insertion(+)

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

2016-12-12 17:09:16

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 3/5] Documentation: dt: mtd: add chip support for "jedec, spi-nor"

On Thu, Dec 08, 2016 at 05:23:02PM +0800, Yuan Yao wrote:
> From: Yuan Yao <[email protected]>

The compatible string is wrong in the subject.

>
> "sst25wf040b" and "en25s64" are also chip compatible with SPI NOR flash.
>
> Signed-off-by: Yuan Yao <[email protected]>
> ---
> Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt | 2 ++
> 1 file changed, 2 insertions(+)

Otherwise,

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

2016-12-12 17:09:53

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 5/5] Documentation: fsl-quadspi: Add fsl, ls1012a-qspi compatible string

On Thu, Dec 08, 2016 at 05:23:04PM +0800, Yuan Yao wrote:
> From: Yuan Yao <[email protected]>

Same problem in this subject too.

>
> new compatible string: "fsl,ls1012a-qspi".
>
> 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]>

2016-12-13 15:20:48

by Yao Yuan

[permalink] [raw]
Subject: RE: [PATCH 5/5] Documentation: fsl-quadspi: Add fsl, ls1012a-qspi compatible string

On Thu, Dec 13, 2016 at 05:23:02PM +0800, Rob Herring wrote:
> On Thu, Dec 08, 2016 at 05:23:04PM +0800, Yuan Yao wrote:
> > From: Yuan Yao <[email protected]>
>
> Same problem in this subject too.
>
> >
> > new compatible string: "fsl,ls1012a-qspi".
> >
> > 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]>

Thanks for your review.
And do you have any suggestion for this subject?

I will update the subject and send v2 soon.

2016-12-13 16:21:47

by Yao Yuan

[permalink] [raw]
Subject: RE: [PATCH 3/5] Documentation: dt: mtd: add chip support for "jedec, spi-nor"

On Thu, Dec 13, 2016 at 05:23:02PM +0800, Rob Herring wrote:
> On Thu, Dec 08, 2016 at 05:23:02PM +0800, Yuan Yao wrote:
> > From: Yuan Yao <[email protected]>
>
> The compatible string is wrong in the subject.
>
> >
> > "sst25wf040b" and "en25s64" are also chip compatible with SPI NOR flash.
> >
> > Signed-off-by: Yuan Yao <[email protected]>
> > ---
> > Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt | 2 ++
> > 1 file changed, 2 insertions(+)
>
> Otherwise,
>
> Acked-by: Rob Herring <[email protected]>

Thanks for your review.
I will update the subject and send v2 soon.




2016-12-13 21:14:29

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 5/5] Documentation: fsl-quadspi: Add fsl, ls1012a-qspi compatible string

On Mon, Dec 12, 2016 at 8:47 PM, Yao Yuan <[email protected]> wrote:
> On Thu, Dec 13, 2016 at 05:23:02PM +0800, Rob Herring wrote:
>> On Thu, Dec 08, 2016 at 05:23:04PM +0800, Yuan Yao wrote:
>> > From: Yuan Yao <[email protected]>
>>
>> Same problem in this subject too.
>>
>> >
>> > new compatible string: "fsl,ls1012a-qspi".
>> >
>> > 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]>
>
> Thanks for your review.
> And do you have any suggestion for this subject?

The problem is you have a space in the compatible string: "fsl,
ls1012a-qspi" rather than "fsl,ls1012a-qspi"

Also, I prefer "dt/bindings: " as the beginning of binding patch subjects.

Rob

2016-12-14 07:52:45

by Yao Yuan

[permalink] [raw]
Subject: RE: [PATCH 5/5] Documentation: fsl-quadspi: Add fsl, ls1012a-qspi compatible string

On Thu, Dec 14, 2016 at 05:23:02PM +0800, Rob Herring wrote:
> On Mon, Dec 12, 2016 at 8:47 PM, Yao Yuan <[email protected]> wrote:
> > On Thu, Dec 13, 2016 at 05:23:02PM +0800, Rob Herring wrote:
> >> On Thu, Dec 08, 2016 at 05:23:04PM +0800, Yuan Yao wrote:
> >> > From: Yuan Yao <[email protected]>
> >>
> >> Same problem in this subject too.
> >>
> >> >
> >> > new compatible string: "fsl,ls1012a-qspi".
> >> >
> >> > 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]>
> >
> > Thanks for your review.
> > And do you have any suggestion for this subject?
>
> The problem is you have a space in the compatible string: "fsl, ls1012a-qspi"
> rather than "fsl,ls1012a-qspi"
>
> Also, I prefer "dt/bindings: " as the beginning of binding patch subjects.
>

Ok, Get it.

Thanks for your comments.
I will send v2 soon.