1 /* SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2017 DENX Software Engineering GmbH, Heiko Schocher <hs@denx.de>
4 * Copyright (c) 2019 Bosch Thermotechnik GmbH
5 * Copyright (c) 2022 DENX Software Engineering GmbH, Philip Oberfichtner <pro@denx.de>
11 #include <linux/sizes.h>
12 #include "mx6_common.h"
14 #ifdef CONFIG_SYS_BOOT_EMMC
15 #define MMC_ROOTFS_DEV 0
16 #define MMC_ROOTFS_PART 2
19 #ifdef CONFIG_SYS_BOOT_EMMC
22 "mmcdev=" __stringify(MMC_ROOTFS_DEV) "\0" \
23 "mmcpart=" __stringify(MMC_ROOTFS_PART) "\0" \
25 "optargs=ro quiet systemd.gpt_auto=false\0" \
27 "mmcautodetect=yes\0" \
28 "mmcrootfstype=ext4\0" \
29 "finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid\0" \
30 "mmcargs=run finduuid; setenv bootargs " \
31 "root=PARTUUID=${uuid} ${optargs} rootfstype=${mmcrootfstype}\0" \
32 "mmc_mmc_fit=run env_persist; run setbm; run mmcloadfit; " \
33 "run auth_fit_or_reset; run mmcargs addcon; " \
34 "bootm ${fit_addr}#${bootconf}\0" \
36 "setbm=if test ${bootset} -eq 1; " \
37 "then setenv mmcpart 4; setenv fitpart 3; " \
38 "else; setenv mmcpart 2; setenv fitpart 1; fi\0" \
39 "handle_ustate=if test ${ustate} -eq 2; then setenv ustate 3; fi\0" \
40 "switch_bootset=if test ${bootset} -eq 1; then setenv bootset 0; " \
41 "else; setenv bootset 1;fi\0" \
43 "env_persist=if test ${env_persisted} != 1; " \
44 "then env set env_persisted 1; run save_env; fi;\0" \
45 "save_env=env save; env save\0" \
46 "altbootcmd=run handle_ustate; run switch_bootset; run save_env; run bootcmd\0"
48 #define CFG_ENV_FLAGS_LIST_STATIC \
51 "endurance_test:bw," \
54 "fdtcontroladdr:xw," \
66 "optargs=ro systemd.gpt_auto=false\0" \
67 "finduuid=part uuid mmc ${mmcdev}:${rootpart} uuid\0" \
68 "mmcargs=run finduuid;setenv bootargs root=PARTUUID=${uuid} ${optargs}\0" \
69 "mmc_mmc_fit=run mmcloadfit; run auth_fit_or_reset; run mmcargs addcon; " \
70 "bootm ${fit_addr}#${bootconf}\0"
74 /* Default environment */
75 #define CFG_EXTRA_ENV_SETTINGS \
76 "bootconf=conf-imx6q-bosch-acc.dtb\0"\
77 "mmcfit_name=fitImage\0" \
78 "mmcloadfit=ext4load mmc ${mmcdev}:${fitpart} ${fit_addr} ${mmcfit_name}\0" \
79 "auth_fit_or_reset=hab_auth_img ${fit_addr} ${filesize} || reset\0" \
81 "addcon=setenv bootargs ${bootargs} console=${console},${baudrate}\0" \
82 "fit_addr=19000000\0" \
85 /* Physical Memory Map */
86 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
88 #define CFG_SYS_SDRAM_BASE PHYS_SDRAM
89 #define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
90 #define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
95 #ifdef CONFIG_XPL_BUILD
96 #define CFG_SYS_FSL_USDHC_NUM 2
98 #ifdef CONFIG_SYS_BOOT_EMMC
101 #define CFG_SYS_FSL_ESDHC_ADDR 1
105 /* Boot from SD-card */
106 # define CFG_SYS_FSL_ESDHC_ADDR 0
114 #endif /* __IMX6Q_ACC_H */