Skip to content

Commit 4d3bbdf

Browse files
committed
Merge remote-tracking branch 'brentru/add-agnostic-board' into add-agnostic-board
2 parents d9e4f42 + 15d91a4 commit 4d3bbdf

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

adafruit_platformdetect/board.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ def id(self) -> Optional[str]:
215215
board_id = boards.MILKV_DUO
216216
elif chip_id == chips.TH1520:
217217
board_id = boards.LICHEEPI_4A
218+
elif chip_id == chips.RV1103:
219+
board_id = self._rv1103_id()
218220
elif chip_id == chips.RV1106:
219221
board_id = self._rv1106_id()
220222
self._board_id = board_id
@@ -732,6 +734,8 @@ def _allwinner_variants_id(self) -> Optional[str]:
732734
board = boards.ORANGE_PI_ZERO_PLUS_2H5
733735
elif "H616" in chip_id:
734736
board = boards.ORANGE_PI_ZERO_2
737+
elif "walnutpi-1b-emmc" in board_value:
738+
board = boards.WALNUT_PI_1B_EMMC
735739
elif "walnutpi-1b" in board_value:
736740
board = boards.WALNUT_PI_1B
737741
# TODO: Add other specifc board contexts here
@@ -808,6 +812,14 @@ def _siemens_simatic_iot2000_id(self) -> Optional[str]:
808812
board = boards.SIEMENS_SIMATIC_IOT2050_BASIC
809813
return board
810814

815+
def _rv1103_id(self) -> Optional[str]:
816+
"""Check what type of rv1103 board."""
817+
board_value = self.detector.get_device_model()
818+
board = None
819+
if board_value and "Luckfox Pico Mini" in board_value:
820+
board = boards.LUCKFOX_PICO_MINI
821+
return board
822+
811823
def _rv1106_id(self) -> Optional[str]:
812824
"""Check what type of rv1106 board."""
813825
board_value = self.detector.get_device_model()

adafruit_platformdetect/chip.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ def _linux_id(self) -> Optional[str]:
252252
if self.detector.check_dt_compatible_value("rockchip,rk3588"):
253253
return chips.RK3588
254254

255+
if self.detector.check_dt_compatible_value("rockchip,rv1103"):
256+
return chips.RV1103
257+
255258
if self.detector.check_dt_compatible_value("rockchip,rv1106"):
256259
return chips.RV1106
257260

adafruit_platformdetect/constants/boards.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
# Walnut Pi boards
4242
WALNUT_PI_1B = "WALNUT_PI_1B"
43+
WALNUT_PI_1B_EMMC = "WALNUT_PI_1B_EMMC"
4344

4445
# Clockwork Pi boards
4546
CLOCKWORK_CPI3 = "CLOCKWORK_CPI3"
@@ -229,6 +230,7 @@
229230

230231
# Luckfox Pico boards
231232
LUCKFOX_PICO_MAX = "LUCKFOX_PICO_MAX"
233+
LUCKFOX_PICO_MINI = "LUCKFOX_PICO_MINI"
232234

233235
# Asus Tinkerboard
234236
_ASUS_TINKER_BOARD_IDS = (
@@ -238,7 +240,10 @@
238240
)
239241

240242
# WalnutPi
241-
_WALNUT_PI_IDS = (WALNUT_PI_1B,)
243+
_WALNUT_PI_IDS = (
244+
WALNUT_PI_1B,
245+
WALNUT_PI_1B_EMMC,
246+
)
242247

243248
# STM32MP1
244249
_STM32MP1_IDS = (
@@ -587,7 +592,10 @@
587592
_MILKV_IDS_ = (MILKV_DUO,)
588593

589594
# Luckfox
590-
_LUCKFOX_IDS = (LUCKFOX_PICO_MAX,)
595+
_LUCKFOX_IDS = (
596+
LUCKFOX_PICO_MAX,
597+
LUCKFOX_PICO_MINI,
598+
)
591599

592600
# Agnostic board
593601
OS_AGNOSTIC_BOARD = "OS_AGNOSTIC_BOARD"

adafruit_platformdetect/constants/chips.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
RK3566 = "RK3566"
6464
RK3568 = "RK3568"
6565
RK3588 = "RK3588"
66+
RV1103 = "RV1103"
6667
RV1106 = "RV1106"
6768
PENTIUM_N3710 = "PENTIUM_N3710" # SOC Braswell core
6869
CELERON_N5105 = "CELERON_N5105"

0 commit comments

Comments
 (0)