From 111daa078b5647453a55d83edd0ef9c317e05f21 Mon Sep 17 00:00:00 2001 From: Daniel Manla <60765275+dmanla@users.noreply.github.com> Date: Thu, 23 Jul 2020 15:14:21 -0400 Subject: [PATCH 01/19] Add PineH64 to board detection --- adafruit_platformdetect/board.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index a6ed830a..8c1a0c4e 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -115,6 +115,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.A33: board_id = self._clockwork_pi_id() elif chip_id == chips.RK3308: @@ -233,6 +235,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 @@ -280,6 +284,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(): From ee64a3d3b06c10297bef685002b940724822901e Mon Sep 17 00:00:00 2001 From: Daniel Manla <60765275+dmanla@users.noreply.github.com> Date: Thu, 23 Jul 2020 15:20:03 -0400 Subject: [PATCH 02/19] Added Allwinner H6; Modified Allwinner A64 In chip.py hardware identifiers take precedence over all other forms of chip detection. This causes issues with differentiating between the Allwinner H6 and Allwinner A64. Both the Allwinner H6 and Allwinner A64 return "sun50iw1p1 when checking the cpu info Hardware field. I have added logic to prevent the use of sun50iw1p1 as an identifier. I have added additional logic which successfully detects the Allwinner H6. --- adafruit_platformdetect/chip.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/adafruit_platformdetect/chip.py b/adafruit_platformdetect/chip.py index f5147a40..f2abe89d 100644 --- a/adafruit_platformdetect/chip.py +++ b/adafruit_platformdetect/chip.py @@ -135,6 +135,8 @@ def _linux_id(self): linux_id = None hardware = self.detector.get_cpuinfo_field("Hardware") + if hardware == "sun50iw1p1": #sun50iw1p1 is a common hardware identifier among different allwinner SOC's. Because it is common it should not be considered a valid + hardware = None #chip identifier. if hardware is None: vendor_id = self.detector.get_cpuinfo_field("vendor_id") @@ -175,6 +177,8 @@ 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 "odroid-xu4" in compatible: linux_id = chips.EXYNOS5422 @@ -213,8 +217,9 @@ def _linux_id(self): linux_id = chips.SAMA5 elif "Pinebook" in hardware: linux_id = chips.A64 - elif "sun50iw1p1" in hardware: - linux_id = chips.A64 + #elif "sun50iw1p1" in hardware: #sun50iw1p1 is a common identfier in Allwinner SOC's. I do not believe it should be + #linux_id = chips.A64 #used as an identifier. I feel it makes more sense to rely on the Linux ID. Otherwise it will be + #Impossible to differentiate between Allwinner A64's and Allwinner H6's. elif "ASUS_TINKER_BOARD" in hardware: linux_id = chips.RK3288 elif "Xilinx Zynq" in hardware: From e586f7e1c55c6153b50640e9d1b28fe1602148fb Mon Sep 17 00:00:00 2001 From: Daniel Manla <60765275+dmanla@users.noreply.github.com> Date: Thu, 23 Jul 2020 15:21:25 -0400 Subject: [PATCH 03/19] Add PineH64 and Allwinner H6 constants --- adafruit_platformdetect/constants/boards.py | 3 ++- adafruit_platformdetect/constants/chips.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index 375606f5..2c7aa522 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -93,6 +93,7 @@ ONION_OMEGA2 = "ONION_OMEGA2" PINE64 = "PINE64" +PINEH64 = "PINEH64" PINEBOOK = "PINEBOOK" PINEPHONE = "PINEPHONE" @@ -354,7 +355,7 @@ ) # Pine64 boards and devices -_PINE64_DEV_IDS = (PINE64, PINEBOOK, PINEPHONE) +_PINE64_DEV_IDS = (PINE64, PINEH64, PINEBOOK, PINEPHONE) # ASUS Tinker Board _ASUS_TINKER_BOARD_DEV_IDS = ASUS_TINKER_BOARD diff --git a/adafruit_platformdetect/constants/chips.py b/adafruit_platformdetect/constants/chips.py index 27b46f4b..ed3eb83c 100644 --- a/adafruit_platformdetect/constants/chips.py +++ b/adafruit_platformdetect/constants/chips.py @@ -27,6 +27,7 @@ MIPS24KEC = "MIPS24KEC" ZYNQ7000 = "ZYNQ7000" A64 = "A64" +H6 = "H6" A33 = "A33" RK3308 = "RK3308" LPC4330 = "LPC4330" From 578742c684183093786591f04e49db8903a9125e Mon Sep 17 00:00:00 2001 From: Daniel Manla <60765275+dmanla@users.noreply.github.com> Date: Thu, 23 Jul 2020 15:26:07 -0400 Subject: [PATCH 04/19] Modified a comment for clarification --- adafruit_platformdetect/chip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_platformdetect/chip.py b/adafruit_platformdetect/chip.py index f2abe89d..e10f5a79 100644 --- a/adafruit_platformdetect/chip.py +++ b/adafruit_platformdetect/chip.py @@ -218,7 +218,7 @@ def _linux_id(self): elif "Pinebook" in hardware: linux_id = chips.A64 #elif "sun50iw1p1" in hardware: #sun50iw1p1 is a common identfier in Allwinner SOC's. I do not believe it should be - #linux_id = chips.A64 #used as an identifier. I feel it makes more sense to rely on the Linux ID. Otherwise it will be + #linux_id = chips.A64 #used as an identifier. I feel it makes more sense to rely on the device compatible field. Otherwise it will be #Impossible to differentiate between Allwinner A64's and Allwinner H6's. elif "ASUS_TINKER_BOARD" in hardware: linux_id = chips.RK3288 From 3f334213a1070d935d63467b10e2a0f97b4499f4 Mon Sep 17 00:00:00 2001 From: Daniel Manla <60765275+dmanla@users.noreply.github.com> Date: Tue, 28 Jul 2020 14:38:48 -0400 Subject: [PATCH 05/19] Fixed formatting via "black" --- adafruit_platformdetect/chip.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/adafruit_platformdetect/chip.py b/adafruit_platformdetect/chip.py index e10f5a79..79f55652 100644 --- a/adafruit_platformdetect/chip.py +++ b/adafruit_platformdetect/chip.py @@ -135,8 +135,10 @@ def _linux_id(self): linux_id = None hardware = self.detector.get_cpuinfo_field("Hardware") - if hardware == "sun50iw1p1": #sun50iw1p1 is a common hardware identifier among different allwinner SOC's. Because it is common it should not be considered a valid - hardware = None #chip identifier. + if ( + hardware == "sun50iw1p1" + ): # sun50iw1p1 is a common hardware identifier among different allwinner SOC's. Because it is common it should not be considered a valid + hardware = None # chip identifier. if hardware is None: vendor_id = self.detector.get_cpuinfo_field("vendor_id") @@ -217,9 +219,9 @@ def _linux_id(self): linux_id = chips.SAMA5 elif "Pinebook" in hardware: linux_id = chips.A64 - #elif "sun50iw1p1" in hardware: #sun50iw1p1 is a common identfier in Allwinner SOC's. I do not believe it should be - #linux_id = chips.A64 #used as an identifier. I feel it makes more sense to rely on the device compatible field. Otherwise it will be - #Impossible to differentiate between Allwinner A64's and Allwinner H6's. + # elif "sun50iw1p1" in hardware: #sun50iw1p1 is a common identfier in Allwinner SOC's. I do not believe it should be + # linux_id = chips.A64 #used as an identifier. I feel it makes more sense to rely on the device compatible field. Otherwise it will be + # Impossible to differentiate between Allwinner A64's and Allwinner H6's. elif "ASUS_TINKER_BOARD" in hardware: linux_id = chips.RK3288 elif "Xilinx Zynq" in hardware: From 0c1d3b700c0efefbd18a4dbf7d9f166f7d0cd13a Mon Sep 17 00:00:00 2001 From: jolesieur Date: Wed, 28 Oct 2020 13:31:25 -0400 Subject: [PATCH 06/19] Added support for BeagleBone Green Gateway Added support for the BeagleBone Green Gateway from Seeed Studio. --- adafruit_platformdetect/constants/boards.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index 0c57e344..21bc1169 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -7,6 +7,7 @@ BEAGLEBONE_POCKETBEAGLE = "BEAGLEBONE_POCKETBEAGLE" BEAGLEBONE_GREEN = "BEAGLEBONE_GREEN" BEAGLEBONE_GREEN_WIRELESS = "BEAGLEBONE_GREEN_WIRELESS" +BEAGLEBONE_GREEN_GATEWAY = "BEAGLEBONE_GREEN_GATEWAY" BEAGLEBONE_BLACK_INDUSTRIAL = "BEAGLEBONE_BLACK_INDUSTRIAL" BEAGLEBONE_ENHANCED = "BEAGLEBONE_ENHANCED" BEAGLEBONE_USOMIQ = "BEAGLEBONE_USOMIQ" @@ -208,6 +209,7 @@ BEAGLEBONE_POCKETBEAGLE, BEAGLEBONE_GREEN, BEAGLEBONE_GREEN_WIRELESS, + BEAGLEBONE_GREEN_GATEWAY, BEAGLEBONE_BLACK_INDUSTRIAL, BEAGLEBONE_ENHANCED, BEAGLEBONE_USOMIQ, @@ -250,6 +252,7 @@ BEAGLEBONE_POCKETBEAGLE: (("A2", "A335PBGL00A2"),), BEAGLEBONE_GREEN: (("1A", "A335BNLT...."), ("UNKNOWN", "A335BNLTBBG1")), BEAGLEBONE_GREEN_WIRELESS: (("W1A", "A335BNLTGW1A"),), + BEAGLEBONE_GREEN_GATEWAY: (("GA1", "A335BNLTGG1A"),), BEAGLEBONE_BLACK_INDUSTRIAL: ( ("A0", "A335BNLTAIA0"), # Arrow ("A0", "A335BNLTEIA0"), # Element14 From 1fa338d96940b7b2f0025499adfb66b46aacece3 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Sat, 31 Oct 2020 08:23:51 -0700 Subject: [PATCH 07/19] Change Pine64 to use dt-compatible --- adafruit_platformdetect/chip.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/adafruit_platformdetect/chip.py b/adafruit_platformdetect/chip.py index deb33717..3373a1ef 100644 --- a/adafruit_platformdetect/chip.py +++ b/adafruit_platformdetect/chip.py @@ -150,6 +150,9 @@ def _linux_id(self): if self.detector.check_dt_compatible_value("st,stm32mp157"): return chips.STM32MP157 + if self.detector.check_dt_compatible_value("sun50i-a64"): + return chips.A64 + linux_id = None hardware = self.detector.get_cpuinfo_field("Hardware") @@ -237,8 +240,6 @@ def _linux_id(self): linux_id = chips.SAMA5 elif "Pinebook" in hardware: linux_id = chips.A64 - elif "sun50iw1p1" in hardware: - linux_id = chips.A64 elif "ASUS_TINKER_BOARD" in hardware: linux_id = chips.RK3288 elif "Xilinx Zynq" in hardware: From 74e1d05857301719c3a395f3214984e97ad1b63a Mon Sep 17 00:00:00 2001 From: twa127 <46624596+twa127@users.noreply.github.com> Date: Sat, 31 Oct 2020 20:50:28 +0000 Subject: [PATCH 08/19] Update board.py --- adafruit_platformdetect/board.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index ee5923be..81927f96 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.H5: + board_id = self._armbian_id() elif chip_id == chips.A33: board_id = self._clockwork_pi_id() elif chip_id == chips.RK3308: From 9ec299e072f36c751f15463606dc387ecb859133 Mon Sep 17 00:00:00 2001 From: twa127 <46624596+twa127@users.noreply.github.com> Date: Sat, 31 Oct 2020 20:53:19 +0000 Subject: [PATCH 09/19] Update boards.py --- adafruit_platformdetect/constants/boards.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index f74b25b0..d1fc9105 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -38,6 +38,7 @@ ORANGE_PI_PC_PLUS = "ORANGE_PI_PC_PLUS" ORANGE_PI_PLUS_2E = "ORANGE_PI_PLUS_2E" ORANGE_PI_2 = "ORANGE_PI_2" +ORANGE_PI_ZERO_PLUS_2H5 = "ORANGE_PI_ZERO_PLUS_2H5" # Banana Pi boards BANANA_PI_M2_ZERO = "BANANA_PI_M2_ZERO" @@ -126,6 +127,7 @@ ORANGE_PI_PC_PLUS, ORANGE_PI_PLUS_2E, ORANGE_PI_2, + ORANGE_PI_ZERO_PLUS_2H5, ) # BananaPI From 97ee9a9415b6083e5c51f72cd8b218ac980cb2fd Mon Sep 17 00:00:00 2001 From: twa127 <46624596+twa127@users.noreply.github.com> Date: Sat, 31 Oct 2020 20:54:51 +0000 Subject: [PATCH 10/19] Update chips.py --- adafruit_platformdetect/constants/chips.py | 1 + 1 file changed, 1 insertion(+) diff --git a/adafruit_platformdetect/constants/chips.py b/adafruit_platformdetect/constants/chips.py index 0d93bdf3..6bd90d3d 100644 --- a/adafruit_platformdetect/constants/chips.py +++ b/adafruit_platformdetect/constants/chips.py @@ -27,6 +27,7 @@ ZYNQ7000 = "ZYNQ7000" A64 = "A64" A33 = "A33" +H5 = "H5" RK3308 = "RK3308" LPC4330 = "LPC4330" RK3288 = "RK3288" From 1f6b3f056f46b7a4dadda9ddb3e39cb08f984574 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Sun, 1 Nov 2020 09:34:23 -0800 Subject: [PATCH 11/19] Removed long line --- adafruit_platformdetect/chip.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/adafruit_platformdetect/chip.py b/adafruit_platformdetect/chip.py index 8b8e6ee6..b87ad22e 100644 --- a/adafruit_platformdetect/chip.py +++ b/adafruit_platformdetect/chip.py @@ -155,10 +155,6 @@ def _linux_id(self): linux_id = None hardware = self.detector.get_cpuinfo_field("Hardware") - if ( - hardware == "sun50iw1p1" - ): # sun50iw1p1 is a common hardware identifier among different allwinner SOC's. Because it is common it should not be considered a valid - hardware = None # chip identifier. if hardware is None: vendor_id = self.detector.get_cpuinfo_field("vendor_id") From 71f439703d0a7dcd79f56eed0af36613a3f99119 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Mon, 2 Nov 2020 11:43:48 -0800 Subject: [PATCH 12/19] Adding Raspberry Pi 400 detection --- adafruit_platformdetect/constants/boards.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index 68cbdd8b..401c56a7 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -79,6 +79,7 @@ RASPBERRY_PI_CM3_PLUS = "RASPBERRY_PI_CM3_PLUS" RASPBERRY_PI_4B = "RASPBERRY_PI_4B" RASPBERRY_PI_AVNET_IIOT_GW = "RASPBERY_PI_AVNET_IIOT_GW" +RASPBERRY_PI_400 = "RASPBERRY_PI_400" ODROID_C1 = "ODROID_C1" ODROID_C1_PLUS = "ODROID_C1_PLUS" @@ -197,6 +198,7 @@ RASPBERRY_PI_3A_PLUS, RASPBERRY_PI_4B, RASPBERRY_PI_AVNET_IIOT_GW, + RASPBERRY_PI_400, ) _RASPBERRY_PI_CM_IDS = (RASPBERRY_PI_CM1, RASPBERRY_PI_CM3, RASPBERRY_PI_CM3_PLUS) @@ -393,6 +395,7 @@ "1c03112", "2c03112", ), + RASPBERRY_PI_400: ("c03130",), } # Onion omega boards From 141ac825c9d07832aa8c6d0dc49eff23c40dc979 Mon Sep 17 00:00:00 2001 From: Jordan ERNST Date: Tue, 17 Nov 2020 10:29:29 +0100 Subject: [PATCH 13/19] SoPine (Pine64) detection --- adafruit_platformdetect/board.py | 2 ++ adafruit_platformdetect/constants/boards.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index f045560e..70f0be07 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -312,6 +312,8 @@ def _pine64_id(self): board = boards.PINEBOOK elif "pinephone" in board_value.lower(): board = boards.PINEPHONE + elif "sopine" in board_value.lower(): + board = boards.SOPINE return board # pylint: disable=no-self-use diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index 401c56a7..5984df2a 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -104,6 +104,7 @@ PINEH64 = "PINEH64" PINEBOOK = "PINEBOOK" PINEPHONE = "PINEPHONE" +SOPINE = "SOPINE" ROCK_PI_S = "ROCK_PI_S" @@ -402,7 +403,7 @@ _ONION_OMEGA_BOARD_IDS = (ONION_OMEGA, ONION_OMEGA2) # Pine64 boards and devices -_PINE64_DEV_IDS = (PINE64, PINEH64, PINEBOOK, PINEPHONE) +_PINE64_DEV_IDS = (PINE64, PINEH64, PINEBOOK, PINEPHONE, SOPINE) # UDOO _UDOO_BOARD_IDS = {UDOO_BOLT_V8: ("SC40-2000-0000-C0|C",), UDOO_X86: ("dummy",)} From 70b9dd7a61b3b93796cf9fb9edb9a16cce24ed48 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Wed, 18 Nov 2020 12:06:21 -0800 Subject: [PATCH 14/19] Add missing Pi 4 Rev code --- adafruit_platformdetect/constants/boards.py | 1 + 1 file changed, 1 insertion(+) diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index 5984df2a..e52ab024 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -382,6 +382,7 @@ "b03112", "c03112", "b03114", + "c03114", "d03114", "1a03111", "2a03111", From aceb21ec300ab161e50ef5960e54cb1d0c45464b Mon Sep 17 00:00:00 2001 From: Scott Main Date: Tue, 24 Nov 2020 20:47:41 -0800 Subject: [PATCH 15/19] Fix documentation title Using the Blinka title is canibalizing page rank for the real Blinka library docs. --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 0027ead7..b9a7c0cc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -36,7 +36,7 @@ master_doc = "index" # General information about the project. -project = "Adafruit Blinka Library" +project = "Adafruit PlatformDetect Library" copyright = "2017 Adafruit Industries" author = "Brennen Bearnes" From 1e83152b46ede3a83c1b175d11c43cbe8898fc94 Mon Sep 17 00:00:00 2001 From: Scott Main Date: Sun, 29 Nov 2020 11:53:21 -0800 Subject: [PATCH 16/19] Add detection for Coral Dev Board Mini --- adafruit_platformdetect/board.py | 4 +++- adafruit_platformdetect/chip.py | 3 +++ adafruit_platformdetect/constants/boards.py | 7 ++++++- adafruit_platformdetect/constants/chips.py | 1 + bin/detect.py | 6 +++++- 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index 70f0be07..1133c6fe 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -137,6 +137,8 @@ def id(self): board_id = self._udoo_id() elif chip_id == chips.STM32MP157: board_id = self._stm32mp1_id() + elif chip_id == chips.MT8167: + board_id = boards.CORAL_EDGE_TPU_DEV_MINI self._board_id = board_id return board_id @@ -401,7 +403,7 @@ def any_orange_pi(self): @property def any_coral_board(self): """Check whether the current board is any defined Coral.""" - return self.CORAL_EDGE_TPU_DEV + return self.id in boards._CORAL_IDS @property def any_pynq_board(self): diff --git a/adafruit_platformdetect/chip.py b/adafruit_platformdetect/chip.py index b87ad22e..52536c45 100644 --- a/adafruit_platformdetect/chip.py +++ b/adafruit_platformdetect/chip.py @@ -153,6 +153,9 @@ def _linux_id(self): if self.detector.check_dt_compatible_value("sun50i-a64"): return chips.A64 + if self.detector.check_dt_compatible_value("mediatek,mt8167"): + return chips.MT8167 + linux_id = None hardware = self.detector.get_cpuinfo_field("Hardware") diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index e52ab024..5094a1c1 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -54,6 +54,7 @@ # Google Coral dev board CORAL_EDGE_TPU_DEV = "CORAL_EDGE_TPU_DEV" +CORAL_EDGE_TPU_DEV_MINI = "CORAL_EDGE_TPU_DEV_MINI" # Xilinx PYNQ FPGA dev boards PYNQ_Z1 = "PYNQ_Z1" @@ -137,7 +138,11 @@ # BananaPI _BANANA_PI_IDS = (BANANA_PI_M2_ZERO,) -_CORAL_IDS = (CORAL_EDGE_TPU_DEV,) +# Coral boards +_CORAL_IDS = ( + CORAL_EDGE_TPU_DEV, + CORAL_EDGE_TPU_DEV_MINI, +) _PYNQ_IDS = (PYNQ_Z1, PYNQ_Z2) diff --git a/adafruit_platformdetect/constants/chips.py b/adafruit_platformdetect/constants/chips.py index 3bec5c57..7b7bfa3b 100644 --- a/adafruit_platformdetect/constants/chips.py +++ b/adafruit_platformdetect/constants/chips.py @@ -35,5 +35,6 @@ PENTIUM_N3710 = "PENTIUM_N3710" # SOC Braswell core STM32F405 = "STM32F405" STM32MP157 = "STM32MP157" +MT8167 = "MT8167" BCM_RANGE = {"BCM2708", "BCM2709", "BCM2711", "BCM2835", "BCM2837"} diff --git a/bin/detect.py b/bin/detect.py index 192ebd3b..eae7b562 100644 --- a/bin/detect.py +++ b/bin/detect.py @@ -16,7 +16,8 @@ print("Is this a BeagleBone Black?", detector.board.BEAGLEBONE_BLACK) print("Is this a BeagleBone Green?", detector.board.BEAGLEBONE_GREEN) print("Is this a Giant Board?", detector.board.GIANT_BOARD) -print("Is this a Coral Edge TPU?", detector.board.CORAL_EDGE_TPU_DEV) +print("Is this a Coral Dev Board?", detector.board.CORAL_EDGE_TPU_DEV) +print("Is this a Coral Dev Board Mini?", detector.board.CORAL_EDGE_TPU_DEV_MINI) print("Is this a SiFive Unleashed? ", detector.board.SIFIVE_UNLEASHED) print("Is this a PYNQ Board?", detector.board.PYNQ_Z1 | detector.board.PYNQ_Z2) print("Is this a Rock Pi board?", detector.board.any_rock_pi_board) @@ -63,3 +64,6 @@ if detector.board.any_asus_tinker_board: print("ASUS Tinker Board device detected.") + +if detector.board.any_coral_board: + print("Coral device detected.") From 800fdb047306553773799f85367f7bb2b62037c2 Mon Sep 17 00:00:00 2001 From: Mike Causer Date: Tue, 8 Dec 2020 01:13:02 +1100 Subject: [PATCH 17/19] Fix expired Discord link --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 684526d2..f8bbd258 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ Introduction :alt: Documentation Status .. image:: https://img.shields.io/discord/327254708534116352.svg - :target: https://discord.gg/nBQh6qu + :target: https://adafru.it/discord :alt: Discord .. image:: https://github.com/adafruit/Adafruit_Python_PlatformDetect/workflows/Build%20CI/badge.svg From 3a00e3262676614dd332dd47af8a64755c9a6826 Mon Sep 17 00:00:00 2001 From: Timon Date: Thu, 10 Dec 2020 23:44:15 +0100 Subject: [PATCH 18/19] Add support for Raspberry Pi CM4 --- adafruit_platformdetect/constants/boards.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index 5094a1c1..f7504789 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -81,6 +81,7 @@ RASPBERRY_PI_4B = "RASPBERRY_PI_4B" RASPBERRY_PI_AVNET_IIOT_GW = "RASPBERY_PI_AVNET_IIOT_GW" RASPBERRY_PI_400 = "RASPBERRY_PI_400" +RASPBERRY_PI_CM4 = "RASPBERRY_PI_CM4" ODROID_C1 = "ODROID_C1" ODROID_C1_PLUS = "ODROID_C1_PLUS" @@ -207,7 +208,7 @@ RASPBERRY_PI_400, ) -_RASPBERRY_PI_CM_IDS = (RASPBERRY_PI_CM1, RASPBERRY_PI_CM3, RASPBERRY_PI_CM3_PLUS) +_RASPBERRY_PI_CM_IDS = (RASPBERRY_PI_CM1, RASPBERRY_PI_CM3, RASPBERRY_PI_CM3_PLUS, RASPBERRY_PI_CM4) _ODROID_40_PIN_IDS = ( ODROID_C1, @@ -403,6 +404,7 @@ "2c03112", ), RASPBERRY_PI_400: ("c03130",), + RASPBERRY_PI_CM4: ("b03140",), } # Onion omega boards From f30f7c9b646021dd46d17853345bc5e7c1080b99 Mon Sep 17 00:00:00 2001 From: lady ada Date: Thu, 10 Dec 2020 18:05:09 -0500 Subject: [PATCH 19/19] fix black --- adafruit_platformdetect/constants/boards.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index f7504789..ef251ae2 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -208,7 +208,12 @@ RASPBERRY_PI_400, ) -_RASPBERRY_PI_CM_IDS = (RASPBERRY_PI_CM1, RASPBERRY_PI_CM3, RASPBERRY_PI_CM3_PLUS, RASPBERRY_PI_CM4) +_RASPBERRY_PI_CM_IDS = ( + RASPBERRY_PI_CM1, + RASPBERRY_PI_CM3, + RASPBERRY_PI_CM3_PLUS, + RASPBERRY_PI_CM4, +) _ODROID_40_PIN_IDS = ( ODROID_C1,