Skip to content

Commit 65ac3f6

Browse files
refactor(usb): Remove deprecated USB pin definitions
When connecting USB OTG to an external FSLS PHY, the FSLS Serial Interface signals can be routed to any GPIO via the GPIO matrix. Thus, these macros are meaningless.
1 parent 214f868 commit 65ac3f6

File tree

4 files changed

+6
-50
lines changed

4 files changed

+6
-50
lines changed

components/soc/esp32p4/include/soc/usb_pins.h

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,11 @@
11
/*
2-
* SPDX-FileCopyrightText: 2020-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
#pragma once
88

9-
/*
10-
Note: These macros are deprecated. When connecting USB OTG to an external FSLS
11-
PHY, the FSLS Serial Interface signals can be routed to any GPIO via the GPIO
12-
matrix. Thus, these macros are meaningless.
13-
14-
Todo: Remove in IDF v6.0 (IDF-9029)
15-
*/
16-
#define USBPHY_VP_NUM 33
17-
#define USBPHY_VM_NUM 34
18-
#define USBPHY_RCV_NUM 35
19-
#define USBPHY_OEN_NUM 36
20-
#define USBPHY_VPO_NUM 37
21-
#define USBPHY_VMO_NUM 38
22-
239
/* GPIOs corresponding to the pads of the internal USB PHY */
2410
#define USBPHY_DP_NUM 20
2511
#define USBPHY_DM_NUM 19
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,11 @@
11
/*
2-
* SPDX-FileCopyrightText: 2020-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
#pragma once
88

9-
/*
10-
Note: These macros are deprecated. When connecting USB OTG to an external FSLS
11-
PHY, the FSLS Serial Interface signals can be routed to any GPIO via the GPIO
12-
matrix. Thus, these macros are meaningless.
13-
14-
Todo: Remove in IDF v6.0 (IDF-9029)
15-
*/
16-
#define USBPHY_VP_NUM 42
17-
#define USBPHY_VM_NUM 41
18-
#define USBPHY_RCV_NUM 21
19-
#define USBPHY_OEN_NUM 40
20-
#define USBPHY_VPO_NUM 39
21-
#define USBPHY_VMO_NUM 38
22-
239
/* GPIOs corresponding to the pads of the internal USB PHY */
2410
#define USBPHY_DP_NUM 20
2511
#define USBPHY_DM_NUM 19

tools/idf_py_actions/hints.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,10 @@
415415
re_variables: ['ESP_HF_CME_MEMEORY_FAILURE']
416416
hint_variables: ['ESP_HF_CME_MEMEORY_FAILURE', 'ESP_HF_CME_MEMORY_FAILURE ']
417417

418+
-
419+
re: "error: 'USBPHY_\\w+' undeclared"
420+
hint: "USBPHY_* pin definitions from <soc/usb_pins.h> have been removed.\nTo use an external USB PHY, wire it to any GPIOs and declare those pin mappings in your application to match your hardware."
421+
418422
-
419423
re: "intr_alloc: No free interrupt inputs for [_\\w]+ interrupt"
420424
hint: "For troubleshooting instructions related to interrupt allocation, run 'idf.py docs -sp api-reference/system/intr_alloc.html'"

0 commit comments

Comments
 (0)