Skip to content

Added PineH64 detection; Modified Allwinner A64 Detection #90

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 7 commits into from
Nov 1, 2020
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
6 changes: 6 additions & 0 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def id(self):
board_id = self._pynq_id()
elif chip_id == chips.A64:
board_id = self._pine64_id()
elif chip_id == chips.H6:
board_id = self._pine64_id()
elif chip_id == chips.H5:
board_id = self._armbian_id()
elif chip_id == chips.A33:
Expand Down Expand Up @@ -246,6 +248,8 @@ def _armbian_id(self):
board = boards.ORANGE_PI_PC_PLUS
if board_value == "pinebook-a64":
board = boards.PINEBOOK
if board_value == "pineH64":
board = boards.PINEH64
if board_value == "orangepi2":
board = boards.ORANGE_PI_2
if board_value == "bananapim2zero":
Expand Down Expand Up @@ -302,6 +306,8 @@ def _pine64_id(self):
board = None
if "pine64" in board_value.lower():
board = boards.PINE64
elif "pine h64" in board_value.lower():
board = boards.PINEH64
elif "pinebook" in board_value.lower():
board = boards.PINEBOOK
elif "pinephone" in board_value.lower():
Expand Down
4 changes: 4 additions & 0 deletions adafruit_platformdetect/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ def _linux_id(self):
return chips.S905X3
if compatible and "sun50i-a64" in compatible:
linux_id = chips.A64
if compatible and "sun50i-h6" in compatible:
linux_id = chips.H6
if compatible and "sun50i-h5" in compatible:
linux_id = chips.H5
if compatible and "odroid-xu4" in compatible:
linux_id = chips.EXYNOS5422

Expand Down
3 changes: 2 additions & 1 deletion adafruit_platformdetect/constants/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
ONION_OMEGA2 = "ONION_OMEGA2"

PINE64 = "PINE64"
PINEH64 = "PINEH64"
PINEBOOK = "PINEBOOK"
PINEPHONE = "PINEPHONE"

Expand Down Expand Up @@ -398,7 +399,7 @@
_ONION_OMEGA_BOARD_IDS = (ONION_OMEGA, ONION_OMEGA2)

# Pine64 boards and devices
_PINE64_DEV_IDS = (PINE64, PINEBOOK, PINEPHONE)
_PINE64_DEV_IDS = (PINE64, PINEH64, PINEBOOK, PINEPHONE)

# 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 @@ -26,6 +26,7 @@
MIPS24KEC = "MIPS24KEC"
ZYNQ7000 = "ZYNQ7000"
A64 = "A64"
H6 = "H6"
A33 = "A33"
H5 = "H5"
RK3308 = "RK3308"
Expand Down