WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Pi Board Hardware Revisions  (Read 3973 times)

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 764
Pi Board Hardware Revisions
« on: December 20, 2015, 11:58:32 AM »
Hi guys!

I'm in the process of re-writing tce-load (to support utilizing armv6 and armv7 repositories so that I don't have to constantly add things manually when they're missing from v7) and figured I'd do a little hardware detection to determine where to start within the repository, including the 7.x repo.  As such, I stopped by the wikipedia and it seems the grid they have regarding processors, etc. is potentially inaccurate.  (ie: I have a Pi2B w/ BCM2709 showing in cpuinfo...  the wiki, however, notes it should be a BCM2836.)

Does anyone have a reliable list (starting with Pi-1A) by chance?

Online Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: Pi Board Hardware Revisions
« Reply #1 on: December 20, 2015, 12:57:44 PM »
I would look at http://elinux.org/RPi_Hardware

But your question is more what is reported by software, vs the actual hardware chip name.

Here is a quote from popcornmix as it relates to the BCM2835
Quote
Technically 2708 is the family, and 2835 is a specific implementation.

for /proc/cpuinfo
Model A,B,B+ will report as a BCM2708
Rpi2's will report as BCM2709

Not sure about the pi0

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 764
Re: Pi Board Hardware Revisions
« Reply #2 on: December 20, 2015, 05:07:27 PM »
@paul: Thanks for the tip.  (I might have to take a different approach.)
As for the Zero...  one would "hope" it shows as 2708 considering it's supposed to be a Pi-A remake...  but we shall see if/when they're available without spending a small fortune on eBay :)

Cheers!

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 404
Re: Pi Board Hardware Revisions
« Reply #3 on: December 20, 2015, 08:10:29 PM »
Hi guys!

I'm in the process of re-writing tce-load (to support utilizing armv6 and armv7 repositories so that I don't have to constantly add things manually when they're missing from v7) and figured I'd do a little hardware detection to determine where to start within the repository, including the 7.x repo.  As such, I stopped by the wikipedia and it seems the grid they have regarding processors, etc. is potentially inaccurate.  (ie: I have a Pi2B w/ BCM2709 showing in cpuinfo...  the wiki, however, notes it should be a BCM2836.)

Does anyone have a reliable list (starting with Pi-1A) by chance?

hi centralware,

Here is the code we use in piCorePlayer. It may be overkill for your situation. It is not guaranteed to be 100% correct, but there are hundreds of people depending on it and no bugs at the moment. The Raspberry Pi Zero code has not been tested yet as I don't have a RPi0.

Code: [Select]
#=========================================================================================
# Determine revisions and features of Raspberry Pi
#-----------------------------------------------------------------------------------------
# References:
#   http://elinux.org/RPi_HardwareHistory#Board_Revision_History
#   http://www.raspberrypi.org/forums/viewtopic.php?f=63&t=32733&p=301930&hilit=revision+identification&sid=e70960c27964330d9677de2eff077b80#p301930
#   http://raspberryalphaomega.org.uk/2013/02/06/automatic-raspberry-pi-board-revision-detection-model-a-b1-and-b2/
#   git://git.drogon.net/wiringPi

# For RPi1:
#    100000e
#    |  ---- Revision
#    Warranty bit

# For RPi2:
#    [USER:8] [NEW:1] [MEMSIZE:3] [MANUFACTURER:4] [PROCESSOR:4] [TYPE:8] [REV:4]
#    NEW            23: will be 1 for the new scheme, 0 for the old scheme
#    MEMSIZE        20: 0=256M    1=512M    2=1G
#    MANUFACTURER   16: 0=SONY    1=EGOMAN  2=EMBEST
#    PROCESSOR      12: 0=2835    1=2836   
#    TYPE           04: 0=MODELA  1=MODELB  2=MODELA+  3=MODELB+  4=Pi2 MODEL B  5=ALPHA  6=CM
#    REV            00: 0=REV0    1=REV1    2=REV2

#    *a21041
#    ||||||1=REV1
#    |||||4=Pi2 MODEL B
#    ||||0=2835
#    |||1=EGOMAN
#    ||2=1G
#    |USER
#    Warranty bit
#-----------------------------------------------------------------------------------------
pcp_rpi_revision() {
awk -F: '/^Revision/ { print $2 }' /proc/cpuinfo | sed 's/ //g'
}

pcp_rpi_details() {
case $(pcp_rpi_revision) in
*Beta)  MODEL=B;    PCBREV=Beta; MEMORY=256;;
*0002)  MODEL=B;    PCBREV=1;    MEMORY=256;;
*0003)  MODEL=B;    PCBREV=1+;   MEMORY=256;;
*0004)  MODEL=B;    PCBREV=2;    MEMORY=256;;
*0005)  MODEL=B;    PCBREV=2;    MEMORY=256;;
*0006)  MODEL=B;    PCBREV=2;    MEMORY=256;;
*0007)  MODEL=A;    PCBREV=2;    MEMORY=256;;
*0008)  MODEL=A;    PCBREV=2;    MEMORY=256;;
*0009)  MODEL=A;    PCBREV=2;    MEMORY=256;;
*000d)  MODEL=B;    PCBREV=2;    MEMORY=512;;
*000e)  MODEL=B;    PCBREV=2;    MEMORY=512;;
*000f)  MODEL=B;    PCBREV=2;    MEMORY=512;;
*0010)  MODEL=B+;   PCBREV=1.2;  MEMORY=512;;
*0011)  MODEL=CM;   PCBREV=1.0;  MEMORY=512;;
*0012)  MODEL=A+;   PCBREV=1;    MEMORY=256;;
*0013)  MODEL=B+;   PCBREV=1.2;  MEMORY=512;;
*0014)  MODEL=CM;   PCBREV=1.1;  MEMORY=512;; # Check PCBREV
*0015)  MODEL=A+;   PCBREV=1.1;  MEMORY=256;;
*041)   MODEL=2B;   PCBREV=1;    MEMORY=1024;;
*0092)  MODEL=ZERO; PCBREV=1;    MEMORY=512;;
*)      MODEL=?;    PCBREV=?;    MEMORY=?;;
esac

case $MODEL$PCBREV in
*B1)    HARDWARE=BCM2708; ETHER=1; USB=2; LED=5; P2PINS=1; HOLES=0; PIN3=0; PIN5=1; PIN13=21; I2C=0; P5=0; P6=0;;
*B1+)   HARDWARE=BCM2708; ETHER=1; USB=2; LED=5; P2PINS=0; HOLES=0; PIN3=0; PIN5=1; PIN13=21; I2C=0; P5=0; P6=0;;
*B2)    HARDWARE=BCM2708; ETHER=1; USB=2; LED=5; P2PINS=0; HOLES=2; PIN3=1; PIN5=2; PIN13=27; I2C=1; P5=8; P6=2;;
*A2)    HARDWARE=BCM2708; ETHER=0; USB=1; LED=2; P2PINS=0; HOLES=2; PIN3=1; PIN5=2; PIN13=27; I2C=1; P5=8; P6=2;;
*B+*)   HARDWARE=BCM2708; ETHER=1; USB=4; LED=2; P2PINS=0; HOLES=4; PIN3=X; PIN5=X; PIN13=X;  I2C=X; P5=X; P6=X;;
*CM*)   HARDWARE=BCM2708; ETHER=0; USB=0; LED=X; P2PINS=0; HOLES=0; PIN3=X; PIN5=X; PIN13=X;  I2C=X; P5=X; P6=X;;
*A+*)   HARDWARE=BCM2708; ETHER=0; USB=1; LED=2; P2PINS=0; HOLES=4; PIN3=1; PIN5=2; PIN13=X;  I2C=X; P5=X; P6=X;;
*2B*)   HARDWARE=BCM2709; ETHER=1; USB=4; LED=2; P2PINS=0; HOLES=4; PIN3=X; PIN5=X; PIN13=X;  I2C=X; P5=X; P6=X;;
*ZERO*) HARDWARE=BCM2708; ETHER=0; USB=1; LED=2; P2PINS=0; HOLES=4; PIN3=X; PIN5=X; PIN13=X;  I2C=X; P5=X; P6=X;;
*)      HARDWARE=X;       ETHER=X; USB=X; LED=X; P2PINS=X; HOLES=X; PIN3=X; PIN5=X; PIN13=X;  I2C=X; P5=X; P6=X;;
esac
}

regards
Greg

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Pi Board Hardware Revisions
« Reply #4 on: December 21, 2015, 01:08:03 AM »
Try this:

Code: [Select]
cat /proc/device-tree/model
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 404
Re: Pi Board Hardware Revisions
« Reply #5 on: December 21, 2015, 01:24:03 AM »
Try this:

Code: [Select]
cat /proc/device-tree/model

Hi bmarkus,

That's great!

When did they add that?

regards
Greg

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Pi Board Hardware Revisions
« Reply #6 on: December 21, 2015, 01:31:48 AM »
Try this:

Code: [Select]
cat /proc/device-tree/model

When did they add that?


Do not know exactly but guess with the first device-tree kernel as this info is needed for kernel itself for proper operation.

Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline geev03

  • Newbie
  • *
  • Posts: 31
Re: Pi Board Hardware Revisions
« Reply #7 on: December 21, 2015, 07:50:37 AM »
>As for the Zero...  one would "hope" it shows as 2708 considering it's supposed to be a Pi-A remake..
Yes, it shows as BCM2708 , Revision 900092

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Pi Board Hardware Revisions
« Reply #8 on: December 21, 2015, 07:55:27 AM »
What is the output of

cat /proc/device-tree/model

on Zero with piCore-7.0beta1?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline jncl

  • Newbie
  • *
  • Posts: 38
Re: Pi Board Hardware Revisions
« Reply #9 on: December 23, 2015, 08:04:38 AM »
Hi Béla,

  The output from cat /proc/device-tree/model for RPi Zero on 7.0rc1 is
Code: [Select]
Raspberry Pi ? Rev 1.2

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Pi Board Hardware Revisions
« Reply #10 on: December 23, 2015, 04:34:47 PM »
Hi Béla,

  The output from cat /proc/device-tree/model for RPi Zero on 7.0rc1 is
Code: [Select]
Raspberry Pi ? Rev 1.2

Thanks. It looks like 4.1.13 doesn't know Zero. Not a big issue, it is the only unknown board so easy to convert ? to Zero :)
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 764
Re: Pi Board Hardware Revisions
« Reply #11 on: December 31, 2015, 02:29:05 AM »
Thanks everyone!  Truly appreciated!