Skip to contentSkip to conversation

zynqmp: Enable USB gadget download and remove hardcoded USB ethernet init

PATCH Applied Pranav Sanwal 2 participants 4 messages Apr 30 – May 11 Arm/Zynq architecture

lore
Share & tools
lore
#0 lore raw

cover zynqmp: Enable USB gadget download and remove hardcoded USB ethernet init

This series makes changes to the ZynqMP USB gadget configuration to enable USB gadget functionalities.

Pranav Sanwal (2):
configs: zynqmp: Enable USB gadget download support
board: zynqmp: Remove hardcoded USB ethernet initialization

 board/xilinx/zynqmp/zynqmp.c         | 4 ----
 configs/xilinx_zynqmp_virt_defconfig | 1 +
 2 files changed, 1 insertion(+), 4 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/2 configs: zynqmp: Enable USB gadget download support

USB_GADGET_DOWNLOAD enables the g_dnl composite gadget framework, allowing other functions to operate over the USB peripheral interface.

---
 configs/xilinx_zynqmp_virt_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/xilinx_zynqmp_virt_defconfig +1 -0
index 2d85084814b..111eead51b1 100644
@@ -220,6 +220,7 @@ CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_MANUFACTURER="Xilinx"
 CONFIG_USB_GADGET_VENDOR_NUM=0x03FD
 CONFIG_USB_GADGET_PRODUCT_NUM=0x0300
+CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_ETHER=y
 CONFIG_USB_ETH_CDC=y
 CONFIG_VIDEO=y
Signature · 1 line
2.34.1
#2 lore raw

PATCH 2/2 board: zynqmp: Remove hardcoded USB ethernet initialization

In reply to Pranav Sanwal

usb_ether_init() called in board_late_init() when CONFIG_USB_ETHER was enabled without CONFIG_USB_GADGET_DOWNLOAD.
This makes USB ethernet gadget a fixed default, with no way to opt out at runtime without a rebuild.

Remove the hardcoded call. If USB ethernet gadget functionality is needed, it can be added via the preboot environment variable.

---
 board/xilinx/zynqmp/zynqmp.c | 4 ----
 1 file changed, 4 deletions(-)
board/xilinx/zynqmp/zynqmp.c +0 -4
index 091e0d0c88a..4a62fdd8028 100644
@@ -541,10 +541,6 @@ int board_late_init(void)
 {
 	int ret, multiboot;
 
-#if defined(CONFIG_USB_ETHER) && !defined(CONFIG_USB_GADGET_DOWNLOAD)
-	usb_ether_init();
-#endif
-
 	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
 		configure_capsule_updates();
 
Signature · 1 line
2.34.1
maintainer Applied
#3 lore raw
In reply to Pranav Sanwal
Quoted 11 lines · Pranav Sanwal

This series makes changes to the ZynqMP USB gadget configuration to enable USB gadget functionalities.

Pranav Sanwal (2):
configs: zynqmp: Enable USB gadget download support
board: zynqmp: Remove hardcoded USB ethernet initialization

  board/xilinx/zynqmp/zynqmp.c         | 4 ----
  configs/xilinx_zynqmp_virt_defconfig | 1 +
  2 files changed, 1 insertion(+), 4 deletions(-)

Applied.
M