Convert Xilinx ZynqMP to DM_USB with generic DWC3 glue logic driver
Subsystems (4)
cover Convert Xilinx ZynqMP to DM_USB with generic DWC3 glue logic driver
Hi,
this patchset is based on unfinished series send to ML 06/13/2017 by Vignesh
"[U-Boot] [PATCH v2 00/13] driver model bring-up of dwc3 usb peripheral" We have taken some part of this to Xilinx tree and use it for a while but it is time to review it and upstream it.
The patchset has 2 patches created by Mugunthan which are a little bit fixed.
dwc3-generic driver was inspired by omap version.
And the last 3 patches just doing conversion and enable DM_USB for our platform.
Thanks,
Michal
Michal Simek (4):
usb: dwc3: Add generic DWC3 glue logic driver
usb: xhci: zynqmp: Add support for DM_USB
arm64: zynqmp: Use DWC3 generic driver and DM_USB
usb: xhci: zynqmp: Remove support for !DM_USB
Mugunthan V N (2):
usb: dwc3: Add dwc3_init/remove with DM_USB
usb: common: add support to get maximum speed from dt
board/xilinx/zynqmp/zynqmp.c | 46 ----- .../xilinx_zynqmp_zc1751_xm015_dc1_defconfig | 1 + .../xilinx_zynqmp_zc1751_xm016_dc2_defconfig | 1 + .../xilinx_zynqmp_zc1751_xm017_dc3_defconfig | 1 + configs/xilinx_zynqmp_zcu100_revC_defconfig | 1 + configs/xilinx_zynqmp_zcu102_rev1_0_defconfig | 1 + configs/xilinx_zynqmp_zcu102_revA_defconfig | 1 + configs/xilinx_zynqmp_zcu102_revB_defconfig | 1 + configs/xilinx_zynqmp_zcu104_revA_defconfig | 1 + configs/xilinx_zynqmp_zcu104_revC_defconfig | 1 + configs/xilinx_zynqmp_zcu106_revA_defconfig | 1 + configs/xilinx_zynqmp_zcu111_revA_defconfig | 1 + drivers/usb/common/common.c | 29 +++ drivers/usb/dwc3/Kconfig | 6 + drivers/usb/dwc3/Makefile | 1 + drivers/usb/dwc3/core.c | 57 ++++++ drivers/usb/dwc3/core.h | 6 + drivers/usb/dwc3/dwc3-generic.c | 165 ++++++++++++++++++ drivers/usb/host/Kconfig | 1 + drivers/usb/host/xhci-zynqmp.c | 85 +++++---- .../configs/xilinx_zynqmp_zc1751_xm015_dc1.h | 1 - .../configs/xilinx_zynqmp_zc1751_xm016_dc2.h | 2 - .../configs/xilinx_zynqmp_zc1751_xm017_dc3.h | 3 - include/configs/xilinx_zynqmp_zcu100.h | 3 - include/configs/xilinx_zynqmp_zcu102.h | 2 - include/configs/xilinx_zynqmp_zcu104.h | 2 - include/configs/xilinx_zynqmp_zcu106.h | 1 - include/configs/xilinx_zynqmp_zcu111.h | 2 - include/linux/usb/otg.h | 9 + scripts/config_whitelist.txt | 1 - 30 files changed, 339 insertions(+), 94 deletions(-) create mode 100644 drivers/usb/dwc3/dwc3-generic.c
Signature · 1 line
2.17.0
PATCH 1/6 usb: dwc3: Add dwc3_init/remove with DM_USB
From: Mugunthan V N <[email protected]>
The patch is preparing dwc3 core for enabling DM_USB with peripheral driver with using driver model support.
The driver will be bound by the DWC3 wrapper driver based on the dr_mode device tree entry.
(Remove dwc3-omap changes)
---
Origin series here: https://patchwork.ozlabs.org/patch/775108/
- Fix labels as was asked in previous review.
--- drivers/usb/dwc3/core.c | 57 +++++++++++++++++++++++++++++++++++++++++ drivers/usb/dwc3/core.h | 6 +++++ 2 files changed, 63 insertions(+)
drivers/usb/dwc3/core.c +57 -0
@@ -602,6 +602,8 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)#define DWC3_ALIGN_MASK (16 - 1) +#ifndef CONFIG_DM_USB +/** * dwc3_uboot_init - dwc3 core uboot initialization code * @dwc3_dev: struct dwc3_device containing initialization data
@@ -788,3 +790,58 @@ MODULE_ALIAS("platform:dwc3");MODULE_AUTHOR ("Felipe Balbi <[email protected]>" );MODULE_LICENSE ("GPL v2" );MODULE_DESCRIPTION ("DesignWare USB3 DRD Controller Driver" ); + +#else + +int dwc3_init (struct dwc3 *dwc) +{ +int ret; + +dwc3_cache_hwparams (dwc); + + ret =dwc3_alloc_event_buffers (dwc,DWC3_EVENT_BUFFERS_SIZE ); +if (ret) { +dev_err (dwc->dev,"failed to allocate event buffers\n" ); +return -ENOMEM ; + } + + ret =dwc3_core_init (dwc); +if (ret) { +dev_err (dev,"failed to initialize core\n" ); + goto core_fail; + } + + ret =dwc3_event_buffers_setup (dwc); +if (ret) { +dev_err (dwc->dev,"failed to setup event buffers\n" ); + goto event_fail; + } + + ret =dwc3_core_init_mode (dwc); +if (ret) + goto mode_fail; + +return 0 ; + +mode_fail: +dwc3_event_buffers_cleanup (dwc); + +event_fail: +dwc3_core_exit (dwc); + +core_fail: +dwc3_free_event_buffers (dwc); + +return ret; +} + +void dwc3_remove (struct dwc3 *dwc) +{ +dwc3_core_exit_mode (dwc); +dwc3_event_buffers_cleanup (dwc); +dwc3_free_event_buffers (dwc); +dwc3_core_exit (dwc); +kfree (dwc->mem); +} + +#endif
drivers/usb/dwc3/core.h +6 -0
@@ -712,7 +712,11 @@ struct dwc3 {/* device lock */ spinlock_t lock; +#ifndef CONFIG_DM_USB struct device *dev; +#else +struct udevice *dev; +#endif struct platform_device *xhci;struct resource xhci_resources[DWC3_XHCI_RESOURCES_NUM ];
@@ -987,6 +991,8 @@ struct dwc3_gadget_ep_cmd_params {/* prototypes */ int dwc3_gadget_resize_tx_fifos (struct dwc3 *dwc); +int dwc3_init (struct dwc3 *dwc); +void dwc3_remove (struct dwc3 *dwc);#ifdef CONFIG_USB_DWC3_HOST int dwc3_host_init (struct dwc3 *dwc);
Signature · 1 line
2.17.0
PATCH 1/6 usb: dwc3: Add dwc3_init/remove with DM_USB
Quoted 11 lines · Michal Simek
From: Mugunthan V N <[email protected]>
The patch is preparing dwc3 core for enabling
DM_USBwith peripheral driver with using driver model support.
The driver will be bound by the DWC3 wrapper driver based on thedr_modedevice tree entry.Signed-off-by Mugunthan V N <[email protected]>(Remove dwc3-omap changes)
Signed-off-by Michal Simek <[email protected]>---
[...]
drivers/usb/dwc3/core.h struct dwc3 { · line 715
Quoted 9 lines
drivers/usb/dwc3/core.h +1
-0@@ -712,7 +712,11 @@ struct dwc3 {/* device lock */ spinlock_t lock; +#ifndef CONFIG_DM_USB
Shouldnt this be ifdef __UBOOT__ ?
Quoted 17 lines
drivers/usb/dwc3/core.h +5
-0struct device *dev; +#else +struct udevice *dev; +#endif struct platform_device *xhci;struct resource xhci_resources[DWC3_XHCI_RESOURCES_NUM ];@@ -987,6 +991,8 @@ struct dwc3_gadget_ep_cmd_params {/* prototypes */ int dwc3_gadget_resize_tx_fifos (struct dwc3 *dwc); +int dwc3_init (struct dwc3 *dwc); +void dwc3_remove (struct dwc3 *dwc);#ifdef CONFIG_USB_DWC3_HOST int dwc3_host_init (struct dwc3 *dwc);
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/6 usb: dwc3: Add dwc3_init/remove with DM_USB
Quoted 21 lines · Marek Vasut
Quoted 11 lines · Michal Simek
From: Mugunthan V N <[email protected]>
The patch is preparing dwc3 core for enabling
DM_USBwith peripheral driver with using driver model support.
The driver will be bound by the DWC3 wrapper driver based on thedr_modedevice tree entry.Signed-off-by Mugunthan V N <[email protected]>(Remove dwc3-omap changes)
Signed-off-by Michal Simek <[email protected]>---
[...]
Quoted 8 lines
drivers/usb/dwc3/core.h +0
-0@@ -712,7 +712,11 @@ struct dwc3 {/* device lock */ spinlock_t lock;
Quoted 8 lines
drivers/usb/dwc3/core.h struct dwc3 { · line 715
Quoted 1 line
drivers/usb/dwc3/core.h +1
-0+#ifndef CONFIG_DM_USB Shouldnt this be ifdef
__UBOOT__?drivers/usb/dwc3/core.h struct dwc3 { · line 719
Quoted 4 lines
drivers/usb/dwc3/core.h +3
-0struct device *dev; +#else +struct udevice *dev; +#endif
What about this?
#if defined(__UBOOT__) && defined(CONFIG_DM_USB) struct udevice *dev; #else struct device *dev;
#endif
Thanks,
Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180517/5c6692e3/attachment.sig>
PATCH 1/6 usb: dwc3: Add dwc3_init/remove with DM_USB
Quoted 33 lines · Michal Simek
Quoted 21 lines · Marek Vasut
Quoted 11 lines · Michal Simek
From: Mugunthan V N <[email protected]>
The patch is preparing dwc3 core for enabling
DM_USBwith peripheral driver with using driver model support.
The driver will be bound by the DWC3 wrapper driver based on thedr_modedevice tree entry.Signed-off-by Mugunthan V N <[email protected]>(Remove dwc3-omap changes)
Signed-off-by Michal Simek <[email protected]>---
[...]
Quoted 8 lines
drivers/usb/dwc3/core.h +0
-0@@ -712,7 +712,11 @@ struct dwc3 {/* device lock */ spinlock_t lock;Quoted 8 lines
drivers/usb/dwc3/core.h struct dwc3 { · line 715
Quoted 1 line
drivers/usb/dwc3/core.h +1
-0+#ifndef CONFIG_DM_USB Shouldnt this be ifdef
__UBOOT__?drivers/usb/dwc3/core.h struct dwc3 { · line 719
Quoted 4 lines
drivers/usb/dwc3/core.h +3
-0struct device *dev; +#else +struct udevice *dev; +#endif What about this?
Quoted 5 lines
#if defined(__UBOOT__) && defined(CONFIG_DM_USB) struct udevice *dev; #else struct device *dev;#endif
Yes. I am kinda surprised we don't have some udevice<->device mapping layer, but I guess that might have it's own problems.
Signature · 2 lines
Best regards, Marek Vasut
PATCH 2/6 usb: common: add support to get maximum speed from dt
In reply to Michal SimekFrom: Mugunthan V N <[email protected]>
Add support to get maximum speed from dt so that usb drivers makes use of it for DT parsing.
(rebase and fix errors)
---
drivers/usb/common/common.c | 29 +++++++++++++++++++++++++++++ include/linux/usb/otg.h | 9 +++++++++ 2 files changed, 38 insertions(+)
drivers/usb/common/common.c +29 -0
@@ -9,6 +9,7 @@#include <common.h> #include <linux/libfdt.h> #include <linux/usb/otg.h> +#include <linux/usb/ch9.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -37,3 +38,31 @@ enum usb_dr_mode usb_get_dr_mode(int node)return USB_DR_MODE_UNKNOWN ; } + +static const char *const speed_names[] = { + [USB_SPEED_UNKNOWN ] ="UNKNOWN" , + [USB_SPEED_LOW ] ="low-speed" , + [USB_SPEED_FULL ] ="full-speed" , + [USB_SPEED_HIGH ] ="high-speed" , + [USB_SPEED_WIRELESS ] ="wireless" , + [USB_SPEED_SUPER ] ="super-speed" , +}; + +enum usb_device_speed usb_get_maximum_speed (int node) +{ +const void *fdt = gd->fdt_blob; +const char *max_speed; +int i; + + max_speed =fdt_getprop (fdt, node,"maximum-speed" ,NULL ); +if (!max_speed) { +pr_err ("usb maximum-speed not found\n" ); +return USB_SPEED_UNKNOWN ; + } + +for (i =0 ; i <ARRAY_SIZE (speed_names); i++) +if (!strcmp (max_speed, speed_names[i])) +return i; + +return USB_SPEED_UNKNOWN ; +}
include/linux/usb/otg.h +9 -0
@@ -25,4 +25,13 @@ enum usb_dr_mode {*/ enum usb_dr_mode usb_get_dr_mode (int node); +/** +* usb_get_maximum_speed() - Get maximum speed for given device +* @node: Node offset to the given device +* +* The function gets phy interface string from property 'maximum-speed', +* and returns the correspondig enum usb_device_speed +*/ +enum usb_device_speed usb_get_maximum_speed (int node); +#endif /* __LINUX_USB_OTG_H */
Signature · 1 line
2.17.0
PATCH 2/6 usb: common: add support to get maximum speed from dt
Quoted 5 lines · Michal Simek
From: Mugunthan V N <[email protected]>
Add support to get maximum speed from dt so that usb drivers makes use of it for DT parsing.
Quoted 8 lines
Signed-off-by Mugunthan V N <[email protected]>Signed-off-by Michal Simek <[email protected]>(rebase and fix errors)
---drivers/usb/common/common.c | 29 +++++++++++++++++++++++++++++ include/linux/usb/otg.h | 9 +++++++++ 2 files changed, 38 insertions(+)
PATCH 3/6 usb: dwc3: Add generic DWC3 glue logic driver
In reply to Michal SimekBy enabling BLK by default this is the next driver which needs to get support for DM_USB. Adding generic DWC3 glue logic which only parse nodes and read device mode. Based on it probe proper host/peripheral DWC3 drivers for it.
---
drivers/usb/dwc3/Kconfig | 6 ++ drivers/usb/dwc3/Makefile | 1 + drivers/usb/dwc3/dwc3-generic.c | 165 ++++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+) create mode 100644 drivers/usb/dwc3/dwc3-generic.c
drivers/usb/dwc3/Kconfig +6 -0
@@ -37,6 +37,12 @@ config USB_DWC3_OMAP Say 'Y' here if you have one such device +config USB_DWC3_GENERIC + bool "Xilinx ZynqMP and similar Platforms" + depends on DM_USB && USB_DWC3 + help + Some platforms can reuse this DWC3 generic implementation. + config USB_DWC3_UNIPHIER bool "DesignWare USB3 Host Support on UniPhier Platforms" depends on ARCH_UNIPHIER && USB_XHCI_DWC3
drivers/usb/dwc3/Makefile +1 -0
@@ -7,6 +7,7 @@ dwc3-y := core.o obj-$(CONFIG_USB_DWC3_GADGET) += gadget.o ep0.o obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o +obj-$(CONFIG_USB_DWC3_GENERIC) += dwc3-generic.o obj-$(CONFIG_USB_DWC3_UNIPHIER) += dwc3-uniphier.o obj-$(CONFIG_USB_DWC3_PHY_OMAP) += ti_usb_phy.o obj-$(CONFIG_USB_DWC3_PHY_SAMSUNG) += samsung_usb_phy.o
drivers/usb/dwc3/dwc3-generic.c new file +165 -0
165 lines not on this page · raw message
Signature · 1 line
2.17.0
PATCH 3/6 usb: dwc3: Add generic DWC3 glue logic driver
Quoted 179 lines · Michal Simek
By enabling BLK by default this is the next driver which needs to get support for
DM_USB. Adding generic DWC3 glue logic which only parse nodes and read device mode. Based on it probe proper host/peripheral DWC3 drivers for it.Signed-off-by Michal Simek <[email protected]>---
drivers/usb/dwc3/Kconfig | 6 ++ drivers/usb/dwc3/Makefile | 1 + drivers/usb/dwc3/dwc3-generic.c | 165 ++++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+) create mode 100644 drivers/usb/dwc3/dwc3-generic.cdrivers/usb/dwc3/Kconfig +6
-0@@ -37,6 +37,12 @@ config USB_DWC3_OMAP Say 'Y' here if you have one such device +config USB_DWC3_GENERIC + bool "Xilinx ZynqMP and similar Platforms" + depends on DM_USB && USB_DWC3 + help + Some platforms can reuse this DWC3 generic implementation. + config USB_DWC3_UNIPHIER bool "DesignWare USB3 Host Support on UniPhier Platforms" depends on ARCH_UNIPHIER && USB_XHCI_DWC3drivers/usb/dwc3/Makefile +1
-0@@ -7,6 +7,7 @@ dwc3-y := core.o obj-$(CONFIG_USB_DWC3_GADGET) += gadget.o ep0.o obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o +obj-$(CONFIG_USB_DWC3_GENERIC) += dwc3-generic.o obj-$(CONFIG_USB_DWC3_UNIPHIER) += dwc3-uniphier.o obj-$(CONFIG_USB_DWC3_PHY_OMAP) += ti_usb_phy.o obj-$(CONFIG_USB_DWC3_PHY_SAMSUNG) += samsung_usb_phy.odrivers/usb/dwc3/dwc3-generic.c new file +130
-0@@ -0,0 +1,165 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Generic DWC3 Glue layer +* +* Copyright (C) 2016 - 2018 Xilinx, Inc. +* +* Based on dwc3-omap.c. +*/ + +#include <common.h> +#include <dm.h> +#include <dm/device-internal.h> +#include <dm/lists.h> +#include <linux/usb/otg.h> +#include <linux/compat.h> +#include <linux/usb/ch9.h> +#include <linux/usb/gadget.h> +#include <malloc.h> +#include <usb.h> +#include "core.h" +#include "gadget.h" +#include "linux-compat.h" + +DECLARE_GLOBAL_DATA_PTR ; + +int usb_gadget_handle_interrupts (int index) +{ +struct dwc3 *priv; +struct udevice *dev; +int ret; + + ret =uclass_first_device (UCLASS_USB_DEV_GENERIC , &dev); +if (!dev || ret) { +pr_err ("No USB device found\n" ); +return -ENODEV ; + } + + priv =dev_get_priv (dev); + +dwc3_gadget_uboot_handle_interrupt (priv); + +return 0 ; +} + +static int dwc3_generic_peripheral_probe (struct udevice *dev) +{ +struct dwc3 *priv =dev_get_priv (dev); + +return dwc3_init (priv); +} + +static int dwc3_generic_peripheral_remove (struct udevice *dev) +{ +struct dwc3 *priv =dev_get_priv (dev); + +dwc3_remove (priv); + +return 0 ; +} + +static int dwc3_generic_peripheral_ofdata_to_platdata (struct udevice *dev) +{ +struct dwc3 *priv =dev_get_priv (dev); +int node =dev_of_offset (dev); + + priv->regs = (void *)devfdt_get_addr (dev); + priv->regs +=DWC3_GLOBALS_REGS_START ; + + priv->maximum_speed =usb_get_maximum_speed (node); +if (priv->maximum_speed ==USB_SPEED_UNKNOWN ) { +pr_err ("Invalid usb maximum speed\n" ); +return -ENODEV ; + } + + priv->dr_mode =usb_get_dr_mode (node); +if (priv->dr_mode ==USB_DR_MODE_UNKNOWN ) { +pr_err ("Invalid usb mode setup\n" ); +return -ENODEV ; + } + +return 0 ; +} + +static int dwc3_generic_peripheral_bind (struct udevice *dev) +{ +return device_probe (dev); +} + +U_BOOT_DRIVER (dwc3_generic_peripheral) = { + .name ="dwc3-generic-peripheral" , + .id =UCLASS_USB_DEV_GENERIC , + .ofdata_to_platdata = dwc3_generic_peripheral_ofdata_to_platdata, + .probe = dwc3_generic_peripheral_probe, + .remove = dwc3_generic_peripheral_remove, + .bind = dwc3_generic_peripheral_bind, + .platdata_auto_alloc_size =sizeof (struct usb_platdata ), + .priv_auto_alloc_size =sizeof (struct dwc3 ), + .flags =DM_FLAG_ALLOC_PRIV_DMA , +}; + +static int dwc3_generic_bind (struct udevice *parent) +{ +const void *fdt = gd->fdt_blob; +int node; +int ret; + +for (node =fdt_first_subnode (fdt,dev_of_offset (parent)); node >0 ; + node =fdt_next_subnode (fdt, node)) { +const char *name =fdt_get_name (fdt, node,NULL ); +enum usb_dr_mode dr_mode; +struct udevice *dev; + +debug ("%s: subnode name: %s\n" , __func__, name); +if (strncmp (name,"dwc3@" ,4 )) +continue ; + + dr_mode =usb_get_dr_mode (node); + +switch (dr_mode) { +case USB_DR_MODE_PERIPHERAL : +case USB_DR_MODE_OTG : +debug ("%s: dr_mode: OTG or Peripheral\n" , __func__); + ret =device_bind_driver_to_node (parent, +"dwc3-generic-peripheral" , + name, +offset_to_ofnode (node), + &dev); +if (ret) { +debug ("%s: not able to bind usb device mode\n" , + __func__);
drivers/usb/dwc3/dwc3-generic.c line 140
Quoted 10 lines
drivers/usb/dwc3/dwc3-generic.c new file +10
-0+return ret; + } +break ; +case USB_DR_MODE_HOST : +debug ("%s: dr_mode: HOST\n" , __func__); + ret =device_bind_driver_to_node (parent, +"dwc3-generic-host" , + name, +offset_to_ofnode (node), + &dev);
Can you somehow improve this indent hell ?
Quoted 26 lines
drivers/usb/dwc3/dwc3-generic.c new file +25
-0+if (ret) { +debug ("%s: not able to bind usb host mode\n" , + __func__); +return ret; + } +break ; +default : +break ; + }; + } + +return 0 ; +} + +static const struct udevice_id dwc3_generic_ids[] = { + { .compatible ="xlnx,zynqmp-dwc3" }, + { } +}; + +U_BOOT_DRIVER (dwc3_generic_wrapper) = { + .name ="dwc3-generic-wrapper" , + .id =UCLASS_MISC , + .of_match = dwc3_generic_ids, + .bind = dwc3_generic_bind, +};
Signature · 2 lines
Best regards, Marek Vasut
PATCH 3/6 usb: dwc3: Add generic DWC3 glue logic driver
Quoted 184 lines · Marek Vasut
Quoted 183 lines · Michal Simek
By enabling BLK by default this is the next driver which needs to get support for
DM_USB. Adding generic DWC3 glue logic which only parse nodes and read device mode. Based on it probe proper host/peripheral DWC3 drivers for it.Signed-off-by Michal Simek <[email protected]>---
drivers/usb/dwc3/Kconfig | 6 ++ drivers/usb/dwc3/Makefile | 1 + drivers/usb/dwc3/dwc3-generic.c | 165 ++++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+) create mode 100644 drivers/usb/dwc3/dwc3-generic.cdrivers/usb/dwc3/Kconfig +6
-0@@ -37,6 +37,12 @@ config USB_DWC3_OMAP Say 'Y' here if you have one such device +config USB_DWC3_GENERIC + bool "Xilinx ZynqMP and similar Platforms" + depends on DM_USB && USB_DWC3 + help + Some platforms can reuse this DWC3 generic implementation. + config USB_DWC3_UNIPHIER bool "DesignWare USB3 Host Support on UniPhier Platforms" depends on ARCH_UNIPHIER && USB_XHCI_DWC3drivers/usb/dwc3/Makefile +1
-0@@ -7,6 +7,7 @@ dwc3-y := core.o obj-$(CONFIG_USB_DWC3_GADGET) += gadget.o ep0.o obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o +obj-$(CONFIG_USB_DWC3_GENERIC) += dwc3-generic.o obj-$(CONFIG_USB_DWC3_UNIPHIER) += dwc3-uniphier.o obj-$(CONFIG_USB_DWC3_PHY_OMAP) += ti_usb_phy.o obj-$(CONFIG_USB_DWC3_PHY_SAMSUNG) += samsung_usb_phy.odrivers/usb/dwc3/dwc3-generic.c new file +134
-0@@ -0,0 +1,165 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Generic DWC3 Glue layer +* +* Copyright (C) 2016 - 2018 Xilinx, Inc. +* +* Based on dwc3-omap.c. +*/ + +#include <common.h> +#include <dm.h> +#include <dm/device-internal.h> +#include <dm/lists.h> +#include <linux/usb/otg.h> +#include <linux/compat.h> +#include <linux/usb/ch9.h> +#include <linux/usb/gadget.h> +#include <malloc.h> +#include <usb.h> +#include "core.h" +#include "gadget.h" +#include "linux-compat.h" + +DECLARE_GLOBAL_DATA_PTR ; + +int usb_gadget_handle_interrupts (int index) +{ +struct dwc3 *priv; +struct udevice *dev; +int ret; + + ret =uclass_first_device (UCLASS_USB_DEV_GENERIC , &dev); +if (!dev || ret) { +pr_err ("No USB device found\n" ); +return -ENODEV ; + } + + priv =dev_get_priv (dev); + +dwc3_gadget_uboot_handle_interrupt (priv); + +return 0 ; +} + +static int dwc3_generic_peripheral_probe (struct udevice *dev) +{ +struct dwc3 *priv =dev_get_priv (dev); + +return dwc3_init (priv); +} + +static int dwc3_generic_peripheral_remove (struct udevice *dev) +{ +struct dwc3 *priv =dev_get_priv (dev); + +dwc3_remove (priv); + +return 0 ; +} + +static int dwc3_generic_peripheral_ofdata_to_platdata (struct udevice *dev) +{ +struct dwc3 *priv =dev_get_priv (dev); +int node =dev_of_offset (dev); + + priv->regs = (void *)devfdt_get_addr (dev); + priv->regs +=DWC3_GLOBALS_REGS_START ; + + priv->maximum_speed =usb_get_maximum_speed (node); +if (priv->maximum_speed ==USB_SPEED_UNKNOWN ) { +pr_err ("Invalid usb maximum speed\n" ); +return -ENODEV ; + } + + priv->dr_mode =usb_get_dr_mode (node); +if (priv->dr_mode ==USB_DR_MODE_UNKNOWN ) { +pr_err ("Invalid usb mode setup\n" ); +return -ENODEV ; + } + +return 0 ; +} + +static int dwc3_generic_peripheral_bind (struct udevice *dev) +{ +return device_probe (dev); +} + +U_BOOT_DRIVER (dwc3_generic_peripheral) = { + .name ="dwc3-generic-peripheral" , + .id =UCLASS_USB_DEV_GENERIC , + .ofdata_to_platdata = dwc3_generic_peripheral_ofdata_to_platdata, + .probe = dwc3_generic_peripheral_probe, + .remove = dwc3_generic_peripheral_remove, + .bind = dwc3_generic_peripheral_bind, + .platdata_auto_alloc_size =sizeof (struct usb_platdata ), + .priv_auto_alloc_size =sizeof (struct dwc3 ), + .flags =DM_FLAG_ALLOC_PRIV_DMA , +}; + +static int dwc3_generic_bind (struct udevice *parent) +{ +const void *fdt = gd->fdt_blob; +int node; +int ret; + +for (node =fdt_first_subnode (fdt,dev_of_offset (parent)); node >0 ; + node =fdt_next_subnode (fdt, node)) { +const char *name =fdt_get_name (fdt, node,NULL ); +enum usb_dr_mode dr_mode; +struct udevice *dev; + +debug ("%s: subnode name: %s\n" , __func__, name); +if (strncmp (name,"dwc3@" ,4 )) +continue ; + + dr_mode =usb_get_dr_mode (node); + +switch (dr_mode) { +case USB_DR_MODE_PERIPHERAL : +case USB_DR_MODE_OTG : +debug ("%s: dr_mode: OTG or Peripheral\n" , __func__); + ret =device_bind_driver_to_node (parent, +"dwc3-generic-peripheral" , + name, +offset_to_ofnode (node), + &dev); +if (ret) { +debug ("%s: not able to bind usb device mode\n" , + __func__); +return ret; + } +break ; +case USB_DR_MODE_HOST :
Quoted 8 lines
drivers/usb/dwc3/dwc3-generic.c line 140
Quoted 6 lines
drivers/usb/dwc3/dwc3-generic.c new file +6
-0+debug ("%s: dr_mode: HOST\n" , __func__); + ret =device_bind_driver_to_node (parent, +"dwc3-generic-host" , + name, +offset_to_ofnode (node), + &dev);Can you somehow improve this indent hell ?
Unfortunately this is correct style. I am happy to break 80 char limit which will clean this up. Just let me know your preference.
Thanks,
Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180517/3e3ba753/attachment.sig>
PATCH 3/6 usb: dwc3: Add generic DWC3 glue logic driver
Quoted 194 lines · Michal Simek
Quoted 184 lines · Marek Vasut
Quoted 183 lines · Michal Simek
By enabling BLK by default this is the next driver which needs to get support for
DM_USB. Adding generic DWC3 glue logic which only parse nodes and read device mode. Based on it probe proper host/peripheral DWC3 drivers for it.Signed-off-by Michal Simek <[email protected]>---
drivers/usb/dwc3/Kconfig | 6 ++ drivers/usb/dwc3/Makefile | 1 + drivers/usb/dwc3/dwc3-generic.c | 165 ++++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+) create mode 100644 drivers/usb/dwc3/dwc3-generic.cdrivers/usb/dwc3/Kconfig +6
-0@@ -37,6 +37,12 @@ config USB_DWC3_OMAP Say 'Y' here if you have one such device +config USB_DWC3_GENERIC + bool "Xilinx ZynqMP and similar Platforms" + depends on DM_USB && USB_DWC3 + help + Some platforms can reuse this DWC3 generic implementation. + config USB_DWC3_UNIPHIER bool "DesignWare USB3 Host Support on UniPhier Platforms" depends on ARCH_UNIPHIER && USB_XHCI_DWC3drivers/usb/dwc3/Makefile +1
-0@@ -7,6 +7,7 @@ dwc3-y := core.o obj-$(CONFIG_USB_DWC3_GADGET) += gadget.o ep0.o obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o +obj-$(CONFIG_USB_DWC3_GENERIC) += dwc3-generic.o obj-$(CONFIG_USB_DWC3_UNIPHIER) += dwc3-uniphier.o obj-$(CONFIG_USB_DWC3_PHY_OMAP) += ti_usb_phy.o obj-$(CONFIG_USB_DWC3_PHY_SAMSUNG) += samsung_usb_phy.odrivers/usb/dwc3/dwc3-generic.c new file +134
-0@@ -0,0 +1,165 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Generic DWC3 Glue layer +* +* Copyright (C) 2016 - 2018 Xilinx, Inc. +* +* Based on dwc3-omap.c. +*/ + +#include <common.h> +#include <dm.h> +#include <dm/device-internal.h> +#include <dm/lists.h> +#include <linux/usb/otg.h> +#include <linux/compat.h> +#include <linux/usb/ch9.h> +#include <linux/usb/gadget.h> +#include <malloc.h> +#include <usb.h> +#include "core.h" +#include "gadget.h" +#include "linux-compat.h" + +DECLARE_GLOBAL_DATA_PTR ; + +int usb_gadget_handle_interrupts (int index) +{ +struct dwc3 *priv; +struct udevice *dev; +int ret; + + ret =uclass_first_device (UCLASS_USB_DEV_GENERIC , &dev); +if (!dev || ret) { +pr_err ("No USB device found\n" ); +return -ENODEV ; + } + + priv =dev_get_priv (dev); + +dwc3_gadget_uboot_handle_interrupt (priv); + +return 0 ; +} + +static int dwc3_generic_peripheral_probe (struct udevice *dev) +{ +struct dwc3 *priv =dev_get_priv (dev); + +return dwc3_init (priv); +} + +static int dwc3_generic_peripheral_remove (struct udevice *dev) +{ +struct dwc3 *priv =dev_get_priv (dev); + +dwc3_remove (priv); + +return 0 ; +} + +static int dwc3_generic_peripheral_ofdata_to_platdata (struct udevice *dev) +{ +struct dwc3 *priv =dev_get_priv (dev); +int node =dev_of_offset (dev); + + priv->regs = (void *)devfdt_get_addr (dev); + priv->regs +=DWC3_GLOBALS_REGS_START ; + + priv->maximum_speed =usb_get_maximum_speed (node); +if (priv->maximum_speed ==USB_SPEED_UNKNOWN ) { +pr_err ("Invalid usb maximum speed\n" ); +return -ENODEV ; + } + + priv->dr_mode =usb_get_dr_mode (node); +if (priv->dr_mode ==USB_DR_MODE_UNKNOWN ) { +pr_err ("Invalid usb mode setup\n" ); +return -ENODEV ; + } + +return 0 ; +} + +static int dwc3_generic_peripheral_bind (struct udevice *dev) +{ +return device_probe (dev); +} + +U_BOOT_DRIVER (dwc3_generic_peripheral) = { + .name ="dwc3-generic-peripheral" , + .id =UCLASS_USB_DEV_GENERIC , + .ofdata_to_platdata = dwc3_generic_peripheral_ofdata_to_platdata, + .probe = dwc3_generic_peripheral_probe, + .remove = dwc3_generic_peripheral_remove, + .bind = dwc3_generic_peripheral_bind, + .platdata_auto_alloc_size =sizeof (struct usb_platdata ), + .priv_auto_alloc_size =sizeof (struct dwc3 ), + .flags =DM_FLAG_ALLOC_PRIV_DMA , +}; + +static int dwc3_generic_bind (struct udevice *parent) +{ +const void *fdt = gd->fdt_blob; +int node; +int ret; + +for (node =fdt_first_subnode (fdt,dev_of_offset (parent)); node >0 ; + node =fdt_next_subnode (fdt, node)) { +const char *name =fdt_get_name (fdt, node,NULL ); +enum usb_dr_mode dr_mode; +struct udevice *dev; + +debug ("%s: subnode name: %s\n" , __func__, name); +if (strncmp (name,"dwc3@" ,4 )) +continue ; + + dr_mode =usb_get_dr_mode (node); + +switch (dr_mode) { +case USB_DR_MODE_PERIPHERAL : +case USB_DR_MODE_OTG : +debug ("%s: dr_mode: OTG or Peripheral\n" , __func__); + ret =device_bind_driver_to_node (parent, +"dwc3-generic-peripheral" , + name, +offset_to_ofnode (node), + &dev); +if (ret) { +debug ("%s: not able to bind usb device mode\n" , + __func__); +return ret; + } +break ; +case USB_DR_MODE_HOST :Quoted 8 lines
drivers/usb/dwc3/dwc3-generic.c line 140
Quoted 6 lines
drivers/usb/dwc3/dwc3-generic.c new file +6
-0+debug ("%s: dr_mode: HOST\n" , __func__); + ret =device_bind_driver_to_node (parent, +"dwc3-generic-host" , + name, +offset_to_ofnode (node), + &dev);Can you somehow improve this indent hell ?
Quoted 2 lines
Unfortunately this is correct style. I am happy to break 80 char limit which will clean this up. Just let me know your preference.
Would separate function help here ? Or even better, something like
switch (drmode) {
case foo
case bar
driver_name = "dwc3-generic-peripheral";
break;
case baz
...
}
ret = device_bind_driver...(parent, driver_name, name ....);
?
Signature · 2 lines
Best regards, Marek Vasut
PATCH 4/6 usb: xhci: zynqmp: Add support for DM_USB
In reply to Michal SimekThe patch is adding support for DM_USB for xhci driver.
---
drivers/usb/host/xhci-zynqmp.c | 69 ++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+)
drivers/usb/host/xhci-zynqmp.c +69 -0
@@ -10,6 +10,7 @@*/ #include <common.h> +#include <dm.h> #include <usb.h> #include <linux/errno.h> #include <asm/arch/hardware.h>
@@ -54,13 +55,23 @@#define USBOTGSS_IRQ_SET_1_DMADISABLECLR_EN BIT(17)struct zynqmp_xhci { +#ifdef CONFIG_DM_USB +struct usb_platdata usb_plat; +#endif +struct xhci_ctrl ctrl;struct xhci_hccr *hcd;struct dwc3 *dwc3_reg; }; +#ifdef CONFIG_DM_USB +struct zynqmp_xhci_platdata { +fdt_addr_t hcd_base; +}; +#else static struct zynqmp_xhci zynqmp_xhci;unsigned long ctr_addr[] =CONFIG_ZYNQMP_XHCI_LIST ; +#endif static int zynqmp_xhci_core_init (struct zynqmp_xhci *zynqmp_xhci) {
@@ -78,6 +89,7 @@ static int zynqmp_xhci_core_init(struct zynqmp_xhci *zynqmp_xhci)return ret; } +#ifndef CONFIG_DM_USB int xhci_hcd_init (int index,struct xhci_hccr **hccr,struct xhci_hcor **hcor) {struct zynqmp_xhci *ctx = &zynqmp_xhci;
@@ -111,6 +123,7 @@ int xhci_hcd_init(int index, struct xhci_hccr **hccr, struct xhci_hcor **hcor) return ret; } +#endif void xhci_hcd_stop (int index) {
@@ -121,3 +134,59 @@ void xhci_hcd_stop(int index)return ; } + +#ifdef CONFIG_DM_USB +static int xhci_usb_probe (struct udevice *dev) +{ +struct zynqmp_xhci_platdata *plat =dev_get_platdata (dev); +struct zynqmp_xhci *ctx =dev_get_priv (dev); +struct xhci_hcor *hcor; +int ret; + + ctx->hcd = (struct xhci_hccr *)plat->hcd_base; + ctx->dwc3_reg = (struct dwc3 *)((char *)(ctx->hcd) +DWC3_REG_OFFSET ); + + ret =zynqmp_xhci_core_init (ctx); +if (ret) { +puts ("XHCI: failed to initialize controller\n" ); +return -EINVAL ; + } + + hcor = (struct xhci_hcor *)((ulong )ctx->hcd + +HC_LENGTH (xhci_readl (&ctx->hcd->cr_capbase))); + +return xhci_register (dev, ctx->hcd, hcor); +} + +static int xhci_usb_remove (struct udevice *dev) +{ +return xhci_deregister (dev); +} + +static int xhci_usb_ofdata_to_platdata (struct udevice *dev) +{ +struct zynqmp_xhci_platdata *plat =dev_get_platdata (dev); +const void *blob = gd->fdt_blob; + +/* Get the base address for XHCI controller from the device node */ + plat->hcd_base =fdtdec_get_addr (blob,dev_of_offset (dev),"reg" ); +if (plat->hcd_base ==FDT_ADDR_T_NONE ) { +debug ("Can't get the XHCI register base address\n" ); +return -ENXIO ; + } + +return 0 ; +} + +U_BOOT_DRIVER (dwc3_generic_host) = { + .name ="dwc3-generic-host" , + .id =UCLASS_USB , + .ofdata_to_platdata = xhci_usb_ofdata_to_platdata, + .probe = xhci_usb_probe, + .remove = xhci_usb_remove, + .ops = &xhci_usb_ops, + .platdata_auto_alloc_size =sizeof (struct zynqmp_xhci_platdata ), + .priv_auto_alloc_size =sizeof (struct zynqmp_xhci ), + .flags =DM_FLAG_ALLOC_PRIV_DMA , +}; +#endif
Signature · 1 line
2.17.0
PATCH 5/6 arm64: zynqmp: Use DWC3 generic driver and DM_USB
In reply to Michal SimekRemove harcoded XHCI lists and detect mode, speed based on DT.
---
board/xilinx/zynqmp/zynqmp.c | 46 ------------------- .../xilinx_zynqmp_zc1751_xm015_dc1_defconfig | 1 + .../xilinx_zynqmp_zc1751_xm016_dc2_defconfig | 1 + .../xilinx_zynqmp_zc1751_xm017_dc3_defconfig | 1 + configs/xilinx_zynqmp_zcu100_revC_defconfig | 1 + configs/xilinx_zynqmp_zcu102_rev1_0_defconfig | 1 + configs/xilinx_zynqmp_zcu102_revA_defconfig | 1 + configs/xilinx_zynqmp_zcu102_revB_defconfig | 1 + configs/xilinx_zynqmp_zcu104_revA_defconfig | 1 + configs/xilinx_zynqmp_zcu104_revC_defconfig | 1 + configs/xilinx_zynqmp_zcu106_revA_defconfig | 1 + configs/xilinx_zynqmp_zcu111_revA_defconfig | 1 + .../configs/xilinx_zynqmp_zc1751_xm015_dc1.h | 1 - .../configs/xilinx_zynqmp_zc1751_xm016_dc2.h | 2 - .../configs/xilinx_zynqmp_zc1751_xm017_dc3.h | 3 -- include/configs/xilinx_zynqmp_zcu100.h | 3 -- include/configs/xilinx_zynqmp_zcu102.h | 2 - include/configs/xilinx_zynqmp_zcu104.h | 2 - include/configs/xilinx_zynqmp_zcu106.h | 1 - include/configs/xilinx_zynqmp_zcu111.h | 2 - 20 files changed, 11 insertions(+), 62 deletions(-)
board/xilinx/zynqmp/zynqmp.c +0 -46
@@ -601,49 +601,3 @@ int checkboard(void)puts ("Board: Xilinx ZynqMP\n" );return 0 ; } - -#ifdef CONFIG_USB_DWC3 -static struct dwc3_device dwc3_device_data0 = { - .maximum_speed =USB_SPEED_HIGH , - .base =ZYNQMP_USB0_XHCI_BASEADDR , - .dr_mode =USB_DR_MODE_PERIPHERAL , - .index =0 , -}; - -static struct dwc3_device dwc3_device_data1 = { - .maximum_speed =USB_SPEED_HIGH , - .base =ZYNQMP_USB1_XHCI_BASEADDR , - .dr_mode =USB_DR_MODE_PERIPHERAL , - .index =1 , -}; - -int usb_gadget_handle_interrupts (int index) -{ -dwc3_uboot_handle_interrupt (index); -return 0 ; -} - -int board_usb_init (int index,enum usb_init_type init) -{ -debug ("%s: index %x\n" , __func__, index); - -#if defined(CONFIG_USB_GADGET_DOWNLOAD ) -g_dnl_set_serialnumber (CONFIG_SYS_CONFIG_NAME ); -#endif - -switch (index) { -case 0 : -return dwc3_uboot_init (&dwc3_device_data0); -case 1 : -return dwc3_uboot_init (&dwc3_device_data1); - }; - -return -1 ; -} - -int board_usb_cleanup (int index,enum usb_init_type init) -{ -dwc3_uboot_exit (index); -return 0 ; -} -#endif
configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig +1 -0
@@ -84,6 +84,7 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_XHCI_ZYNQMP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GADGET=y +CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_ULPI_VIEWPORT=y CONFIG_USB_ULPI=y CONFIG_USB_STORAGE=y
configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig +1 -0
@@ -80,6 +80,7 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_XHCI_ZYNQMP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GADGET=y +CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_ULPI_VIEWPORT=y CONFIG_USB_ULPI=y CONFIG_USB_STORAGE=y
configs/xilinx_zynqmp_zc1751_xm017_dc3_defconfig +1 -0
@@ -76,6 +76,7 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_XHCI_ZYNQMP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GADGET=y +CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_ULPI_VIEWPORT=y CONFIG_USB_ULPI=y CONFIG_USB_STORAGE=y
configs/xilinx_zynqmp_zcu100_revC_defconfig +1 -0
@@ -78,6 +78,7 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_XHCI_ZYNQMP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GADGET=y +CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_ULPI_VIEWPORT=y CONFIG_USB_ULPI=y CONFIG_USB_STORAGE=y
configs/xilinx_zynqmp_zcu102_rev1_0_defconfig +1 -0
@@ -94,6 +94,7 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_XHCI_ZYNQMP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GADGET=y +CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_ULPI_VIEWPORT=y CONFIG_USB_ULPI=y CONFIG_USB_STORAGE=y
configs/xilinx_zynqmp_zcu102_revA_defconfig +1 -0
@@ -92,6 +92,7 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_XHCI_ZYNQMP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GADGET=y +CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_ULPI_VIEWPORT=y CONFIG_USB_ULPI=y CONFIG_USB_STORAGE=y
configs/xilinx_zynqmp_zcu102_revB_defconfig +1 -0
@@ -91,6 +91,7 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_XHCI_ZYNQMP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GADGET=y +CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_ULPI_VIEWPORT=y CONFIG_USB_ULPI=y CONFIG_USB_STORAGE=y
configs/xilinx_zynqmp_zcu104_revA_defconfig +1 -0
@@ -84,6 +84,7 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_XHCI_ZYNQMP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GADGET=y +CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_ULPI_VIEWPORT=y CONFIG_USB_ULPI=y CONFIG_USB_STORAGE=y
configs/xilinx_zynqmp_zcu104_revC_defconfig +1 -0
@@ -84,6 +84,7 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_XHCI_ZYNQMP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GADGET=y +CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_ULPI_VIEWPORT=y CONFIG_USB_ULPI=y CONFIG_USB_STORAGE=y
configs/xilinx_zynqmp_zcu106_revA_defconfig +1 -0
@@ -90,6 +90,7 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_XHCI_ZYNQMP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GADGET=y +CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_ULPI_VIEWPORT=y CONFIG_USB_ULPI=y CONFIG_USB_STORAGE=y
configs/xilinx_zynqmp_zcu111_revA_defconfig +1 -0
@@ -84,6 +84,7 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_USB_XHCI_ZYNQMP=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_GADGET=y +CONFIG_USB_DWC3_GENERIC=y CONFIG_USB_ULPI_VIEWPORT=y CONFIG_USB_ULPI=y CONFIG_USB_STORAGE=y
include/configs/xilinx_zynqmp_zc1751_xm015_dc1.h +0 -1
@@ -11,7 +11,6 @@#define CONFIG_ZYNQ_SDHCI0 #define CONFIG_ZYNQ_SDHCI1 -#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR}#include <configs/xilinx_zynqmp.h>
include/configs/xilinx_zynqmp_zc1751_xm016_dc2.h +0 -2
@@ -9,8 +9,6 @@#ifndef __CONFIG_ZYNQMP_ZC1751_XM016_DC2_H#define __CONFIG_ZYNQMP_ZC1751_XM016_DC2_H -#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB1_XHCI_BASEADDR} -#include <configs/xilinx_zynqmp.h> #endif /* __CONFIG_ZYNQMP_ZC1751_XM016_DC2_H */
include/configs/xilinx_zynqmp_zc1751_xm017_dc3.h +0 -3
@@ -11,9 +11,6 @@#define CONFIG_ZYNQ_SDHCI1 -#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR, \ - ZYNQMP_USB1_XHCI_BASEADDR} -#include <configs/xilinx_zynqmp.h> #endif /* __CONFIG_ZYNQMP_ZC1751_XM017_DC3_H */
include/configs/xilinx_zynqmp_zcu100.h +0 -3
@@ -24,9 +24,6 @@ {0, {{I2C_MUX_PCA9548, 0x75, 7} } }, \ } -#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR, \ - ZYNQMP_USB1_XHCI_BASEADDR} -#define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX
include/configs/xilinx_zynqmp_zcu102.h +0 -2
@@ -35,8 +35,6 @@#define CONFIG_PCA953X -#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR} -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_ZYNQ_EEPROM_BUS 5#define CONFIG_ZYNQ_GEM_EEPROM_ADDR 0x54
include/configs/xilinx_zynqmp_zcu104.h +0 -2
@@ -26,8 +26,6 @@#define CONFIG_PCA953X -#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR} -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#include <configs/xilinx_zynqmp.h>
include/configs/xilinx_zynqmp_zcu106.h +0 -1
@@ -35,7 +35,6 @@#define CONFIG_PCA953X -#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR}#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_ZYNQ_EEPROM_BUS 5
include/configs/xilinx_zynqmp_zcu111.h +0 -2
@@ -38,8 +38,6 @@#define CONFIG_PCA953X -#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR} -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_ZYNQ_EEPROM_BUS 5#define CONFIG_ZYNQ_GEM_EEPROM_ADDR 0x54
Signature · 1 line
2.17.0
PATCH 6/6 usb: xhci: zynqmp: Remove support for !DM_USB
In reply to Michal SimekSwitch to DM_USB was done and there is no need to keep !DM_USB code in tree.
---
drivers/usb/host/Kconfig | 1 + drivers/usb/host/xhci-zynqmp.c | 46 ---------------------------------- scripts/config_whitelist.txt | 1 - 3 files changed, 1 insertion(+), 47 deletions(-)
drivers/usb/host/Kconfig +1 -0
@@ -75,6 +75,7 @@ config USB_XHCI_STI config USB_XHCI_ZYNQMP bool "Support for Xilinx ZynqMP on-chip xHCI USB controller" depends on ARCH_ZYNQMP + depends on DM_USB help Enables support for the on-chip xHCI controller on Xilinx ZynqMP SoCs.
drivers/usb/host/xhci-zynqmp.c +0 -46
76 lines not on this page · raw message
scripts/config_whitelist.txt +0 -1
@@ -4782,7 +4782,6 @@ CONFIG_ZLIB CONFIG_ZLT CONFIG_ZM7300 CONFIG_ZYNQMP_EEPROM -CONFIG_ZYNQMP_XHCI_LIST CONFIG_ZYNQ_EEPROM CONFIG_ZYNQ_EEPROM_BUS CONFIG_ZYNQ_GEM_EEPROM_ADDR
Signature · 1 line
2.17.0
PATCH 6/6 usb: xhci: zynqmp: Remove support for !DM_USB
Quoted 11 lines · Michal Simek
Switch to
DM_USBwas done and there is no need to keep !DM_USB code in tree.Signed-off-by Michal Simek <[email protected]>---
drivers/usb/host/Kconfig | 1 + drivers/usb/host/xhci-zynqmp.c | 46 ---------------------------------- scripts/config_whitelist.txt | 1 - 3 files changed, 1 insertion(+), 47 deletions(-)