From: Kever Yang <kever.yang@rock-chips.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] board: evb-rk3399: add api to support dwc3 gadget
Date: Wed, 17 Aug 2016 14:11:08 +0800 [thread overview]
Message-ID: <57B3FFFC.8010503@rock-chips.com> (raw)
In-Reply-To: <1471341825-5000-3-git-send-email-kever.yang@rock-chips.com>
+ Simon,
On 08/16/2016 06:03 PM, Kever Yang wrote:
> This patch add board_usb_init() and interrupt callback
> for dwc3 gadget.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> board/rockchip/evb_rk3399/evb-rk3399.c | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c
> index d394276..cd61f59 100644
> --- a/board/rockchip/evb_rk3399/evb-rk3399.c
> +++ b/board/rockchip/evb_rk3399/evb-rk3399.c
> @@ -7,6 +7,8 @@
> #include <dm.h>
> #include <dm/pinctrl.h>
> #include <asm/arch/periph.h>
> +#include <usb.h>
> +#include <dwc3-uboot.h>
>
> DECLARE_GLOBAL_DATA_PTR;
>
> @@ -54,3 +56,23 @@ void dram_init_banksize(void)
> gd->bd->bi_dram[0].start = 0x200000;
> gd->bd->bi_dram[0].size = 0x80000000;
> }
> +
> +#ifdef CONFIG_USB_DWC3
> +static struct dwc3_device dwc3_device_data = {
> + .maximum_speed = USB_SPEED_HIGH,
> + .base = 0xfe800000,
> + .dr_mode = USB_DR_MODE_PERIPHERAL,
> + .index = 0,
> +};
> +
> +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
next prev parent reply other threads:[~2016-08-17 6:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 10:03 [U-Boot] [PATCH 0/4] rk3399: enable dwc3 gadget and fastboot Kever Yang
2016-08-16 10:03 ` [U-Boot] [PATCH 1/4] rk3399: add a empty "sys_proto.h" header file Kever Yang
2016-08-17 6:10 ` Kever Yang
2016-08-18 3:44 ` Simon Glass
2016-08-16 10:03 ` [U-Boot] [PATCH 2/4] board: evb-rk3399: add api to support dwc3 gadget Kever Yang
2016-08-17 6:11 ` Kever Yang [this message]
2016-08-18 3:44 ` Simon Glass
2016-08-16 10:03 ` [U-Boot] [PATCH 3/4] usb: dwc3: add support for 16 bit UTMI+ interface Kever Yang
2016-08-16 13:18 ` Marek Vasut
2016-08-17 1:31 ` Kever Yang
2016-08-17 1:39 ` Marek Vasut
2016-08-17 2:06 ` Kever Yang
2016-08-17 8:07 ` Marek Vasut
2016-08-18 9:04 ` Kever Yang
2016-08-18 23:23 ` Marek Vasut
2016-08-16 10:03 ` [U-Boot] [PATCH 4/4] config: rk3399: add support for dwc3 gadget Kever Yang
2016-08-17 4:16 ` Simon Glass
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=57B3FFFC.8010503@rock-chips.com \
--to=kever.yang@rock-chips.com \
--cc=u-boot@lists.denx.de \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox