fix(usb): Fixed missing GPIO drive capability on ESP32-P4

All USB PHYs that share their IOs with GPIOs must set
the GPIO's drive capability to maximum.
This commit is contained in:
Tomas Rezucha
2025-01-20 21:08:43 +01:00
parent 91f0cb493f
commit ce59bd4017
5 changed files with 44 additions and 16 deletions

View File

@@ -1,12 +1,10 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stddef.h>
#include "soc/gpio_sig_map.h"
#include "soc/usb_periph.h"
#include "soc/interrupts.h"
#include "soc/usb_dwc_periph.h"
@@ -41,6 +39,11 @@ static const usb_otg_signal_conn_t otg_signals = {
.dischrgvbus = USB_SRP_DISCHRGVBUS_IDX,
};
static const usb_internal_phy_io_t internal_phy_io = {
.dp = 20,
.dm = 19,
};
/* --------------------------------- Public --------------------------------- */
const usb_dwc_info_t usb_dwc_info = {
@@ -48,6 +51,7 @@ const usb_dwc_info_t usb_dwc_info = {
[0] = {
.fsls_signals = &fsls_signals,
.otg_signals = &otg_signals,
.internal_phy_io = &internal_phy_io,
.irq = ETS_USB_INTR_SOURCE,
.irq_2nd_cpu = -1,
},
@@ -56,6 +60,7 @@ const usb_dwc_info_t usb_dwc_info = {
/* ------------------------------- Deprecated ------------------------------- */
#include "soc/usb_periph.h"
/*
Note: These IO pins are deprecated. When connecting USB OTG to an external FSLS
PHY, the FSLS Serial Interface signals can be routed to any GPIO via the GPIO