Skip to content

Commit 12e70d7

Browse files
committed
Add RV1106 Luckfox Pico Max
1 parent f991454 commit 12e70d7

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

adafruit_platformdetect/board.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ def id(self) -> Optional[str]:
187187
or self._armbian_id()
188188
or self._rk3588_id()
189189
)
190+
elif chip_id == chips.RV1106:
191+
board_id = self._rv1106_id()
190192
elif chip_id == chips.RYZEN_V1605B:
191193
board_id = self._udoo_id()
192194
elif chip_id == chips.PENTIUM_N3710:
@@ -605,6 +607,14 @@ def _rk3588_id(self) -> Optional[str]:
605607
board = boards.LUBANCAT4
606608
return board
607609

610+
def _rv1106_id(self) -> Optional[str]:
611+
"""Check what type of rv1106 board."""
612+
board_value = self.detector.get_device_model()
613+
board = None
614+
if board_value and "Luckfox Pico Max" in board_value:
615+
board = boards.LUCKFOX_PICO_MAX
616+
return board
617+
608618
def _rock_pi_id(self) -> Optional[str]:
609619
"""Check what type of Rock Pi board."""
610620
board_value = self.detector.get_device_model()
@@ -984,6 +994,11 @@ def any_olimex_lime2_board(self):
984994
def any_repka_board(self):
985995
"""Check whether the current board is any Repka device."""
986996
return self.id in boards._REPKA_PI_IDS
997+
998+
@property
999+
def any_luckfox_pico_board(self):
1000+
"""Check whether the current board is any Luckfox Pico device."""
1001+
return self.id in boards._LUCKFOX_IDS
9871002

9881003
@property
9891004
def os_environ_board(self) -> bool:
@@ -1050,6 +1065,7 @@ def lazily_generate_conditions():
10501065
yield self.any_olimex_lime2_board
10511066
yield self.any_repka_board
10521067
yield self.any_milkv_board
1068+
yield self.any_luckfox_pico_board
10531069

10541070
return any(condition for condition in lazily_generate_conditions())
10551071

adafruit_platformdetect/chip.py

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

251+
if self.detector.check_dt_compatible_value("rockchip,rv1106"):
252+
return chips.RV1106
253+
251254
if self.detector.check_dt_compatible_value("amlogic,a311d"):
252255
return chips.A311D
253256

adafruit_platformdetect/constants/boards.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@
117117
LUBANCAT2 = "LUBANCAT2"
118118
LUBANCAT4 = "LUBANCAT4"
119119

120+
# Luckfox Pico boards
121+
LUCKFOX_PICO_MAX = "LUCKFOX_PICO_MAX"
122+
120123
# Various Raspberry Pi models
121124
RASPBERRY_PI_B_REV1 = "RASPBERRY_PI_B_REV1"
122125
RASPBERRY_PI_B_REV2 = "RASPBERRY_PI_B_REV2"
@@ -296,6 +299,11 @@
296299
LUBANCAT4,
297300
)
298301

302+
# Luckfox
303+
_LUCKFOX_IDS = (
304+
LUCKFOX_PICO_MAX,
305+
)
306+
299307
# Coral boards
300308
_CORAL_IDS = (CORAL_EDGE_TPU_DEV, CORAL_EDGE_TPU_DEV_MINI)
301309

adafruit_platformdetect/constants/chips.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
RK3566 = "RK3566"
6363
RK3568 = "RK3568"
6464
RK3588 = "RK3588"
65+
RV1106 = "RV1106"
6566
PENTIUM_N3710 = "PENTIUM_N3710" # SOC Braswell core
6667
CELERON_N5105 = "CELERON_N5105"
6768
STM32F405 = "STM32F405"

0 commit comments

Comments
 (0)