Skip to content

Commit 9b8c8cd

Browse files
authored
Merge pull request #90 from dmanla/master
Added PineH64 detection; Modified Allwinner A64 Detection
2 parents d2ccda4 + 1f6b3f0 commit 9b8c8cd

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

adafruit_platformdetect/board.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ def id(self):
121121
board_id = self._pynq_id()
122122
elif chip_id == chips.A64:
123123
board_id = self._pine64_id()
124+
elif chip_id == chips.H6:
125+
board_id = self._pine64_id()
124126
elif chip_id == chips.H5:
125127
board_id = self._armbian_id()
126128
elif chip_id == chips.A33:
@@ -246,6 +248,8 @@ def _armbian_id(self):
246248
board = boards.ORANGE_PI_PC_PLUS
247249
if board_value == "pinebook-a64":
248250
board = boards.PINEBOOK
251+
if board_value == "pineH64":
252+
board = boards.PINEH64
249253
if board_value == "orangepi2":
250254
board = boards.ORANGE_PI_2
251255
if board_value == "bananapim2zero":
@@ -302,6 +306,8 @@ def _pine64_id(self):
302306
board = None
303307
if "pine64" in board_value.lower():
304308
board = boards.PINE64
309+
elif "pine h64" in board_value.lower():
310+
board = boards.PINEH64
305311
elif "pinebook" in board_value.lower():
306312
board = boards.PINEBOOK
307313
elif "pinephone" in board_value.lower():

adafruit_platformdetect/chip.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ def _linux_id(self):
202202
return chips.S905X3
203203
if compatible and "sun50i-a64" in compatible:
204204
linux_id = chips.A64
205+
if compatible and "sun50i-h6" in compatible:
206+
linux_id = chips.H6
207+
if compatible and "sun50i-h5" in compatible:
208+
linux_id = chips.H5
205209
if compatible and "odroid-xu4" in compatible:
206210
linux_id = chips.EXYNOS5422
207211

adafruit_platformdetect/constants/boards.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
ONION_OMEGA2 = "ONION_OMEGA2"
101101

102102
PINE64 = "PINE64"
103+
PINEH64 = "PINEH64"
103104
PINEBOOK = "PINEBOOK"
104105
PINEPHONE = "PINEPHONE"
105106

@@ -398,7 +399,7 @@
398399
_ONION_OMEGA_BOARD_IDS = (ONION_OMEGA, ONION_OMEGA2)
399400

400401
# Pine64 boards and devices
401-
_PINE64_DEV_IDS = (PINE64, PINEBOOK, PINEPHONE)
402+
_PINE64_DEV_IDS = (PINE64, PINEH64, PINEBOOK, PINEPHONE)
402403

403404
# UDOO
404405
_UDOO_BOARD_IDS = {UDOO_BOLT_V8: ("SC40-2000-0000-C0|C",), UDOO_X86: ("dummy",)}

adafruit_platformdetect/constants/chips.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
MIPS24KEC = "MIPS24KEC"
2727
ZYNQ7000 = "ZYNQ7000"
2828
A64 = "A64"
29+
H6 = "H6"
2930
A33 = "A33"
3031
H5 = "H5"
3132
RK3308 = "RK3308"

0 commit comments

Comments
 (0)