Skip to content

Add Support for Rock Pi E #166

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 2 commits into from
May 10, 2021
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 @@ -149,6 +149,8 @@ def id(self):
board_id = self._rock_pi_id()
elif chip_id == chips.RK3288:
board_id = self._asus_tinker_board_id()
elif chip_id == chips.RK3328:
board_id = self._rock_pi_id()
elif chip_id == chips.RYZEN_V1605B:
board_id = self._udoo_id()
elif chip_id == chips.PENTIUM_N3710:
Expand Down Expand Up @@ -402,6 +404,8 @@ def _rock_pi_id(self):
board = boards.ROCK_PI_S
if board_value and "ROCK PI 4" in board_value.upper():
board = boards.ROCK_PI_4
if board_value and "ROCK PI E" in board_value.upper():
board = boards.ROCK_PI_E
if self.detector.check_board_name_value() == "ROCK Pi X":
board = boards.ROCK_PI_X
return board
Expand Down
3 changes: 3 additions & 0 deletions adafruit_platformdetect/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ def _linux_id(self):
if self.detector.check_dt_compatible_value("rockchip,rk3288"):
return chips.RK3288

if self.detector.check_dt_compatible_value("rockchip,rk3328"):
return chips.RK3328

if self.detector.check_dt_compatible_value("st,stm32mp157"):
return chips.STM32MP157

Expand Down
56 changes: 10 additions & 46 deletions adafruit_platformdetect/constants/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
ROCK_PI_S = "ROCK_PI_S"
ROCK_PI_4 = "ROCK_PI_4"
ROCK_PI_X = "ROCK_PI_X"
ROCK_PI_E = "ROCK_PI_E"

GREATFET_ONE = "GREATFET_ONE"

Expand All @@ -145,11 +146,7 @@
_ASUS_TINKER_BOARD_IDS = (ASUS_TINKER_BOARD,)

# STM32MP1
_STM32MP1_IDS = (
STM32MP157C_DK2,
LUBANCAT_STM32MP157,
OSD32MP1_BRK,
)
_STM32MP1_IDS = (STM32MP157C_DK2, LUBANCAT_STM32MP157, OSD32MP1_BRK)

# OrangePI
_ORANGE_PI_IDS = (
Expand All @@ -167,36 +164,21 @@
)

# NanoPi
_NANOPI_IDS = (
NANOPI_NEO_AIR,
NANOPI_DUO2,
)
_NANOPI_IDS = (NANOPI_NEO_AIR, NANOPI_DUO2)

# BananaPI
_BANANA_PI_IDS = (BANANA_PI_M2_ZERO,)

# LubanCat
_LUBANCAT_IDS = (
LUBANCAT_IMX6ULL,
LUBANCAT_STM32MP157,
)
_LUBANCAT_IDS = (LUBANCAT_IMX6ULL, LUBANCAT_STM32MP157)

# Coral boards
_CORAL_IDS = (
CORAL_EDGE_TPU_DEV,
CORAL_EDGE_TPU_DEV_MINI,
)
_CORAL_IDS = (CORAL_EDGE_TPU_DEV, CORAL_EDGE_TPU_DEV_MINI)

_PYNQ_IDS = (PYNQ_Z1, PYNQ_Z2)

_JETSON_IDS = (
(
JETSON_TX1,
(
"nvidia,p2371-2180",
"nvidia,jetson-cv",
),
),
(JETSON_TX1, ("nvidia,p2371-2180", "nvidia,jetson-cv")),
(
JETSON_TX2,
(
Expand All @@ -210,22 +192,8 @@
),
(JETSON_TX2_NX, ("nvidia,p3509-0000+p3636-0001",)),
(CLARA_AGX_XAVIER, ("nvidia,e3900-0000+p2888-0004",)),
(
JETSON_XAVIER,
(
"nvidia,p2972-0000",
"nvidia,p2972-0006",
"nvidia,jetson-xavier",
),
),
(
JETSON_NANO,
(
"nvidia,p3450-0000",
"nvidia,p3450-0002",
"nvidia,jetson-nano",
),
),
(JETSON_XAVIER, ("nvidia,p2972-0000", "nvidia,p2972-0006", "nvidia,jetson-xavier")),
(JETSON_NANO, ("nvidia,p3450-0000", "nvidia,p3450-0002", "nvidia,jetson-nano")),
(
JETSON_NX,
(
Expand Down Expand Up @@ -454,11 +422,7 @@
"2c03112",
),
RASPBERRY_PI_400: ("c03130",),
RASPBERRY_PI_CM4: (
"a03140",
"b03140",
"c03140",
),
RASPBERRY_PI_CM4: ("a03140", "b03140", "c03140"),
}

# Onion omega boards
Expand All @@ -468,7 +432,7 @@
_PINE64_DEV_IDS = (PINE64, PINEH64, PINEBOOK, PINEPHONE, SOPINE)

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

# 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 @@ -37,6 +37,7 @@
H616 = "H616"
RK3308 = "RK3308"
RK3399 = "RK3399"
RK3328 = "RK3328"
LPC4330 = "LPC4330"
RK3288 = "RK3288"
PENTIUM_N3710 = "PENTIUM_N3710" # SOC Braswell core
Expand Down