Skip to content

Commit 31a4811

Browse files
authored
Merge pull request adafruit#154 from fede2cr/master
Adding support for BeagleV Starfive, with VIC-U7 processor
2 parents 98ee83b + e334f66 commit 31a4811

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

adafruit_platformdetect/board.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ def id(self):
115115
board_id = self._sifive_id()
116116
elif chip_id == chips.C906:
117117
board_id = self._allwinner_id()
118+
elif chip_id == chips.VICU7:
119+
board_id = self.__beaglebone_id()
118120
elif chip_id == chips.MCP2221:
119121
board_id = boards.MICROCHIP_MCP2221
120122
elif chip_id == chips.BINHO:
@@ -240,6 +242,11 @@ def _beaglebone_id(self):
240242
if id_string == bb_id[1]:
241243
return model
242244

245+
board_value = self.detector.get_armbian_release_field("BOARD")
246+
247+
if board_value == "freedom-u74-arty":
248+
return boards.BEAGLEV_STARFIV
249+
243250
return None
244251

245252
# pylint: enable=no-self-use

adafruit_platformdetect/chip.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ def _linux_id(self):
165165
if self.detector.check_dt_compatible_value("sun20iw1p1"):
166166
return chips.C906
167167

168+
if self.detector.check_dt_compatible_value("sifive"):
169+
return chips.VICU7
170+
168171
if self.detector.check_dt_compatible_value("sun8i-a33"):
169172
return chips.A33
170173

adafruit_platformdetect/constants/boards.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
BEAGLEBONE_AIR = "BEAGLEBONE_AIR"
1515
BEAGLEBONE_AI = "BEAGLEBONE_AI"
1616
BEAGLEBONE_POCKETBONE = "BEAGLEBONE_POCKETBONE"
17+
BEAGLEV_STARFIV = "BEAGLEV_STARFIVE"
1718
BEAGLELOGIC_STANDALONE = "BEAGLELOGIC_STANDALONE"
1819
OSD3358_DEV_BOARD = "OSD3358_DEV_BOARD"
1920
OSD3358_SM_RED = "OSD3358_SM_RED"

adafruit_platformdetect/constants/chips.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
FT2232H = "FT2232H"
2525
HFU540 = "HFU540"
2626
C906 = "C906"
27+
VICU7 = "VICU7"
2728
MCP2221 = "MCP2221"
2829
BINHO = "BINHO"
2930
MIPS24KC = "MIPS24KC"

0 commit comments

Comments
 (0)