File tree Expand file tree Collapse file tree 4 files changed +15
-4
lines changed Expand file tree Collapse file tree 4 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 3030
3131from adafruit_platformdetect .constants import boards , chips
3232
33-
3433__version__ = "0.0.0+auto.0"
3534__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect.git"
3635
@@ -63,6 +62,8 @@ def id(self) -> Optional[str]:
6362
6463 if chip_id == chips .H3 :
6564 board_id = self ._armbian_id () or self ._allwinner_variants_id ()
65+ elif chip_id == chips .JH7110 :
66+ board_id = self ._starfive_id ()
6667 elif chip_id == chips .BCM2XXX :
6768 board_id = self ._pi_id ()
6869 elif chip_id == chips .OS_AGNOSTIC :
@@ -226,6 +227,12 @@ def id(self) -> Optional[str]:
226227 return board_id
227228
228229 # pylint: enable=invalid-name
230+ def _starfive_id (self ) -> Optional [str ]:
231+ model = None
232+ model_value = self .detector .get_device_model ()
233+ if "VisionFive" in model_value and "V2" in model_value :
234+ model = boards .VISIONFIVE2
235+ return model
229236
230237 def _pi_id (self ) -> Optional [str ]:
231238 """Try to detect id of a Raspberry Pi."""
Original file line number Diff line number Diff line change 1919
2020"""
2121
22-
2322import os
2423import sys
2524
3029
3130from adafruit_platformdetect .constants import chips
3231
33-
3432__version__ = "0.0.0+auto.0"
3533__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect.git"
3634
@@ -224,6 +222,9 @@ def _linux_id(self) -> Optional[str]:
224222 if self .detector .check_dt_compatible_value ("jh7100" ):
225223 return chips .JH71X0
226224
225+ if self .detector .check_dt_compatible_value ("jh7110" ):
226+ return chips .JH7110
227+
227228 if self .detector .check_dt_compatible_value ("sun8i-a33" ):
228229 return chips .A33
229230
Original file line number Diff line number Diff line change 44
55"""Definition of boards and/or ids"""
66# Allow for aligned constant definitions:
7+ VISIONFIVE2 = "VISIONFIVE2"
78BEAGLE_PLAY = "BEAGLE_PLAY"
89BEAGLEBONE_AI64 = "BEAGLEBONE_AI64"
910BEAGLEBONE = "BEAGLEBONE"
7374NANOPI_NEO = "NANOPI_NEO"
7475NANOPI_NEO_2 = "NANOPI_NEO_2"
7576
76-
7777# Banana Pi boards
7878BANANA_PI_M2_ZERO = "BANANA_PI_M2_ZERO"
7979BANANA_PI_M2_PLUS = "BANANA_PI_M2_PLUS"
243243LUCKFOX_PICO_MINI = "LUCKFOX_PICO_MINI"
244244LUCKFOX_PICO_PLUS = "LUCKFOX_PICO_PLUS"
245245
246+ # StarFive boards
247+ _STARFIVE_BOARD_IDS = (VISIONFIVE2 ,)
246248# Asus Tinkerboard
247249_ASUS_TINKER_BOARD_IDS = (
248250 ASUS_TINKER_BOARD ,
Original file line number Diff line number Diff line change 4141HFU540 = "HFU540"
4242C906 = "C906"
4343JH71X0 = "JH71X0"
44+ JH7110 = "JH7110"
4445MCP2221 = "MCP2221"
4546BINHO = "BINHO"
4647MIPS24KC = "MIPS24KC"
You can’t perform that action at this time.
0 commit comments