Skip to content

Commit 715e573

Browse files
authored
Merge pull request #355 from Grippy98/main
Add BeagleY-AI / AM67A
2 parents b8c5355 + fd5202c commit 715e573

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

adafruit_platformdetect/board.py

+8
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ def id(self) -> Optional[str]:
7373
board_id = self._beaglebone_id()
7474
elif chip_id == chips.AM65XX:
7575
board_id = self._siemens_simatic_iot2000_id()
76+
elif chip_id == chips.AM67A:
77+
board_id = self._beagleyai_id()
7678
elif chip_id == chips.DRA74X:
7779
board_id = self._bbai_id()
7880
elif chip_id == chips.SUN4I:
@@ -342,6 +344,12 @@ def _beaglebone_id(self) -> Optional[str]:
342344
return None
343345

344346
# pylint: enable=no-self-use
347+
def _beagleyai_id(self) -> Optional[str]:
348+
"""Try to detect id of a BeagleY-AI board."""
349+
board_value = self.detector.get_device_model()
350+
if "BeagleY-AI" in board_value:
351+
return boards.BEAGLEY_AI
352+
return None
345353

346354
def _bbai_id(self) -> Optional[str]:
347355
"""Try to detect id of a Beaglebone AI related board."""

adafruit_platformdetect/chip.py

+2
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ def _linux_id(self) -> Optional[str]:
183183
# pylint: disable=too-many-branches,too-many-statements
184184
# pylint: disable=too-many-return-statements
185185
"""Attempt to detect the CPU on a computer running the Linux kernel."""
186+
if self.detector.check_dt_compatible_value("beagle,am67a-beagley-ai"):
187+
return chips.AM67A
186188
if self.detector.check_dt_compatible_value("ti,am625"):
187189
return chips.AM625X
188190
if self.detector.check_dt_compatible_value("ti,am654"):

adafruit_platformdetect/constants/boards.py

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
BEAGLEBONE_AI = "BEAGLEBONE_AI"
2222
BEAGLEBONE_POCKETBONE = "BEAGLEBONE_POCKETBONE"
2323
BEAGLEV_STARLIGHT = "BEAGLEV_STARLIGHT"
24+
BEAGLEY_AI = "BEAGLEY_AI"
2425
BEAGLELOGIC_STANDALONE = "BEAGLELOGIC_STANDALONE"
2526
OSD3358_DEV_BOARD = "OSD3358_DEV_BOARD"
2627
OSD3358_SM_RED = "OSD3358_SM_RED"
@@ -420,6 +421,7 @@
420421
_ODROID_MINI_PC_IDS = (ODROID_H3,)
421422

422423
_BEAGLEBONE_IDS = (
424+
BEAGLEY_AI,
423425
BEAGLE_PLAY,
424426
BEAGLEBONE_AI64,
425427
BEAGLEBONE,

adafruit_platformdetect/constants/chips.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
AM33XX = "AM33XX"
99
AM625X = "AM625X"
1010
AM65XX = "AM65XX"
11+
AM67A = "AM67A"
1112
DRA74X = "DRA74X"
1213
TDA4VM = "TDA4VM"
1314
IMX6ULL = "IMX6ULL"

0 commit comments

Comments
 (0)