add support for Radxa-X4 via U2IF

This commit is contained in:
Bernhard Bablok 2025-06-14 12:27:20 +02:00
parent 7e3169bc72
commit 017cceb73e
3 changed files with 10 additions and 1 deletions

View file

@ -896,6 +896,8 @@ class Board:
product = dev["product_id"] product = dev["product_id"]
if vendor == 0xCAFE and product == 0x4005: if vendor == 0xCAFE and product == 0x4005:
return boards.PICO_U2IF return boards.PICO_U2IF
if vendor == 0xCAFF and product == 0x4005:
return boards.RADXA_X4_U2IF
if vendor == 0x239A: if vendor == 0x239A:
# Feather RP2040 # Feather RP2040
if product == 0x00F1: if product == 0x00F1:
@ -1203,6 +1205,7 @@ class Board:
yield self.board.QT2040_TRINKEY_U2IF yield self.board.QT2040_TRINKEY_U2IF
yield self.board.KB2040_U2IF yield self.board.KB2040_U2IF
yield self.board.RP2040_ONE_U2IF yield self.board.RP2040_ONE_U2IF
yield self.board.RADXA_X4_U2IF
yield self.board.OS_AGNOSTIC_BOARD yield self.board.OS_AGNOSTIC_BOARD
return any(condition for condition in lazily_generate_conditions()) return any(condition for condition in lazily_generate_conditions())
@ -1342,6 +1345,11 @@ class Board:
"""Check whether the current board is an RP2040 One w/ u2if.""" """Check whether the current board is an RP2040 One w/ u2if."""
return self.id == boards.RP2040_ONE_U2IF return self.id == boards.RP2040_ONE_U2IF
@property
def radxa_x4_u2if(self) -> bool:
"""Check whether the current board is an RP2040 One w/ u2if."""
return self.id == boards.RADXA_X4_U2IF
@property @property
def binho_nova(self) -> bool: def binho_nova(self) -> bool:
"""Check whether the current board is an BINHO NOVA.""" """Check whether the current board is an BINHO NOVA."""

View file

@ -125,7 +125,7 @@ class Chip:
if ( if (
( (
# Raspberry Pi Pico # Raspberry Pi Pico
vendor == 0xCAFE vendor in (0xCAFE, 0xCAFF)
and product == 0x4005 and product == 0x4005
) )
or ( or (

View file

@ -195,6 +195,7 @@ QT2040_TRINKEY_U2IF = "QT2040_TRINKEY_U2IF"
KB2040_U2IF = "KB2040_U2IF" KB2040_U2IF = "KB2040_U2IF"
RP2040_ONE_U2IF = "RP2040_ONE_U2IF" RP2040_ONE_U2IF = "RP2040_ONE_U2IF"
RADXA_X4_U2IF = "RADXA_X4_U2IF"
BINHO_NOVA = "BINHO_NOVA" BINHO_NOVA = "BINHO_NOVA"