All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] rockchip: rk3288: update the mmc number for fastboot
@ 2017-07-27 11:47 Kever Yang
  2017-07-27 12:16 ` Dr. Philipp Tomsich
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Kever Yang @ 2017-07-27 11:47 UTC (permalink / raw)
  To: u-boot

The emmc number is 0, correct it for fastboot parameter.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 include/configs/rk3288_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index 488d679..4489323 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -66,7 +66,7 @@
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_USB_FUNCTION_FASTBOOT
 #define CONFIG_FASTBOOT_FLASH
-#define CONFIG_FASTBOOT_FLASH_MMC_DEV	1	/* eMMC */
+#define CONFIG_FASTBOOT_FLASH_MMC_DEV	0	/* eMMC */
 #define CONFIG_FASTBOOT_BUF_ADDR	CONFIG_SYS_LOAD_ADDR
 #define CONFIG_FASTBOOT_BUF_SIZE	0x08000000
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] rockchip: rk3288: update the mmc number for fastboot
  2017-07-27 11:47 [U-Boot] [PATCH] rockchip: rk3288: update the mmc number for fastboot Kever Yang
@ 2017-07-27 12:16 ` Dr. Philipp Tomsich
  2017-07-27 13:04   ` Kever Yang
  2017-08-04 22:43 ` [U-Boot] " Philipp Tomsich
  2017-09-05  9:19 ` Philipp Tomsich
  2 siblings, 1 reply; 9+ messages in thread
From: Dr. Philipp Tomsich @ 2017-07-27 12:16 UTC (permalink / raw)
  To: u-boot

Kever,

> On 27 Jul 2017, at 13:47, Kever Yang <kever.yang@rock-chips.com> wrote:
> 
> The emmc number is 0, correct it for fastboot parameter.

I provided some code in rk3399-board-spl.c (commit d02d11f8; see
spl_node_to_boot_device(…) and how 'desc->devnum’ is accessed there)
to map from a of_node back to a device-number.

Could you do something similar for the fastboot case, so we can have a DTS
property (e.g. under /config or /chosen) to map back to the devnum on a
per-board basis?

> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
> include/configs/rk3288_common.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
> index 488d679..4489323 100644
> --- a/include/configs/rk3288_common.h
> +++ b/include/configs/rk3288_common.h
> @@ -66,7 +66,7 @@
> #define CONFIG_CMD_FASTBOOT
> #define CONFIG_USB_FUNCTION_FASTBOOT
> #define CONFIG_FASTBOOT_FLASH
> -#define CONFIG_FASTBOOT_FLASH_MMC_DEV	1	/* eMMC */
> +#define CONFIG_FASTBOOT_FLASH_MMC_DEV	0	/* eMMC */
> #define CONFIG_FASTBOOT_BUF_ADDR	CONFIG_SYS_LOAD_ADDR
> #define CONFIG_FASTBOOT_BUF_SIZE	0x08000000
> 
> -- 
> 1.9.1
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] rockchip: rk3288: update the mmc number for fastboot
  2017-07-27 12:16 ` Dr. Philipp Tomsich
@ 2017-07-27 13:04   ` Kever Yang
  2017-07-27 13:09     ` Dr. Philipp Tomsich
  0 siblings, 1 reply; 9+ messages in thread
From: Kever Yang @ 2017-07-27 13:04 UTC (permalink / raw)
  To: u-boot

Philipp,


On 07/27/2017 08:16 PM, Dr. Philipp Tomsich wrote:
> Kever,
>
>> On 27 Jul 2017, at 13:47, Kever Yang <kever.yang@rock-chips.com> wrote:
>>
>> The emmc number is 0, correct it for fastboot parameter.
> I provided some code in rk3399-board-spl.c (commit d02d11f8; see
> spl_node_to_boot_device(…) and how 'desc->devnum’ is accessed there)
> to map from a of_node back to a device-number.
>
> Could you do something similar for the fastboot case, so we can have a DTS
> property (e.g. under /config or /chosen) to map back to the devnum on a
> per-board basis?

I'm not sure if there two are similar the same case, for boot device, we
want to support more then one devices in an order, but for fastboot,
we usually do not support device other than eMMC.

Thanks,
- Kever
>
>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>> ---
>>
>> include/configs/rk3288_common.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
>> index 488d679..4489323 100644
>> --- a/include/configs/rk3288_common.h
>> +++ b/include/configs/rk3288_common.h
>> @@ -66,7 +66,7 @@
>> #define CONFIG_CMD_FASTBOOT
>> #define CONFIG_USB_FUNCTION_FASTBOOT
>> #define CONFIG_FASTBOOT_FLASH
>> -#define CONFIG_FASTBOOT_FLASH_MMC_DEV	1	/* eMMC */
>> +#define CONFIG_FASTBOOT_FLASH_MMC_DEV	0	/* eMMC */
>> #define CONFIG_FASTBOOT_BUF_ADDR	CONFIG_SYS_LOAD_ADDR
>> #define CONFIG_FASTBOOT_BUF_SIZE	0x08000000
>>
>> -- 
>> 1.9.1
>>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] rockchip: rk3288: update the mmc number for fastboot
  2017-07-27 13:04   ` Kever Yang
@ 2017-07-27 13:09     ` Dr. Philipp Tomsich
  2017-08-17  7:51       ` Kever Yang
  0 siblings, 1 reply; 9+ messages in thread
From: Dr. Philipp Tomsich @ 2017-07-27 13:09 UTC (permalink / raw)
  To: u-boot

> On 27 Jul 2017, at 15:04, Kever Yang <kever.yang@rock-chips.com> wrote:
> 
> Philipp,
> 
> 
> On 07/27/2017 08:16 PM, Dr. Philipp Tomsich wrote:
>> Kever,
>> 
>>> On 27 Jul 2017, at 13:47, Kever Yang <kever.yang@rock-chips.com> wrote:
>>> 
>>> The emmc number is 0, correct it for fastboot parameter.
>> I provided some code in rk3399-board-spl.c (commit d02d11f8; see
>> spl_node_to_boot_device(…) and how 'desc->devnum’ is accessed there)
>> to map from a of_node back to a device-number.
>> 
>> Could you do something similar for the fastboot case, so we can have a DTS
>> property (e.g. under /config or /chosen) to map back to the devnum on a
>> per-board basis?
> 
> I'm not sure if there two are similar the same case, for boot device, we
> want to support more then one devices in an order, but for fastboot,
> we usually do not support device other than eMMC.

Sorry for being a bit unspecific (but had hoped that the reference to the function
resolving a single of_node back to a devnum would have clarified what I intended
to say)…

I didn’t mean for you to use an ordered list, but rather a single referenced node.
E.g.
	u-boot,fastboot-flash-device = <&sdmmc>;

> 
> Thanks,
> - Kever
>> 
>>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>>> ---
>>> 
>>> include/configs/rk3288_common.h | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>> 
>>> diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
>>> index 488d679..4489323 100644
>>> --- a/include/configs/rk3288_common.h
>>> +++ b/include/configs/rk3288_common.h
>>> @@ -66,7 +66,7 @@
>>> #define CONFIG_CMD_FASTBOOT
>>> #define CONFIG_USB_FUNCTION_FASTBOOT
>>> #define CONFIG_FASTBOOT_FLASH
>>> -#define CONFIG_FASTBOOT_FLASH_MMC_DEV	1	/* eMMC */
>>> +#define CONFIG_FASTBOOT_FLASH_MMC_DEV	0	/* eMMC */
>>> #define CONFIG_FASTBOOT_BUF_ADDR	CONFIG_SYS_LOAD_ADDR
>>> #define CONFIG_FASTBOOT_BUF_SIZE	0x08000000
>>> 
>>> -- 
>>> 1.9.1
>>> 
>> 
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] rockchip: rk3288: update the mmc number for fastboot
  2017-07-27 11:47 [U-Boot] [PATCH] rockchip: rk3288: update the mmc number for fastboot Kever Yang
  2017-07-27 12:16 ` Dr. Philipp Tomsich
@ 2017-08-04 22:43 ` Philipp Tomsich
  2017-09-05  9:19 ` Philipp Tomsich
  2 siblings, 0 replies; 9+ messages in thread
From: Philipp Tomsich @ 2017-08-04 22:43 UTC (permalink / raw)
  To: u-boot

> The emmc number is 0, correct it for fastboot parameter.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
>  include/configs/rk3288_common.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] rockchip: rk3288: update the mmc number for fastboot
  2017-07-27 13:09     ` Dr. Philipp Tomsich
@ 2017-08-17  7:51       ` Kever Yang
  2017-08-17  8:27         ` Dr. Philipp Tomsich
  0 siblings, 1 reply; 9+ messages in thread
From: Kever Yang @ 2017-08-17  7:51 UTC (permalink / raw)
  To: u-boot

Hi Philipp,


On 07/27/2017 09:09 PM, Dr. Philipp Tomsich wrote:
>> On 27 Jul 2017, at 15:04, Kever Yang <kever.yang@rock-chips.com> wrote:
>>
>> Philipp,
>>
>>
>> On 07/27/2017 08:16 PM, Dr. Philipp Tomsich wrote:
>>> Kever,
>>>
>>>> On 27 Jul 2017, at 13:47, Kever Yang <kever.yang@rock-chips.com> wrote:
>>>>
>>>> The emmc number is 0, correct it for fastboot parameter.
>>> I provided some code in rk3399-board-spl.c (commit d02d11f8; see
>>> spl_node_to_boot_device(…) and how 'desc->devnum’ is accessed there)
>>> to map from a of_node back to a device-number.
>>>
>>> Could you do something similar for the fastboot case, so we can have a DTS
>>> property (e.g. under /config or /chosen) to map back to the devnum on a
>>> per-board basis?
>> I'm not sure if there two are similar the same case, for boot device, we
>> want to support more then one devices in an order, but for fastboot,
>> we usually do not support device other than eMMC.
> Sorry for being a bit unspecific (but had hoped that the reference to the function
> resolving a single of_node back to a devnum would have clarified what I intended
> to say)…
>
> I didn’t mean for you to use an ordered list, but rather a single referenced node.
> E.g.
> 	u-boot,fastboot-flash-device = <&sdmmc>;

I try to under stand what you want to do here, but again, I think this 
is different
with the boot order. The boot order have much choice, different 
sequence, so it's
reasonable for what you have done. But the FLASH_MMC_DEV is only one number,
not a list, not a node, just like CONFIG_SYS_MMC_ENV_DEV, it's quite 
easy to do it,
we do not need to write it in dts and decode the dts, what we need is 
give the correct
number to fastboot driver, and that's all.

Thanks,
- Kever
>> Thanks,
>> - Kever
>>>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>>>> ---
>>>>
>>>> include/configs/rk3288_common.h | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
>>>> index 488d679..4489323 100644
>>>> --- a/include/configs/rk3288_common.h
>>>> +++ b/include/configs/rk3288_common.h
>>>> @@ -66,7 +66,7 @@
>>>> #define CONFIG_CMD_FASTBOOT
>>>> #define CONFIG_USB_FUNCTION_FASTBOOT
>>>> #define CONFIG_FASTBOOT_FLASH
>>>> -#define CONFIG_FASTBOOT_FLASH_MMC_DEV	1	/* eMMC */
>>>> +#define CONFIG_FASTBOOT_FLASH_MMC_DEV	0	/* eMMC */
>>>> #define CONFIG_FASTBOOT_BUF_ADDR	CONFIG_SYS_LOAD_ADDR
>>>> #define CONFIG_FASTBOOT_BUF_SIZE	0x08000000
>>>>
>>>> -- 
>>>> 1.9.1
>>>>
>>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] rockchip: rk3288: update the mmc number for fastboot
  2017-08-17  7:51       ` Kever Yang
@ 2017-08-17  8:27         ` Dr. Philipp Tomsich
  2017-08-21  5:05           ` Kever Yang
  0 siblings, 1 reply; 9+ messages in thread
From: Dr. Philipp Tomsich @ 2017-08-17  8:27 UTC (permalink / raw)
  To: u-boot


> On 17 Aug 2017, at 09:51, Kever Yang <kever.yang@rock-chips.com> wrote:
> 
> Hi Philipp,
> 
> 
> On 07/27/2017 09:09 PM, Dr. Philipp Tomsich wrote:
>>> On 27 Jul 2017, at 15:04, Kever Yang <kever.yang@rock-chips.com> wrote:
>>> 
>>> Philipp,
>>> 
>>> 
>>> On 07/27/2017 08:16 PM, Dr. Philipp Tomsich wrote:
>>>> Kever,
>>>> 
>>>>> On 27 Jul 2017, at 13:47, Kever Yang <kever.yang@rock-chips.com> wrote:
>>>>> 
>>>>> The emmc number is 0, correct it for fastboot parameter.
>>>> I provided some code in rk3399-board-spl.c (commit d02d11f8; see
>>>> spl_node_to_boot_device(…) and how 'desc->devnum’ is accessed there)
>>>> to map from a of_node back to a device-number.
>>>> 
>>>> Could you do something similar for the fastboot case, so we can have a DTS
>>>> property (e.g. under /config or /chosen) to map back to the devnum on a
>>>> per-board basis?
>>> I'm not sure if there two are similar the same case, for boot device, we
>>> want to support more then one devices in an order, but for fastboot,
>>> we usually do not support device other than eMMC.
>> Sorry for being a bit unspecific (but had hoped that the reference to the function
>> resolving a single of_node back to a devnum would have clarified what I intended
>> to say)…
>> 
>> I didn’t mean for you to use an ordered list, but rather a single referenced node.
>> E.g.
>> 	u-boot,fastboot-flash-device = <&sdmmc>;
> 
> I try to under stand what you want to do here, but again, I think this is different
> with the boot order. The boot order have much choice, different sequence, so it's
> reasonable for what you have done. But the FLASH_MMC_DEV is only one number,
> not a list, not a node, just like CONFIG_SYS_MMC_ENV_DEV, it's quite easy to do it,
> we do not need to write it in dts and decode the dts, what we need is give the correct
> number to fastboot driver, and that's all.

While eMMC will be the default for most deployments, people may want to
use a different setting for their devices or during testing. In fact the way this
is used in the applications we see can be grouped along the following use
cases:
(a) production deployment
	(1) sometimes fixed to the internal storage (i.e. eMMC) 
	(2) sometimes fixed to external storage (e.g. a eMMC on the baseboard)
	(3) sometimes set to ‘same device the bootloader was loaded from'
(b) device development:
	(4) often fixed to a specific storage device (can bei either ‘internal’ or
		‘external’ storage)
	(5) sometimes set to ‘same devices as the bootloader'

In other words, there’s a lot of variability in what is right for a specific application
and device, but this should not require a new board-configuration in U-Boot (or
a U-Boot rebuild).

Regards,
Philipp.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH] rockchip: rk3288: update the mmc number for fastboot
  2017-08-17  8:27         ` Dr. Philipp Tomsich
@ 2017-08-21  5:05           ` Kever Yang
  0 siblings, 0 replies; 9+ messages in thread
From: Kever Yang @ 2017-08-21  5:05 UTC (permalink / raw)
  To: u-boot

Hi Philipp,


On 08/17/2017 04:27 PM, Dr. Philipp Tomsich wrote:
>> On 17 Aug 2017, at 09:51, Kever Yang <kever.yang@rock-chips.com> wrote:
>>
>> Hi Philipp,
>>
>>
>> On 07/27/2017 09:09 PM, Dr. Philipp Tomsich wrote:
>>>> On 27 Jul 2017, at 15:04, Kever Yang <kever.yang@rock-chips.com> wrote:
>>>>
>>>> Philipp,
>>>>
>>>>
>>>> On 07/27/2017 08:16 PM, Dr. Philipp Tomsich wrote:
>>>>> Kever,
>>>>>
>>>>>> On 27 Jul 2017, at 13:47, Kever Yang <kever.yang@rock-chips.com> wrote:
>>>>>>
>>>>>> The emmc number is 0, correct it for fastboot parameter.
>>>>> I provided some code in rk3399-board-spl.c (commit d02d11f8; see
>>>>> spl_node_to_boot_device(…) and how 'desc->devnum’ is accessed there)
>>>>> to map from a of_node back to a device-number.
>>>>>
>>>>> Could you do something similar for the fastboot case, so we can have a DTS
>>>>> property (e.g. under /config or /chosen) to map back to the devnum on a
>>>>> per-board basis?
>>>> I'm not sure if there two are similar the same case, for boot device, we
>>>> want to support more then one devices in an order, but for fastboot,
>>>> we usually do not support device other than eMMC.
>>> Sorry for being a bit unspecific (but had hoped that the reference to the function
>>> resolving a single of_node back to a devnum would have clarified what I intended
>>> to say)…
>>>
>>> I didn’t mean for you to use an ordered list, but rather a single referenced node.
>>> E.g.
>>> 	u-boot,fastboot-flash-device = <&sdmmc>;
>> I try to under stand what you want to do here, but again, I think this is different
>> with the boot order. The boot order have much choice, different sequence, so it's
>> reasonable for what you have done. But the FLASH_MMC_DEV is only one number,
>> not a list, not a node, just like CONFIG_SYS_MMC_ENV_DEV, it's quite easy to do it,
>> we do not need to write it in dts and decode the dts, what we need is give the correct
>> number to fastboot driver, and that's all.
> While eMMC will be the default for most deployments, people may want to
> use a different setting for their devices or during testing. In fact the way this
> is used in the applications we see can be grouped along the following use
> cases:
> (a) production deployment
> 	(1) sometimes fixed to the internal storage (i.e. eMMC)
> 	(2) sometimes fixed to external storage (e.g. a eMMC on the baseboard)
> 	(3) sometimes set to ‘same device the bootloader was loaded from'
> (b) device development:
> 	(4) often fixed to a specific storage device (can bei either ‘internal’ or
> 		‘external’ storage)
> 	(5) sometimes set to ‘same devices as the bootloader'
>
> In other words, there’s a lot of variability in what is right for a specific application
> and device, but this should not require a new board-configuration in U-Boot (or
> a U-Boot rebuild).

Make the fastboot dev number select into dts instead of MACRO in header 
file can not
resolve the issue without bootloader update, but need to update fastboot 
cmd driver,
like the ums driver works good for the issue with the correct parameter:
'ums 0 mmc 0' vs 'fastboot usb0'

Thanks,
- Kever
>
> Regards,
> Philipp.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] rockchip: rk3288: update the mmc number for fastboot
  2017-07-27 11:47 [U-Boot] [PATCH] rockchip: rk3288: update the mmc number for fastboot Kever Yang
  2017-07-27 12:16 ` Dr. Philipp Tomsich
  2017-08-04 22:43 ` [U-Boot] " Philipp Tomsich
@ 2017-09-05  9:19 ` Philipp Tomsich
  2 siblings, 0 replies; 9+ messages in thread
From: Philipp Tomsich @ 2017-09-05  9:19 UTC (permalink / raw)
  To: u-boot

Kever,

On Thu, 27 Jul 2017, Kever Yang wrote:

> The emmc number is 0, correct it for fastboot parameter.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
>
> include/configs/rk3288_common.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
> index 488d679..4489323 100644
> --- a/include/configs/rk3288_common.h
> +++ b/include/configs/rk3288_common.h
> @@ -66,7 +66,7 @@
> #define CONFIG_CMD_FASTBOOT
> #define CONFIG_USB_FUNCTION_FASTBOOT
> #define CONFIG_FASTBOOT_FLASH
> -#define CONFIG_FASTBOOT_FLASH_MMC_DEV	1	/* eMMC */
> +#define CONFIG_FASTBOOT_FLASH_MMC_DEV	0	/* eMMC */

FASTBOOT_FLASH_MMC_DEV has been moved to Kconfig.
It looks like the setting in the various _defconfig files is correct.

If the default for all RK3288 boards should be changed, we shouldn't have 
this in each _defconfig, but rather override the default-value on the 
Kconfig file for the RK3288.

Let me know how you want to proceed with this patch.

> #define CONFIG_FASTBOOT_BUF_ADDR	CONFIG_SYS_LOAD_ADDR
> #define CONFIG_FASTBOOT_BUF_SIZE	0x08000000
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-09-05  9:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-27 11:47 [U-Boot] [PATCH] rockchip: rk3288: update the mmc number for fastboot Kever Yang
2017-07-27 12:16 ` Dr. Philipp Tomsich
2017-07-27 13:04   ` Kever Yang
2017-07-27 13:09     ` Dr. Philipp Tomsich
2017-08-17  7:51       ` Kever Yang
2017-08-17  8:27         ` Dr. Philipp Tomsich
2017-08-21  5:05           ` Kever Yang
2017-08-04 22:43 ` [U-Boot] " Philipp Tomsich
2017-09-05  9:19 ` Philipp Tomsich

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.