From 3e6e7b98236a6032fd5d6ff7b3a4f409131b0807 Mon Sep 17 00:00:00 2001 From: explodeo Date: Sat, 21 Feb 2026 22:39:17 -0500 Subject: [PATCH 1/2] added support for PocketBeagle2 --- adafruit_platformdetect/board.py | 5 +++++ adafruit_platformdetect/chip.py | 2 ++ adafruit_platformdetect/constants/boards.py | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index a391abe..2050aae 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -369,6 +369,11 @@ def _beaglebone_id(self) -> Optional[str]: if eeprom_bytes[:4] != b"\xaaU3\xee": return None + # add support for PocketBeagle 2 + # should be caught in the else clause at the bottom but I couldn't figure it out + if eeprom_bytes == b"\xaaU3\xee\x017\x00\x10.\x00POCKET": + return boards.BEAGLEBONE_POCKETBEAGLE_2 + # special condition for BeagleBone Green rev. 1A # refer to GitHub issue #57 in this repo for more info if eeprom_bytes == b"\xaaU3\xeeA335BNLT\x1a\x00\x00\x00": diff --git a/adafruit_platformdetect/chip.py b/adafruit_platformdetect/chip.py index e073d45..d4af11f 100644 --- a/adafruit_platformdetect/chip.py +++ b/adafruit_platformdetect/chip.py @@ -208,6 +208,8 @@ def _linux_id(self) -> Optional[str]: """Attempt to detect the CPU on a computer running the Linux kernel.""" if self.detector.check_dt_compatible_value("beagle,am67a-beagley-ai"): return chips.AM67A + if self.detector.check_dt_compatible_value("beagle,am62-pocketbeagle2ti,am625"): + return chips.AM625X if self.detector.check_dt_compatible_value("ti,am625"): return chips.AM625X if self.detector.check_dt_compatible_value("ti,am654"): diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index cc8f945..8d99eb0 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -12,6 +12,7 @@ BEAGLEBONE_BLUE = "BEAGLEBONE_BLUE" BEAGLEBONE_BLACK_WIRELESS = "BEAGLEBONE_BLACK_WIRELESS" BEAGLEBONE_POCKETBEAGLE = "BEAGLEBONE_POCKETBEAGLE" +BEAGLEBONE_POCKETBEAGLE_2 = "BEAGLEBONE_POCKETBEAGLE_2" BEAGLEBONE_GREEN = "BEAGLEBONE_GREEN" BEAGLEBONE_GREEN_WIRELESS = "BEAGLEBONE_GREEN_WIRELESS" BEAGLEBONE_GREEN_GATEWAY = "BEAGLEBONE_GREEN_GATEWAY" @@ -559,6 +560,7 @@ BEAGLEBONE_BLUE, BEAGLEBONE_BLACK_WIRELESS, BEAGLEBONE_POCKETBEAGLE, + BEAGLEBONE_POCKETBEAGLE_2, BEAGLEBONE_GREEN, BEAGLEBONE_GREEN_WIRELESS, BEAGLEBONE_GREEN_GATEWAY, @@ -588,6 +590,7 @@ BEAGLEBONE_AI64: ("B0", "7.BBONEA"), # Original bone/white: BEAGLEBONE: ( + ("A3", "A335BONE00A3"), ("A4", "A335BONE00A4"), ("A5", "A335BONE00A5"), @@ -611,6 +614,7 @@ BEAGLEBONE_BLUE: (("A2", "A335BNLTBLA2"),), BEAGLEBONE_BLACK_WIRELESS: (("A5", "A335BNLTBWA5"),), BEAGLEBONE_POCKETBEAGLE: (("A2", "A335PBGL00A2"),), + BEAGLEBONE_POCKETBEAGLE_2: (("A0", "7.POCKET"),), BEAGLEBONE_GREEN: (("1A", "A335BNLT...."), ("UNKNOWN", "A335BNLTBBG1")), BEAGLEBONE_GREEN_WIRELESS: (("W1A", "A335BNLTGW1A"),), BEAGLEBONE_GREEN_GATEWAY: (("GA1", "A335BNLTGG1A"),), From c9797d3b1319ac2994d0b2584950ab984c342019 Mon Sep 17 00:00:00 2001 From: Piclaw Date: Wed, 22 Apr 2026 10:17:46 -0700 Subject: [PATCH 2/2] Fix PocketBeagle 2 support: black formatting and comment cleanup - Fix boards.py: Remove stray blank line inside BEAGLEBONE tuple that caused black formatting CI failure. - Clean up board.py comment: The special-case EEPROM check is the correct approach for new-format Beagle boards (like BeaglePlay), so replaced the uncertain comment with an explanatory one. --- adafruit_platformdetect/board.py | 3 +-- adafruit_platformdetect/constants/boards.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index 2050aae..158023c 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -369,8 +369,7 @@ def _beaglebone_id(self) -> Optional[str]: if eeprom_bytes[:4] != b"\xaaU3\xee": return None - # add support for PocketBeagle 2 - # should be caught in the else clause at the bottom but I couldn't figure it out + # PocketBeagle 2 uses the new Beagle EEPROM format if eeprom_bytes == b"\xaaU3\xee\x017\x00\x10.\x00POCKET": return boards.BEAGLEBONE_POCKETBEAGLE_2 diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index 8d99eb0..62ffa21 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -590,7 +590,6 @@ BEAGLEBONE_AI64: ("B0", "7.BBONEA"), # Original bone/white: BEAGLEBONE: ( - ("A3", "A335BONE00A3"), ("A4", "A335BONE00A4"), ("A5", "A335BONE00A5"),