File tree 4 files changed +15
-4
lines changed
4 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 30
30
31
31
from adafruit_platformdetect .constants import boards , chips
32
32
33
-
34
33
__version__ = "0.0.0+auto.0"
35
34
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect.git"
36
35
@@ -63,6 +62,8 @@ def id(self) -> Optional[str]:
63
62
64
63
if chip_id == chips .H3 :
65
64
board_id = self ._armbian_id () or self ._allwinner_variants_id ()
65
+ elif chip_id == chips .JH7110 :
66
+ board_id = self ._starfive_id ()
66
67
elif chip_id == chips .BCM2XXX :
67
68
board_id = self ._pi_id ()
68
69
elif chip_id == chips .OS_AGNOSTIC :
@@ -226,6 +227,12 @@ def id(self) -> Optional[str]:
226
227
return board_id
227
228
228
229
# 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
229
236
230
237
def _pi_id (self ) -> Optional [str ]:
231
238
"""Try to detect id of a Raspberry Pi."""
Original file line number Diff line number Diff line change 19
19
20
20
"""
21
21
22
-
23
22
import os
24
23
import sys
25
24
30
29
31
30
from adafruit_platformdetect .constants import chips
32
31
33
-
34
32
__version__ = "0.0.0+auto.0"
35
33
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect.git"
36
34
@@ -224,6 +222,9 @@ def _linux_id(self) -> Optional[str]:
224
222
if self .detector .check_dt_compatible_value ("jh7100" ):
225
223
return chips .JH71X0
226
224
225
+ if self .detector .check_dt_compatible_value ("jh7110" ):
226
+ return chips .JH7110
227
+
227
228
if self .detector .check_dt_compatible_value ("sun8i-a33" ):
228
229
return chips .A33
229
230
Original file line number Diff line number Diff line change 4
4
5
5
"""Definition of boards and/or ids"""
6
6
# Allow for aligned constant definitions:
7
+ VISIONFIVE2 = "VISIONFIVE2"
7
8
BEAGLE_PLAY = "BEAGLE_PLAY"
8
9
BEAGLEBONE_AI64 = "BEAGLEBONE_AI64"
9
10
BEAGLEBONE = "BEAGLEBONE"
73
74
NANOPI_NEO = "NANOPI_NEO"
74
75
NANOPI_NEO_2 = "NANOPI_NEO_2"
75
76
76
-
77
77
# Banana Pi boards
78
78
BANANA_PI_M2_ZERO = "BANANA_PI_M2_ZERO"
79
79
BANANA_PI_M2_PLUS = "BANANA_PI_M2_PLUS"
243
243
LUCKFOX_PICO_MINI = "LUCKFOX_PICO_MINI"
244
244
LUCKFOX_PICO_PLUS = "LUCKFOX_PICO_PLUS"
245
245
246
+ # StarFive boards
247
+ _STARFIVE_BOARD_IDS = (VISIONFIVE2 ,)
246
248
# Asus Tinkerboard
247
249
_ASUS_TINKER_BOARD_IDS = (
248
250
ASUS_TINKER_BOARD ,
Original file line number Diff line number Diff line change 41
41
HFU540 = "HFU540"
42
42
C906 = "C906"
43
43
JH71X0 = "JH71X0"
44
+ JH7110 = "JH7110"
44
45
MCP2221 = "MCP2221"
45
46
BINHO = "BINHO"
46
47
MIPS24KC = "MIPS24KC"
You can’t perform that action at this time.
0 commit comments