Skip to content

Commit

Permalink
Merge pull request #340 from anonymouscowhead/add-licheepi4a-detect
Browse files Browse the repository at this point in the history
Add licheepi4a detect
  • Loading branch information
makermelissa authored Jan 22, 2024
2 parents 9384e45 + be59d2b commit 5ed903c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ def id(self) -> Optional[str]:
board_id = boards.AML_S905X_CC
elif chip_id == chips.CV1800B:
board_id = boards.MILKV_DUO
elif chip_id == chips.TH1520:
board_id = boards.LICHEEPI_4A
self._board_id = board_id
return board_id

Expand Down
3 changes: 3 additions & 0 deletions adafruit_platformdetect/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ def _linux_id(self) -> Optional[str]:
if self.detector.check_dt_compatible_value("libretech,aml-s905x-cc"):
return chips.S905X

if self.detector.check_dt_compatible_value("light-lpi4a"):
return chips.TH1520

linux_id = None
hardware = self.detector.get_cpuinfo_field("Hardware")

Expand Down
3 changes: 2 additions & 1 deletion adafruit_platformdetect/constants/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@

ALLWINER_D1 = "ALLWINER_D1"
LICHEE_RV = "LICHEE_RV"
LICHEEPI_4A = "LICHEEPI_4A"

MICROCHIP_MCP2221 = "MICROCHIP_MCP2221"

Expand Down Expand Up @@ -536,7 +537,7 @@
_MAAXBOARD_IDS = ("MAAXBOARD", "MAAXBOARD_MINI")

# Lichee RISC-V boards
_LICHEE_RISCV_IDS = (LICHEE_RV,)
_LICHEE_RISCV_IDS = (LICHEE_RV, LICHEEPI_4A)

# Siemens Simatic IOT2000 Gateways
SIEMENS_SIMATIC_IOT2050_ADV = "SIEMENS_SIMATIC_IOT2050_ADVANCED"
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 @@ -73,6 +73,7 @@
RP2040_U2IF = "RP2040_U2IF"
D1_RISCV = "D1_RISCV"
ATOM_J4105 = "ATOM_J4105"
TH1520 = "TH1520"

BCM_RANGE = {"BCM2708", "BCM2709", "BCM2711", "BCM2712", "BCM2835", "BCM2837"}

Expand Down

0 comments on commit 5ed903c

Please sign in to comment.