Skip to content

Commit 86a57dc

Browse files
authored
Merge pull request #269 from LuisMalhadas/RockPi4CPlus
Add Rock pi4 c plus
2 parents eeea86a + b7ebea6 commit 86a57dc

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

adafruit_platformdetect/board.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ def id(self) -> Optional[str]:
151151
board_id = self._rock_pi_id()
152152
elif chip_id == chips.RK3399:
153153
board_id = self._rock_pi_id() or self._armbian_id()
154+
elif chip_id == chips.RK3399_T:
155+
board_id = self._rock_pi_id() or self._armbian_id()
154156
elif chip_id == chips.ATOM_X5_Z8350:
155157
board_id = self._rock_pi_id()
156158
elif chip_id == chips.ATOM_J4105:
@@ -511,6 +513,8 @@ def _rock_pi_id(self) -> Optional[str]:
511513
board = boards.ROCK_PI_X
512514
if board_value and "ROCK 5" in board_value.upper():
513515
board = boards.ROCK_PI_5
516+
if board_value and "RADXA ROCK 4C+" in board_value.upper():
517+
board = boards.ROCK_PI_4_C_PLUS
514518
return board
515519

516520
def _clockwork_pi_id(self) -> Optional[str]:

adafruit_platformdetect/chip.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ def _linux_id(self) -> Optional[str]:
209209
if self.detector.check_dt_compatible_value("rockchip,rk3308"):
210210
return chips.RK3308
211211

212+
if self.detector.check_dt_compatible_value("radxa,rock-4c-plus"):
213+
return chips.RK3399_T
214+
212215
if self.detector.check_dt_compatible_value("rockchip,rk3399"):
213216
return chips.RK3399
214217

adafruit_platformdetect/constants/boards.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167

168168
ROCK_PI_S = "ROCK_PI_S"
169169
ROCK_PI_4 = "ROCK_PI_4"
170+
ROCK_PI_4_C_PLUS = "ROCK_PI_4C+"
170171
ROCK_PI_X = "ROCK_PI_X"
171172
ROCK_PI_E = "ROCK_PI_E"
172173
ROCK_PI_5 = "ROCK_PI_5"
@@ -541,6 +542,7 @@
541542
_ROCK_PI_IDS = (
542543
ROCK_PI_S,
543544
ROCK_PI_4,
545+
ROCK_PI_4_C_PLUS,
544546
ROCK_PI_X,
545547
ROCK_PI_E,
546548
RADXA_ZERO,

adafruit_platformdetect/constants/chips.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
H616 = "H616"
5353
RK3308 = "RK3308"
5454
RK3399 = "RK3399"
55+
RK3399_T = "RK3399_T"
5556
RK3328 = "RK3328"
5657
LPC4330 = "LPC4330"
5758
RK3288 = "RK3288"

0 commit comments

Comments
 (0)