Skip to content

Commit 3e042bf

Browse files
authored
Merge pull request #411 from makermelissa-piclaw/fix-pocketbeagle2-pr409
Fix PocketBeagle 2 support: correct DT compatible string and black formatting
2 parents b75a8a9 + c9797d3 commit 3e042bf

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎adafruit_platformdetect/board.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,10 @@ def _beaglebone_id(self) -> Optional[str]:
373373
if eeprom_bytes[:4] != b"\xaaU3\xee":
374374
return None
375375

376+
# PocketBeagle 2 uses the new Beagle EEPROM format
377+
if eeprom_bytes == b"\xaaU3\xee\x017\x00\x10.\x00POCKET":
378+
return boards.BEAGLEBONE_POCKETBEAGLE_2
379+
376380
# special condition for BeagleBone Green rev. 1A
377381
# refer to GitHub issue #57 in this repo for more info
378382
if eeprom_bytes == b"\xaaU3\xeeA335BNLT\x1a\x00\x00\x00":

‎adafruit_platformdetect/chip.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ def _linux_id(self) -> Optional[str]:
211211
"""Attempt to detect the CPU on a computer running the Linux kernel."""
212212
if self.detector.check_dt_compatible_value("beagle,am67a-beagley-ai"):
213213
return chips.AM67A
214+
if self.detector.check_dt_compatible_value("beagle,am62-pocketbeagle2ti,am625"):
215+
return chips.AM625X
214216
if self.detector.check_dt_compatible_value("ti,am625"):
215217
return chips.AM625X
216218
if self.detector.check_dt_compatible_value("ti,am654"):

‎adafruit_platformdetect/constants/boards.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
BEAGLEBONE_BLUE = "BEAGLEBONE_BLUE"
1313
BEAGLEBONE_BLACK_WIRELESS = "BEAGLEBONE_BLACK_WIRELESS"
1414
BEAGLEBONE_POCKETBEAGLE = "BEAGLEBONE_POCKETBEAGLE"
15+
BEAGLEBONE_POCKETBEAGLE_2 = "BEAGLEBONE_POCKETBEAGLE_2"
1516
BEAGLEBONE_GREEN = "BEAGLEBONE_GREEN"
1617
BEAGLEBONE_GREEN_WIRELESS = "BEAGLEBONE_GREEN_WIRELESS"
1718
BEAGLEBONE_GREEN_GATEWAY = "BEAGLEBONE_GREEN_GATEWAY"
@@ -562,6 +563,7 @@
562563
BEAGLEBONE_BLUE,
563564
BEAGLEBONE_BLACK_WIRELESS,
564565
BEAGLEBONE_POCKETBEAGLE,
566+
BEAGLEBONE_POCKETBEAGLE_2,
565567
BEAGLEBONE_GREEN,
566568
BEAGLEBONE_GREEN_WIRELESS,
567569
BEAGLEBONE_GREEN_GATEWAY,
@@ -614,6 +616,7 @@
614616
BEAGLEBONE_BLUE: (("A2", "A335BNLTBLA2"),),
615617
BEAGLEBONE_BLACK_WIRELESS: (("A5", "A335BNLTBWA5"),),
616618
BEAGLEBONE_POCKETBEAGLE: (("A2", "A335PBGL00A2"),),
619+
BEAGLEBONE_POCKETBEAGLE_2: (("A0", "7.POCKET"),),
617620
BEAGLEBONE_GREEN: (("1A", "A335BNLT...."), ("UNKNOWN", "A335BNLTBBG1")),
618621
BEAGLEBONE_GREEN_WIRELESS: (("W1A", "A335BNLTGW1A"),),
619622
BEAGLEBONE_GREEN_GATEWAY: (("GA1", "A335BNLTGG1A"),),

0 commit comments

Comments
 (0)