Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rock pi4 c plus #269

Merged
merged 3 commits into from
Dec 14, 2022
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
4 changes: 4 additions & 0 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ def id(self) -> Optional[str]:
board_id = self._rock_pi_id()
elif chip_id == chips.RK3399:
board_id = self._rock_pi_id() or self._armbian_id()
elif chip_id == chips.RK3399_T:
board_id = self._rock_pi_id() or self._armbian_id()
elif chip_id == chips.ATOM_X5_Z8350:
board_id = self._rock_pi_id()
elif chip_id == chips.ATOM_J4105:
Expand Down Expand Up @@ -511,6 +513,8 @@ def _rock_pi_id(self) -> Optional[str]:
board = boards.ROCK_PI_X
if board_value and "ROCK 5" in board_value.upper():
board = boards.ROCK_PI_5
if board_value and "RADXA ROCK 4C+" in board_value.upper():
board = boards.ROCK_PI_4_C_PLUS
return board

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

if self.detector.check_dt_compatible_value("radxa,rock-4c-plus"):
return chips.RK3399_T

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

Expand Down
2 changes: 2 additions & 0 deletions adafruit_platformdetect/constants/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@

ROCK_PI_S = "ROCK_PI_S"
ROCK_PI_4 = "ROCK_PI_4"
ROCK_PI_4_C_PLUS = "ROCK_PI_4C+"
ROCK_PI_X = "ROCK_PI_X"
ROCK_PI_E = "ROCK_PI_E"
ROCK_PI_5 = "ROCK_PI_5"
Expand Down Expand Up @@ -541,6 +542,7 @@
_ROCK_PI_IDS = (
ROCK_PI_S,
ROCK_PI_4,
ROCK_PI_4_C_PLUS,
ROCK_PI_X,
ROCK_PI_E,
RADXA_ZERO,
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 @@ -52,6 +52,7 @@
H616 = "H616"
RK3308 = "RK3308"
RK3399 = "RK3399"
RK3399_T = "RK3399_T"
RK3328 = "RK3328"
LPC4330 = "LPC4330"
RK3288 = "RK3288"
Expand Down