devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFT] ARM: bcm2835: dt: fix memory of Raspberry Pi B+
@ 2015-10-15 20:48 Stefan Wahren
       [not found] ` <1444942124-23122-1-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Wahren @ 2015-10-15 20:48 UTC (permalink / raw)
  To: Stephen Warren, Lee Jones, Eric Anholt
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Since the Raspberry Pi models differ in memory amount we
better define it at board level. After that we are able
to fix the memory node of the Raspberry Pi B+ .

Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
---
 arch/arm/boot/dts/bcm2835-rpi-a-plus.dts |    4 ++++
 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts |    4 ++++
 arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts |    4 ++++
 arch/arm/boot/dts/bcm2835-rpi-b.dts      |    4 ++++
 arch/arm/boot/dts/bcm2835-rpi.dtsi       |    4 ----
 5 files changed, 16 insertions(+), 4 deletions(-)

This patch is only compile-tested.

diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
index b2bff43..c08dff2 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
@@ -5,6 +5,10 @@
 	compatible = "raspberrypi,model-a-plus", "brcm,bcm2835";
 	model = "Raspberry Pi Model A+";
 
+	memory {
+		reg = <0 0x10000000>; /* 256 MB */
+	};
+
 	leds {
 		act {
 			gpios = <&gpio 47 0>;
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
index 668442b..b4a1e56 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
@@ -5,6 +5,10 @@
 	compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
 	model = "Raspberry Pi Model B+";
 
+	memory {
+		reg = <0 0x20000000>; /* 512 MB */
+	};
+
 	leds {
 		act {
 			gpios = <&gpio 47 0>;
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
index eab8b591..e6ccfab 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
@@ -5,6 +5,10 @@
 	compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835";
 	model = "Raspberry Pi Model B rev2";
 
+	memory {
+		reg = <0 0x10000000>; /* 256 MB */
+	};
+
 	leds {
 		act {
 			gpios = <&gpio 16 1>;
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
index ff6b2d1..bfd917c 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
@@ -5,6 +5,10 @@
 	compatible = "raspberrypi,model-b", "brcm,bcm2835";
 	model = "Raspberry Pi Model B";
 
+	memory {
+		reg = <0 0x10000000>; /* 256 MB */
+	};
+
 	leds {
 		act {
 			gpios = <&gpio 16 1>;
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index 3572f03..d1c6538 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -1,10 +1,6 @@
 #include "bcm2835.dtsi"
 
 / {
-	memory {
-		reg = <0 0x10000000>;
-	};
-
 	leds {
 		compatible = "gpio-leds";
 
-- 
1.7.10.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 RFT] ARM: bcm2835: dt: fix memory of Raspberry Pi B+
       [not found] ` <1444942124-23122-1-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
@ 2015-10-20  8:53   ` Eric Anholt
       [not found]     ` <8737x5ncod.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Anholt @ 2015-10-20  8:53 UTC (permalink / raw)
  To: Stefan Wahren, Stephen Warren, Lee Jones
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

[-- Attachment #1: Type: text/plain, Size: 2834 bytes --]

Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org> writes:

> Since the Raspberry Pi models differ in memory amount we
> better define it at board level. After that we are able
> to fix the memory node of the Raspberry Pi B+ .
>
> Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
> ---
>  arch/arm/boot/dts/bcm2835-rpi-a-plus.dts |    4 ++++
>  arch/arm/boot/dts/bcm2835-rpi-b-plus.dts |    4 ++++
>  arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts |    4 ++++
>  arch/arm/boot/dts/bcm2835-rpi-b.dts      |    4 ++++
>  arch/arm/boot/dts/bcm2835-rpi.dtsi       |    4 ----
>  5 files changed, 16 insertions(+), 4 deletions(-)
>
> This patch is only compile-tested.
>
> diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
> index b2bff43..c08dff2 100644
> --- a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
> +++ b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
> @@ -5,6 +5,10 @@
>  	compatible = "raspberrypi,model-a-plus", "brcm,bcm2835";
>  	model = "Raspberry Pi Model A+";
>  
> +	memory {
> +		reg = <0 0x10000000>; /* 256 MB */
> +	};
> +
>  	leds {
>  		act {
>  			gpios = <&gpio 47 0>;
> diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
> index 668442b..b4a1e56 100644
> --- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
> +++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
> @@ -5,6 +5,10 @@
>  	compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
>  	model = "Raspberry Pi Model B+";
>  
> +	memory {
> +		reg = <0 0x20000000>; /* 512 MB */
> +	};
> +
>  	leds {
>  		act {
>  			gpios = <&gpio 47 0>;
> diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
> index eab8b591..e6ccfab 100644
> --- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
> +++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
> @@ -5,6 +5,10 @@
>  	compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835";
>  	model = "Raspberry Pi Model B rev2";
>  
> +	memory {
> +		reg = <0 0x10000000>; /* 256 MB */
> +	};
> +
>  	leds {
>  		act {
>  			gpios = <&gpio 16 1>;
> diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
> index ff6b2d1..bfd917c 100644
> --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
> +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
> @@ -5,6 +5,10 @@
>  	compatible = "raspberrypi,model-b", "brcm,bcm2835";
>  	model = "Raspberry Pi Model B";
>  
> +	memory {
> +		reg = <0 0x10000000>; /* 256 MB */
> +	};
> +
>  	leds {
>  		act {
>  			gpios = <&gpio 16 1>;

Seems like a good idea.  The closed firmware passes us an edited
devicetree with good memory fields, but I don't think U-Boot is up to it
if you chainload it.

However, isn't the rpi-b-rev2 the 512MB variant of the rpi-b?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: [PATCH RFT] ARM: bcm2835: dt: fix memory of Raspberry Pi B+
       [not found]     ` <8737x5ncod.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
@ 2015-10-20 17:29       ` Stefan Wahren
  2015-10-21  2:37       ` Stephen Warren
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Wahren @ 2015-10-20 17:29 UTC (permalink / raw)
  To: Eric Anholt, Stefan Wahren, Stephen Warren, Lee Jones
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Am 20.10.2015 um 10:53 schrieb Eric Anholt:
> Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org> writes:
>
>> Since the Raspberry Pi models differ in memory amount we
>> better define it at board level. After that we are able
>> to fix the memory node of the Raspberry Pi B+ .
>>
>> Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
> [...]
>
> Seems like a good idea.  The closed firmware passes us an edited
> devicetree with good memory fields, but I don't think U-Boot is up to it
> if you chainload it.
>
> However, isn't the rpi-b-rev2 the 512MB variant of the rpi-b?
>

Unfortunately not. There are rev2 boards with 256 MB and with 512 MB RAM 
[1]. I'm not sure it is worth to create 2 dts files for both.

[1] - http://elinux.org/Board_revisions
--
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 RFT] ARM: bcm2835: dt: fix memory of Raspberry Pi B+
       [not found]     ` <8737x5ncod.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
  2015-10-20 17:29       ` Stefan Wahren
@ 2015-10-21  2:37       ` Stephen Warren
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Warren @ 2015-10-21  2:37 UTC (permalink / raw)
  To: Eric Anholt, Stefan Wahren
  Cc: Lee Jones, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On 10/20/2015 02:53 AM, Eric Anholt wrote:
> Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org> writes:
> 
>> Since the Raspberry Pi models differ in memory amount we better
>> define it at board level. After that we are able to fix the
>> memory node of the Raspberry Pi B+ .

>> diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
>> b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts

>> +	memory { +		reg = <0 0x10000000>; /* 256 MB */ +	}; +

> 
> Seems like a good idea.  The closed firmware passes us an edited 
> devicetree with good memory fields, but I don't think U-Boot is up
> to it if you chainload it.

U-Boot fills in the memory size in DT correctly too.

I have no objection to the patch since it looks correct at a very
brief glance, but I think it will have zero practical effect.
--
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:[~2015-10-21  2:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 20:48 [PATCH RFT] ARM: bcm2835: dt: fix memory of Raspberry Pi B+ Stefan Wahren
     [not found] ` <1444942124-23122-1-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2015-10-20  8:53   ` Eric Anholt
     [not found]     ` <8737x5ncod.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
2015-10-20 17:29       ` Stefan Wahren
2015-10-21  2:37       ` Stephen Warren

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