linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: shmobile: porter: add QSPI DT support
@ 2015-10-09 20:51 Sergei Shtylyov
  2015-10-12  0:04 ` Simon Horman
  0 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2015-10-09 20:51 UTC (permalink / raw)
  To: linux-arm-kernel

Define the Porter board dependent part of the QSPI device node.
Add device nodes  for Spansion  S25FL512S SPI flash and the MTD partitions
on it.

This patch is  mostly analogous to the commit f59838d44835 (ARM: shmobile:
henninger: add QSPI DT support) as there  are no differences between the
boards in this respect.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
This patch is against 'renesas-devel-20151008-v4.3-rc4' tag of Simon Horman's
'renesas.git' repo plus the Porter I2C2 and VIN0/ADV7180 patches posted earlier.

 arch/arm/boot/dts/r8a7791-porter.dts |   38 +++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7791-porter.dts
=================================--- renesas.orig/arch/arm/boot/dts/r8a7791-porter.dts
+++ renesas/arch/arm/boot/dts/r8a7791-porter.dts
@@ -110,6 +110,11 @@
 		renesas,function = "sdhi2";
 	};
 
+	qspi_pins: spi0 {
+		renesas,groups = "qspi_ctrl", "qspi_data4";
+		renesas,function = "qspi";
+	};
+
 	i2c2_pins: i2c2 {
 		renesas,groups = "i2c2";
 		renesas,function = "i2c2";
@@ -165,6 +170,39 @@
 	status = "okay";
 };
 
+&qspi {
+	pinctrl-0 = <&qspi_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+
+	flash@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spansion,s25fl512s", "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <30000000>;
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+		m25p,fast-read;
+
+		partition@0 {
+			label = "loader_prg";
+			reg = <0x00000000 0x00040000>;
+			read-only;
+		};
+		partition@40000 {
+			label = "user_prg";
+			reg = <0x00040000 0x00400000>;
+			read-only;
+		};
+		partition@440000 {
+			label = "flash_fs";
+			reg = <0x00440000 0x03bc0000>;
+		};
+	};
+};
+
 &i2c2 {
 	pinctrl-0 = <&i2c2_pins>;
 	pinctrl-names = "default";


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: shmobile: porter: add QSPI DT support
  2015-10-09 20:51 [PATCH] ARM: shmobile: porter: add QSPI DT support Sergei Shtylyov
@ 2015-10-12  0:04 ` Simon Horman
  2015-10-12  0:19   ` Simon Horman
  2015-10-12  6:53   ` Geert Uytterhoeven
  0 siblings, 2 replies; 5+ messages in thread
From: Simon Horman @ 2015-10-12  0:04 UTC (permalink / raw)
  To: linux-arm-kernel

[Cc Geert]

On Fri, Oct 09, 2015 at 11:51:05PM +0300, Sergei Shtylyov wrote:
> Define the Porter board dependent part of the QSPI device node.
> Add device nodes  for Spansion  S25FL512S SPI flash and the MTD partitions
> on it.
> 
> This patch is  mostly analogous to the commit f59838d44835 (ARM: shmobile:
> henninger: add QSPI DT support) as there  are no differences between the
> boards in this respect.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Thanks, I have queued this up for v4.4.

> ---
> This patch is against 'renesas-devel-20151008-v4.3-rc4' tag of Simon Horman's
> 'renesas.git' repo plus the Porter I2C2 and VIN0/ADV7180 patches posted earlier.
> 
>  arch/arm/boot/dts/r8a7791-porter.dts |   38 +++++++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
> 
> Index: renesas/arch/arm/boot/dts/r8a7791-porter.dts
> =================================> --- renesas.orig/arch/arm/boot/dts/r8a7791-porter.dts
> +++ renesas/arch/arm/boot/dts/r8a7791-porter.dts
> @@ -110,6 +110,11 @@
>  		renesas,function = "sdhi2";
>  	};
>  
> +	qspi_pins: spi0 {
> +		renesas,groups = "qspi_ctrl", "qspi_data4";
> +		renesas,function = "qspi";
> +	};
> +
>  	i2c2_pins: i2c2 {
>  		renesas,groups = "i2c2";
>  		renesas,function = "i2c2";
> @@ -165,6 +170,39 @@
>  	status = "okay";
>  };
>  
> +&qspi {
> +	pinctrl-0 = <&qspi_pins>;
> +	pinctrl-names = "default";
> +
> +	status = "okay";
> +
> +	flash@0 {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "spansion,s25fl512s", "jedec,spi-nor";

spansion,s25fl512s is used in several dt files but it seems to be
undocumented. Do we have a plan to resolve this?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: shmobile: porter: add QSPI DT support
  2015-10-12  0:04 ` Simon Horman
@ 2015-10-12  0:19   ` Simon Horman
  2015-10-12  6:53   ` Geert Uytterhoeven
  1 sibling, 0 replies; 5+ messages in thread
From: Simon Horman @ 2015-10-12  0:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 12, 2015 at 09:04:53AM +0900, Simon Horman wrote:
> [Cc Geert]
> 
> On Fri, Oct 09, 2015 at 11:51:05PM +0300, Sergei Shtylyov wrote:
> > Define the Porter board dependent part of the QSPI device node.
> > Add device nodes  for Spansion  S25FL512S SPI flash and the MTD partitions
> > on it.
> > 
> > This patch is  mostly analogous to the commit f59838d44835 (ARM: shmobile:
> > henninger: add QSPI DT support) as there  are no differences between the
> > boards in this respect.
> > 
> > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> Thanks, I have queued this up for v4.4.

For the record, I queued-up v2.

> 
> > ---
> > This patch is against 'renesas-devel-20151008-v4.3-rc4' tag of Simon Horman's
> > 'renesas.git' repo plus the Porter I2C2 and VIN0/ADV7180 patches posted earlier.
> > 
> >  arch/arm/boot/dts/r8a7791-porter.dts |   38 +++++++++++++++++++++++++++++++++++
> >  1 file changed, 38 insertions(+)
> > 
> > Index: renesas/arch/arm/boot/dts/r8a7791-porter.dts
> > =================================> > --- renesas.orig/arch/arm/boot/dts/r8a7791-porter.dts
> > +++ renesas/arch/arm/boot/dts/r8a7791-porter.dts
> > @@ -110,6 +110,11 @@
> >  		renesas,function = "sdhi2";
> >  	};
> >  
> > +	qspi_pins: spi0 {
> > +		renesas,groups = "qspi_ctrl", "qspi_data4";
> > +		renesas,function = "qspi";
> > +	};
> > +
> >  	i2c2_pins: i2c2 {
> >  		renesas,groups = "i2c2";
> >  		renesas,function = "i2c2";
> > @@ -165,6 +170,39 @@
> >  	status = "okay";
> >  };
> >  
> > +&qspi {
> > +	pinctrl-0 = <&qspi_pins>;
> > +	pinctrl-names = "default";
> > +
> > +	status = "okay";
> > +
> > +	flash@0 {
> > +		#address-cells = <1>;
> > +		#size-cells = <1>;
> > +		compatible = "spansion,s25fl512s", "jedec,spi-nor";
> 
> spansion,s25fl512s is used in several dt files but it seems to be
> undocumented. Do we have a plan to resolve this?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: shmobile: porter: add QSPI DT support
  2015-10-12  0:04 ` Simon Horman
  2015-10-12  0:19   ` Simon Horman
@ 2015-10-12  6:53   ` Geert Uytterhoeven
  2015-10-13  1:04     ` Simon Horman
  1 sibling, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2015-10-12  6:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 12, 2015 at 2:04 AM, Simon Horman <horms@verge.net.au> wrote:
>> +     flash@0 {
>> +             #address-cells = <1>;
>> +             #size-cells = <1>;
>> +             compatible = "spansion,s25fl512s", "jedec,spi-nor";
>
> spansion,s25fl512s is used in several dt files but it seems to be
> undocumented. Do we have a plan to resolve this?

Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt:

- compatible : May include a device-specific string consisting of the
               manufacturer and name of the chip. Bear in mind the DT binding
               is not Linux-only, but in case of Linux, see the "m25p_ids"
               table in drivers/mtd/devices/m25p80.c for the list of supported
               chips.
               Must also include "jedec,spi-nor" for any SPI NOR flash that can
               be identified by the JEDEC READ ID opcode (0x9F).

Hence it's OK.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: shmobile: porter: add QSPI DT support
  2015-10-12  6:53   ` Geert Uytterhoeven
@ 2015-10-13  1:04     ` Simon Horman
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2015-10-13  1:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 12, 2015 at 08:53:26AM +0200, Geert Uytterhoeven wrote:
> On Mon, Oct 12, 2015 at 2:04 AM, Simon Horman <horms@verge.net.au> wrote:
> >> +     flash@0 {
> >> +             #address-cells = <1>;
> >> +             #size-cells = <1>;
> >> +             compatible = "spansion,s25fl512s", "jedec,spi-nor";
> >
> > spansion,s25fl512s is used in several dt files but it seems to be
> > undocumented. Do we have a plan to resolve this?
> 
> Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt:
> 
> - compatible : May include a device-specific string consisting of the
>                manufacturer and name of the chip. Bear in mind the DT binding
>                is not Linux-only, but in case of Linux, see the "m25p_ids"
>                table in drivers/mtd/devices/m25p80.c for the list of supported
>                chips.
>                Must also include "jedec,spi-nor" for any SPI NOR flash that can
>                be identified by the JEDEC READ ID opcode (0x9F).
> 
> Hence it's OK.

Thanks, I guess checkpatch needs to learn about that rule.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-13  1:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-09 20:51 [PATCH] ARM: shmobile: porter: add QSPI DT support Sergei Shtylyov
2015-10-12  0:04 ` Simon Horman
2015-10-12  0:19   ` Simon Horman
2015-10-12  6:53   ` Geert Uytterhoeven
2015-10-13  1:04     ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).