Skip to content

Commit f8d2cb8

Browse files
committed
Add support for the AML_S905X_CC board
1 parent 858f7d5 commit f8d2cb8

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

adafruit_platformdetect/board.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ def id(self) -> Optional[str]:
173173
board_id = self._tisk_id()
174174
elif chip_id == chips.D1_RISCV:
175175
board_id = self._armbian_id()
176+
elif chip_id == chips.S905X:
177+
board_id = boards.AML_S905X_CC
176178
self._board_id = board_id
177179
return board_id
178180

@@ -805,6 +807,11 @@ def greatfet_one(self) -> bool:
805807
"""Check whether the current board is a GreatFET One."""
806808
return self.id == boards.GREATFET_ONE
807809

810+
@property
811+
def aml_s905x_cc(self) -> bool:
812+
"""Check whether the current board is a aml-s905x-cc One."""
813+
return self.id == boards.AML_S905X_CC
814+
808815
def __getattr__(self, attr: str) -> bool:
809816
"""
810817
Detect whether the given attribute is the currently-detected board. See list

adafruit_platformdetect/chip.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ def _linux_id(self) -> Optional[str]:
254254
if self.detector.check_dt_compatible_value("sun20i-d1"):
255255
return chips.D1_RISCV
256256

257+
if self.detector.check_dt_compatible_value("libretech,aml-s905x-cc"):
258+
return chips.S905X
259+
257260
linux_id = None
258261
hardware = self.detector.get_cpuinfo_field("Hardware")
259262

adafruit_platformdetect/constants/boards.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,3 +540,11 @@
540540
SIEMENS_SIMATIC_IOT2050_ADV,
541541
SIEMENS_SIMATIC_IOT2050_BASIC,
542542
)
543+
544+
# Libre Computer Boards
545+
AML_S905X_CC = "AML-S905X-CC"
546+
547+
# Libre Computer Boards
548+
_LIBRE_COMPUTER_IDS = (
549+
AML_S905X_CC
550+
)

adafruit_platformdetect/constants/chips.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
SUN8I = "SUN8I"
2222
S805 = "S805"
2323
S905 = "S905"
24+
S905X = "S905X"
2425
S905X3 = "S905X3"
2526
S905Y2 = "S905Y2"
2627
S922X = "S922X"

0 commit comments

Comments
 (0)