u-boot/include/configs/iot2050.h
Jan Kiszka 352ed65df7 iot2050: Add support for configuring M.2 connector
The M.2 slots of the related IOT2050 variant need to be configured
according to the plugged cards. This tries to detect the card using the
M.2 configuration pins of the B-key slot. If that fails, a U-Boot
environment variable can be set to configure manually. This variable is
write-permitted also in secure boot mode as it is not able to undermine
the integrity of the booted system.

The configuration is then applied to mux the serdes and to fix up the
device tree passed to or loaded by the bootloader. The fix-ups are
coming from device tree overlays that are embedded into the firmware
image and there also integrity protected. The OS remains free to load
a device tree to which they do not apply: U-Boot will not fail to boot
in that case.

Based on original patch by Chao Zeng.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2023-03-29 11:58:26 -04:00

51 lines
1.2 KiB
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Configuration header file for IOT2050
* Copyright (c) Siemens AG, 2018-2021
*
* Authors:
* Le Jin <le.jin@siemens.com>
* Jan Kiszka <jan.kiszka@siemens.com>
*/
#ifndef __CONFIG_IOT2050_H
#define __CONFIG_IOT2050_H
#include <linux/sizes.h>
#if IS_ENABLED(CONFIG_CMD_USB)
# define BOOT_TARGET_USB(func) \
func(USB, usb, 0) \
func(USB, usb, 1) \
func(USB, usb, 2)
#else
# define BOOT_TARGET_USB(func)
#endif
/*
* This defines all MMC devices, even if the basic variant has no mmc1.
* The non-supported device will be removed from the boot targets during
* runtime, when that board was detected.
*/
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \
func(MMC, mmc, 0) \
BOOT_TARGET_USB(func)
#include <config_distro_bootcmd.h>
#define CFG_EXTRA_ENV_SETTINGS \
DEFAULT_LINUX_BOOT_ENV \
BOOTENV
#include <configs/ti_armv7_common.h>
#ifdef CONFIG_ENV_WRITEABLE_LIST
#define CFG_ENV_FLAGS_LIST_STATIC \
"board_uuid:sw,board_name:sw,board_serial:sw,board_a5e:sw," \
"mlfb:sw,fw_version:sw,seboot_version:sw," \
"m2_manuel_config:sw," \
"eth1addr:mw,eth2addr:mw,watchdog_timeout_ms:dw,boot_targets:sw"
#endif
#endif /* __CONFIG_IOT2050_H */