blob: ea1b1635fe9f909255911a48e8b5f81533beeb48 [file] [log] [blame]
Pankaj Bansal338baa32019-02-08 10:29:58 +00001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
Meenakshi Aggarwal751f7a72020-01-10 20:13:19 +05303 * Copyright 2018-2020 NXP
Pankaj Bansal338baa32019-02-08 10:29:58 +00004 */
5
6#ifndef __LX2_QDS_H
7#define __LX2_QDS_H
8
9#include "lx2160a_common.h"
10
Pankaj Bansal338baa32019-02-08 10:29:58 +000011/* VID */
Pankaj Bansal338baa32019-02-08 10:29:58 +000012#define CONFIG_VID_FLS_ENV "lx2160aqds_vdd_mv"
13#define CONFIG_VID
Pankaj Bansal338baa32019-02-08 10:29:58 +000014#define CONFIG_VOL_MONITOR_LTC3882_SET
15#define CONFIG_VOL_MONITOR_LTC3882_READ
16
17/* RTC */
18#define CONFIG_SYS_RTC_BUS_NUM 0
Pankaj Bansal338baa32019-02-08 10:29:58 +000019
20/*
21 * MMC
22 */
23#ifdef CONFIG_MMC
24#ifndef __ASSEMBLY__
25u8 qixis_esdhc_detect_quirk(void);
26#endif
27#define CONFIG_ESDHC_DETECT_QUIRK qixis_esdhc_detect_quirk()
28#endif
29
30/* MAC/PHY configuration */
31#if defined(CONFIG_FSL_MC_ENET)
32#define CONFIG_MII
33#define CONFIG_ETHPRIME "DPMAC17@rgmii-id"
Pankaj Bansal338baa32019-02-08 10:29:58 +000034#endif
35
36/* EEPROM */
37#define CONFIG_ID_EEPROM
38#define CONFIG_SYS_I2C_EEPROM_NXID
39#define CONFIG_SYS_EEPROM_BUS_NUM 0
40#define CONFIG_SYS_I2C_EEPROM_ADDR 0x57
41#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
42#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
43#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
44
45/* Initial environment variables */
46#define CONFIG_EXTRA_ENV_SETTINGS \
47 EXTRA_ENV_SETTINGS \
Meenakshi Aggarwal751f7a72020-01-10 20:13:19 +053048 "boot_scripts=lx2160aqds_boot.scr\0" \
49 "boot_script_hdr=hdr_lx2160aqds_bs.out\0" \
Pankaj Bansal338baa32019-02-08 10:29:58 +000050 "BOARD=lx2160aqds\0" \
51 "xspi_bootcmd=echo Trying load from flexspi..;" \
52 "sf probe 0:0 && sf read $load_addr " \
53 "$kernel_start $kernel_size ; env exists secureboot &&" \
54 "sf read $kernelheader_addr_r $kernelheader_start " \
55 "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; "\
56 " bootm $load_addr#$BOARD\0" \
57 "sd_bootcmd=echo Trying load from sd card..;" \
Meenakshi Aggarwala0569bd2020-09-01 12:56:28 +053058 "mmc dev 0; mmcinfo; mmc read $load_addr " \
Pankaj Bansal338baa32019-02-08 10:29:58 +000059 "$kernel_addr_sd $kernel_size_sd ;" \
60 "env exists secureboot && mmc read $kernelheader_addr_r "\
61 "$kernelhdr_addr_sd $kernelhdr_size_sd " \
62 " && esbc_validate ${kernelheader_addr_r};" \
Meenakshi Aggarwalbebebab2020-02-19 23:30:45 +053063 "bootm $load_addr#$BOARD\0" \
64 "sd2_bootcmd=echo Trying load from emmc card..;" \
65 "mmc dev 1; mmcinfo; mmc read $load_addr " \
66 "$kernel_addr_sd $kernel_size_sd ;" \
67 "env exists secureboot && mmc read $kernelheader_addr_r "\
68 "$kernelhdr_addr_sd $kernelhdr_size_sd " \
69 " && esbc_validate ${kernelheader_addr_r};" \
Pankaj Bansal338baa32019-02-08 10:29:58 +000070 "bootm $load_addr#$BOARD\0"
71
72#include <asm/fsl_secure_boot.h>
73
74#endif /* __LX2_QDS_H */