Skip to content

Added support for Orange Pi 5 Pro board #388

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

Merged
merged 6 commits into from
Aug 15, 2025
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
9 changes: 9 additions & 0 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ def id(self) -> Optional[str]:
or self._ameridroid_id()
or self._vicharak_id()
)
elif chip_id == chips.RK3588S:
board_id = self._orange_pi_id() or self._armbian_id()
elif chip_id == chips.RYZEN_V1605B:
board_id = self._udoo_id()
elif chip_id == chips.PENTIUM_N3710:
Expand Down Expand Up @@ -448,6 +450,8 @@ def _armbian_id(self) -> Optional[str]:
board = boards.ORANGE_PI_5_PLUS
elif board_value == "orangepi5":
board = boards.ORANGE_PI_5
elif board_value == "orangepi5-pro":
board = boards.ORANGE_PI_5_PRO
elif board_value == "bananapim2zero":
board = boards.BANANA_PI_M2_ZERO
elif board_value == "bananapim2plus":
Expand Down Expand Up @@ -515,9 +519,12 @@ def _ameridroid_id(self) -> Optional[str]:
return None

def _orange_pi_id(self) -> Optional[str]:
# pylint: disable=too-many-return-statements
board_value = self.detector.get_device_model()
if "OPi 5 Max" in board_value:
return boards.ORANGE_PI_5_MAX
if "OPi 5 Pro" in board_value:
return boards.ORANGE_PI_5_PRO
if "Orange Pi 5 Max" in board_value:
return boards.ORANGE_PI_5_MAX
if "Orange Pi 5 Plus" in board_value:
Expand All @@ -528,6 +535,8 @@ def _orange_pi_id(self) -> Optional[str]:
return boards.ORANGE_PI_3B
return None

# pylint: enable=too-many-return-statements

def _sama5_id(self) -> Optional[str]:
"""Check what type sama5 board."""
board_value = self.detector.get_device_model()
Expand Down
3 changes: 3 additions & 0 deletions adafruit_platformdetect/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ def _linux_id(self) -> Optional[str]:
if self.detector.check_dt_compatible_value("rockchip,rk3568"):
return chips.RK3568

if self.detector.check_dt_compatible_value("rockchip,rk3588s"):
return chips.RK3588S

if self.detector.check_dt_compatible_value("rockchip,rk3588"):
return chips.RK3588

Expand Down
6 changes: 4 additions & 2 deletions adafruit_platformdetect/constants/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
ORANGE_PI_5 = "ORANGE_PI_5"
ORANGE_PI_5_MAX = "ORANGE_PI_5_MAX"
ORANGE_PI_5_PLUS = "ORANGE_PI_5_PLUS"
ORANGE_PI_5_PRO = "ORANGE_PI_5_PRO"

# Nano Pi boards
NANOPI_NEO_AIR = "NANOPI_NEO_AIR"
Expand Down Expand Up @@ -314,6 +315,7 @@
ORANGE_PI_4_LTS,
ORANGE_PI_5,
ORANGE_PI_5_PLUS,
ORANGE_PI_5_PRO,
)

# NanoPi
Expand Down Expand Up @@ -553,8 +555,8 @@
# https://github.com/beagleboard/image-builder
# Thanks to zmatt on freenode #beagle for pointers.
_BEAGLEBONE_BOARD_IDS = {
BEAGLE_PLAY: (("A0", "7.BEAGLE")),
BEAGLEBONE_AI64: (("B0", "7.BBONEA")),
BEAGLE_PLAY: ("A0", "7.BEAGLE"),
BEAGLEBONE_AI64: ("B0", "7.BBONEA"),
# Original bone/white:
BEAGLEBONE: (
("A3", "A335BONE00A3"),
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 @@ -68,6 +68,7 @@
RK3566 = "RK3566"
RK3568 = "RK3568"
RK3588 = "RK3588"
RK3588S = "RK3588S"
RV1103 = "RV1103"
RV1106 = "RV1106"
PENTIUM_N3710 = "PENTIUM_N3710" # SOC Braswell core
Expand Down
Loading