Skip to content

Commit 6cac3e6

Browse files
author
Alvaro Figueroa
committed
Sticking to naming convention, testing on real hw!
1 parent 7a79652 commit 6cac3e6

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

adafruit_platformdetect/board.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ def id(self):
117117
board_id = self._sifive_id()
118118
elif chip_id == chips.C906:
119119
board_id = self._allwinner_id()
120-
elif chip_id == chips.VICU7:
121-
board_id = self.__beaglebone_id()
120+
elif chip_id == chips.JH71x0:
121+
board_id = self._beaglebone_id()
122122
elif chip_id == chips.MCP2221:
123123
board_id = boards.MICROCHIP_MCP2221
124124
elif chip_id == chips.BINHO:
@@ -233,6 +233,11 @@ def _pi_rev_code(self):
233233
# pylint: disable=no-self-use
234234
def _beaglebone_id(self):
235235
"""Try to detect id of a Beaglebone."""
236+
237+
board_value = self.detector.get_device_compatible()
238+
if "freedom-u74-arty" in board_value:
239+
return boards.BEAGLEV_STARLIGHT
240+
236241
try:
237242
with open("/sys/bus/nvmem/devices/0-00500/nvmem", "rb") as eeprom:
238243
eeprom_bytes = eeprom.read(16)
@@ -255,9 +260,6 @@ def _beaglebone_id(self):
255260

256261
board_value = self.detector.get_armbian_release_field("BOARD")
257262

258-
if board_value == "freedom-u74-arty":
259-
return boards.BEAGLEV_STARFIV
260-
261263
return None
262264

263265
# pylint: enable=no-self-use

adafruit_platformdetect/chip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def _linux_id(self):
187187
return chips.C906
188188

189189
if self.detector.check_dt_compatible_value("sifive"):
190-
return chips.VICU7
190+
return chips.JH71x0
191191

192192
if self.detector.check_dt_compatible_value("sun8i-a33"):
193193
return chips.A33

adafruit_platformdetect/constants/boards.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
BEAGLEBONE_AIR = "BEAGLEBONE_AIR"
1515
BEAGLEBONE_AI = "BEAGLEBONE_AI"
1616
BEAGLEBONE_POCKETBONE = "BEAGLEBONE_POCKETBONE"
17-
BEAGLEV_STARFIV = "BEAGLEV_STARFIVE"
17+
BEAGLEV_STARLIGHT = "BEAGLEV_STARLIGHT"
1818
BEAGLELOGIC_STANDALONE = "BEAGLELOGIC_STANDALONE"
1919
OSD3358_DEV_BOARD = "OSD3358_DEV_BOARD"
2020
OSD3358_SM_RED = "OSD3358_SM_RED"

adafruit_platformdetect/constants/chips.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
FT2232H = "FT2232H"
2525
HFU540 = "HFU540"
2626
C906 = "C906"
27-
VICU7 = "VICU7"
27+
JH71x0 = "JH71x0"
2828
MCP2221 = "MCP2221"
2929
BINHO = "BINHO"
3030
MIPS24KC = "MIPS24KC"

0 commit comments

Comments
 (0)