mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
Merge branch 'refactor/usb_device_driver' into 'master'
tiny_usb: support on esp32-s3 Closes IDF-3234 See merge request espressif/esp-idf!14293
This commit is contained in:
@@ -17,17 +17,28 @@
|
||||
#include "soc/system_reg.h"
|
||||
#include "soc/gpio_sig_map.h"
|
||||
#include "soc/usb_periph.h"
|
||||
#include "soc/rtc_cntl_struct.h"
|
||||
|
||||
static inline void usb_ll_int_phy_enable(void)
|
||||
{
|
||||
USB_WRAP.otg_conf.pad_enable = 1;
|
||||
// USB_OTG use internal PHY
|
||||
USB_WRAP.otg_conf.phy_sel = 0;
|
||||
// phy_sel is controlled by the following register value
|
||||
RTCCNTL.usb_conf.sw_hw_usb_phy_sel = 1;
|
||||
// phy_sel=sw_usb_phy_sel=1, USB_OTG is connected with internal PHY
|
||||
RTCCNTL.usb_conf.sw_usb_phy_sel = 1;
|
||||
}
|
||||
|
||||
static inline void usb_ll_ext_phy_enable(void)
|
||||
{
|
||||
USB_WRAP.otg_conf.pad_enable = 1;
|
||||
// USB_OTG use external PHY
|
||||
USB_WRAP.otg_conf.phy_sel = 1;
|
||||
// phy_sel is controlled by the following register value
|
||||
RTCCNTL.usb_conf.sw_hw_usb_phy_sel = 1;
|
||||
// phy_sel=sw_usb_phy_sel=0, USB_OTG is connected with external PHY through GPIO Matrix
|
||||
RTCCNTL.usb_conf.sw_usb_phy_sel = 0;
|
||||
}
|
||||
|
||||
static inline void usb_ll_int_phy_pullup_conf(bool dp_pu, bool dp_pd, bool dm_pu, bool dm_pd)
|
||||
|
Reference in New Issue
Block a user