cmd: Fix Kconfig coding style
[u-boot.git] / include / configs / imx6q-bosch-acc.h
blob64ddbf711d31b1ad5eee61a1671e6212bf9af4c4
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>
6 */
8 #ifndef __IMX6Q_ACC_H
9 #define __IMX6Q_ACC_H
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
17 #endif
19 #ifdef CONFIG_SYS_BOOT_EMMC
20 /* eMMC Boot */
21 #define ENV_EXTRA \
22 "mmcdev=" __stringify(MMC_ROOTFS_DEV) "\0" \
23 "mmcpart=" __stringify(MMC_ROOTFS_PART) "\0" \
24 "fitpart=1\0" \
25 "optargs=ro quiet systemd.gpt_auto=false\0" \
26 "production=1\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" \
35 "bootset=0\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" \
42 "env_persisted=0\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 \
49 "bootset:bw," \
50 "clone_pending:bw," \
51 "endurance_test:bw," \
52 "env_persisted:bw," \
53 "factory_reset:bw," \
54 "fdtcontroladdr:xw," \
55 "fitpart:dw," \
56 "mmcpart:dw," \
57 "production:bw," \
58 "ustate:dw"
60 #else
61 /* SD Card boot */
62 #define ENV_EXTRA \
63 "mmcdev=1\0" \
64 "fitpart=1\0" \
65 "rootpart=2\0" \
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"
72 #endif
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" \
80 "console=ttymxc0\0" \
81 "addcon=setenv bootargs ${bootargs} console=${console},${baudrate}\0" \
82 "fit_addr=19000000\0" \
83 ENV_EXTRA
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
92 /* SPL */
93 #ifdef CONFIG_SPL
95 #ifdef CONFIG_XPL_BUILD
96 #define CFG_SYS_FSL_USDHC_NUM 2
98 #ifdef CONFIG_SYS_BOOT_EMMC
100 /* Boot from eMMC */
101 #define CFG_SYS_FSL_ESDHC_ADDR 1
103 #else
105 /* Boot from SD-card */
106 # define CFG_SYS_FSL_ESDHC_ADDR 0
108 #endif
110 #endif
111 #endif
114 #endif /* __IMX6Q_ACC_H */