Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@

// Use the second USB device (numbered 0 and 1)
#define CIRCUITPY_USB_DEVICE_INSTANCE 1
#define CIRCUITPY_USB_DEVICE_HIGH_SPEED (1)

#define CIRCUITPY_USB_HOST_INSTANCE 0
8 changes: 0 additions & 8 deletions ports/espressif/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ extern portMUX_TYPE background_task_mutex;
#define CIRCUITPY_WIFI_DEFAULT_TX_POWER (20)
#endif

#ifndef CIRCUITPY_USB_DEVICE_HIGH_SPEED
#if defined(CONFIG_IDF_TARGET_ESP32P4) && CIRCUITPY_USB_DEVICE_INSTANCE == 1
#define CIRCUITPY_USB_DEVICE_HIGH_SPEED (1)
#else
#define CIRCUITPY_USB_DEVICE_HIGH_SPEED (0)
#endif
#endif

#ifndef CIRCUITPY_ESP32P4_SWAP_LSFS
#define CIRCUITPY_ESP32P4_SWAP_LSFS (0)
#endif
4 changes: 4 additions & 0 deletions ports/espressif/supervisor/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ void init_usb_hardware(void) {
// Configure USB PHY
usb_phy_config_t phy_conf = {
.controller = USB_PHY_CTRL_OTG,
#if defined(CONFIG_IDF_TARGET_ESP32P4) && CIRCUITPY_USB_DEVICE_INSTANCE == 1
.target = USB_PHY_TARGET_UTMI,
#else
.target = USB_PHY_TARGET_INT,
#endif
.otg_mode = USB_OTG_MODE_DEVICE,
#if defined(CONFIG_IDF_TARGET_ESP32P4) && CIRCUITPY_USB_DEVICE_INSTANCE == 0
.otg_speed = USB_PHY_SPEED_FULL,
Expand Down