All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ziyuan Xu <xzy.xu@rock-chips.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] rockchip: rk3288: add fastboot support
Date: Fri, 01 Jul 2016 14:22:42 +0800	[thread overview]
Message-ID: <57760C32.5040103@rock-chips.com> (raw)
In-Reply-To: <CAAGaQKBsdMg9gHgBCeYzeq_NExVs-=f4dOLd+uaydFuw7LXbjA@mail.gmail.com>

Hi Steve,

On 2016?07?01? 05:55, Steve Rae wrote:
> Hi Ziyuan,
>
> On Thu, Jun 30, 2016 at 8:23 AM, Simon Glass <sjg@chromium.org> wrote:
>> Hi Ziyuan,
>>
>> On 30 June 2016 at 00:22, Ziyuan Xu <xzy.xu@rock-chips.com> wrote:
>>> Enable fastboot feature on rk3288.
>>>
>>> This path doesn't support the fastboot flash function command entirely.
>>> We will hit "cannot find partition" assertion without specified
>>> partition environment. Define gpt partition layout in specified board
>>> such as firefly-rk3288, then enjoy it!
> s/path/patch/
> Are you trying to resolve this in this patch or in a subsequent patch?
> Thanks, Steve

By that I mean this path series support fastboot function on rk3288, so 
far, host only has the ability push image to device.
We need further configuration for partition so that the image could 
flash to the mmc device.
Each of 3288 boards(firefly-rk3288, rock2) has a different partition 
setting, that's why I add the GPT partition on rk3288_common.h,
and didn't add the partition setting to ENV. If someone would like to 
use fastboot function on rk3288 board(ie. firefly-rk3288), he shall
configure partition in firefly-rk3288.h. like:
#define PARTS_DEFAULT \
     "uuid_disk=${uuid_gpt_disk};" \
     "name=loader,start=32K,size=4000K,uuid=${uuid_gpt_loader};" \
     "name=reserved,size=64K,uuid=${uuid_gpt_reserved};" \
     "name=misc,size=4M,uuid=${uuid_gpt_misc};" \
     "name=recovery,size=32M,uuid=${uuid_gpt_recovery};" \
     "name=boot_a,size=32M,uuid=${uuid_gpt_boot_a};" \
     "name=boot_b,size=32M,uuid=${uuid_gpt_boot_b};" \
     "name=system_a,size=818M,uuid=${uuid_gpt_system_a};" \
     "name=system_b,size=818M,uuid=${uuid_gpt_system_b};" \
     "name=vendor_a,size=50M,uuid=${uuid_gpt_vendor_a};" \
     "name=vendor_b,size=50M,uuid=${uuid_gpt_vendor_b};" \
     "name=cache,size=100M,uuid=${uuid_gpt_cache};" \
     "name=metadata,size=16M,uuid=${uuid_gpt_metadata};" \
     "name=persist,size=4M,uuid=${uuid_gpt_persist};" \
     "name=userdata,size=-,uuid=${uuid_gpt_userdata};\0" \

#undef CONFIG_EXTRA_ENV_SETTINGS
#define CONFIG_EXTRA_ENV_SETTINGS \
     "partitions=" PARTS_DEFAULT \

In short, I don't think "cannot find partition" is an issue. Does it 
make sense to you?
>>> Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
>>> ---
>>>
>>>   arch/arm/mach-rockchip/board.c  | 20 ++++++++++++++++++++
>>>   include/configs/rk3288_common.h | 25 +++++++++++++++++++++++++
>>>   2 files changed, 45 insertions(+)
>>>
>>> diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
>>> index 816540e..9766ba0 100644
>>> --- a/arch/arm/mach-rockchip/board.c
>>> +++ b/arch/arm/mach-rockchip/board.c
>>> @@ -52,6 +52,26 @@ void lowlevel_init(void)
>>>   {
>>>   }
>>>
>>> +#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG)
>>> +#include <usb.h>
>>> +#include <usb/dwc2_udc.h>
>>> +
>>> +static struct dwc2_plat_otg_data rk3288_otg_data = {
>>> +       .regs_phy       = 0xff770000,
>>> +       .regs_otg       = 0xff580000,
>> Shouldn't these come from the device tree?
>>
>>> +};
>>> +
>>> +int board_usb_init(int index, enum usb_init_type init)
>>> +{
>>> +       return dwc2_udc_probe(&rk3288_otg_data);
>>> +}
>>> +
>>> +int board_usb_cleanup(int index, enum usb_init_type init)
>>> +{
>>> +       return 0;
>>> +}
>>> +#endif
>>> +
>>>   static int do_clock(cmd_tbl_t *cmdtp, int flag, int argc,
>>>                         char * const argv[])
>>>   {
>>> diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
>>> index 9d50d83..f8a6c98 100644
>>> --- a/include/configs/rk3288_common.h
>>> +++ b/include/configs/rk3288_common.h
>>> @@ -80,6 +80,31 @@
>>>   #define CONFIG_SPI
>>>   #define CONFIG_SF_DEFAULT_SPEED 20000000
>>>
>>> +/* usb otg */
>>> +#define CONFIG_USB_GADGET
>>> +#define CONFIG_USB_GADGET_DUALSPEED
>>> +#define CONFIG_USB_GADGET_DWC2_OTG
>>> +#define CONFIG_RK3288_USB_PHY
>>> +#define CONFIG_USB_GADGET_VBUS_DRAW    0
>>> +
>>> +/* fastboot  */
>>> +#define CONFIG_CMD_FASTBOOT
>>> +#define CONFIG_USB_FUNCTION_FASTBOOT
>>> +#define CONFIG_FASTBOOT_FLASH
>>> +#define CONFIG_FASTBOOT_FLASH_MMC_DEV  1       /* eMMC */
>>> +#define CONFIG_FASTBOOT_BUF_ADDR       (CONFIG_SYS_SDRAM_BASE \
>>> +                                       + SDRAM_BANK_SIZE)
>> Can you add a comment as to why the buffer is placed here?
>>
>>> +#define CONFIG_FASTBOOT_BUF_SIZE       0x08000000
>>> +
>>> +#define CONFIG_USB_GADGET_DOWNLOAD
>>> +#define CONFIG_G_DNL_MANUFACTURER      "Rockchip"
>>> +#define CONFIG_G_DNL_VENDOR_NUM                0x2207
>>> +#define CONFIG_G_DNL_PRODUCT_NUM       0x320a
>>> +
>>> +/* Enable gpt partition table */
>>> +#define CONFIG_CMD_GPT
>>> +#define CONFIG_EFI_PARTITION
>>> +
>>>   #ifndef CONFIG_SPL_BUILD
>>>   #include <config_distro_defaults.h>
>>>
>>> --
>>> 1.9.1
>>>
>>>
>> Regards,
>> Simon
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>
>

  reply	other threads:[~2016-07-01  6:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30  7:21 [U-Boot] [PATCH 0/4] rockchip: rk3288: add fastboot support Ziyuan Xu
2016-06-30  7:21 ` [U-Boot] [PATCH 1/4] usb: phy: implement usb-otg phy control for rk3288 Ziyuan Xu
2016-06-30 15:23   ` Simon Glass
2016-06-30  7:21 ` [U-Boot] [PATCH 2/4] usb: dwc2-otg: redefine fifo-size " Ziyuan Xu
2016-06-30 15:23   ` Simon Glass
2016-07-01  5:46     ` Ziyuan Xu
2016-07-01  6:00     ` Ziyuan Xu
2016-07-01 15:15       ` Simon Glass
2016-07-04  6:41         ` Ziyuan Xu
2016-06-30  7:22 ` [U-Boot] [PATCH 3/4] rockchip: rk3288: add fastboot support Ziyuan Xu
2016-06-30 15:23   ` Simon Glass
2016-06-30 21:55     ` Steve Rae
2016-07-01  6:22       ` Ziyuan Xu [this message]
2016-07-01  3:25     ` [U-Boot] [PATCH 3/4] rockchip: rk3288: add fastboot support[Involving remittance information, please pay attention to the safety of property] Ziyuan Xu
2016-06-30  7:22 ` [U-Boot] [PATCH 4/4] rockchip: firefly-rk3288: undef CONFIG_EFI_LOADER Ziyuan Xu
2016-06-30  8:34 ` [U-Boot] [PATCH 0/4] rockchip: rk3288: add fastboot support Alexander Graf

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=57760C32.5040103@rock-chips.com \
    --to=xzy.xu@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 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.