@@ -65,6 +65,8 @@ def id(self) -> Optional[str]:
65
65
board_id = self ._armbian_id () or self ._allwinner_variants_id ()
66
66
elif chip_id == chips .BCM2XXX :
67
67
board_id = self ._pi_id ()
68
+ elif chip_id == chips .AM625X :
69
+ board_id = self ._beaglebone_id ()
68
70
elif chip_id == chips .AM33XX :
69
71
board_id = self ._beaglebone_id ()
70
72
elif chip_id == chips .AM65XX :
@@ -184,7 +186,7 @@ def id(self) -> Optional[str]:
184
186
elif chip_id == chips .GENERIC_X86 :
185
187
board_id = boards .GENERIC_LINUX_PC
186
188
elif chip_id == chips .TDA4VM :
187
- board_id = self ._tisk_id ()
189
+ board_id = self ._beaglebone_id () or self . _tisk_id ()
188
190
elif chip_id == chips .D1_RISCV :
189
191
board_id = self ._armbian_id ()
190
192
elif chip_id == chips .S905X :
@@ -270,7 +272,12 @@ def _beaglebone_id(self) -> Optional[str]:
270
272
with open ("/sys/bus/nvmem/devices/0-00501/nvmem" , "rb" ) as eeprom :
271
273
eeprom_bytes = eeprom .read (16 )
272
274
except FileNotFoundError :
273
- return None
275
+ try :
276
+ # Special Case for AI64
277
+ with open ("/sys/bus/nvmem/devices/2-00500/nvmem" , "rb" ) as eeprom :
278
+ eeprom_bytes = eeprom .read (16 )
279
+ except FileNotFoundError :
280
+ return None
274
281
275
282
if eeprom_bytes [:4 ] != b"\xaa U3\xee " :
276
283
return None
@@ -280,6 +287,14 @@ def _beaglebone_id(self) -> Optional[str]:
280
287
if eeprom_bytes == b"\xaa U3\xee A335BNLT\x1a \x00 \x00 \x00 " :
281
288
return boards .BEAGLEBONE_GREEN
282
289
290
+ # BeaglePlay Special Condition
291
+ # new Beagle EEPROM IDs are 24 Bit, so we need to verify full range
292
+ if eeprom_bytes == b"\xaa U3\xee \x01 7\x00 \x10 .\x00 BEAGLE" :
293
+ with open ("/sys/bus/nvmem/devices/0-00500/nvmem" , "rb" ) as eeprom :
294
+ eeprom_bytes = eeprom .read (24 )
295
+ if eeprom_bytes == b"\xaa U3\xee \x01 7\x00 \x10 .\x00 BEAGLEPLAY-A0-" :
296
+ return boards .BEAGLE_PLAY
297
+
283
298
id_string = eeprom_bytes [4 :].decode ("ascii" )
284
299
for model , bb_ids in boards ._BEAGLEBONE_BOARD_IDS .items ():
285
300
for bb_id in bb_ids :
0 commit comments