Home

Awesome

raspberry_pi_revision

C function to decode the Revision: field of /proc/cpuinfo on the Raspberry Pi.

Known revisions

The file /proc/cpuinfo contains a line such as:-

Revision : 0003

Prior to Raspberry Pi 2

that holds the revision number of the Raspberry Pi. Known revisions (prior to the Raspberry Pi 2) are:

RevisionModelPCB RevMemoryManufacturer
0000
0001
0002B1256 MBEgoman
0003B1256 MBEgoman
0004B2256 MBSony UK
0005B2256 MBQisda
0006B2256 MBEgoman
0007A2256 MBEgoman
0008A2256 MBSony UK
0009A2256 MBQisda
000a
000b
000c
000dB2512 MBEgoman
000eB2512 MBSony UK
000fB2512 MBEgoman
0010B+1512 MBSony UK
0011compute1512 MBSony UK
0012A+1256 MBSony UK
0013B+1512 MBEmbest
0014compute1512 MBEmbest
0015A+1256 MBEmbest
0015A+1512 MBEmbest

If the Raspberry Pi has been over-volted (voiding the warranty) the revision number will have 100 at the front. e.g. 1000002.

Raspberry Pi 2 / Model Zero

With the release of the Raspberry Pi 2, there is a new encoding of the Revision field in /proc/cpuinfo. The bit fields are as follows

FEDCBA9876543210FEDCBA9876543210
HGFEEEDDDDCCCCBBBBBBBBAAAA
10987654321098765432109876543210
#bitscontainsvalues
A00-03PCB Revision(the pcb revision number)
B04-11Model nameA, B, A+, B+, B Pi2, Alpha, Compute Module, unknown, Pi3, Zero, Compute Module 3, unknown, Zero W, Pi3+, 3A+, unknown, Compute Module 3+, Pi4, Zero 2 W, Compute Module 4, 400, Compute Module 4S, unknown, Pi5
C12-15ProcessorBCM2835, BCM2836, BCM2837, BCM2711, BCM2712
D16-19ManufacturerSony UK, Egoman, Embest, Sony Japan, Embest, Stadium
E20-22Memory size256 MB, 512 MB, 1024 MB, 2048 MB, 4096 MB, 8192 MB
F23-23encoded flag(if set, revision is a bit field)
G24-24waranty bit(if set, warranty void - Pre Pi2)
H25-25waranty bit(if set, warranty void - Post Pi2)

Also, due to some early issues the warranty bit has been move from bit 24 to bit 25 of the revision number (i.e. 0x2000000).

e.g.

Revision : A01041

A - PCB Revision - 1 (first revision)
B - Model Name - 4 (Model B Pi 2)
C - Processor - 1 (BCM2836)
D - Manufacturer - 0 (Sony UK)
E - Memory - 2 (1024 MB)
F - Endcoded flag - 1 (encoded cpu info)

Revision : A21041

A - PCB Revision - 1 (first revision)
B - Model Name - 4 (Model B Pi 2)
C - Processor - 1 (BCM2836)
D - Manufacturer - 2 (Embest)
E - Memory - 2 (1024 MB)
F - Endcoded flag - 1 (encoded cpu info)

Revision : 900092

A - PCB Revision - 2 (second revision)
B - Model Name - 9 (Model Zero)
C - Processor - 0 (BCM2835)
D - Manufacturer - 0 (Sony UK)
E - Memory - 1 (512 MB)
F - Endcoded flag - 1 (encoded cpu info)

Revision : A02082

A - PCB Revision - 2 (second revision)
B - Model Name - 8 (Model B Pi 3)
C - Processor - 2 (BCM2837)
D - Manufacturer - 0 (Sony UK)
E - Memory - 2 (1024 MB)
F - Endcoded flag - 1 (encoded cpu info)

Revision : A52082

A - PCB Revision - 2 (second revision)
B - Model Name - 8 (Model B Pi 3)
C - Processor - 2 (BCM2837)
D - Manufacturer - 5 (Stadium)
E - Memory - 2 (1024 MB)
F - Endcoded flag - 1 (encoded cpu info)

Revision : B03111

A - PCB Revision - 1 (first revision)
B - Model Name - 17 (Model B Pi 4)
C - Processor - 3 (BCM2711)
D - Manufacturer - 0 (Sony UK)
E - Memory - 3 (2048 MB)
F - Endcoded flag - 1 (encoded cpu info)