Skip to content

Commit

Permalink
[BSP][Phytium] add support for mainbranch cherryusb (xhci host + pusb…
Browse files Browse the repository at this point in the history
…2 device/host)
  • Loading branch information
zhugengyu authored Aug 28, 2024
1 parent 66738d7 commit b9f4daa
Show file tree
Hide file tree
Showing 62 changed files with 11,601 additions and 635 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@ cmake-build-debug
# vDSO
vdso_sys.os
vdso.lds

# cherryusb libraries
!components/drivers/usb/cherryusb/port/pusb2/*.a
!components/drivers/usb/cherryusb/port/xhci/phytium/*.a
100 changes: 73 additions & 27 deletions bsp/phytium/aarch32/.config
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,41 @@ CONFIG_RT_USING_QSPI=y
CONFIG_RT_USING_PIN=y
CONFIG_RT_USING_KTIME=y
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_CHERRYUSB is not set
CONFIG_RT_USING_CHERRYUSB=y
# CONFIG_RT_CHERRYUSB_DEVICE is not set
CONFIG_RT_CHERRYUSB_HOST=y
# CONFIG_RT_CHERRYUSB_HOST_CUSTOM is not set
# CONFIG_RT_CHERRYUSB_HOST_EHCI_BL is not set
# CONFIG_RT_CHERRYUSB_HOST_EHCI_HPM is not set
# CONFIG_RT_CHERRYUSB_HOST_EHCI_AIC is not set
# CONFIG_RT_CHERRYUSB_HOST_EHCI_NUVOTON_NUC980 is not set
# CONFIG_RT_CHERRYUSB_HOST_EHCI_NUVOTON_MA35D0 is not set
# CONFIG_RT_CHERRYUSB_HOST_EHCI_CUSTOM is not set
# CONFIG_RT_CHERRYUSB_HOST_DWC2_ST is not set
# CONFIG_RT_CHERRYUSB_HOST_DWC2_ESP is not set
# CONFIG_RT_CHERRYUSB_HOST_DWC2_CUSTOM is not set
# CONFIG_RT_CHERRYUSB_HOST_MUSB_ES is not set
# CONFIG_RT_CHERRYUSB_HOST_MUSB_SUNXI is not set
# CONFIG_RT_CHERRYUSB_HOST_MUSB_BK is not set
# CONFIG_RT_CHERRYUSB_HOST_MUSB_CUSTOM is not set
CONFIG_RT_CHERRYUSB_HOST_PUSB2=y
# CONFIG_RT_CHERRYUSB_HOST_XHCI is not set
# CONFIG_RT_CHERRYUSB_HOST_CDC_ACM is not set
CONFIG_RT_CHERRYUSB_HOST_HID=y
CONFIG_RT_CHERRYUSB_HOST_MSC=y
# CONFIG_RT_CHERRYUSB_HOST_CDC_ECM is not set
# CONFIG_RT_CHERRYUSB_HOST_CDC_RNDIS is not set
# CONFIG_RT_CHERRYUSB_HOST_CDC_NCM is not set
# CONFIG_RT_CHERRYUSB_HOST_VIDEO is not set
# CONFIG_RT_CHERRYUSB_HOST_AUDIO is not set
# CONFIG_RT_CHERRYUSB_HOST_BLUETOOTH is not set
# CONFIG_RT_CHERRYUSB_HOST_ASIX is not set
# CONFIG_RT_CHERRYUSB_HOST_RTL8152 is not set
# CONFIG_RT_CHERRYUSB_HOST_FTDI is not set
# CONFIG_RT_CHERRYUSB_HOST_CH34X is not set
# CONFIG_RT_CHERRYUSB_HOST_CP210X is not set
# CONFIG_RT_CHERRYUSB_HOST_PL2303 is not set
# CONFIG_CHERRYUSB_HOST_TEMPLATE is not set
# end of Device Drivers

#
Expand Down Expand Up @@ -325,6 +359,7 @@ CONFIG_NETDEV_USING_IFCONFIG=y
CONFIG_NETDEV_USING_PING=y
CONFIG_NETDEV_USING_NETSTAT=y
CONFIG_NETDEV_USING_AUTO_DEFAULT=y
# CONFIG_NETDEV_USING_LINK_STATUS_CALLBACK is not set
# CONFIG_NETDEV_USING_IPV6 is not set
CONFIG_NETDEV_IPV4=1
CONFIG_NETDEV_IPV6=0
Expand Down Expand Up @@ -587,6 +622,7 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_JSMN is not set
# CONFIG_PKG_USING_AGILE_JSMN is not set
# CONFIG_PKG_USING_PARSON is not set
# CONFIG_PKG_USING_RYAN_JSON is not set
# end of JSON: JavaScript Object Notation, a lightweight data-interchange format

#
Expand Down Expand Up @@ -706,6 +742,8 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set
# end of enhanced kernel services

# CONFIG_PKG_USING_AUNITY is not set

#
# acceleration: Assembly language or algorithmic acceleration packages
#
Expand Down Expand Up @@ -796,12 +834,29 @@ CONFIG_RT_USING_ADT_REF=y
#
# STM32 HAL & SDK Drivers
#
# CONFIG_PKG_USING_STM32F4_HAL_DRIVER is not set
# CONFIG_PKG_USING_STM32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_STM32L4_HAL_DRIVER is not set
# CONFIG_PKG_USING_STM32L4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_STM32WB55_SDK is not set
# CONFIG_PKG_USING_STM32_SDIO is not set
# end of STM32 HAL & SDK Drivers

#
# Infineon HAL Packages
#
# CONFIG_PKG_USING_INFINEON_CAT1CM0P is not set
# CONFIG_PKG_USING_INFINEON_CMSIS is not set
# CONFIG_PKG_USING_INFINEON_CORE_LIB is not set
# CONFIG_PKG_USING_INFINEON_MTB_HAL_CAT1 is not set
# CONFIG_PKG_USING_INFINEON_MTB_PDL_CAT1 is not set
# CONFIG_PKG_USING_INFINEON_RETARGET_IO is not set
# CONFIG_PKG_USING_INFINEON_CAPSENSE is not set
# CONFIG_PKG_USING_INFINEON_CSDIDAC is not set
# CONFIG_PKG_USING_INFINEON_SERIAL_FLASH is not set
# CONFIG_PKG_USING_INFINEON_USBDEV is not set
# end of Infineon HAL Packages

# CONFIG_PKG_USING_BLUETRUM_SDK is not set
# CONFIG_PKG_USING_EMBARC_BSP is not set
# CONFIG_PKG_USING_ESP_IDF is not set
Expand Down Expand Up @@ -974,6 +1029,7 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set
# CONFIG_PKG_USING_BT_MX01 is not set
# CONFIG_PKG_USING_RGPOWER is not set
# CONFIG_PKG_USING_BT_MX02 is not set
# CONFIG_PKG_USING_SPI_TOOLS is not set
# end of peripheral libraries and drivers

Expand All @@ -995,6 +1051,7 @@ CONFIG_RT_USING_ADT_REF=y
#
# Signal Processing and Control Algorithm Packages
#
# CONFIG_PKG_USING_APID is not set
# CONFIG_PKG_USING_FIRE_PID_CURVE is not set
# CONFIG_PKG_USING_QPID is not set
# CONFIG_PKG_USING_UKAL is not set
Expand Down Expand Up @@ -1322,15 +1379,11 @@ CONFIG_RT_USING_UART1=y
# CONFIG_RT_USING_UART2 is not set
# CONFIG_RT_USING_UART3 is not set
CONFIG_BSP_USING_SPI=y
# CONFIG_RT_USING_SPIM0 is not set
CONFIG_RT_USING_SPIM0=y
# CONFIG_RT_USING_SPIM1 is not set
CONFIG_RT_USING_SPIM2=y
# CONFIG_RT_USING_SPIM2 is not set
# CONFIG_RT_USING_SPIM3 is not set
CONFIG_BSP_USING_CAN=y
CONFIG_RT_USING_CANFD=y
# CONFIG_RT_USING_FILTER is not set
CONFIG_RT_USING_CAN0=y
CONFIG_RT_USING_CAN1=y
# CONFIG_BSP_USING_CAN is not set
CONFIG_BSP_USING_GPIO=y
CONFIG_BSP_USING_QSPI=y
CONFIG_RT_USING_QSPI0=y
Expand All @@ -1341,16 +1394,16 @@ CONFIG_RT_LWIP_PBUF_POOL_BUFSIZE=1700
CONFIG_BSP_USING_PWM=y
# CONFIG_RT_USING_PWM0 is not set
# CONFIG_RT_USING_PWM1 is not set
CONFIG_RT_USING_PWM2=y
# CONFIG_RT_USING_PWM2 is not set
# CONFIG_RT_USING_PWM3 is not set
# CONFIG_RT_USING_PWM4 is not set
# CONFIG_RT_USING_PWM5 is not set
# CONFIG_RT_USING_PWM6 is not set
# CONFIG_RT_USING_PWM7 is not set
CONFIG_BSP_USING_I2C=y
CONFIG_I2C_USE_MIO=y
# CONFIG_RT_USING_MIO0 is not set
# CONFIG_RT_USING_MIO1 is not set
CONFIG_RT_USING_MIO0=y
CONFIG_RT_USING_MIO1=y
# CONFIG_RT_USING_MIO2 is not set
# CONFIG_RT_USING_MIO3 is not set
# CONFIG_RT_USING_MIO4 is not set
Expand All @@ -1364,21 +1417,15 @@ CONFIG_I2C_USE_MIO=y
# CONFIG_RT_USING_MIO12 is not set
# CONFIG_RT_USING_MIO13 is not set
# CONFIG_RT_USING_MIO14 is not set
CONFIG_RT_USING_MIO15=y
# CONFIG_RT_USING_MIO15 is not set
# CONFIG_I2C_USE_CONTROLLER is not set
CONFIG_BSP_USING_SDIF=y
CONFIG_BSP_USING_SDCARD_FATFS=y
CONFIG_USING_SDIF0=y
# CONFIG_USE_SDIF0_TF is not set
CONFIG_USE_SDIF0_EMMC=y
CONFIG_USING_SDIF1=y
CONFIG_USE_SDIF1_TF=y
# CONFIG_USE_SDIF1_EMMC is not set
# CONFIG_BSP_USING_SDCARD_FATFS is not set
# CONFIG_USING_SDIF0 is not set
# CONFIG_USING_SDIF1 is not set
CONFIG_BSP_USING_DC=y
CONFIG_RT_USING_DC_CHANNEL0=y
CONFIG_RT_USING_DC_CHANNEL1=y
# CONFIG_BSP_USING_XHCI is not set
# CONFIG_BSP_USING_PUSB2 is not set
# end of On-chip Peripheral Drivers

#
Expand All @@ -1397,15 +1444,14 @@ CONFIG_USE_AARCH64_L1_TO_AARCH32=y
#
# Soc configuration
#
# CONFIG_TARGET_PHYTIUMPI is not set
CONFIG_TARGET_E2000Q=y
CONFIG_TARGET_PHYTIUMPI=y
# CONFIG_TARGET_E2000Q is not set
# CONFIG_TARGET_E2000D is not set
# CONFIG_TARGET_E2000S is not set
# CONFIG_TARGET_FT2004 is not set
# CONFIG_TARGET_D2000 is not set
# CONFIG_TARGET_PD2308 is not set
CONFIG_SOC_NAME="e2000"
CONFIG_TARGET_TYPE_NAME="q"
CONFIG_SOC_NAME="phytiumpi"
CONFIG_SOC_CORE_NUM=4
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
Expand All @@ -1420,7 +1466,7 @@ CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
#
# Board Configuration
#
CONFIG_BOARD_NAME="demo"
CONFIG_BOARD_NAME="firefly"
# CONFIG_USE_SPI_IOPAD is not set
# CONFIG_USE_GPIO_IOPAD is not set
# CONFIG_USE_CAN_IOPAD is not set
Expand All @@ -1430,7 +1476,7 @@ CONFIG_BOARD_NAME="demo"
# CONFIG_USE_TACHO_IOPAD is not set
# CONFIG_USE_UART_IOPAD is not set
# CONFIG_USE_THIRD_PARTY_IOPAD is not set
CONFIG_E2000Q_DEMO_BOARD=y
CONFIG_FIREFLY_DEMO_BOARD=y

#
# IO mux configuration when board start up
Expand Down
61 changes: 58 additions & 3 deletions bsp/phytium/aarch32/configs/e2000d_demo_rtthread
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,41 @@ CONFIG_RT_USING_QSPI=y
CONFIG_RT_USING_PIN=y
CONFIG_RT_USING_KTIME=y
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_CHERRYUSB is not set
CONFIG_RT_USING_CHERRYUSB=y
# CONFIG_RT_CHERRYUSB_DEVICE is not set
CONFIG_RT_CHERRYUSB_HOST=y
# CONFIG_RT_CHERRYUSB_HOST_CUSTOM is not set
# CONFIG_RT_CHERRYUSB_HOST_EHCI_BL is not set
# CONFIG_RT_CHERRYUSB_HOST_EHCI_HPM is not set
# CONFIG_RT_CHERRYUSB_HOST_EHCI_AIC is not set
# CONFIG_RT_CHERRYUSB_HOST_EHCI_NUVOTON_NUC980 is not set
# CONFIG_RT_CHERRYUSB_HOST_EHCI_NUVOTON_MA35D0 is not set
# CONFIG_RT_CHERRYUSB_HOST_EHCI_CUSTOM is not set
# CONFIG_RT_CHERRYUSB_HOST_DWC2_ST is not set
# CONFIG_RT_CHERRYUSB_HOST_DWC2_ESP is not set
# CONFIG_RT_CHERRYUSB_HOST_DWC2_CUSTOM is not set
# CONFIG_RT_CHERRYUSB_HOST_MUSB_ES is not set
# CONFIG_RT_CHERRYUSB_HOST_MUSB_SUNXI is not set
# CONFIG_RT_CHERRYUSB_HOST_MUSB_BK is not set
# CONFIG_RT_CHERRYUSB_HOST_MUSB_CUSTOM is not set
# CONFIG_RT_CHERRYUSB_HOST_PUSB2 is not set
CONFIG_RT_CHERRYUSB_HOST_XHCI=y
# CONFIG_RT_CHERRYUSB_HOST_CDC_ACM is not set
CONFIG_RT_CHERRYUSB_HOST_HID=y
CONFIG_RT_CHERRYUSB_HOST_MSC=y
# CONFIG_RT_CHERRYUSB_HOST_CDC_ECM is not set
# CONFIG_RT_CHERRYUSB_HOST_CDC_RNDIS is not set
# CONFIG_RT_CHERRYUSB_HOST_CDC_NCM is not set
# CONFIG_RT_CHERRYUSB_HOST_VIDEO is not set
# CONFIG_RT_CHERRYUSB_HOST_AUDIO is not set
# CONFIG_RT_CHERRYUSB_HOST_BLUETOOTH is not set
# CONFIG_RT_CHERRYUSB_HOST_ASIX is not set
# CONFIG_RT_CHERRYUSB_HOST_RTL8152 is not set
# CONFIG_RT_CHERRYUSB_HOST_FTDI is not set
# CONFIG_RT_CHERRYUSB_HOST_CH34X is not set
# CONFIG_RT_CHERRYUSB_HOST_CP210X is not set
# CONFIG_RT_CHERRYUSB_HOST_PL2303 is not set
# CONFIG_CHERRYUSB_HOST_TEMPLATE is not set
# end of Device Drivers

#
Expand Down Expand Up @@ -325,6 +359,7 @@ CONFIG_NETDEV_USING_IFCONFIG=y
CONFIG_NETDEV_USING_PING=y
CONFIG_NETDEV_USING_NETSTAT=y
CONFIG_NETDEV_USING_AUTO_DEFAULT=y
# CONFIG_NETDEV_USING_LINK_STATUS_CALLBACK is not set
# CONFIG_NETDEV_USING_IPV6 is not set
CONFIG_NETDEV_IPV4=1
CONFIG_NETDEV_IPV6=0
Expand Down Expand Up @@ -587,6 +622,7 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_JSMN is not set
# CONFIG_PKG_USING_AGILE_JSMN is not set
# CONFIG_PKG_USING_PARSON is not set
# CONFIG_PKG_USING_RYAN_JSON is not set
# end of JSON: JavaScript Object Notation, a lightweight data-interchange format

#
Expand Down Expand Up @@ -706,6 +742,8 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set
# end of enhanced kernel services

# CONFIG_PKG_USING_AUNITY is not set

#
# acceleration: Assembly language or algorithmic acceleration packages
#
Expand Down Expand Up @@ -796,12 +834,29 @@ CONFIG_RT_USING_ADT_REF=y
#
# STM32 HAL & SDK Drivers
#
# CONFIG_PKG_USING_STM32F4_HAL_DRIVER is not set
# CONFIG_PKG_USING_STM32F4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_STM32L4_HAL_DRIVER is not set
# CONFIG_PKG_USING_STM32L4_CMSIS_DRIVER is not set
# CONFIG_PKG_USING_STM32WB55_SDK is not set
# CONFIG_PKG_USING_STM32_SDIO is not set
# end of STM32 HAL & SDK Drivers

#
# Infineon HAL Packages
#
# CONFIG_PKG_USING_INFINEON_CAT1CM0P is not set
# CONFIG_PKG_USING_INFINEON_CMSIS is not set
# CONFIG_PKG_USING_INFINEON_CORE_LIB is not set
# CONFIG_PKG_USING_INFINEON_MTB_HAL_CAT1 is not set
# CONFIG_PKG_USING_INFINEON_MTB_PDL_CAT1 is not set
# CONFIG_PKG_USING_INFINEON_RETARGET_IO is not set
# CONFIG_PKG_USING_INFINEON_CAPSENSE is not set
# CONFIG_PKG_USING_INFINEON_CSDIDAC is not set
# CONFIG_PKG_USING_INFINEON_SERIAL_FLASH is not set
# CONFIG_PKG_USING_INFINEON_USBDEV is not set
# end of Infineon HAL Packages

# CONFIG_PKG_USING_BLUETRUM_SDK is not set
# CONFIG_PKG_USING_EMBARC_BSP is not set
# CONFIG_PKG_USING_ESP_IDF is not set
Expand Down Expand Up @@ -974,6 +1029,7 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set
# CONFIG_PKG_USING_BT_MX01 is not set
# CONFIG_PKG_USING_RGPOWER is not set
# CONFIG_PKG_USING_BT_MX02 is not set
# CONFIG_PKG_USING_SPI_TOOLS is not set
# end of peripheral libraries and drivers

Expand All @@ -995,6 +1051,7 @@ CONFIG_RT_USING_ADT_REF=y
#
# Signal Processing and Control Algorithm Packages
#
# CONFIG_PKG_USING_APID is not set
# CONFIG_PKG_USING_FIRE_PID_CURVE is not set
# CONFIG_PKG_USING_QPID is not set
# CONFIG_PKG_USING_UKAL is not set
Expand Down Expand Up @@ -1377,8 +1434,6 @@ CONFIG_USE_SDIF1_TF=y
CONFIG_BSP_USING_DC=y
CONFIG_RT_USING_DC_CHANNEL0=y
CONFIG_RT_USING_DC_CHANNEL1=y
# CONFIG_BSP_USING_XHCI is not set
# CONFIG_BSP_USING_PUSB2 is not set
# end of On-chip Peripheral Drivers

#
Expand Down
9 changes: 9 additions & 0 deletions bsp/phytium/aarch32/configs/e2000d_demo_rtthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@
#define RT_USING_QSPI
#define RT_USING_PIN
#define RT_USING_KTIME
#define RT_USING_CHERRYUSB
#define RT_CHERRYUSB_HOST
#define RT_CHERRYUSB_HOST_XHCI
#define RT_CHERRYUSB_HOST_HID
#define RT_CHERRYUSB_HOST_MSC
/* end of Device Drivers */

/* C/C++ and POSIX layer */
Expand Down Expand Up @@ -373,6 +378,10 @@

/* end of STM32 HAL & SDK Drivers */

/* Infineon HAL Packages */

/* end of Infineon HAL Packages */

/* Kendryte SDK */

/* end of Kendryte SDK */
Expand Down
Loading

0 comments on commit b9f4daa

Please sign in to comment.