diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index 7972af70..df5b0734 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -71,6 +71,8 @@ def id(self) -> Optional[str]: board_id = self._beaglebone_id() elif chip_id == chips.AM65XX: board_id = self._siemens_simatic_iot2000_id() + elif chip_id == chips.AM67A: + board_id = self._beagleyai_id() elif chip_id == chips.DRA74X: board_id = self._bbai_id() elif chip_id == chips.SUN4I: @@ -340,6 +342,12 @@ def _beaglebone_id(self) -> Optional[str]: return None # pylint: enable=no-self-use + def _beagleyai_id(self) -> Optional[str]: + """Try to detect id of a BeagleY-AI board.""" + board_value = self.detector.get_device_model() + if "BeagleY-AI" in board_value: + return boards.BEAGLEY_AI + return None def _bbai_id(self) -> Optional[str]: """Try to detect id of a Beaglebone AI related board.""" diff --git a/adafruit_platformdetect/chip.py b/adafruit_platformdetect/chip.py index a384fee9..d3cad992 100644 --- a/adafruit_platformdetect/chip.py +++ b/adafruit_platformdetect/chip.py @@ -179,6 +179,8 @@ def _linux_id(self) -> Optional[str]: # pylint: disable=too-many-branches,too-many-statements # pylint: disable=too-many-return-statements """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("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 969c512d..34b57348 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -21,6 +21,7 @@ BEAGLEBONE_AI = "BEAGLEBONE_AI" BEAGLEBONE_POCKETBONE = "BEAGLEBONE_POCKETBONE" BEAGLEV_STARLIGHT = "BEAGLEV_STARLIGHT" +BEAGLEY_AI = "BEAGLEY_AI" BEAGLELOGIC_STANDALONE = "BEAGLELOGIC_STANDALONE" OSD3358_DEV_BOARD = "OSD3358_DEV_BOARD" OSD3358_SM_RED = "OSD3358_SM_RED" @@ -420,6 +421,7 @@ _ODROID_MINI_PC_IDS = (ODROID_H3,) _BEAGLEBONE_IDS = ( + BEAGLEY_AI, BEAGLE_PLAY, BEAGLEBONE_AI64, BEAGLEBONE, diff --git a/adafruit_platformdetect/constants/chips.py b/adafruit_platformdetect/constants/chips.py index 13b9049b..14329dc9 100644 --- a/adafruit_platformdetect/constants/chips.py +++ b/adafruit_platformdetect/constants/chips.py @@ -7,6 +7,7 @@ AM33XX = "AM33XX" AM625X = "AM625X" AM65XX = "AM65XX" +AM67A = "AM67A" DRA74X = "DRA74X" TDA4VM = "TDA4VM" IMX6ULL = "IMX6ULL"