Skip to content

Add BeagleY-AI / AM67A #355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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."""
Expand Down
2 changes: 2 additions & 0 deletions adafruit_platformdetect/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
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 @@ -7,6 +7,7 @@
AM33XX = "AM33XX"
AM625X = "AM625X"
AM65XX = "AM65XX"
AM67A = "AM67A"
DRA74X = "DRA74X"
TDA4VM = "TDA4VM"
IMX6ULL = "IMX6ULL"
Expand Down