From 4c5a5da14dff59488cff5fac3525206c24d32067 Mon Sep 17 00:00:00 2001 From: nopnop2002 Date: Tue, 4 Jun 2024 06:31:23 +0900 Subject: [PATCH] Added LUCKFOX_PICO/LUCKFOX_PICO_PLUS --- adafruit_platformdetect/board.py | 4 ++++ adafruit_platformdetect/chip.py | 6 +++--- adafruit_platformdetect/constants/boards.py | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index 75629b5..487c3c6 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -828,6 +828,10 @@ def _rv1103_id(self) -> Optional[str]: board = None if board_value and "Luckfox Pico Mini" in board_value: board = boards.LUCKFOX_PICO_MINI + elif board_value and "Luckfox Pico Plus" in board_value: + board = boards.LUCKFOX_PICO_PLUS + elif board_value and "Luckfox Pico" in board_value: + board = boards.LUCKFOX_PICO return board def _rv1106_id(self) -> Optional[str]: diff --git a/adafruit_platformdetect/chip.py b/adafruit_platformdetect/chip.py index 72ce924..9958823 100644 --- a/adafruit_platformdetect/chip.py +++ b/adafruit_platformdetect/chip.py @@ -254,12 +254,12 @@ def _linux_id(self) -> Optional[str]: if self.detector.check_dt_compatible_value("rockchip,rk3588"): return chips.RK3588 - if self.detector.check_dt_compatible_value("rockchip,rv1103"): - return chips.RV1103 - if self.detector.check_dt_compatible_value("rockchip,rv1106"): return chips.RV1106 + if self.detector.check_dt_compatible_value("rockchip,rv1103"): + return chips.RV1103 + if self.detector.check_dt_compatible_value("amlogic,a311d"): return chips.A311D diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index 940b960..772a6d6 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -231,8 +231,10 @@ _KHADAS_40_PIN_IDS = (KHADAS_VIM3,) # Luckfox Pico boards +LUCKFOX_PICO = "LUCKFOX_PICO" LUCKFOX_PICO_MAX = "LUCKFOX_PICO_MAX" LUCKFOX_PICO_MINI = "LUCKFOX_PICO_MINI" +LUCKFOX_PICO_PLUS = "LUCKFOX_PICO_PLUS" # Asus Tinkerboard _ASUS_TINKER_BOARD_IDS = ( @@ -597,8 +599,10 @@ # Luckfox _LUCKFOX_IDS = ( + LUCKFOX_PICO, LUCKFOX_PICO_MAX, LUCKFOX_PICO_MINI, + LUCKFOX_PICO_PLUS, ) # Agnostic board