mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-22 19:23:07 +00:00
5367b67be4
On STMicroelectronics boards, the UART can reliably go up to 2000000 bauds when connected to the on-board ST-LINK-V2 for STM32MP15 Unfortunately U-Boot will fall back to 115200 unless higher rates are declared via CONFIG_SYS_BAUDRATE_TABLE. This patch add the support of higher baudrates on STMicroelectronics boards with ST-LINK. Cc: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
54 lines
1.6 KiB
C
54 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */
|
|
/*
|
|
* Copyright (C) 2021, STMicroelectronics - All Rights Reserved
|
|
*
|
|
* Configuration settings for the STMicroelectonics STM32MP15x boards
|
|
*/
|
|
|
|
#ifndef __CONFIG_STM32MP15_ST_COMMON_H__
|
|
#define __CONFIG_STM32MP15_ST_COMMON_H__
|
|
|
|
#define STM32MP_BOARD_EXTRA_ENV \
|
|
"console=ttySTM0\0"
|
|
|
|
#include <configs/stm32mp15_common.h>
|
|
|
|
/* uart with on-board st-link */
|
|
#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, \
|
|
230400, 460800, 921600, \
|
|
1000000, 2000000 }
|
|
|
|
#ifdef CONFIG_EXTRA_ENV_SETTINGS
|
|
/*
|
|
* default bootcmd for stm32mp1 STMicroelectronics boards:
|
|
* for serial/usb: execute the stm32prog command
|
|
* for mmc boot (eMMC, SD card), distro boot on the same mmc device
|
|
* for nand or spi-nand boot, distro boot with ubifs on UBI partition
|
|
* for nor boot, distro boot on SD card = mmc0 ONLY !
|
|
*/
|
|
#define ST_STM32MP1_BOOTCMD "bootcmd_stm32mp=" \
|
|
"echo \"Boot over ${boot_device}${boot_instance}!\";" \
|
|
"if test ${boot_device} = serial || test ${boot_device} = usb;" \
|
|
"then stm32prog ${boot_device} ${boot_instance}; " \
|
|
"else " \
|
|
"run env_check;" \
|
|
"if test ${boot_device} = mmc;" \
|
|
"then env set boot_targets \"mmc${boot_instance}\"; fi;" \
|
|
"if test ${boot_device} = nand ||" \
|
|
" test ${boot_device} = spi-nand ;" \
|
|
"then env set boot_targets ubifs0; fi;" \
|
|
"if test ${boot_device} = nor;" \
|
|
"then env set boot_targets mmc0; fi;" \
|
|
"run distro_bootcmd;" \
|
|
"fi;\0"
|
|
|
|
#undef CONFIG_EXTRA_ENV_SETTINGS
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
STM32MP_MEM_LAYOUT \
|
|
ST_STM32MP1_BOOTCMD \
|
|
STM32MP_PARTS_DEFAULT \
|
|
BOOTENV \
|
|
STM32MP_EXTRA
|
|
|
|
#endif
|
|
#endif
|