devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: imx6: Remove unneeded address-cells/size-cells
@ 2017-11-10 21:12 Fabio Estevam
  2017-11-11 14:24 ` Christopher Spinrath
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2017-11-10 21:12 UTC (permalink / raw)
  To: shawnguo-DgEjT+Ai2ygdnm+yROfE0A
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Fabio Estevam

From: Fabio Estevam <fabio.estevam-3arQi8VN3Tc@public.gmane.org>

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

"- #address-cells, #size-cells : Must be present if the device has
sub-nodes representing partitions."

Remove the occurrences of #address-cells/size-cells where no sub-nodes
representing partitions are present.

Signed-off-by: Fabio Estevam <fabio.estevam-3arQi8VN3Tc@public.gmane.org>
---
 arch/arm/boot/dts/imx6q-cm-fx6.dts           | 2 --
 arch/arm/boot/dts/imx6q-mccmon6.dts          | 2 --
 arch/arm/boot/dts/imx6qdl-aristainetos.dtsi  | 2 --
 arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi | 2 --
 arch/arm/boot/dts/imx6qdl-sabreauto.dtsi     | 2 --
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi       | 2 --
 arch/arm/boot/dts/imx6sl-evk.dts             | 2 --
 arch/arm/boot/dts/imx6sx-sdb-reva.dts        | 4 ----
 arch/arm/boot/dts/imx6sx-sdb.dts             | 4 ----
 9 files changed, 22 deletions(-)

diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
index bc7587c..5df84e2 100644
--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
@@ -194,8 +194,6 @@
 	status = "okay";
 
 	m25p80@0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
 		compatible = "st,m25p", "jedec,spi-nor";
 		spi-max-frequency = <20000000>;
 		reg = <0>;
diff --git a/arch/arm/boot/dts/imx6q-mccmon6.dts b/arch/arm/boot/dts/imx6q-mccmon6.dts
index cab36f4..9636e15 100644
--- a/arch/arm/boot/dts/imx6q-mccmon6.dts
+++ b/arch/arm/boot/dts/imx6q-mccmon6.dts
@@ -90,8 +90,6 @@
 	status = "okay";
 
 	s25sl032p: flash@0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
 		compatible = "jedec,spi-nor";
 		spi-max-frequency = <40000000>;
 		reg = <0>;
diff --git a/arch/arm/boot/dts/imx6qdl-aristainetos.dtsi b/arch/arm/boot/dts/imx6qdl-aristainetos.dtsi
index 7d64075..d8f578c 100644
--- a/arch/arm/boot/dts/imx6qdl-aristainetos.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-aristainetos.dtsi
@@ -106,8 +106,6 @@
 	status = "okay";
 
 	flash: m25p80@0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
 		compatible = "micron,n25q128a11", "jedec,spi-nor";
 		spi-max-frequency = <20000000>;
 		reg = <0>;
diff --git a/arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi b/arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi
index 1b18728..5875252 100644
--- a/arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi
@@ -136,8 +136,6 @@
 	status = "okay";
 
 	flash: m25p80@1 {
-		#address-cells = <1>;
-		#size-cells = <1>;
 		compatible = "micron,n25q128a11", "jedec,spi-nor";
 		spi-max-frequency = <20000000>;
 		reg = <1>;
diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
index 4fa2fac..828a9a5 100644
--- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
@@ -200,8 +200,6 @@
 	status = "disabled"; /* pin conflict with WEIM NOR */
 
 	flash: m25p80@0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
 		compatible = "st,m25p32", "jedec,spi-nor";
 		spi-max-frequency = <20000000>;
 		reg = <0>;
diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index 0a50705..acb0292 100644
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -196,8 +196,6 @@
 	status = "okay";
 
 	flash: m25p80@0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
 		compatible = "st,m25p32", "jedec,spi-nor";
 		spi-max-frequency = <20000000>;
 		reg = <0>;
diff --git a/arch/arm/boot/dts/imx6sl-evk.dts b/arch/arm/boot/dts/imx6sl-evk.dts
index 60600b4..03a2240 100644
--- a/arch/arm/boot/dts/imx6sl-evk.dts
+++ b/arch/arm/boot/dts/imx6sl-evk.dts
@@ -123,8 +123,6 @@
 	status = "okay";
 
 	flash: m25p80@0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
 		compatible = "st,m25p32", "jedec,spi-nor";
 		spi-max-frequency = <20000000>;
 		reg = <0>;
diff --git a/arch/arm/boot/dts/imx6sx-sdb-reva.dts b/arch/arm/boot/dts/imx6sx-sdb-reva.dts
index e3533e7..ebbed57 100644
--- a/arch/arm/boot/dts/imx6sx-sdb-reva.dts
+++ b/arch/arm/boot/dts/imx6sx-sdb-reva.dts
@@ -127,16 +127,12 @@
 
 	flash0: s25fl128s@0 {
 		reg = <0>;
-		#address-cells = <1>;
-		#size-cells = <1>;
 		compatible = "spansion,s25fl128s", "jedec,spi-nor";
 		spi-max-frequency = <66000000>;
 	};
 
 	flash1: s25fl128s@1 {
 		reg = <1>;
-		#address-cells = <1>;
-		#size-cells = <1>;
 		compatible = "spansion,s25fl128s", "jedec,spi-nor";
 		spi-max-frequency = <66000000>;
 	};
diff --git a/arch/arm/boot/dts/imx6sx-sdb.dts b/arch/arm/boot/dts/imx6sx-sdb.dts
index 6dd9beb..4b7481a 100644
--- a/arch/arm/boot/dts/imx6sx-sdb.dts
+++ b/arch/arm/boot/dts/imx6sx-sdb.dts
@@ -113,16 +113,12 @@
 	status = "okay";
 
 	flash0: n25q256a@0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
 		compatible = "micron,n25q256a", "jedec,spi-nor";
 		spi-max-frequency = <29000000>;
 		reg = <0>;
 	};
 
 	flash1: n25q256a@1 {
-		#address-cells = <1>;
-		#size-cells = <1>;
 		compatible = "micron,n25q256a", "jedec,spi-nor";
 		spi-max-frequency = <29000000>;
 		reg = <1>;
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] ARM: dts: imx6: Remove unneeded address-cells/size-cells
  2017-11-10 21:12 [PATCH] ARM: dts: imx6: Remove unneeded address-cells/size-cells Fabio Estevam
@ 2017-11-11 14:24 ` Christopher Spinrath
       [not found]   ` <62f3cb01-ff85-0fe0-2afa-0fe4732a7421-vA1bhqPz9FBZXbeN9DUtxg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Spinrath @ 2017-11-11 14:24 UTC (permalink / raw)
  To: Fabio Estevam, Shawn Guo, Sascha Hauer
  Cc: Mark Rutland, devicetree@vger.kernel.org, Rob Herring,
	Russell King, linux-arm-kernel@lists.infradead.org

Hi Fabio,

(I'm sorry if I've missed some recipients or broke the email thread but
I got Fabio's email from the infradead archive.)

On 11/10/2017 10:12 PM, festevam at gmail.com (Fabio Estevam) wrote:
> From: Fabio Estevam <fabio.estevam at nxp.com>
> 
> According to Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt:
> 
> "- #address-cells, #size-cells : Must be present if the device has
> sub-nodes representing partitions."
> 
> Remove the occurrences of #address-cells/size-cells where no sub-nodes
> representing partitions are present.

This results in a regression for those devices where U-Boot is supposed
to inject the partition sub-nodes. For example, this is the case for
cm-fx6 module based devices like the Utilite Pro.

Linux fails to parse the partitions and reports:
[    9.330881] spi0.0: error parsing ofpart partition
/soc/aips-bus@2000000/spba-bus@2000000/ecspi@2008000/m25p80@0/partition@0
(/soc/aips-bus@2000000/spba-bus@2000000/ecspi@2008000/m25p80@0)
[    9.330887] mtd: failed to find partitions; one or more parsers
reports errors (-22)

Also, the documentation does not forbid the #address-cells/size-cells if
no partitions are present.

So, please, drop this patch (or exclude at least the cm-fx6 related change).

Thanks!
Christopher

> Signed-off-by: Fabio Estevam <fabio.estevam at nxp.com>
> ---
>  arch/arm/boot/dts/imx6q-cm-fx6.dts           | 2 --
>  arch/arm/boot/dts/imx6q-mccmon6.dts          | 2 --
>  arch/arm/boot/dts/imx6qdl-aristainetos.dtsi  | 2 --
>  arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi | 2 --
>  arch/arm/boot/dts/imx6qdl-sabreauto.dtsi     | 2 --
>  arch/arm/boot/dts/imx6qdl-sabresd.dtsi       | 2 --
>  arch/arm/boot/dts/imx6sl-evk.dts             | 2 --
>  arch/arm/boot/dts/imx6sx-sdb-reva.dts        | 4 ----
>  arch/arm/boot/dts/imx6sx-sdb.dts             | 4 ----
>  9 files changed, 22 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
> index bc7587c..5df84e2 100644
> --- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
> +++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
> @@ -194,8 +194,6 @@
>  	status = "okay";
>  
>  	m25p80 at 0 {
> -		#address-cells = <1>;
> -		#size-cells = <1>;
>  		compatible = "st,m25p", "jedec,spi-nor";
>  		spi-max-frequency = <20000000>;
>  		reg = <0>;
> diff --git a/arch/arm/boot/dts/imx6q-mccmon6.dts b/arch/arm/boot/dts/imx6q-mccmon6.dts
> index cab36f4..9636e15 100644
> --- a/arch/arm/boot/dts/imx6q-mccmon6.dts
> +++ b/arch/arm/boot/dts/imx6q-mccmon6.dts
> @@ -90,8 +90,6 @@
>  	status = "okay";
>  
>  	s25sl032p: flash at 0 {
> -		#address-cells = <1>;
> -		#size-cells = <1>;
>  		compatible = "jedec,spi-nor";
>  		spi-max-frequency = <40000000>;
>  		reg = <0>;
> diff --git a/arch/arm/boot/dts/imx6qdl-aristainetos.dtsi b/arch/arm/boot/dts/imx6qdl-aristainetos.dtsi
> index 7d64075..d8f578c 100644
> --- a/arch/arm/boot/dts/imx6qdl-aristainetos.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-aristainetos.dtsi
> @@ -106,8 +106,6 @@
>  	status = "okay";
>  
>  	flash: m25p80 at 0 {
> -		#address-cells = <1>;
> -		#size-cells = <1>;
>  		compatible = "micron,n25q128a11", "jedec,spi-nor";
>  		spi-max-frequency = <20000000>;
>  		reg = <0>;
> diff --git a/arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi b/arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi
> index 1b18728..5875252 100644
> --- a/arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-aristainetos2.dtsi
> @@ -136,8 +136,6 @@
>  	status = "okay";
>  
>  	flash: m25p80 at 1 {
> -		#address-cells = <1>;
> -		#size-cells = <1>;
>  		compatible = "micron,n25q128a11", "jedec,spi-nor";
>  		spi-max-frequency = <20000000>;
>  		reg = <1>;
> diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
> index 4fa2fac..828a9a5 100644
> --- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
> @@ -200,8 +200,6 @@
>  	status = "disabled"; /* pin conflict with WEIM NOR */
>  
>  	flash: m25p80 at 0 {
> -		#address-cells = <1>;
> -		#size-cells = <1>;
>  		compatible = "st,m25p32", "jedec,spi-nor";
>  		spi-max-frequency = <20000000>;
>  		reg = <0>;
> diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> index 0a50705..acb0292 100644
> --- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> @@ -196,8 +196,6 @@
>  	status = "okay";
>  
>  	flash: m25p80 at 0 {
> -		#address-cells = <1>;
> -		#size-cells = <1>;
>  		compatible = "st,m25p32", "jedec,spi-nor";
>  		spi-max-frequency = <20000000>;
>  		reg = <0>;
> diff --git a/arch/arm/boot/dts/imx6sl-evk.dts b/arch/arm/boot/dts/imx6sl-evk.dts
> index 60600b4..03a2240 100644
> --- a/arch/arm/boot/dts/imx6sl-evk.dts
> +++ b/arch/arm/boot/dts/imx6sl-evk.dts
> @@ -123,8 +123,6 @@
>  	status = "okay";
>  
>  	flash: m25p80 at 0 {
> -		#address-cells = <1>;
> -		#size-cells = <1>;
>  		compatible = "st,m25p32", "jedec,spi-nor";
>  		spi-max-frequency = <20000000>;
>  		reg = <0>;
> diff --git a/arch/arm/boot/dts/imx6sx-sdb-reva.dts b/arch/arm/boot/dts/imx6sx-sdb-reva.dts
> index e3533e7..ebbed57 100644
> --- a/arch/arm/boot/dts/imx6sx-sdb-reva.dts
> +++ b/arch/arm/boot/dts/imx6sx-sdb-reva.dts
> @@ -127,16 +127,12 @@
>  
>  	flash0: s25fl128s at 0 {
>  		reg = <0>;
> -		#address-cells = <1>;
> -		#size-cells = <1>;
>  		compatible = "spansion,s25fl128s", "jedec,spi-nor";
>  		spi-max-frequency = <66000000>;
>  	};
>  
>  	flash1: s25fl128s at 1 {
>  		reg = <1>;
> -		#address-cells = <1>;
> -		#size-cells = <1>;
>  		compatible = "spansion,s25fl128s", "jedec,spi-nor";
>  		spi-max-frequency = <66000000>;
>  	};
> diff --git a/arch/arm/boot/dts/imx6sx-sdb.dts b/arch/arm/boot/dts/imx6sx-sdb.dts
> index 6dd9beb..4b7481a 100644
> --- a/arch/arm/boot/dts/imx6sx-sdb.dts
> +++ b/arch/arm/boot/dts/imx6sx-sdb.dts
> @@ -113,16 +113,12 @@
>  	status = "okay";
>  
>  	flash0: n25q256a at 0 {
> -		#address-cells = <1>;
> -		#size-cells = <1>;
>  		compatible = "micron,n25q256a", "jedec,spi-nor";
>  		spi-max-frequency = <29000000>;
>  		reg = <0>;
>  	};
>  
>  	flash1: n25q256a at 1 {
> -		#address-cells = <1>;
> -		#size-cells = <1>;
>  		compatible = "micron,n25q256a", "jedec,spi-nor";
>  		spi-max-frequency = <29000000>;
>  		reg = <1>;
> 

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

* Re: [PATCH] ARM: dts: imx6: Remove unneeded address-cells/size-cells
       [not found]   ` <62f3cb01-ff85-0fe0-2afa-0fe4732a7421-vA1bhqPz9FBZXbeN9DUtxg@public.gmane.org>
@ 2017-11-12 12:14     ` Fabio Estevam
  2017-11-13  7:55     ` Uwe Kleine-König
  1 sibling, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2017-11-12 12:14 UTC (permalink / raw)
  To: Christopher Spinrath
  Cc: Shawn Guo, Sascha Hauer, Rob Herring, Mark Rutland, Russell King,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Hi Christopher,

On Sat, Nov 11, 2017 at 12:24 PM, Christopher Spinrath
<christopher.spinrath-vA1bhqPz9FBZXbeN9DUtxg@public.gmane.org> wrote:

> This results in a regression for those devices where U-Boot is supposed
> to inject the partition sub-nodes. For example, this is the case for
> cm-fx6 module based devices like the Utilite Pro.
>
> Linux fails to parse the partitions and reports:
> [    9.330881] spi0.0: error parsing ofpart partition
> /soc/aips-bus@2000000/spba-bus@2000000/ecspi@2008000/m25p80@0/partition@0
> (/soc/aips-bus@2000000/spba-bus@2000000/ecspi@2008000/m25p80@0)
> [    9.330887] mtd: failed to find partitions; one or more parsers
> reports errors (-22)
>
> Also, the documentation does not forbid the #address-cells/size-cells if
> no partitions are present.
>
> So, please, drop this patch (or exclude at least the cm-fx6 related change).

Good point! I will resend the patch and will only change the NXP boards.

Thanks
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] ARM: dts: imx6: Remove unneeded address-cells/size-cells
       [not found]   ` <62f3cb01-ff85-0fe0-2afa-0fe4732a7421-vA1bhqPz9FBZXbeN9DUtxg@public.gmane.org>
  2017-11-12 12:14     ` Fabio Estevam
@ 2017-11-13  7:55     ` Uwe Kleine-König
  1 sibling, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2017-11-13  7:55 UTC (permalink / raw)
  To: Christopher Spinrath
  Cc: Fabio Estevam, Shawn Guo, Sascha Hauer, Mark Rutland,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring,
	Russell King,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org

Hello,

On Sat, Nov 11, 2017 at 03:24:47PM +0100, Christopher Spinrath wrote:
> (I'm sorry if I've missed some recipients or broke the email thread but
> I got Fabio's email from the infradead archive.)
> 
> On 11/10/2017 10:12 PM, festevam at gmail.com (Fabio Estevam) wrote:
> > From: Fabio Estevam <fabio.estevam at nxp.com>
> > 
> > According to Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt:
> > 
> > "- #address-cells, #size-cells : Must be present if the device has
> > sub-nodes representing partitions."
> > 
> > Remove the occurrences of #address-cells/size-cells where no sub-nodes
> > representing partitions are present.
> 
> This results in a regression for those devices where U-Boot is supposed
> to inject the partition sub-nodes. For example, this is the case for
> cm-fx6 module based devices like the Utilite Pro.

sounds like an U-Boot bug that it inserts partition nodes, but doesn't
ensure matching #address-cells/size-cells are specified.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-11-13  7:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-10 21:12 [PATCH] ARM: dts: imx6: Remove unneeded address-cells/size-cells Fabio Estevam
2017-11-11 14:24 ` Christopher Spinrath
     [not found]   ` <62f3cb01-ff85-0fe0-2afa-0fe4732a7421-vA1bhqPz9FBZXbeN9DUtxg@public.gmane.org>
2017-11-12 12:14     ` Fabio Estevam
2017-11-13  7:55     ` Uwe Kleine-König

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).