Skip to content
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: 6 additions & 2 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ def id(self):
board_id = self._clockwork_pi_id()
elif chip_id == chips.RK3308:
board_id = self._rock_pi_id()
elif chip_id == chips.RK3399:
board_id = self._rock_pi_id()
elif chip_id == chips.ATOM_X5_Z8350:
board_id = self._rock_pi_id()
elif chip_id == chips.RK3288:
Expand Down Expand Up @@ -372,6 +374,8 @@ def _rock_pi_id(self):
board = None
if board_value and "ROCK Pi S" in board_value:
board = boards.ROCK_PI_S
if board_value and "ROCK PI 4" in board_value.upper():
board = boards.ROCK_PI_4
if self.detector.check_board_name_value() == "ROCK Pi X":
board = boards.ROCK_PI_X
return board
Expand Down Expand Up @@ -486,8 +490,8 @@ def any_pine64_board(self):

@property
def any_rock_pi_board(self):
"""Check whether the current board is any Clockwork Pi device."""
return self.ROCK_PI_S
"""Check whether the current board is any Rock Pi device."""
return self.id in boards._ROCK_PI_IDS

@property
def any_clockwork_pi_board(self):
Expand Down
3 changes: 3 additions & 0 deletions adafruit_platformdetect/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def _linux_id(self):
if self.detector.check_dt_compatible_value("rockchip,rk3308"):
return chips.RK3308

if self.detector.check_dt_compatible_value("rockchip,rk3399"):
return chips.RK3399

if self.detector.check_dt_compatible_value("rockchip,rk3288"):
return chips.RK3288

Expand Down
4 changes: 4 additions & 0 deletions adafruit_platformdetect/constants/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
SOPINE = "SOPINE"

ROCK_PI_S = "ROCK_PI_S"
ROCK_PI_4 = "ROCK_PI_4"
ROCK_PI_X = "ROCK_PI_X"

GREATFET_ONE = "GREATFET_ONE"
Expand Down Expand Up @@ -454,5 +455,8 @@
# Pine64 boards and devices
_PINE64_DEV_IDS = (PINE64, PINEH64, PINEBOOK, PINEPHONE, SOPINE)

# RockPi boards and devices
_ROCK_PI_IDS = (ROCK_PI_S, ROCK_PI_4, ROCK_PI_X)

# UDOO
_UDOO_BOARD_IDS = {UDOO_BOLT_V8: ("SC40-2000-0000-C0|C",), UDOO_X86: ("dummy",)}
1 change: 1 addition & 0 deletions adafruit_platformdetect/constants/chips.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
H5 = "H5"
H616 = "H616"
RK3308 = "RK3308"
RK3399 = "RK3399"
LPC4330 = "LPC4330"
RK3288 = "RK3288"
PENTIUM_N3710 = "PENTIUM_N3710" # SOC Braswell core
Expand Down