From: Kever Yang <kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org> To: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>, Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>, Philipp Tomsich <philipp.tomsich-SN7IsUiht6C/RdPyistoZJqQE7yCjDx5@public.gmane.org> Cc: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>, u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org, Levin Du <djw-Efosm3t9Qi2Pt1CcHtbs0g@public.gmane.org>, linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Subject: Re: [PATCH v2 09/10] rockchip: Setup dwc3_device (for non-dm gadgets) Date: Sat, 23 Nov 2019 22:22:04 +0800 [thread overview] Message-ID: <2d8589bf-e9b9-d72f-2c9b-0629ad199b9b@rock-chips.com> (raw) In-Reply-To: <20191119082623.6165-10-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> On 2019/11/19 下午4:26, Jagan Teki wrote: > Setup dwc3_device structure for non-dm gadgets, which is used > in rk3399 platforms. > > dwc3_device would have basic regbase, dr_mode, high speed > and 16-bit UTMI+ etc. > > Cc: Marek Vasut <marex@denx.de> > Tested-by: Levin Du <djw@t-chip.com.cn> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Thanks, - Kever > --- > arch/arm/mach-rockchip/board.c | 32 ++++++++++++++++++++++++++++++-- > 1 file changed, 30 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c > index c90eb976d0..542823b8cd 100644 > --- a/arch/arm/mach-rockchip/board.c > +++ b/arch/arm/mach-rockchip/board.c > @@ -49,8 +49,10 @@ void enable_caches(void) > } > #endif > > -#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG) > +#if defined(CONFIG_USB_GADGET) > #include <usb.h> > + > +#if defined(CONFIG_USB_GADGET_DWC2_OTG) > #include <usb/dwc2_udc.h> > > static struct dwc2_plat_otg_data otg_data = { > @@ -117,7 +119,33 @@ int board_usb_cleanup(int index, enum usb_init_type init) > { > return 0; > } > -#endif > +#endif /* CONFIG_USB_GADGET_DWC2_OTG */ > + > +#if defined(CONFIG_USB_DWC3) && !defined(CONFIG_DM_USB_GADGET) > +#include <dwc3-uboot.h> > + > +static struct dwc3_device dwc3_device_data = { > + .maximum_speed = USB_SPEED_HIGH, > + .base = 0xfe800000, > + .dr_mode = USB_DR_MODE_PERIPHERAL, > + .index = 0, > + .dis_u2_susphy_quirk = 1, > + .hsphy_mode = USBPHY_INTERFACE_MODE_UTMIW, > +}; > + > +int usb_gadget_handle_interrupts(void) > +{ > + dwc3_uboot_handle_interrupt(0); > + return 0; > +} > + > +int board_usb_init(int index, enum usb_init_type init) > +{ > + return dwc3_uboot_init(&dwc3_device_data); > +} > +#endif /* CONFIG_USB_DWC3 */ > + > +#endif /* CONFIG_USB_GADGET */ > > #if CONFIG_IS_ENABLED(FASTBOOT) > int fastboot_set_reboot_flag(void) _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip
WARNING: multiple messages have this Message-ID (diff)
From: Kever Yang <kever.yang@rock-chips.com> To: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 09/10] rockchip: Setup dwc3_device (for non-dm gadgets) Date: Sat, 23 Nov 2019 22:22:04 +0800 [thread overview] Message-ID: <2d8589bf-e9b9-d72f-2c9b-0629ad199b9b@rock-chips.com> (raw) In-Reply-To: <20191119082623.6165-10-jagan@amarulasolutions.com> On 2019/11/19 下午4:26, Jagan Teki wrote: > Setup dwc3_device structure for non-dm gadgets, which is used > in rk3399 platforms. > > dwc3_device would have basic regbase, dr_mode, high speed > and 16-bit UTMI+ etc. > > Cc: Marek Vasut <marex@denx.de> > Tested-by: Levin Du <djw@t-chip.com.cn> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Thanks, - Kever > --- > arch/arm/mach-rockchip/board.c | 32 ++++++++++++++++++++++++++++++-- > 1 file changed, 30 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c > index c90eb976d0..542823b8cd 100644 > --- a/arch/arm/mach-rockchip/board.c > +++ b/arch/arm/mach-rockchip/board.c > @@ -49,8 +49,10 @@ void enable_caches(void) > } > #endif > > -#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG) > +#if defined(CONFIG_USB_GADGET) > #include <usb.h> > + > +#if defined(CONFIG_USB_GADGET_DWC2_OTG) > #include <usb/dwc2_udc.h> > > static struct dwc2_plat_otg_data otg_data = { > @@ -117,7 +119,33 @@ int board_usb_cleanup(int index, enum usb_init_type init) > { > return 0; > } > -#endif > +#endif /* CONFIG_USB_GADGET_DWC2_OTG */ > + > +#if defined(CONFIG_USB_DWC3) && !defined(CONFIG_DM_USB_GADGET) > +#include <dwc3-uboot.h> > + > +static struct dwc3_device dwc3_device_data = { > + .maximum_speed = USB_SPEED_HIGH, > + .base = 0xfe800000, > + .dr_mode = USB_DR_MODE_PERIPHERAL, > + .index = 0, > + .dis_u2_susphy_quirk = 1, > + .hsphy_mode = USBPHY_INTERFACE_MODE_UTMIW, > +}; > + > +int usb_gadget_handle_interrupts(void) > +{ > + dwc3_uboot_handle_interrupt(0); > + return 0; > +} > + > +int board_usb_init(int index, enum usb_init_type init) > +{ > + return dwc3_uboot_init(&dwc3_device_data); > +} > +#endif /* CONFIG_USB_DWC3 */ > + > +#endif /* CONFIG_USB_GADGET */ > > #if CONFIG_IS_ENABLED(FASTBOOT) > int fastboot_set_reboot_flag(void)
next prev parent reply other threads:[~2019-11-23 14:22 UTC|newest] Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-11-19 8:26 [PATCH v2 00/10] rockchip: rk3399: Add fastboot support Jagan Teki 2019-11-19 8:26 ` [U-Boot] " Jagan Teki [not found] ` <20191119082623.6165-1-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-11-19 8:26 ` [PATCH v2 01/10] gadget: Select USB_GADGET_MANUFACTURER for rockchip Jagan Teki 2019-11-19 8:26 ` [U-Boot] " Jagan Teki 2019-11-23 14:20 ` Kever Yang 2019-11-23 14:20 ` [U-Boot] " Kever Yang 2019-11-19 8:26 ` [PATCH v2 02/10] gadget: Select USB_GADGET_VENDOR_NUM " Jagan Teki 2019-11-19 8:26 ` [U-Boot] " Jagan Teki [not found] ` <20191119082623.6165-3-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-11-23 14:20 ` Kever Yang 2019-11-23 14:20 ` [U-Boot] " Kever Yang 2019-11-19 8:26 ` [PATCH v2 03/10] gadget: rockchip: USB_GADGET_PRODUCT_NUM Jagan Teki 2019-11-19 8:26 ` [U-Boot] " Jagan Teki [not found] ` <20191119082623.6165-4-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-11-23 14:20 ` Kever Yang 2019-11-23 14:20 ` [U-Boot] " Kever Yang 2019-11-19 8:26 ` [PATCH v2 04/10] gadget: rockchip: Add rk3128 USB_GADGET_PRODUCT_NUM Jagan Teki 2019-11-19 8:26 ` [U-Boot] " Jagan Teki [not found] ` <20191119082623.6165-5-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-11-23 14:21 ` Kever Yang 2019-11-23 14:21 ` [U-Boot] " Kever Yang 2019-11-19 8:26 ` [PATCH v2 05/10] fastboot: rockchip: Select FASTBOOT_FLASH[_MMC_DEV] Jagan Teki 2019-11-19 8:26 ` [U-Boot] " Jagan Teki [not found] ` <20191119082623.6165-6-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-11-23 14:21 ` Kever Yang 2019-11-23 14:21 ` [U-Boot] " Kever Yang 2019-11-19 8:26 ` [PATCH v2 06/10] fastboot: rockchip: Fix rk3328 default mmc device Jagan Teki 2019-11-19 8:26 ` [U-Boot] " Jagan Teki [not found] ` <20191119082623.6165-7-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-11-23 14:21 ` Kever Yang 2019-11-23 14:21 ` [U-Boot] " Kever Yang 2019-11-19 8:26 ` [PATCH v2 07/10] usb: dwc3: Add phy interface for dwc3_uboot Jagan Teki 2019-11-19 8:26 ` [U-Boot] " Jagan Teki 2019-11-19 11:13 ` Marek Vasut 2019-11-19 11:13 ` [U-Boot] " Marek Vasut [not found] ` <20191119082623.6165-8-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-11-23 14:21 ` Kever Yang 2019-11-23 14:21 ` [U-Boot] " Kever Yang 2019-11-19 8:26 ` [PATCH v2 08/10] gadget: rockchip: Add rk3399 USB_GADGET_PRODUCT_NUM Jagan Teki 2019-11-19 8:26 ` [U-Boot] " Jagan Teki [not found] ` <20191119082623.6165-9-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-11-23 14:21 ` Kever Yang 2019-11-23 14:21 ` [U-Boot] " Kever Yang 2019-11-19 8:26 ` [PATCH v2 09/10] rockchip: Setup dwc3_device (for non-dm gadgets) Jagan Teki 2019-11-19 8:26 ` [U-Boot] " Jagan Teki [not found] ` <20191119082623.6165-10-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-11-23 14:22 ` Kever Yang [this message] 2019-11-23 14:22 ` Kever Yang 2019-11-23 15:37 ` Kever Yang 2019-11-23 15:37 ` [U-Boot] " Kever Yang 2019-11-19 8:26 ` [PATCH v2 10/10] rock960: Enable USB Gadget Jagan Teki 2019-11-19 8:26 ` [U-Boot] " Jagan Teki [not found] ` <20191119082623.6165-11-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-11-23 14:22 ` Kever Yang 2019-11-23 14:22 ` [U-Boot] " Kever Yang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=2d8589bf-e9b9-d72f-2c9b-0629ad199b9b@rock-chips.com \ --to=kever.yang-tnx95d0mmh7dzftrwevzcw@public.gmane.org \ --cc=djw-Efosm3t9Qi2Pt1CcHtbs0g@public.gmane.org \ --cc=jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org \ --cc=linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org \ --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=marex-ynQEQJNshbs@public.gmane.org \ --cc=philipp.tomsich-SN7IsUiht6C/RdPyistoZJqQE7yCjDx5@public.gmane.org \ --cc=sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \ --cc=u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.