blob: 866cd7a719f80c945f0091b4e73286c57dd6a082 [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 *
Patrick Delaunaya6b185e2022-05-20 18:38:10 +02005 * Configuration settings for the STMicroelectronics STM32MP15x boards
Patrick Delaunayf9484bc2021-10-22 10:19:25 +02006 */
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 \
Patrice Chotard870bc642023-03-16 08:03:42 +010012 "usb_pgood_delay=2000\0" \
Patrick Delaunay35e450b2022-04-15 14:31:54 +020013 "console=ttySTM0\0"
14
Patrick Delaunayf9484bc2021-10-22 10:19:25 +020015#include <configs/stm32mp15_common.h>
16
Patrick Delaunay1cda20b2022-04-15 14:31:55 +020017/* uart with on-board st-link */
Tom Rini6a5dccc2022-11-16 13:10:41 -050018#define CFG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, \
Patrick Delaunay1cda20b2022-04-15 14:31:55 +020019 230400, 460800, 921600, \
20 1000000, 2000000 }
21
Tom Rinic9edebe2022-12-04 10:03:50 -050022#ifdef CFG_EXTRA_ENV_SETTINGS
Patrick Delaunayf9484bc2021-10-22 10:19:25 +020023/*
24 * default bootcmd for stm32mp1 STMicroelectronics boards:
25 * for serial/usb: execute the stm32prog command
26 * for mmc boot (eMMC, SD card), distro boot on the same mmc device
27 * for nand or spi-nand boot, distro boot with ubifs on UBI partition
28 * for nor boot, distro boot on SD card = mmc0 ONLY !
29 */
30#define ST_STM32MP1_BOOTCMD "bootcmd_stm32mp=" \
31 "echo \"Boot over ${boot_device}${boot_instance}!\";" \
32 "if test ${boot_device} = serial || test ${boot_device} = usb;" \
33 "then stm32prog ${boot_device} ${boot_instance}; " \
34 "else " \
35 "run env_check;" \
36 "if test ${boot_device} = mmc;" \
37 "then env set boot_targets \"mmc${boot_instance}\"; fi;" \
38 "if test ${boot_device} = nand ||" \
39 " test ${boot_device} = spi-nand ;" \
40 "then env set boot_targets ubifs0; fi;" \
41 "if test ${boot_device} = nor;" \
42 "then env set boot_targets mmc0; fi;" \
43 "run distro_bootcmd;" \
44 "fi;\0"
45
Tom Rinic9edebe2022-12-04 10:03:50 -050046#undef CFG_EXTRA_ENV_SETTINGS
47#define CFG_EXTRA_ENV_SETTINGS \
Patrick Delaunayf9484bc2021-10-22 10:19:25 +020048 STM32MP_MEM_LAYOUT \
49 ST_STM32MP1_BOOTCMD \
50 STM32MP_PARTS_DEFAULT \
51 BOOTENV \
Patrick Delaunay2154b1e2022-07-11 19:45:50 +020052 STM32MP_EXTRA \
53 STM32MP_BOARD_EXTRA_ENV
Patrick Delaunayf9484bc2021-10-22 10:19:25 +020054
55#endif
56#endif