@@ -65,6 +65,8 @@ def id(self) -> Optional[str]:
6565 board_id = self ._armbian_id () or self ._allwinner_variants_id ()
6666 elif chip_id == chips .BCM2XXX :
6767 board_id = self ._pi_id ()
68+ elif chip_id == chips .AM625X :
69+ board_id = self ._beaglebone_id ()
6870 elif chip_id == chips .AM33XX :
6971 board_id = self ._beaglebone_id ()
7072 elif chip_id == chips .AM65XX :
@@ -184,7 +186,7 @@ def id(self) -> Optional[str]:
184186 elif chip_id == chips .GENERIC_X86 :
185187 board_id = boards .GENERIC_LINUX_PC
186188 elif chip_id == chips .TDA4VM :
187- board_id = self ._tisk_id ()
189+ board_id = self ._beaglebone_id () or self . _tisk_id ()
188190 elif chip_id == chips .D1_RISCV :
189191 board_id = self ._armbian_id ()
190192 elif chip_id == chips .S905X :
@@ -270,7 +272,12 @@ def _beaglebone_id(self) -> Optional[str]:
270272 with open ("/sys/bus/nvmem/devices/0-00501/nvmem" , "rb" ) as eeprom :
271273 eeprom_bytes = eeprom .read (16 )
272274 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
274281
275282 if eeprom_bytes [:4 ] != b"\xaa U3\xee " :
276283 return None
@@ -280,6 +287,14 @@ def _beaglebone_id(self) -> Optional[str]:
280287 if eeprom_bytes == b"\xaa U3\xee A335BNLT\x1a \x00 \x00 \x00 " :
281288 return boards .BEAGLEBONE_GREEN
282289
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+
283298 id_string = eeprom_bytes [4 :].decode ("ascii" )
284299 for model , bb_ids in boards ._BEAGLEBONE_BOARD_IDS .items ():
285300 for bb_id in bb_ids :
0 commit comments