Skip to content

Commit fd5202c

Browse files
committed
Add BeagleY-AI / AM67A
Add Testing for BeagleY-AI & AM67A SoC. This will include shim for GPIOZERO so Pi Calls work out of box. GPIOD works too of course. What's the best way to utilize? Mark it as Pi compat somehow?
1 parent 2e1f0a2 commit fd5202c

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
@@ -71,6 +71,8 @@ def id(self) -> Optional[str]:
7171
board_id = self._beaglebone_id()
7272
elif chip_id == chips.AM65XX:
7373
board_id = self._siemens_simatic_iot2000_id()
74+
elif chip_id == chips.AM67A:
75+
board_id = self._beagleyai_id()
7476
elif chip_id == chips.DRA74X:
7577
board_id = self._bbai_id()
7678
elif chip_id == chips.SUN4I:
@@ -340,6 +342,12 @@ def _beaglebone_id(self) -> Optional[str]:
340342
return None
341343

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

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

adafruit_platformdetect/chip.py

+2
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ def _linux_id(self) -> Optional[str]:
179179
# pylint: disable=too-many-branches,too-many-statements
180180
# pylint: disable=too-many-return-statements
181181
"""Attempt to detect the CPU on a computer running the Linux kernel."""
182+
if self.detector.check_dt_compatible_value("beagle,am67a-beagley-ai"):
183+
return chips.AM67A
182184
if self.detector.check_dt_compatible_value("ti,am625"):
183185
return chips.AM625X
184186
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
@@ -7,6 +7,7 @@
77
AM33XX = "AM33XX"
88
AM625X = "AM625X"
99
AM65XX = "AM65XX"
10+
AM67A = "AM67A"
1011
DRA74X = "DRA74X"
1112
TDA4VM = "TDA4VM"
1213
IMX6ULL = "IMX6ULL"

0 commit comments

Comments
 (0)