Skip to content

Commit 80ec116

Browse files
authored
Merge pull request #388 from avenstewart/add-orange-pi-5-pro
Added support for Orange Pi 5 Pro board
2 parents ba31c3c + d914ee5 commit 80ec116

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

adafruit_platformdetect/board.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ def id(self) -> Optional[str]:
209209
or self._ameridroid_id()
210210
or self._vicharak_id()
211211
)
212+
elif chip_id == chips.RK3588S:
213+
board_id = self._orange_pi_id() or self._armbian_id()
212214
elif chip_id == chips.RYZEN_V1605B:
213215
board_id = self._udoo_id()
214216
elif chip_id == chips.PENTIUM_N3710:
@@ -448,6 +450,8 @@ def _armbian_id(self) -> Optional[str]:
448450
board = boards.ORANGE_PI_5_PLUS
449451
elif board_value == "orangepi5":
450452
board = boards.ORANGE_PI_5
453+
elif board_value == "orangepi5-pro":
454+
board = boards.ORANGE_PI_5_PRO
451455
elif board_value == "bananapim2zero":
452456
board = boards.BANANA_PI_M2_ZERO
453457
elif board_value == "bananapim2plus":
@@ -515,9 +519,12 @@ def _ameridroid_id(self) -> Optional[str]:
515519
return None
516520

517521
def _orange_pi_id(self) -> Optional[str]:
522+
# pylint: disable=too-many-return-statements
518523
board_value = self.detector.get_device_model()
519524
if "OPi 5 Max" in board_value:
520525
return boards.ORANGE_PI_5_MAX
526+
if "OPi 5 Pro" in board_value:
527+
return boards.ORANGE_PI_5_PRO
521528
if "Orange Pi 5 Max" in board_value:
522529
return boards.ORANGE_PI_5_MAX
523530
if "Orange Pi 5 Plus" in board_value:
@@ -528,6 +535,8 @@ def _orange_pi_id(self) -> Optional[str]:
528535
return boards.ORANGE_PI_3B
529536
return None
530537

538+
# pylint: enable=too-many-return-statements
539+
531540
def _sama5_id(self) -> Optional[str]:
532541
"""Check what type sama5 board."""
533542
board_value = self.detector.get_device_model()

adafruit_platformdetect/chip.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ def _linux_id(self) -> Optional[str]:
274274
if self.detector.check_dt_compatible_value("rockchip,rk3568"):
275275
return chips.RK3568
276276

277+
if self.detector.check_dt_compatible_value("rockchip,rk3588s"):
278+
return chips.RK3588S
279+
277280
if self.detector.check_dt_compatible_value("rockchip,rk3588"):
278281
return chips.RK3588
279282

adafruit_platformdetect/constants/boards.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
ORANGE_PI_5 = "ORANGE_PI_5"
7070
ORANGE_PI_5_MAX = "ORANGE_PI_5_MAX"
7171
ORANGE_PI_5_PLUS = "ORANGE_PI_5_PLUS"
72+
ORANGE_PI_5_PRO = "ORANGE_PI_5_PRO"
7273

7374
# Nano Pi boards
7475
NANOPI_NEO_AIR = "NANOPI_NEO_AIR"
@@ -314,6 +315,7 @@
314315
ORANGE_PI_4_LTS,
315316
ORANGE_PI_5,
316317
ORANGE_PI_5_PLUS,
318+
ORANGE_PI_5_PRO,
317319
)
318320

319321
# NanoPi
@@ -553,8 +555,8 @@
553555
# https://github.com/beagleboard/image-builder
554556
# Thanks to zmatt on freenode #beagle for pointers.
555557
_BEAGLEBONE_BOARD_IDS = {
556-
BEAGLE_PLAY: (("A0", "7.BEAGLE")),
557-
BEAGLEBONE_AI64: (("B0", "7.BBONEA")),
558+
BEAGLE_PLAY: ("A0", "7.BEAGLE"),
559+
BEAGLEBONE_AI64: ("B0", "7.BBONEA"),
558560
# Original bone/white:
559561
BEAGLEBONE: (
560562
("A3", "A335BONE00A3"),

adafruit_platformdetect/constants/chips.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
RK3566 = "RK3566"
6969
RK3568 = "RK3568"
7070
RK3588 = "RK3588"
71+
RK3588S = "RK3588S"
7172
RV1103 = "RV1103"
7273
RV1106 = "RV1106"
7374
PENTIUM_N3710 = "PENTIUM_N3710" # SOC Braswell core

0 commit comments

Comments
 (0)