Skip to content

Commit

Permalink
Merge pull request #355 from Grippy98/main
Browse files Browse the repository at this point in the history
Add BeagleY-AI / AM67A
  • Loading branch information
makermelissa authored May 31, 2024
2 parents b8c5355 + fd5202c commit 715e573
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,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:
Expand Down Expand Up @@ -342,6 +344,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."""
Expand Down
2 changes: 2 additions & 0 deletions adafruit_platformdetect/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,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"):
Expand Down
2 changes: 2 additions & 0 deletions adafruit_platformdetect/constants/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -420,6 +421,7 @@
_ODROID_MINI_PC_IDS = (ODROID_H3,)

_BEAGLEBONE_IDS = (
BEAGLEY_AI,
BEAGLE_PLAY,
BEAGLEBONE_AI64,
BEAGLEBONE,
Expand Down
1 change: 1 addition & 0 deletions adafruit_platformdetect/constants/chips.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
AM33XX = "AM33XX"
AM625X = "AM625X"
AM65XX = "AM65XX"
AM67A = "AM67A"
DRA74X = "DRA74X"
TDA4VM = "TDA4VM"
IMX6ULL = "IMX6ULL"
Expand Down

0 comments on commit 715e573

Please sign in to comment.