diff mbox series

ARM: stm32: Set stdio to serial on DH STM32MP15xx DHSOM

Message ID 20240113175811.157221-1-marex@denx.de
State Accepted
Commit 82f5942e51b96ffdfd689ec8b4cbfab5c9b15f7d
Delegated to: Patrice Chotard
Headers show
Series ARM: stm32: Set stdio to serial on DH STM32MP15xx DHSOM | expand

Commit Message

Marek Vasut Jan. 13, 2024, 5:57 p.m. UTC
In case CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENV are enabled, the console
stdin, stdout, stderr must be defined in environment. Define the default
settings to fix the following warning on boot:

"
In:    No input devices available!
Out:   No output devices available!
Err:   No error devices available!
"

Sort the default environment as well.

Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: u-boot@dh-electronics.com
Cc: uboot-stm32@st-md-mailman.stormreply.com
---
 include/configs/stm32mp15_dh_dhsom.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Comments

Patrice CHOTARD Jan. 16, 2024, 7:19 a.m. UTC | #1
Hi Marek

On 1/13/24 18:57, Marek Vasut wrote:
> In case CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENV are enabled, the console
> stdin, stdout, stderr must be defined in environment. Define the default
> settings to fix the following warning on boot:
> 
> "
> In:    No input devices available!
> Out:   No output devices available!
> Err:   No error devices available!
> "
> 
> Sort the default environment as well.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Cc: u-boot@dh-electronics.com
> Cc: uboot-stm32@st-md-mailman.stormreply.com
> ---
>  include/configs/stm32mp15_dh_dhsom.h | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/include/configs/stm32mp15_dh_dhsom.h b/include/configs/stm32mp15_dh_dhsom.h
> index 8ff882264f4..de39b19219d 100644
> --- a/include/configs/stm32mp15_dh_dhsom.h
> +++ b/include/configs/stm32mp15_dh_dhsom.h
> @@ -12,14 +12,13 @@
>  #define PHY_ANEG_TIMEOUT		20000
>  
>  #ifdef CONFIG_SPL_BUILD
> -#define CFG_EXTRA_ENV_SETTINGS					\
> +#define CFG_EXTRA_ENV_SETTINGS						\
>  	"dfu_alt_info_ram=u-boot.itb ram "				\
>  			__stringify(CONFIG_SPL_LOAD_FIT_ADDRESS)	\
>  			" 0x800000\0"
>  #endif
>  
> -#define STM32MP_BOARD_EXTRA_ENV \
> -	"usb_pgood_delay=1000\0" \
> +#define STM32MP_BOARD_EXTRA_ENV						\
>  	"dh_update_sd_to_emmc=" /* Install U-Boot from SD to eMMC */	\
>  		"setexpr loadaddr1 ${loadaddr} + 0x1000000 && "		\
>  		"load mmc 0:4 ${loadaddr1} boot/u-boot-spl.stm32 && "	\
> @@ -49,7 +48,11 @@
>  		"sf update ${loadaddr1} 0x40000 ${filesize1} && "	\
>  		"sf update ${loadaddr} 0x80000 ${filesize} && "		\
>  		"env set filesize1 && env set loadaddr1\0"		\
> -	"update_sf=run dh_update_sd_to_sf\0"
> +	"stdin=serial\0"						\
> +	"stdout=serial\0"						\
> +	"stderr=serial\0"						\
> +	"update_sf=run dh_update_sd_to_sf\0"				\
> +	"usb_pgood_delay=1000\0"
>  
>  
>  #include <configs/stm32mp15_common.h>

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice
Patrice CHOTARD Jan. 19, 2024, 2:07 p.m. UTC | #2
On 1/16/24 08:19, Patrice CHOTARD wrote:
> Hi Marek
> 
> On 1/13/24 18:57, Marek Vasut wrote:
>> In case CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENV are enabled, the console
>> stdin, stdout, stderr must be defined in environment. Define the default
>> settings to fix the following warning on boot:
>>
>> "
>> In:    No input devices available!
>> Out:   No output devices available!
>> Err:   No error devices available!
>> "
>>
>> Sort the default environment as well.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> ---
>> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
>> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
>> Cc: u-boot@dh-electronics.com
>> Cc: uboot-stm32@st-md-mailman.stormreply.com
>> ---
>>  include/configs/stm32mp15_dh_dhsom.h | 11 +++++++----
>>  1 file changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/include/configs/stm32mp15_dh_dhsom.h b/include/configs/stm32mp15_dh_dhsom.h
>> index 8ff882264f4..de39b19219d 100644
>> --- a/include/configs/stm32mp15_dh_dhsom.h
>> +++ b/include/configs/stm32mp15_dh_dhsom.h
>> @@ -12,14 +12,13 @@
>>  #define PHY_ANEG_TIMEOUT		20000
>>  
>>  #ifdef CONFIG_SPL_BUILD
>> -#define CFG_EXTRA_ENV_SETTINGS					\
>> +#define CFG_EXTRA_ENV_SETTINGS						\
>>  	"dfu_alt_info_ram=u-boot.itb ram "				\
>>  			__stringify(CONFIG_SPL_LOAD_FIT_ADDRESS)	\
>>  			" 0x800000\0"
>>  #endif
>>  
>> -#define STM32MP_BOARD_EXTRA_ENV \
>> -	"usb_pgood_delay=1000\0" \
>> +#define STM32MP_BOARD_EXTRA_ENV						\
>>  	"dh_update_sd_to_emmc=" /* Install U-Boot from SD to eMMC */	\
>>  		"setexpr loadaddr1 ${loadaddr} + 0x1000000 && "		\
>>  		"load mmc 0:4 ${loadaddr1} boot/u-boot-spl.stm32 && "	\
>> @@ -49,7 +48,11 @@
>>  		"sf update ${loadaddr1} 0x40000 ${filesize1} && "	\
>>  		"sf update ${loadaddr} 0x80000 ${filesize} && "		\
>>  		"env set filesize1 && env set loadaddr1\0"		\
>> -	"update_sf=run dh_update_sd_to_sf\0"
>> +	"stdin=serial\0"						\
>> +	"stdout=serial\0"						\
>> +	"stderr=serial\0"						\
>> +	"update_sf=run dh_update_sd_to_sf\0"				\
>> +	"usb_pgood_delay=1000\0"
>>  
>>  
>>  #include <configs/stm32mp15_common.h>
> 
> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
> 
> Thanks
> Patrice

Applied to u-boot-stm32/master

Thanks
Patrice
diff mbox series

Patch

diff --git a/include/configs/stm32mp15_dh_dhsom.h b/include/configs/stm32mp15_dh_dhsom.h
index 8ff882264f4..de39b19219d 100644
--- a/include/configs/stm32mp15_dh_dhsom.h
+++ b/include/configs/stm32mp15_dh_dhsom.h
@@ -12,14 +12,13 @@ 
 #define PHY_ANEG_TIMEOUT		20000
 
 #ifdef CONFIG_SPL_BUILD
-#define CFG_EXTRA_ENV_SETTINGS					\
+#define CFG_EXTRA_ENV_SETTINGS						\
 	"dfu_alt_info_ram=u-boot.itb ram "				\
 			__stringify(CONFIG_SPL_LOAD_FIT_ADDRESS)	\
 			" 0x800000\0"
 #endif
 
-#define STM32MP_BOARD_EXTRA_ENV \
-	"usb_pgood_delay=1000\0" \
+#define STM32MP_BOARD_EXTRA_ENV						\
 	"dh_update_sd_to_emmc=" /* Install U-Boot from SD to eMMC */	\
 		"setexpr loadaddr1 ${loadaddr} + 0x1000000 && "		\
 		"load mmc 0:4 ${loadaddr1} boot/u-boot-spl.stm32 && "	\
@@ -49,7 +48,11 @@ 
 		"sf update ${loadaddr1} 0x40000 ${filesize1} && "	\
 		"sf update ${loadaddr} 0x80000 ${filesize} && "		\
 		"env set filesize1 && env set loadaddr1\0"		\
-	"update_sf=run dh_update_sd_to_sf\0"
+	"stdin=serial\0"						\
+	"stdout=serial\0"						\
+	"stderr=serial\0"						\
+	"update_sf=run dh_update_sd_to_sf\0"				\
+	"usb_pgood_delay=1000\0"
 
 
 #include <configs/stm32mp15_common.h>