diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index 81927f96..f045560e 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -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: @@ -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": @@ -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(): diff --git a/adafruit_platformdetect/chip.py b/adafruit_platformdetect/chip.py index 3373a1ef..b87ad22e 100644 --- a/adafruit_platformdetect/chip.py +++ b/adafruit_platformdetect/chip.py @@ -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 diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index 764d93f4..68cbdd8b 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -100,6 +100,7 @@ ONION_OMEGA2 = "ONION_OMEGA2" PINE64 = "PINE64" +PINEH64 = "PINEH64" PINEBOOK = "PINEBOOK" PINEPHONE = "PINEPHONE" @@ -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",)} diff --git a/adafruit_platformdetect/constants/chips.py b/adafruit_platformdetect/constants/chips.py index 6bd90d3d..3bec5c57 100644 --- a/adafruit_platformdetect/constants/chips.py +++ b/adafruit_platformdetect/constants/chips.py @@ -26,6 +26,7 @@ MIPS24KEC = "MIPS24KEC" ZYNQ7000 = "ZYNQ7000" A64 = "A64" +H6 = "H6" A33 = "A33" H5 = "H5" RK3308 = "RK3308"