diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index beb1088..b86be6b 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -177,7 +177,7 @@ class Board: elif chip_id == chips.RK3568: board_id = self._rk3568_id() elif chip_id == chips.RK3588: - board_id = self._rock_pi_id() or self._orange_pi_id() or self._armbian_id() + board_id = self._rock_pi_id() or self._orange_pi_id() or self._armbian_id() or self._rk3588_id() elif chip_id == chips.RYZEN_V1605B: board_id = self._udoo_id() elif chip_id == chips.PENTIUM_N3710: @@ -559,6 +559,14 @@ class Board: board = boards.ROCK_PI_3A return board + def _rk3588_id(self) -> Optional[str]: + """Check what type of rk3588 board.""" + board_value = self.detector.get_device_model() + board = None + if board_value and "LubanCat-4" in board_value: + board = boards.LUBANCAT4 + return board + def _rock_pi_id(self) -> Optional[str]: """Check what type of Rock Pi board.""" board_value = self.detector.get_device_model() diff --git a/adafruit_platformdetect/constants/boards.py b/adafruit_platformdetect/constants/boards.py index 8ca40e6..ba9c56e 100644 --- a/adafruit_platformdetect/constants/boards.py +++ b/adafruit_platformdetect/constants/boards.py @@ -110,6 +110,7 @@ LUBANCAT_STM32MP157 = "LUBANCAT_STM32MP157" LUBANCAT_ZERO = "LUBANCAT_ZERO" LUBANCAT1 = "LUBANCAT1" LUBANCAT2 = "LUBANCAT2" +LUBANCAT4 = "LUBANCAT4" # Various Raspberry Pi models RASPBERRY_PI_B_REV1 = "RASPBERRY_PI_B_REV1" @@ -273,6 +274,7 @@ _LUBANCAT_IDS = ( LUBANCAT_ZERO, LUBANCAT1, LUBANCAT2, + LUBANCAT4, ) # Coral boards