Merge pull request #384 from Dangku/main

support renesas rzv2h/rzv2n, bananapi ai2h/ai2n board
This commit is contained in:
Melissa LeBlanc-Williams 2025-05-14 09:42:47 -07:00 committed by GitHub
commit 7e3169bc72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 36 additions and 0 deletions

View file

@ -168,6 +168,10 @@ class Board:
board_id = self._clockwork_pi_id()
elif chip_id == chips.K1:
board_id = self._armbian_id() or self._spacemit_variants_id()
elif chip_id == chips.RZV2N:
board_id = self._armbian_id() or self._renesas_variants_id()
elif chip_id == chips.RZV2H:
board_id = self._armbian_id() or self._renesas_variants_id()
elif chip_id == chips.RK3308:
board_id = self._rock_pi_id()
elif chip_id == chips.RK3399:
@ -454,6 +458,10 @@ class Board:
board = boards.BANANA_PI_F3
elif board_value == "bananapif5":
board = boards.BANANA_PI_F5
elif board_value == "bananapiai2n":
board = boards.BANANA_PI_AI2N
elif board_value == "bananapiai2h":
board = boards.BANANA_PI_AI2H
elif board_value == "orangepizeroplus2-h5":
board = boards.ORANGE_PI_ZERO_PLUS_2H5
elif board_value == "orangepizeroplus":
@ -847,6 +855,22 @@ class Board:
return board
def _renesas_variants_id(self) -> Optional[str]:
"""Try to detect the id of renesas based board. (bananapi)"""
board_value = self.detector.get_device_model()
board = None
if not board_value:
return board
board_value = board_value.lower()
if any(x in board_value for x in ("banana pi", "bananapi")):
if "bpi-ai2n" in board_value:
board = boards.BANANA_PI_AI2N
if "bpi-ai2h" in board_value:
board = boards.BANANA_PI_AI2H
return board
def _repka_variants_id(self) -> Optional[str]:
board_value = self.detector.get_device_model()
board = None

View file

@ -315,6 +315,12 @@ class Chip:
if self.detector.check_dt_compatible_value("spacemit,k1-x"):
return chips.K1
if self.detector.check_dt_compatible_value("renesas,r9a09g056"):
return chips.RZV2N
if self.detector.check_dt_compatible_value("renesas,r9a09g057"):
return chips.RZV2H
if self.detector.check_dt_compatible_value("mediatek,mt8167"):
return chips.MT8167

View file

@ -84,6 +84,8 @@ BANANA_PI_M4_ZERO = "BANANA_PI_M4_ZERO"
BANANA_PI_M5 = "BANANA_PI_M5"
BANANA_PI_F3 = "BANANA_PI_F3"
BANANA_PI_F5 = "BANANA_PI_F5"
BANANA_PI_AI2N = "BANANA_PI_AI2N"
BANANA_PI_AI2H = "BANANA_PI_AI2H"
# LeMaker boards
LEMAKER_BANANA_PRO = "LEMAKER_BANANA_PRO"
@ -330,6 +332,8 @@ _BANANA_PI_IDS = (
BANANA_PI_M5,
BANANA_PI_F3,
BANANA_PI_F5,
BANANA_PI_AI2N,
BANANA_PI_AI2H,
)
# LeMaker

View file

@ -83,6 +83,8 @@ D1_RISCV = "D1_RISCV"
ATOM_J4105 = "ATOM_J4105"
TH1520 = "TH1520"
K1 = "K1"
RZV2N = "RZV2N"
RZV2H = "RZV2H"
SUNRISE_X3 = "SUNRISE_X3"
BCM_RANGE = {"BCM2708", "BCM2709", "BCM2711", "BCM2712", "BCM2835", "BCM2837"}