All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] rpi: fix up Model B entries
@ 2016-01-25 20:36 Lubomir Rintel
  2016-01-27  3:39 ` Stephen Warren
  2016-01-29  5:22 ` Stephen Warren
  0 siblings, 2 replies; 4+ messages in thread
From: Lubomir Rintel @ 2016-01-25 20:36 UTC (permalink / raw)
  To: u-boot

It seems like the P5 header was not present on "Model B" any board prior
to Revision 2.0, there's no need for a separate device tree.

Also, it looks like "rev2" is incorrectly used to only cover the 512MiB
memory models; there also were 256MiB 2.0 boards.

I don't have all of the boards to check this, I'm following this table:
http://elinux.org/RPi_HardwareHistory#Board_Revision_History
---
 board/raspberrypi/rpi/rpi.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 4b80d7b..b344362 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -110,28 +110,28 @@ static const struct rpi_model rpi_models_new_scheme[] = {
 
 static const struct rpi_model rpi_models_old_scheme[] = {
 	[0x2] = {
-		"Model B (no P5)",
-		"bcm2835-rpi-b-i2c0.dtb",
+		"Model B",
+		"bcm2835-rpi-b.dtb",
 		true,
 	},
 	[0x3] = {
-		"Model B (no P5)",
-		"bcm2835-rpi-b-i2c0.dtb",
+		"Model B",
+		"bcm2835-rpi-b.dtb",
 		true,
 	},
 	[0x4] = {
-		"Model B",
-		"bcm2835-rpi-b.dtb",
+		"Model B rev2",
+		"bcm2835-rpi-b-rev2.dtb",
 		true,
 	},
 	[0x5] = {
-		"Model B",
-		"bcm2835-rpi-b.dtb",
+		"Model B rev2",
+		"bcm2835-rpi-b-rev2.dtb",
 		true,
 	},
 	[0x6] = {
-		"Model B",
-		"bcm2835-rpi-b.dtb",
+		"Model B rev2",
+		"bcm2835-rpi-b-rev2.dtb",
 		true,
 	},
 	[0x7] = {
-- 
2.5.0

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

* [U-Boot] [PATCH] rpi: fix up Model B entries
  2016-01-25 20:36 [U-Boot] [PATCH] rpi: fix up Model B entries Lubomir Rintel
@ 2016-01-27  3:39 ` Stephen Warren
  2016-01-27 14:47   ` popcorn mix
  2016-01-29  5:22 ` Stephen Warren
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2016-01-27  3:39 UTC (permalink / raw)
  To: u-boot

On 01/25/2016 01:36 PM, Lubomir Rintel wrote:
> It seems like the P5 header was not present on "Model B" any board prior
> to Revision 2.0, there's no need for a separate device tree.
> 
> Also, it looks like "rev2" is incorrectly used to only cover the 512MiB
> memory models; there also were 256MiB 2.0 boards.
> 
> I don't have all of the boards to check this, I'm following this table:
> http://elinux.org/RPi_HardwareHistory#Board_Revision_History

Yes, I believe this makes sense, and is consistent with the URLs listed
as data sources just a little above the model table.

I tested this patch on board rev 0x2 (B, no P5/rev1, 256M), 0x8 (A,
256M), 0xf (B, P5/rev2, 512M).

Acked-by: Stephen Warren <swarren@wwwdotorg.org>

It would be really nice if you could get someone at the Pi Foundation to
validate the complete updated tables (at least, the revision number to
model name mapping) in this file after this patch. I CC'd Gordon and Dom
to see if one of them could do that, or track someone down who can.
Gordon, Dom, you can find the file content at:

> https://github.com/swarren/u-boot/blob/rpi_dev/board/raspberrypi/rpi/rpi.c#L98

P.S. Lubomir, I used my personal email swarren at wwwdotorg.org for RPi
work, not my work email swarren at nvidia.com.

Thanks for working on cleaning this up.

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

* [U-Boot] [PATCH] rpi: fix up Model B entries
  2016-01-27  3:39 ` Stephen Warren
@ 2016-01-27 14:47   ` popcorn mix
  0 siblings, 0 replies; 4+ messages in thread
From: popcorn mix @ 2016-01-27 14:47 UTC (permalink / raw)
  To: u-boot

I believe this is accurate for identifying boards from revision numbers:
https://github.com/AndrewFromMelbourne/raspberry_pi_revision

From the firmware, old style revision numbers:

      case 0x02: case 0x03:
         boardrev = MAKE_BOARDREV(MODELB, 1_1); break;
      case 0x04: case 0x05: case 0x06:
         boardrev = MAKE_BOARDREV(MODELB, 1_2); break;
      case 0x07: case 0x08: case 0x09:
         boardrev = MAKE_BOARDREV(MODELA, 1_2); break;
      case 0x0d: case 0x0e: case 0x0f:
         boardrev = MAKE_BOARDREV(MODELB, 1_2); break;
      case 0x10: case 0x13: case 0x16: case 0x19:
         boardrev = MAKE_BOARDREV(MODELBPLUS, 1_2);
         break;
      case 0x11: case 0x14: case 0x17: case 0x1a:
         boardrev = MAKE_BOARDREV(CM, 1_0); break;
      case 0x12: case 0x15: case 0x18: case 0x1b:
         boardrev = MAKE_BOARDREV(MODELAPLUS, 1_1); break;
      default:
         boardrev = MAKE_BOARDREV(MODELB, 1_2); break;
      }

and new style (bits 4-11):

typedef enum
{
   BOARD_TYPE_MODELA = 0,
   BOARD_TYPE_MODELB = 1,
   BOARD_TYPE_MODELAPLUS = 2,
   BOARD_TYPE_MODELBPLUS = 3,
   BOARD_TYPE_PI2MODELB = 4,
   BOARD_TYPE_ALPHA = 5,
   BOARD_TYPE_CM = 6,
   BOARD_TYPE_PI0 = 9,
} BOARD_TYPE_T;

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

* [U-Boot] [PATCH] rpi: fix up Model B entries
  2016-01-25 20:36 [U-Boot] [PATCH] rpi: fix up Model B entries Lubomir Rintel
  2016-01-27  3:39 ` Stephen Warren
@ 2016-01-29  5:22 ` Stephen Warren
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Warren @ 2016-01-29  5:22 UTC (permalink / raw)
  To: u-boot

On 01/25/2016 01:36 PM, Lubomir Rintel wrote:
> It seems like the P5 header was not present on "Model B" any board prior
> to Revision 2.0, there's no need for a separate device tree.
> 
> Also, it looks like "rev2" is incorrectly used to only cover the 512MiB
> memory models; there also were 256MiB 2.0 boards.
> 
> I don't have all of the boards to check this, I'm following this table:
> http://elinux.org/RPi_HardwareHistory#Board_Revision_History
> ---

You forgot you signed-off-by line on this patch. You also possibly need
to Cc Tom Rini so he knows the patch exists.

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

end of thread, other threads:[~2016-01-29  5:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-25 20:36 [U-Boot] [PATCH] rpi: fix up Model B entries Lubomir Rintel
2016-01-27  3:39 ` Stephen Warren
2016-01-27 14:47   ` popcorn mix
2016-01-29  5:22 ` Stephen Warren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.