blob: 3c0ffb8f56fe8fa901d01d77155a1426f3df2dab [file] [log] [blame]
Patrick Delaunayf9484bc2021-10-22 10:19:25 +02001/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */
2/*
3 * Copyright (C) 2021, STMicroelectronics - All Rights Reserved
4 *
5 * Configuration settings for the STMicroelectonics STM32MP15x boards
6 */
7
8#ifndef __CONFIG_STM32MP15_ST_COMMON_H__
9#define __CONFIG_STM32MP15_ST_COMMON_H__
10
Patrick Delaunay35e450b2022-04-15 14:31:54 +020011#define STM32MP_BOARD_EXTRA_ENV \
12 "console=ttySTM0\0"
13
Patrick Delaunayf9484bc2021-10-22 10:19:25 +020014#include <configs/stm32mp15_common.h>
15
Patrick Delaunay1cda20b2022-04-15 14:31:55 +020016/* uart with on-board st-link */
17#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, \
18 230400, 460800, 921600, \
19 1000000, 2000000 }
20
Patrick Delaunayf9484bc2021-10-22 10:19:25 +020021#ifdef CONFIG_EXTRA_ENV_SETTINGS
22/*
23 * default bootcmd for stm32mp1 STMicroelectronics boards:
24 * for serial/usb: execute the stm32prog command
25 * for mmc boot (eMMC, SD card), distro boot on the same mmc device
26 * for nand or spi-nand boot, distro boot with ubifs on UBI partition
27 * for nor boot, distro boot on SD card = mmc0 ONLY !
28 */
29#define ST_STM32MP1_BOOTCMD "bootcmd_stm32mp=" \
30 "echo \"Boot over ${boot_device}${boot_instance}!\";" \
31 "if test ${boot_device} = serial || test ${boot_device} = usb;" \
32 "then stm32prog ${boot_device} ${boot_instance}; " \
33 "else " \
34 "run env_check;" \
35 "if test ${boot_device} = mmc;" \
36 "then env set boot_targets \"mmc${boot_instance}\"; fi;" \
37 "if test ${boot_device} = nand ||" \
38 " test ${boot_device} = spi-nand ;" \
39 "then env set boot_targets ubifs0; fi;" \
40 "if test ${boot_device} = nor;" \
41 "then env set boot_targets mmc0; fi;" \
42 "run distro_bootcmd;" \
43 "fi;\0"
44
45#undef CONFIG_EXTRA_ENV_SETTINGS
46#define CONFIG_EXTRA_ENV_SETTINGS \
47 STM32MP_MEM_LAYOUT \
48 ST_STM32MP1_BOOTCMD \
49 STM32MP_PARTS_DEFAULT \
50 BOOTENV \
51 STM32MP_EXTRA
52
53#endif
54#endif