All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eddie Cai <eddie.cai.linux@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot 3/3] rockchip: rk3288: enable rockusb support on rk3288 based device
Date: Fri, 5 May 2017 09:15:38 +0800	[thread overview]
Message-ID: <CAJrj+DPhEk-VF+KUT-Ma4cc240EjoiDaJL7mZ6qgMPBZYzfKjg@mail.gmail.com> (raw)
In-Reply-To: <CAPnjgZ2FJ7X+BkQ+WhhmfceZBeN5-z2zFbsaw5f8C0NmsVd6OA@mail.gmail.com>

2017-05-05 0:49 GMT+08:00 Simon Glass <sjg@chromium.org>:
> Hi,
>
> On 4 May 2017 at 03:19, Lukasz Majewski <lukma@denx.de> wrote:
>> Hi Eddie, Simon,
>>
>>> Hi Simon
>>>
>>> 2017-05-03 18:09 GMT+08:00 Simon Glass <sjg@chromium.org>:
>>> > Hi Eddie,
>>> >
>>> > On 2 May 2017 at 04:37, Eddie Cai <eddie.cai.linux@gmail.com> wrote:
>>> >> Hi Simon
>>> >> 2017-03-20 10:30 GMT+08:00 Simon Glass <sjg@chromium.org>:
>>> >>> Hi Eddie.
>>> >>>
>>> >>> On 15 March 2017 at 01:56, Eddie Cai <eddie.cai.linux@gmail.com>
>>> >>> wrote:
>>> >>>> this patch enable rockusb support on rk3288 based device.
>>> >>>>
>>> >>>> Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
>>> >>>> ---
>>> >>>>  include/configs/rk3288_common.h | 4 ++++
>>> >>>>  1 file changed, 4 insertions(+)
>>> >>>
>>> >>> I think this should be done in Kconfig.
>>> >> since rockusb used so widely on rockchip soc based devices. every
>>> >> rockchip soc based
>>> >> device should support it. So I would like to put it in
>>> >> rk3288_common.h or even rockchip-common.h.
>>> >> what do you think?
>>> >
>>> > We are moving to removing the board config headers so cannot add new
>>> > non-Kconfig CONFIG options.
>>> >
>>> > You can add it to arch/arm/Kconfig - e.g. with 'imply CONFIG_....'
>>> > under 'config ARCH_ROCKCHIP'.
>>> USB_FUNCTION_ROCKUSB depend on USB_GADGET, USB_GADGET_DOWNLOAD,
>>> CONFIG_G_DNL_VENDOR_NUM, CONFIG_G_DNL_PRODUCT_NUM
>>> should i move those config to arch/arm/Kconfig? how to define
>>> CONFIG_G_DNL_VENDOR_NUM
>>> and CONFIG_G_DNL_PRODUCT_NUM when select it?
>>
>> I would prefer to keep those CONFIG options as they are now (and are in
>> sync with other gadgets).
>
> These two are new though right?
>
> CONFIG_CMD_ROCKUSB
> CONFIG_USB_FUNCTION_ROCKUSB
>
> So they should be added to Kconfig. If they 'depend' on non-Kconfig
> options, that's fine IMO. We can't express that until the other
> options are converted.
>
> Let's convert them soon!
Does it means i can keep it in rk3288_common.h?
>
>>
>> The problem here is that the gadget infrastructure is a bit
>> "problematic" from the device model point of view.
>>
>> It has his own "structure" borrowed from Linux kernel.
>>
>> I've poked around and it seems like adding it to DM requires calling
>> "g_dnl_register()" with embedded name of the gadget (like
>> "usb_dnl_dfu").
>>
>> And such call is required for each different gadget (like mass storage,
>> dfu, fastboot).
>>
>> Or maybe we should add "stub" DM support to only indicate supported
>> gadgets (like dfu, ums, etc) and leave as much code untouched as
>> possible?
>
> I'm sure this can be resolved in some way. I admit I have not looked
> at it but was thinking of attacking usb_tty sometime, so perhaps might
> see if I can figure it out.
>
>>
>>> >
>>> > Please help to remove any options you can from the headers.
>>> >
>>> >>>
>>> >>>>
>>> >>>> diff --git a/include/configs/rk3288_common.h
>>> >>>> b/include/configs/rk3288_common.h index b5606d4..b19a34d 100644
>>> >>>> --- a/include/configs/rk3288_common.h
>>> >>>> +++ b/include/configs/rk3288_common.h
>>> >>>> @@ -74,6 +74,10 @@
>>> >>>>  #define CONFIG_FASTBOOT_BUF_ADDR       CONFIG_SYS_LOAD_ADDR
>>> >>>>  #define CONFIG_FASTBOOT_BUF_SIZE       0x08000000
>>> >>>>
>>> >>>> +/* rockusb  */
>>> >>>> +#define CONFIG_CMD_ROCKUSB
>>> >>>> +#define CONFIG_USB_FUNCTION_ROCKUSB
>>> >>>> +
>>> >>>>  /* usb mass storage */
>>> >>>>  #define CONFIG_USB_FUNCTION_MASS_STORAGE
>>> >>>>  #define CONFIG_CMD_USB_MASS_STORAGE
>>> >>>> --
>>> >>>> 2.7.4
>>> >
>>> > Regards,
>>> > Simon
>
> Regards,
> Simon

  reply	other threads:[~2017-05-05  1:15 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15  7:56 [U-Boot] [U-Boot 0/3] introduce Rockchip rockusb Eddie Cai
2017-03-15  7:56 ` [U-Boot] [U-Boot 1/3] drivers: usb: gadget: add the rockusb gadget Eddie Cai
2017-03-16  7:05   ` Kever Yang
2017-03-20  7:24     ` Eddie Cai
2017-03-20  8:37       ` Lukasz Majewski
2017-04-20  0:56         ` Eddie Cai
2017-04-20 10:04   ` Lukasz Majewski
2017-03-15  7:56 ` [U-Boot] [U-Boot 2/3] cmd: add rockusb command Eddie Cai
2017-03-20  2:29   ` Simon Glass
2017-03-20  8:14     ` Eddie Cai
2017-03-22 13:05       ` Simon Glass
2017-04-20 10:11   ` Lukasz Majewski
2017-03-15  7:56 ` [U-Boot] [U-Boot 3/3] rockchip: rk3288: enable rockusb support on rk3288 based device Eddie Cai
2017-03-20  2:30   ` Simon Glass
2017-03-20  8:16     ` Eddie Cai
2017-05-02 10:37     ` Eddie Cai
2017-05-03 10:09       ` Simon Glass
2017-05-04  7:17         ` Eddie Cai
2017-05-04  9:19           ` Lukasz Majewski
2017-05-04 16:49             ` Simon Glass
2017-05-05  1:15               ` Eddie Cai [this message]
2017-05-14  9:32                 ` Simon Glass
2017-05-14 21:49                   ` Lukasz Majewski
2017-04-20 10:12   ` Lukasz Majewski
2017-03-15  9:06 ` [U-Boot] [U-Boot 0/3] introduce Rockchip rockusb Lukasz Majewski
2017-03-15  9:31   ` Eddie Cai
2017-03-15  9:46     ` Lukasz Majewski
2017-03-16 21:26 ` Marek Vasut
2017-03-20  1:53   ` Eddie Cai
2017-03-20 12:24     ` Marek Vasut
2017-03-20 16:01       ` Simon Glass
2017-03-20 16:33         ` Marek Vasut
2017-03-21  5:17           ` Kever Yang
2017-03-21 14:27             ` Tom Rini
2017-03-27  8:27 ` Lukasz Majewski
2017-03-28  9:13   ` Eddie Cai

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=CAJrj+DPhEk-VF+KUT-Ma4cc240EjoiDaJL7mZ6qgMPBZYzfKjg@mail.gmail.com \
    --to=eddie.cai.linux@gmail.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 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.