[PATCH] ARM: stm32: Increase USB power-good delay on DHSOM
Patrick DELAUNAY
patrick.delaunay at foss.st.com
Mon Nov 15 12:18:46 CET 2021
Hi Marek,
On 11/13/21 3:24 AM, Marek Vasut wrote:
> The USB hub on STM32MP1 DHCOM boards needs to wait a bit longer until
> the USB Vbus is stable. Increase the USB power-good delay to 1 s.
>
> This adds default-undefined STM32MP_BOARD_EXTRA_ENV variable into
> stm32mp15_common.h to reduce duplication in board-specific config
> files adding custom environment.
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Patrice Chotard <patrice.chotard at foss.st.com>
> Cc: Patrick Delaunay <patrick.delaunay at foss.st.com>
> ---
> include/configs/stm32mp15_common.h | 3 ++-
> include/configs/stm32mp15_dh_dhsom.h | 3 +++
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/include/configs/stm32mp15_common.h b/include/configs/stm32mp15_common.h
> index 4e2cabff2e7..be22d3ea7f1 100644
> --- a/include/configs/stm32mp15_common.h
> +++ b/include/configs/stm32mp15_common.h
> @@ -169,7 +169,8 @@
> STM32MP_BOOTCMD \
> STM32MP_PARTS_DEFAULT \
> BOOTENV \
> - STM32MP_EXTRA
> + STM32MP_EXTRA \
> + STM32MP_BOARD_EXTRA_ENV
I think you that patch failed for the board which include
"stm32mp15_common.h" only
STM32MP_BOARD_EXTRA_ENV is not define
=> board/engicam/stm32mp1/Kconfig:10: default "stm32mp15_common"
at minimal, you need to add:
#ifndef STM32MP_BOARD_EXTRA_ENV
#defineSTM32MP_BOARD_EXTRA_ENV
#endif
But for my point of view CONFIG_EXTRA_ENV_SETTINGS is already a
"default" value
=> it can be override in board (after #undef)
or the overidde should be also managed by STM32MP_EXTRA, if we add in
the common file:
#ifndef STM32MP_EXTRA
#defineSTM32MP_EXTRA \
"altbootcmd=run bootcmd\0"\
"env_check=if env info -p -d -q; then env save; fi\0"\
"boot_net_usb_start=true\0"
#endif
> #endif /* ifndef CONFIG_SPL_BUILD */
> #endif /* ifdef CONFIG_DISTRO_DEFAULTS*/
> diff --git a/include/configs/stm32mp15_dh_dhsom.h b/include/configs/stm32mp15_dh_dhsom.h
> index c559cd72da7..bac9e8388a7 100644
> --- a/include/configs/stm32mp15_dh_dhsom.h
> +++ b/include/configs/stm32mp15_dh_dhsom.h
> @@ -8,6 +8,9 @@
> #ifndef __CONFIG_STM32MP15_DH_DHSOM_H__
> #define __CONFIG_STM32MP15_DH_DHSOM_H__
>
> +#define STM32MP_BOARD_EXTRA_ENV \
> + "usb_pgood_delay=1000\0"
> +
> #include <configs/stm32mp15_common.h>
proposal 1: overiddeCONFIG_EXTRA_ENV_SETTINGS as it is done in stm32mp15_st_common.h
#include <configs/stm32mp15_common.h>
#define STM32MP_DH_EXTRA_ENV \
"usb_pgood_delay=1000\0"
#undefCONFIG_EXTRA_ENV_SETTINGS
#defineCONFIG_EXTRA_ENV_SETTINGS \
STM32MP_MEM_LAYOUT \
ST_STM32MP1_BOOTCMD \
STM32MP_PARTS_DEFAULT \
BOOTENV \
STM32MP_EXTRA \
STM32MP_DH_EXTRA_ENV
or
#include <configs/stm32mp15_common.h>
#undefCONFIG_EXTRA_ENV_SETTINGS
#defineCONFIG_EXTRA_ENV_SETTINGS \
STM32MP_MEM_LAYOUT \
ST_STM32MP1_BOOTCMD \
STM32MP_PARTS_DEFAULT \
BOOTENV \
STM32MP_EXTRA \
"usb_pgood_delay=1000\0"
proposal 2: you can overrideSTM32MP_EXTRA
#defineSTM32MP_EXTRA \
"altbootcmd=run bootcmd\0"\
"env_check=if env info -p -d -q; then env save; fi\0"\
"boot_net_usb_start=true\0" \
"usb_pgood_delay=1000\0"
#include <configs/stm32mp15_common.h>
open point : do you really need "altbootcmd" ? "boot_net_usb_start"
?"env_check" ?
I moved them in EXTRA define to be override by board because I think
they are not always necessary.
>
> #define CONFIG_SPL_TARGET "u-boot.itb"
Patrick
More information about the U-Boot
mailing list