blob: 67c469c0090d46cdfcfc952dc4360f32e22009a8 [file] [log] [blame]
Meenakshi Aggarwal8a03b0d2020-12-04 20:17:28 +05301/* SPDX-License-Identifier: GPL-2.0+ */
2/*
Meenakshi Aggarwal121c7db2021-08-26 16:09:24 +05303 * Copyright 2020-2021 NXP
Meenakshi Aggarwal8a03b0d2020-12-04 20:17:28 +05304 */
5
6#ifndef __LX2162_QDS_H
7#define __LX2162_QDS_H
8
9#include "lx2160a_common.h"
10
11/* USB */
12#undef CONFIG_USB_MAX_CONTROLLER_COUNT
13#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
14
15/* Voltage monitor on channel 2*/
16#define CONFIG_VID_FLS_ENV "lx2162aqds_vdd_mv"
17#define CONFIG_VID
18#define CONFIG_VOL_MONITOR_LTC3882_SET
19#define CONFIG_VOL_MONITOR_LTC3882_READ
20
21/* RTC */
22#define CONFIG_SYS_RTC_BUS_NUM 0
23
24/*
25 * MMC
26 */
27#ifdef CONFIG_MMC
28#ifndef __ASSEMBLY__
29u8 qixis_esdhc_detect_quirk(void);
30#endif
31#define CONFIG_ESDHC_DETECT_QUIRK qixis_esdhc_detect_quirk()
32#endif
33
34/* MAC/PHY configuration */
35#if defined(CONFIG_FSL_MC_ENET)
Meenakshi Aggarwal8a03b0d2020-12-04 20:17:28 +053036#define CONFIG_ETHPRIME "DPMAC17@rgmii-id"
37#endif
38
39/* EEPROM */
Meenakshi Aggarwal8a03b0d2020-12-04 20:17:28 +053040#define CONFIG_SYS_I2C_EEPROM_NXID
41#define CONFIG_SYS_EEPROM_BUS_NUM 0
Meenakshi Aggarwal8a03b0d2020-12-04 20:17:28 +053042
43/* Initial environment variables */
44#define CONFIG_EXTRA_ENV_SETTINGS \
45 EXTRA_ENV_SETTINGS \
46 "boot_scripts=lx2162aqds_boot.scr\0" \
47 "boot_script_hdr=hdr_lx2162aqds_bs.out\0" \
48 "BOARD=lx2162aqds\0" \
49 "xspi_bootcmd=echo Trying load from flexspi..;" \
50 "sf probe 0:0 && sf read $load_addr " \
51 "$kernel_start $kernel_size ; env exists secureboot &&" \
52 "sf read $kernelheader_addr_r $kernelheader_start " \
53 "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; "\
54 " bootm $load_addr#$BOARD\0" \
55 "sd_bootcmd=echo Trying load from sd card..;" \
56 "mmc dev 0; mmcinfo; mmc read $load_addr " \
57 "$kernel_addr_sd $kernel_size_sd ;" \
58 "env exists secureboot && mmc read $kernelheader_addr_r "\
59 "$kernelhdr_addr_sd $kernelhdr_size_sd " \
60 " && esbc_validate ${kernelheader_addr_r};" \
61 "bootm $load_addr#$BOARD\0" \
Meenakshi Aggarwal121c7db2021-08-26 16:09:24 +053062 "sd2_bootcmd=echo Trying load from emmc card..;" \
Meenakshi Aggarwal8a03b0d2020-12-04 20:17:28 +053063 "mmc dev 1; mmcinfo; mmc read $load_addr " \
64 "$kernel_addr_sd $kernel_size_sd ;" \
65 "env exists secureboot && mmc read $kernelheader_addr_r "\
66 "$kernelhdr_addr_sd $kernelhdr_size_sd " \
67 " && esbc_validate ${kernelheader_addr_r};" \
68 "bootm $load_addr#$BOARD\0"
69
70#include <asm/fsl_secure_boot.h>
71
72#endif /* __LX2162_QDS_H */