Skip to content

Commit e425b99

Browse files
committed
feat(port/kinetis): add kinetis usbip
1 parent 0b81f3b commit e425b99

File tree

10 files changed

+2035
-2
lines changed

10 files changed

+2035
-2
lines changed

Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ if CHERRYUSB
4848
bool "musb_bk"
4949
config CHERRYUSB_DEVICE_MUSB_CUSTOM
5050
bool "musb_custom"
51+
config CHERRYUSB_DEVICE_KINETIS_MCX
52+
bool "kinetis_mcx"
53+
config CHERRYUSB_DEVICE_KINETIS_MM32
54+
bool "kinetis_mm32"
55+
config CHERRYUSB_DEVICE_KINETIS_CUSTOM
56+
bool "kinetis_custom"
5157
config CHERRYUSB_DEVICE_CHIPIDEA_MCX
5258
bool "chipidea_mcx"
5359
config CHERRYUSB_DEVICE_CHIPIDEA_CUSTOM
@@ -201,6 +207,12 @@ if CHERRYUSB
201207
bool "xhci_phytium"
202208
config CHERRYUSB_HOST_XHCI_CUSTOM
203209
bool "xhci"
210+
config CHERRYUSB_HOST_KINETIS_MCX
211+
bool "kinetis_mcx"
212+
config CHERRYUSB_HOST_KINETIS_MM32
213+
bool "kinetis_mm32"
214+
config CHERRYUSB_HOST_KINETIS_CUSTOM
215+
bool "kinetis_custom"
204216
endchoice
205217

206218
config CHERRYUSB_HOST_CDC_ACM

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ USB basic concepts and how the CherryUSB Device stack is implemented, see [Cherr
185185
|Phytium | e2000 | pusb2/xhci |[phytium_repo](https://gitee.com/phytium_embedded/phytium-free-rtos-sdk)|>=1.4.0 | Long-term |
186186
|Artinchip | d12x/d13x/d21x | aic/ehci/ohci |[luban-lite](https://gitee.com/artinchip/luban-lite)|<= latest | Long-term |
187187
|Espressif | esp32s2/esp32s3/esp32p4 | dwc2 |[esp32_repo](https://github.com/CherryUSB/cherryusb_esp32)|<= latest | Long-term |
188-
|NXP | mcx | chipidea/ehci |[nxp_mcx_repo](https://github.com/CherryUSB/cherryusb_mcx)|<= latest | Long-term |
188+
|NXP | mcx | kinetis/chipidea/ehci |[nxp_mcx_repo](https://github.com/CherryUSB/cherryusb_mcx)|<= latest | Long-term |
189189
|AllwinnerTech | F1C100S/F1C200S | musb |[cherryusb_rtt_f1c100s](https://github.com/CherryUSB/cherryusb_rtt_f1c100s)|<= latest | the same with musb |
190190
|Bekencorp | bk7256/bk7258 | musb |[bk_idk](https://github.com/CherryUSB/bk_idk)| v0.7.0 | the same with musb |
191191
|Sophgo | cv18xx | dwc2 |[cvi_alios_open](https://github.com/CherryUSB/cvi_alios_open)| v0.7.0 | TBD |

README_zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ CherryUSB 快速入门、USB 基本概念,API 手册,Class 基本概念和
186186
|Phytium | e2000 | pusb2/xhci |[phytium_repo](https://gitee.com/phytium_embedded/phytium-free-rtos-sdk)|>=1.4.0 | Long-term |
187187
|Artinchip | d12x/d13x/d21x | aic/ehci/ohci |[luban-lite](https://gitee.com/artinchip/luban-lite)|<= latest | Long-term |
188188
|Espressif | esp32s2/esp32s3/esp32p4 | dwc2 |[esp32_repo](https://github.com/CherryUSB/cherryusb_esp32)|<= latest | Long-term |
189-
|NXP | mcx | chipidea/ehci |[nxp_mcx_repo](https://github.com/CherryUSB/cherryusb_mcx)|<= latest | Long-term |
189+
|NXP | mcx | kinetis/chipidea/ehci |[nxp_mcx_repo](https://github.com/CherryUSB/cherryusb_mcx)|<= latest | Long-term |
190190
|AllwinnerTech | F1C100S/F1C200S | musb |[cherryusb_rtt_f1c100s](https://github.com/CherryUSB/cherryusb_rtt_f1c100s)|<= latest | the same with musb |
191191
|Bekencorp | bk7256/bk7258 | musb |[bk_idk](https://github.com/CherryUSB/bk_idk)| v0.7.0 | the same with musb |
192192
|Sophgo | cv18xx | dwc2 |[cvi_alios_open](https://github.com/CherryUSB/cvi_alios_open)| v0.7.0 | TBD |

SConscript

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ if GetDepend(['PKG_CHERRYUSB_DEVICE']):
5858
src += Glob('port/musb/usb_glue_bk.c')
5959
if GetDepend(['PKG_CHERRYUSB_DEVICE_MUSB_CUSTOM']):
6060
src += Glob('port/musb/usb_dc_musb.c')
61+
if GetDepend(['PKG_CHERRYUSB_DEVICE_KINETIS_MCX']):
62+
src += Glob('port/kinetis/usb_dc_kinetis.c')
63+
src += Glob('port/kinetis/usb_glue_mcx.c')
64+
if GetDepend(['PKG_CHERRYUSB_DEVICE_KINETIS_CUSTOM']):
65+
src += Glob('port/kinetis/usb_dc_kinetis.c')
6166
if GetDepend(['PKG_CHERRYUSB_DEVICE_CHIPIDEA_MCX']):
6267
src += Glob('port/chipidea/usb_dc_chipidea.c')
6368
src += Glob('port/chipidea/usb_glue_mcx.c')
@@ -187,6 +192,11 @@ if GetDepend(['PKG_CHERRYUSB_HOST']):
187192
src += Glob('port/musb/usb_glue_bk.c')
188193
if GetDepend(['PKG_CHERRYUSB_HOST_MUSB_CUSTOM']):
189194
src += Glob('port/musb/usb_hc_musb.c')
195+
if GetDepend(['PKG_CHERRYUSB_HOST_KINETIS_MCX']):
196+
src += Glob('port/kinetis/usb_hc_kinetis.c')
197+
src += Glob('port/kinetis/usb_glue_mcx.c')
198+
if GetDepend(['PKG_CHERRYUSB_HOST_KINETIS_CUSTOM']):
199+
src += Glob('port/kinetis/usb_hc_kinetis.c')
190200
if GetDepend(['PKG_CHERRYUSB_HOST_PUSB2']):
191201
path += [cwd + '/port/pusb2/rt-thread']
192202
src += Glob('port/pusb2/rt-thread/usb_hc_glue_phytium.c')

cherryusb.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ if(CONFIG_CHERRYUSB_DEVICE)
105105
elseif("${CONFIG_CHERRYUSB_DEVICE_DCD}" STREQUAL "chipidea_mcx")
106106
list(APPEND cherryusb_srcs ${CMAKE_CURRENT_LIST_DIR}/port/chipidea/usb_dc_chipidea.c)
107107
list(APPEND cherryusb_srcs ${CMAKE_CURRENT_LIST_DIR}/port/chipidea/usb_glue_mcx.c)
108+
elseif("${CONFIG_CHERRYUSB_DEVICE_DCD}" STREQUAL "kinetis_mcx")
109+
list(APPEND cherryusb_srcs ${CMAKE_CURRENT_LIST_DIR}/port/kinetis/usb_dc_kinetis.c)
110+
list(APPEND cherryusb_srcs ${CMAKE_CURRENT_LIST_DIR}/port/kinetis/usb_glue_mcx.c)
108111
elseif("${CONFIG_CHERRYUSB_DEVICE_DCD}" STREQUAL "hpm")
109112
list(APPEND cherryusb_srcs ${CMAKE_CURRENT_LIST_DIR}/port/hpm/usb_dc_hpm.c)
110113
elseif("${CONFIG_CHERRYUSB_DEVICE_DCD}" STREQUAL "bl")
@@ -260,6 +263,9 @@ if(CONFIG_CHERRYUSB_HOST)
260263
elseif("${CONFIG_CHERRYUSB_HOST_HCD}" STREQUAL "musb_bk")
261264
list(APPEND cherryusb_srcs ${CMAKE_CURRENT_LIST_DIR}/port/musb/usb_hc_musb.c)
262265
list(APPEND cherryusb_srcs ${CMAKE_CURRENT_LIST_DIR}/port/musb/usb_glue_bk.c)
266+
elseif("${CONFIG_CHERRYUSB_HOST_HCD}" STREQUAL "kinetis_mcx")
267+
list(APPEND cherryusb_srcs ${CMAKE_CURRENT_LIST_DIR}/port/kinetis/usb_hc_kinetis.c)
268+
list(APPEND cherryusb_srcs ${CMAKE_CURRENT_LIST_DIR}/port/kinetis/usb_glue_mcx.c)
263269
endif()
264270
endif()
265271

port/kinetis/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Note
2+
3+
## Support Chip List
4+
5+
### NXP
6+
7+
Modify USB_NOCACHE_RAM_SECTION
8+
9+
```
10+
#define USB_NOCACHE_RAM_SECTION __attribute__((section(".NonCacheable")))
11+
```
12+
13+
- MCXC/MCXA (device only)
14+
- MCXN
15+
16+
### MM32
17+
18+
- MM32F3/MM32F5

0 commit comments

Comments
 (0)