Skip to content

Commit bc4cede

Browse files
authored
Merge pull request #9 from adafruit/pi_overvolt_codes
pi revision codes: add overvolt / overclock indicator codes to list
2 parents 9830db0 + c14d7d6 commit bc4cede

File tree

1 file changed

+60
-13
lines changed

1 file changed

+60
-13
lines changed

adafruit_platformdetect/board.py

Lines changed: 60 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -151,20 +151,67 @@
151151
# Pi revision codes from:
152152
# https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
153153

154+
# Each tuple here contains both the base codes, and the versions that indicate
155+
# the Pi is overvolted / overclocked - for 4-digit codes, this will be prefixed
156+
# with 1000, and for 6-digit codes it'll be prefixed with 1. These are placed
157+
# on separate lines.
158+
154159
_PI_REV_CODES = {
155-
RASPBERRY_PI_B_REV1: ('0002', '0003'),
156-
RASPBERRY_PI_B_REV2: ('0005', '0006', '000d', '000e', '000f'),
157-
RASPBERRY_PI_B_PLUS: ('0010', '0013', '900032'),
158-
RASPBERRY_PI_A: ('0007', '0008', '0009'),
159-
RASPBERRY_PI_A_PLUS: ('0012', '0015', '900021'),
160-
RASPBERRY_PI_CM1: ('0011', '0014'),
161-
RASPBERRY_PI_ZERO: ('900092', '920092', '900093', '920093'),
162-
RASPBERRY_PI_ZERO_W: ('9000c1',),
163-
RASPBERRY_PI_2B: ('a01040', 'a01041', 'a21041', 'a22042'),
164-
RASPBERRY_PI_3B: ('a02082', 'a22082', 'a32082', 'a52082'),
165-
RASPBERRY_PI_3B_PLUS: ('a020d3',),
166-
RASPBERRY_PI_CM3: ('a020a0',),
167-
RASPBERRY_PI_3A_PLUS: ('9020e0',),
160+
RASPBERRY_PI_B_REV1: (
161+
# Regular codes:
162+
'0002', '0003',
163+
164+
# Overvolted/clocked versions:
165+
'10000002', '10000003',
166+
),
167+
RASPBERRY_PI_B_REV2: (
168+
'0005', '0006', '000d', '000e', '000f',
169+
'10000005', '10000006', '1000000d', '1000000e', '1000000f',
170+
),
171+
RASPBERRY_PI_B_PLUS: (
172+
'0010', '0013', '900032',
173+
'10000010', '10000013', '1900032',
174+
),
175+
RASPBERRY_PI_A: (
176+
'0007', '0008', '0009',
177+
'10000007', '10000008', '10000009',
178+
),
179+
RASPBERRY_PI_A_PLUS: (
180+
'0012', '0015', '900021',
181+
'10000012', '10000015', '1900021',
182+
),
183+
RASPBERRY_PI_CM1: (
184+
'0011', '0014',
185+
'10000011', '10000014',
186+
),
187+
RASPBERRY_PI_ZERO: (
188+
'900092', '920092', '900093', '920093'
189+
'1900092', '1920092', '1900093', '1920093',
190+
),
191+
RASPBERRY_PI_ZERO_W: (
192+
'9000c1',
193+
'19000c1',
194+
),
195+
RASPBERRY_PI_2B: (
196+
'a01040', 'a01041', 'a21041', 'a22042',
197+
'1a01040', '1a01041', '1a21041', '1a22042',
198+
),
199+
RASPBERRY_PI_3B: (
200+
'a02082', 'a22082', 'a32082', 'a52082',
201+
'1a02082', '1a22082', '1a32082', '1a52082',
202+
),
203+
RASPBERRY_PI_3B_PLUS: (
204+
'a020d3',
205+
'1a020d3',
206+
),
207+
RASPBERRY_PI_CM3: (
208+
'a020a0',
209+
'1a020a0',
210+
),
211+
RASPBERRY_PI_3A_PLUS: (
212+
'9020e0',
213+
'19020e0',
214+
),
168215
}
169216

170217
class Board:

0 commit comments

Comments
 (0)