blob: 4b4bd7cbe4860b339e02194b125a9ffb2820d31b [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Shaohui Xie085ac1c2016-09-07 17:56:14 +08002/*
3 * Copyright 2016 Freescale Semiconductor, Inc.
Shaohui Xie085ac1c2016-09-07 17:56:14 +08004 */
5
6#ifndef __LS1046AQDS_H__
7#define __LS1046AQDS_H__
8
9#include "ls1046a_common.h"
10
Shaohui Xie085ac1c2016-09-07 17:56:14 +080011/* Physical Memory Map */
Shaohui Xie085ac1c2016-09-07 17:56:14 +080012
Shaohui Xie085ac1c2016-09-07 17:56:14 +080013#define SPD_EEPROM_ADDRESS 0x51
Shaohui Xie085ac1c2016-09-07 17:56:14 +080014
Shaohui Xie085ac1c2016-09-07 17:56:14 +080015#ifdef CONFIG_SYS_DPAA_FMAN
Shaohui Xie085ac1c2016-09-07 17:56:14 +080016#define RGMII_PHY1_ADDR 0x1
17#define RGMII_PHY2_ADDR 0x2
18#define SGMII_CARD_PORT1_PHY_ADDR 0x1C
19#define SGMII_CARD_PORT2_PHY_ADDR 0x1D
20#define SGMII_CARD_PORT3_PHY_ADDR 0x1E
21#define SGMII_CARD_PORT4_PHY_ADDR 0x1F
22/* PHY address on QSGMII riser card on slot 2 */
23#define QSGMII_CARD_PORT1_PHY_ADDR_S2 0x8
24#define QSGMII_CARD_PORT2_PHY_ADDR_S2 0x9
25#define QSGMII_CARD_PORT3_PHY_ADDR_S2 0xA
26#define QSGMII_CARD_PORT4_PHY_ADDR_S2 0xB
27#endif
28
Shaohui Xie085ac1c2016-09-07 17:56:14 +080029/* IFC */
30#if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI)
Shaohui Xie085ac1c2016-09-07 17:56:14 +080031/*
Tom Rini6a5dccc2022-11-16 13:10:41 -050032 * CFG_SYS_FLASH_BASE has the final address (core view)
33 * CFG_SYS_FLASH_BASE_PHYS has the final address (IFC view)
34 * CFG_SYS_FLASH_BASE_PHYS_EARLY has the temporary IFC address
Simon Glass72cc5382022-10-20 18:22:39 -060035 * CONFIG_TEXT_BASE is linked to 0x60000000 for booting
Shaohui Xie085ac1c2016-09-07 17:56:14 +080036 */
Tom Rini6a5dccc2022-11-16 13:10:41 -050037#define CFG_SYS_FLASH_BASE 0x60000000
38#define CFG_SYS_FLASH_BASE_PHYS CFG_SYS_FLASH_BASE
39#define CFG_SYS_FLASH_BASE_PHYS_EARLY 0x00000000
Shaohui Xie085ac1c2016-09-07 17:56:14 +080040#endif
41
Shaohui Xie56007a02016-10-28 14:24:02 +080042/* LPUART */
43#ifdef CONFIG_LPUART
Shaohui Xie56007a02016-10-28 14:24:02 +080044#define CFG_UART_MUX_MASK 0x6
45#define CFG_UART_MUX_SHIFT 1
46#define CFG_LPUART_EN 0x2
47#endif
48
Shaohui Xie085ac1c2016-09-07 17:56:14 +080049/*
50 * IFC Definitions
51 */
52#if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI)
Tom Rini6a5dccc2022-11-16 13:10:41 -050053#define CFG_SYS_NOR0_CSPR_EXT (0x0)
54#define CFG_SYS_NOR0_CSPR (CSPR_PHYS_ADDR(CFG_SYS_FLASH_BASE_PHYS) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +080055 CSPR_PORT_SIZE_16 | \
56 CSPR_MSEL_NOR | \
57 CSPR_V)
Tom Rini6a5dccc2022-11-16 13:10:41 -050058#define CFG_SYS_NOR1_CSPR_EXT (0x0)
59#define CFG_SYS_NOR1_CSPR (CSPR_PHYS_ADDR(CFG_SYS_FLASH_BASE_PHYS \
Shaohui Xie085ac1c2016-09-07 17:56:14 +080060 + 0x8000000) | \
61 CSPR_PORT_SIZE_16 | \
62 CSPR_MSEL_NOR | \
63 CSPR_V)
Tom Rini7b577ba2022-11-16 13:10:25 -050064#define CFG_SYS_NOR_AMASK IFC_AMASK(128 * 1024 * 1024)
Shaohui Xie085ac1c2016-09-07 17:56:14 +080065
Tom Rini7b577ba2022-11-16 13:10:25 -050066#define CFG_SYS_NOR_CSOR (CSOR_NOR_ADM_SHIFT(4) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +080067 CSOR_NOR_TRHZ_80)
Tom Rini7b577ba2022-11-16 13:10:25 -050068#define CFG_SYS_NOR_FTIM0 (FTIM0_NOR_TACSE(0x4) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +080069 FTIM0_NOR_TEADC(0x5) | \
York Sunebcd9d62017-12-11 08:39:05 -080070 FTIM0_NOR_TAVDS(0x6) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +080071 FTIM0_NOR_TEAHC(0x5))
Tom Rini7b577ba2022-11-16 13:10:25 -050072#define CFG_SYS_NOR_FTIM1 (FTIM1_NOR_TACO(0x35) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +080073 FTIM1_NOR_TRAD_NOR(0x1a) | \
74 FTIM1_NOR_TSEQRAD_NOR(0x13))
Tom Rini7b577ba2022-11-16 13:10:25 -050075#define CFG_SYS_NOR_FTIM2 (FTIM2_NOR_TCS(0x8) | \
York Sunebcd9d62017-12-11 08:39:05 -080076 FTIM2_NOR_TCH(0x8) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +080077 FTIM2_NOR_TWPH(0xe) | \
78 FTIM2_NOR_TWP(0x1c))
Tom Rini7b577ba2022-11-16 13:10:25 -050079#define CFG_SYS_NOR_FTIM3 0
Shaohui Xie085ac1c2016-09-07 17:56:14 +080080
Tom Rini6a5dccc2022-11-16 13:10:41 -050081#define CFG_SYS_FLASH_BANKS_LIST {CFG_SYS_FLASH_BASE_PHYS, \
82 CFG_SYS_FLASH_BASE_PHYS + 0x8000000}
Shaohui Xie085ac1c2016-09-07 17:56:14 +080083
Tom Rini6a5dccc2022-11-16 13:10:41 -050084#define CFG_SYS_WRITE_SWAPPED_DATA
Shaohui Xie085ac1c2016-09-07 17:56:14 +080085
86/*
87 * NAND Flash Definitions
88 */
Shaohui Xie085ac1c2016-09-07 17:56:14 +080089
Tom Rinib4213492022-11-12 17:36:51 -050090#define CFG_SYS_NAND_BASE 0x7e800000
91#define CFG_SYS_NAND_BASE_PHYS CFG_SYS_NAND_BASE
Shaohui Xie085ac1c2016-09-07 17:56:14 +080092
Tom Rinib4213492022-11-12 17:36:51 -050093#define CFG_SYS_NAND_CSPR_EXT (0x0)
Shaohui Xie085ac1c2016-09-07 17:56:14 +080094
Tom Rinib4213492022-11-12 17:36:51 -050095#define CFG_SYS_NAND_CSPR (CSPR_PHYS_ADDR(CFG_SYS_NAND_BASE_PHYS) \
Shaohui Xie085ac1c2016-09-07 17:56:14 +080096 | CSPR_PORT_SIZE_8 \
97 | CSPR_MSEL_NAND \
98 | CSPR_V)
Tom Rinib4213492022-11-12 17:36:51 -050099#define CFG_SYS_NAND_AMASK IFC_AMASK(64*1024)
100#define CFG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800101 | CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \
102 | CSOR_NAND_ECC_MODE_8 /* 8-bit ECC */ \
103 | CSOR_NAND_RAL_3 /* RAL = 3 Bytes */ \
104 | CSOR_NAND_PGS_4K /* Page Size = 4K */ \
105 | CSOR_NAND_SPRZ_224 /* Spare size = 224 */ \
106 | CSOR_NAND_PB(64)) /* 64 Pages Per Block */
107
Tom Rinib4213492022-11-12 17:36:51 -0500108#define CFG_SYS_NAND_FTIM0 (FTIM0_NAND_TCCST(0x7) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800109 FTIM0_NAND_TWP(0x18) | \
110 FTIM0_NAND_TWCHT(0x7) | \
111 FTIM0_NAND_TWH(0xa))
Tom Rinib4213492022-11-12 17:36:51 -0500112#define CFG_SYS_NAND_FTIM1 (FTIM1_NAND_TADLE(0x32) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800113 FTIM1_NAND_TWBE(0x39) | \
114 FTIM1_NAND_TRR(0xe) | \
115 FTIM1_NAND_TRP(0x18))
Tom Rinib4213492022-11-12 17:36:51 -0500116#define CFG_SYS_NAND_FTIM2 (FTIM2_NAND_TRAD(0xf) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800117 FTIM2_NAND_TREH(0xa) | \
118 FTIM2_NAND_TWHRE(0x1e))
Tom Rinib4213492022-11-12 17:36:51 -0500119#define CFG_SYS_NAND_FTIM3 0x0
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800120
Tom Rinib4213492022-11-12 17:36:51 -0500121#define CFG_SYS_NAND_BASE_LIST { CFG_SYS_NAND_BASE }
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800122#endif
123
124#ifdef CONFIG_NAND_BOOT
Tom Rinib4213492022-11-12 17:36:51 -0500125#define CFG_SYS_NAND_U_BOOT_SIZE (768 << 10)
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800126#endif
127
Rajesh Bhagat9af0a0b2018-11-05 18:02:40 +0000128#if defined(CONFIG_TFABOOT) || \
129 defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800130#endif
131
132/*
133 * QIXIS Definitions
134 */
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800135
136#ifdef CONFIG_FSL_QIXIS
137#define QIXIS_BASE 0x7fb00000
138#define QIXIS_BASE_PHYS QIXIS_BASE
Tom Rini6a5dccc2022-11-16 13:10:41 -0500139#define CFG_SYS_I2C_FPGA_ADDR 0x66
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800140#define QIXIS_LBMAP_SWITCH 6
141#define QIXIS_LBMAP_MASK 0x0f
142#define QIXIS_LBMAP_SHIFT 0
143#define QIXIS_LBMAP_DFLTBANK 0x00
144#define QIXIS_LBMAP_ALTBANK 0x04
145#define QIXIS_LBMAP_NAND 0x09
146#define QIXIS_LBMAP_SD 0x00
147#define QIXIS_LBMAP_SD_QSPI 0xff
148#define QIXIS_LBMAP_QSPI 0xff
149#define QIXIS_RCW_SRC_NAND 0x110
150#define QIXIS_RCW_SRC_SD 0x040
151#define QIXIS_RCW_SRC_QSPI 0x045
152#define QIXIS_RST_CTL_RESET 0x41
153#define QIXIS_RCFG_CTL_RECONFIG_IDLE 0x20
154#define QIXIS_RCFG_CTL_RECONFIG_START 0x21
155#define QIXIS_RCFG_CTL_WATCHDOG_ENBLE 0x08
156
Tom Rini6a5dccc2022-11-16 13:10:41 -0500157#define CFG_SYS_FPGA_CSPR_EXT (0x0)
158#define CFG_SYS_FPGA_CSPR (CSPR_PHYS_ADDR(QIXIS_BASE_PHYS) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800159 CSPR_PORT_SIZE_8 | \
160 CSPR_MSEL_GPCM | \
161 CSPR_V)
Tom Rini6a5dccc2022-11-16 13:10:41 -0500162#define CFG_SYS_FPGA_AMASK IFC_AMASK(64 * 1024)
163#define CFG_SYS_FPGA_CSOR (CSOR_NOR_ADM_SHIFT(4) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800164 CSOR_NOR_NOR_MODE_AVD_NOR | \
165 CSOR_NOR_TRHZ_80)
166
167/*
168 * QIXIS Timing parameters for IFC GPCM
169 */
Tom Rini6a5dccc2022-11-16 13:10:41 -0500170#define CFG_SYS_FPGA_FTIM0 (FTIM0_GPCM_TACSE(0xc) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800171 FTIM0_GPCM_TEADC(0x20) | \
172 FTIM0_GPCM_TEAHC(0x10))
Tom Rini6a5dccc2022-11-16 13:10:41 -0500173#define CFG_SYS_FPGA_FTIM1 (FTIM1_GPCM_TACO(0x50) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800174 FTIM1_GPCM_TRAD(0x1f))
Tom Rini6a5dccc2022-11-16 13:10:41 -0500175#define CFG_SYS_FPGA_FTIM2 (FTIM2_GPCM_TCS(0x8) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800176 FTIM2_GPCM_TCH(0x8) | \
177 FTIM2_GPCM_TWP(0xf0))
Tom Rini6a5dccc2022-11-16 13:10:41 -0500178#define CFG_SYS_FPGA_FTIM3 0x0
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800179#endif
180
Rajesh Bhagat9af0a0b2018-11-05 18:02:40 +0000181#ifdef CONFIG_TFABOOT
Tom Rini6a5dccc2022-11-16 13:10:41 -0500182#define CFG_SYS_CSPR0_EXT CFG_SYS_NOR0_CSPR_EXT
183#define CFG_SYS_CSPR0 CFG_SYS_NOR0_CSPR
184#define CFG_SYS_AMASK0 CFG_SYS_NOR_AMASK
185#define CFG_SYS_CSOR0 CFG_SYS_NOR_CSOR
186#define CFG_SYS_CS0_FTIM0 CFG_SYS_NOR_FTIM0
187#define CFG_SYS_CS0_FTIM1 CFG_SYS_NOR_FTIM1
188#define CFG_SYS_CS0_FTIM2 CFG_SYS_NOR_FTIM2
189#define CFG_SYS_CS0_FTIM3 CFG_SYS_NOR_FTIM3
190#define CFG_SYS_CSPR1_EXT CFG_SYS_NOR1_CSPR_EXT
191#define CFG_SYS_CSPR1 CFG_SYS_NOR1_CSPR
192#define CFG_SYS_AMASK1 CFG_SYS_NOR_AMASK
193#define CFG_SYS_CSOR1 CFG_SYS_NOR_CSOR
194#define CFG_SYS_CS1_FTIM0 CFG_SYS_NOR_FTIM0
195#define CFG_SYS_CS1_FTIM1 CFG_SYS_NOR_FTIM1
196#define CFG_SYS_CS1_FTIM2 CFG_SYS_NOR_FTIM2
197#define CFG_SYS_CS1_FTIM3 CFG_SYS_NOR_FTIM3
198#define CFG_SYS_CSPR2_EXT CFG_SYS_NAND_CSPR_EXT
199#define CFG_SYS_CSPR2 CFG_SYS_NAND_CSPR
200#define CFG_SYS_AMASK2 CFG_SYS_NAND_AMASK
201#define CFG_SYS_CSOR2 CFG_SYS_NAND_CSOR
202#define CFG_SYS_CS2_FTIM0 CFG_SYS_NAND_FTIM0
203#define CFG_SYS_CS2_FTIM1 CFG_SYS_NAND_FTIM1
204#define CFG_SYS_CS2_FTIM2 CFG_SYS_NAND_FTIM2
205#define CFG_SYS_CS2_FTIM3 CFG_SYS_NAND_FTIM3
206#define CFG_SYS_CSPR3_EXT CFG_SYS_FPGA_CSPR_EXT
207#define CFG_SYS_CSPR3 CFG_SYS_FPGA_CSPR
208#define CFG_SYS_AMASK3 CFG_SYS_FPGA_AMASK
209#define CFG_SYS_CSOR3 CFG_SYS_FPGA_CSOR
210#define CFG_SYS_CS3_FTIM0 CFG_SYS_FPGA_FTIM0
211#define CFG_SYS_CS3_FTIM1 CFG_SYS_FPGA_FTIM1
212#define CFG_SYS_CS3_FTIM2 CFG_SYS_FPGA_FTIM2
213#define CFG_SYS_CS3_FTIM3 CFG_SYS_FPGA_FTIM3
Rajesh Bhagat9af0a0b2018-11-05 18:02:40 +0000214#else
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800215#ifdef CONFIG_NAND_BOOT
Tom Rini6a5dccc2022-11-16 13:10:41 -0500216#define CFG_SYS_CSPR0_EXT CFG_SYS_NAND_CSPR_EXT
217#define CFG_SYS_CSPR0 CFG_SYS_NAND_CSPR
218#define CFG_SYS_AMASK0 CFG_SYS_NAND_AMASK
219#define CFG_SYS_CSOR0 CFG_SYS_NAND_CSOR
220#define CFG_SYS_CS0_FTIM0 CFG_SYS_NAND_FTIM0
221#define CFG_SYS_CS0_FTIM1 CFG_SYS_NAND_FTIM1
222#define CFG_SYS_CS0_FTIM2 CFG_SYS_NAND_FTIM2
223#define CFG_SYS_CS0_FTIM3 CFG_SYS_NAND_FTIM3
224#define CFG_SYS_CSPR1_EXT CFG_SYS_NOR0_CSPR_EXT
225#define CFG_SYS_CSPR1 CFG_SYS_NOR0_CSPR
226#define CFG_SYS_AMASK1 CFG_SYS_NOR_AMASK
227#define CFG_SYS_CSOR1 CFG_SYS_NOR_CSOR
228#define CFG_SYS_CS1_FTIM0 CFG_SYS_NOR_FTIM0
229#define CFG_SYS_CS1_FTIM1 CFG_SYS_NOR_FTIM1
230#define CFG_SYS_CS1_FTIM2 CFG_SYS_NOR_FTIM2
231#define CFG_SYS_CS1_FTIM3 CFG_SYS_NOR_FTIM3
232#define CFG_SYS_CSPR2_EXT CFG_SYS_NOR1_CSPR_EXT
233#define CFG_SYS_CSPR2 CFG_SYS_NOR1_CSPR
234#define CFG_SYS_AMASK2 CFG_SYS_NOR_AMASK
235#define CFG_SYS_CSOR2 CFG_SYS_NOR_CSOR
236#define CFG_SYS_CS2_FTIM0 CFG_SYS_NOR_FTIM0
237#define CFG_SYS_CS2_FTIM1 CFG_SYS_NOR_FTIM1
238#define CFG_SYS_CS2_FTIM2 CFG_SYS_NOR_FTIM2
239#define CFG_SYS_CS2_FTIM3 CFG_SYS_NOR_FTIM3
240#define CFG_SYS_CSPR3_EXT CFG_SYS_FPGA_CSPR_EXT
241#define CFG_SYS_CSPR3 CFG_SYS_FPGA_CSPR
242#define CFG_SYS_AMASK3 CFG_SYS_FPGA_AMASK
243#define CFG_SYS_CSOR3 CFG_SYS_FPGA_CSOR
244#define CFG_SYS_CS3_FTIM0 CFG_SYS_FPGA_FTIM0
245#define CFG_SYS_CS3_FTIM1 CFG_SYS_FPGA_FTIM1
246#define CFG_SYS_CS3_FTIM2 CFG_SYS_FPGA_FTIM2
247#define CFG_SYS_CS3_FTIM3 CFG_SYS_FPGA_FTIM3
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800248#else
Tom Rini6a5dccc2022-11-16 13:10:41 -0500249#define CFG_SYS_CSPR0_EXT CFG_SYS_NOR0_CSPR_EXT
250#define CFG_SYS_CSPR0 CFG_SYS_NOR0_CSPR
251#define CFG_SYS_AMASK0 CFG_SYS_NOR_AMASK
252#define CFG_SYS_CSOR0 CFG_SYS_NOR_CSOR
253#define CFG_SYS_CS0_FTIM0 CFG_SYS_NOR_FTIM0
254#define CFG_SYS_CS0_FTIM1 CFG_SYS_NOR_FTIM1
255#define CFG_SYS_CS0_FTIM2 CFG_SYS_NOR_FTIM2
256#define CFG_SYS_CS0_FTIM3 CFG_SYS_NOR_FTIM3
257#define CFG_SYS_CSPR1_EXT CFG_SYS_NOR1_CSPR_EXT
258#define CFG_SYS_CSPR1 CFG_SYS_NOR1_CSPR
259#define CFG_SYS_AMASK1 CFG_SYS_NOR_AMASK
260#define CFG_SYS_CSOR1 CFG_SYS_NOR_CSOR
261#define CFG_SYS_CS1_FTIM0 CFG_SYS_NOR_FTIM0
262#define CFG_SYS_CS1_FTIM1 CFG_SYS_NOR_FTIM1
263#define CFG_SYS_CS1_FTIM2 CFG_SYS_NOR_FTIM2
264#define CFG_SYS_CS1_FTIM3 CFG_SYS_NOR_FTIM3
265#define CFG_SYS_CSPR2_EXT CFG_SYS_NAND_CSPR_EXT
266#define CFG_SYS_CSPR2 CFG_SYS_NAND_CSPR
267#define CFG_SYS_AMASK2 CFG_SYS_NAND_AMASK
268#define CFG_SYS_CSOR2 CFG_SYS_NAND_CSOR
269#define CFG_SYS_CS2_FTIM0 CFG_SYS_NAND_FTIM0
270#define CFG_SYS_CS2_FTIM1 CFG_SYS_NAND_FTIM1
271#define CFG_SYS_CS2_FTIM2 CFG_SYS_NAND_FTIM2
272#define CFG_SYS_CS2_FTIM3 CFG_SYS_NAND_FTIM3
273#define CFG_SYS_CSPR3_EXT CFG_SYS_FPGA_CSPR_EXT
274#define CFG_SYS_CSPR3 CFG_SYS_FPGA_CSPR
275#define CFG_SYS_AMASK3 CFG_SYS_FPGA_AMASK
276#define CFG_SYS_CSOR3 CFG_SYS_FPGA_CSOR
277#define CFG_SYS_CS3_FTIM0 CFG_SYS_FPGA_FTIM0
278#define CFG_SYS_CS3_FTIM1 CFG_SYS_FPGA_FTIM1
279#define CFG_SYS_CS3_FTIM2 CFG_SYS_FPGA_FTIM2
280#define CFG_SYS_CS3_FTIM3 CFG_SYS_FPGA_FTIM3
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800281#endif
Rajesh Bhagat9af0a0b2018-11-05 18:02:40 +0000282#endif
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800283
284/*
285 * I2C bus multiplexer
286 */
287#define I2C_MUX_PCA_ADDR_PRI 0x77
288#define I2C_MUX_PCA_ADDR_SEC 0x76 /* Secondary multiplexer */
289#define I2C_RETIMER_ADDR 0x18
290#define I2C_MUX_CH_DEFAULT 0x8
291#define I2C_MUX_CH_CH7301 0xC
292#define I2C_MUX_CH5 0xD
293#define I2C_MUX_CH6 0xE
294#define I2C_MUX_CH7 0xF
295
296#define I2C_MUX_CH_VOL_MONITOR 0xa
297
298/* Voltage monitor on channel 2*/
299#define I2C_VOL_MONITOR_ADDR 0x40
300#define I2C_VOL_MONITOR_BUS_V_OFFSET 0x2
301#define I2C_VOL_MONITOR_BUS_V_OVF 0x1
302#define I2C_VOL_MONITOR_BUS_V_SHIFT 3
303
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800304/* The lowest and highest voltage allowed for LS1046AQDS */
305#define VDD_MV_MIN 819
306#define VDD_MV_MAX 1212
307
308/*
309 * Miscellaneous configurable options
310 */
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800311
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800312/*
313 * Environment
314 */
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800315
Rajesh Bhagat9af0a0b2018-11-05 18:02:40 +0000316#ifdef CONFIG_TFABOOT
Biwen Li88dd2e82020-04-20 18:29:06 +0800317#define IFC_NAND_BOOTCOMMAND "run distro_bootcmd; run nand_bootcmd; " \
318 "env exists secureboot && esbc_halt;;"
319#define QSPI_NOR_BOOTCOMMAND "run distro_bootcmd; run nor_bootcmd" \
320 "env exists secureboot && esbc_halt;;"
321#define IFC_NOR_BOOTCOMMAND "run distro_bootcmd; run nor_bootcmd; " \
322 "env exists secureboot && esbc_halt;;"
323#define SD_BOOTCOMMAND "run distro_bootcmd; run sd_bootcmd; " \
324 "env exists secureboot && esbc_halt;;"
Rajesh Bhagat9af0a0b2018-11-05 18:02:40 +0000325#endif
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800326
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800327#include <asm/fsl_secure_boot.h>
328
329#endif /* __LS1046AQDS_H__ */