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"),),