blob: d565492f1d1cbc68e3636cd483ee2bf3c6fa40cf [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_DDR_ECC
Shaohui Xie085ac1c2016-09-07 17:56:14 +080016#define CONFIG_MEM_INIT_VALUE 0xdeadbeef
17#endif
18
Shaohui Xie085ac1c2016-09-07 17:56:14 +080019#ifdef CONFIG_SYS_DPAA_FMAN
Shaohui Xie085ac1c2016-09-07 17:56:14 +080020#define RGMII_PHY1_ADDR 0x1
21#define RGMII_PHY2_ADDR 0x2
22#define SGMII_CARD_PORT1_PHY_ADDR 0x1C
23#define SGMII_CARD_PORT2_PHY_ADDR 0x1D
24#define SGMII_CARD_PORT3_PHY_ADDR 0x1E
25#define SGMII_CARD_PORT4_PHY_ADDR 0x1F
26/* PHY address on QSGMII riser card on slot 2 */
27#define QSGMII_CARD_PORT1_PHY_ADDR_S2 0x8
28#define QSGMII_CARD_PORT2_PHY_ADDR_S2 0x9
29#define QSGMII_CARD_PORT3_PHY_ADDR_S2 0xA
30#define QSGMII_CARD_PORT4_PHY_ADDR_S2 0xB
31#endif
32
Shaohui Xie085ac1c2016-09-07 17:56:14 +080033/* IFC */
34#if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI)
Shaohui Xie085ac1c2016-09-07 17:56:14 +080035/*
36 * CONFIG_SYS_FLASH_BASE has the final address (core view)
37 * CONFIG_SYS_FLASH_BASE_PHYS has the final address (IFC view)
38 * CONFIG_SYS_FLASH_BASE_PHYS_EARLY has the temporary IFC address
Simon Glass72cc5382022-10-20 18:22:39 -060039 * CONFIG_TEXT_BASE is linked to 0x60000000 for booting
Shaohui Xie085ac1c2016-09-07 17:56:14 +080040 */
41#define CONFIG_SYS_FLASH_BASE 0x60000000
42#define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE
43#define CONFIG_SYS_FLASH_BASE_PHYS_EARLY 0x00000000
44
Masahiro Yamada8cea9b52017-02-11 22:43:54 +090045#ifdef CONFIG_MTD_NOR_FLASH
Shaohui Xie085ac1c2016-09-07 17:56:14 +080046#define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */
47#endif
48#endif
49
Shaohui Xie56007a02016-10-28 14:24:02 +080050/* LPUART */
51#ifdef CONFIG_LPUART
Shaohui Xie56007a02016-10-28 14:24:02 +080052#define CFG_UART_MUX_MASK 0x6
53#define CFG_UART_MUX_SHIFT 1
54#define CFG_LPUART_EN 0x2
55#endif
56
Shaohui Xie085ac1c2016-09-07 17:56:14 +080057/*
58 * IFC Definitions
59 */
60#if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI)
61#define CONFIG_SYS_NOR0_CSPR_EXT (0x0)
62#define CONFIG_SYS_NOR0_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | \
63 CSPR_PORT_SIZE_16 | \
64 CSPR_MSEL_NOR | \
65 CSPR_V)
66#define CONFIG_SYS_NOR1_CSPR_EXT (0x0)
67#define CONFIG_SYS_NOR1_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS \
68 + 0x8000000) | \
69 CSPR_PORT_SIZE_16 | \
70 CSPR_MSEL_NOR | \
71 CSPR_V)
Tom Rini7b577ba2022-11-16 13:10:25 -050072#define CFG_SYS_NOR_AMASK IFC_AMASK(128 * 1024 * 1024)
Shaohui Xie085ac1c2016-09-07 17:56:14 +080073
Tom Rini7b577ba2022-11-16 13:10:25 -050074#define CFG_SYS_NOR_CSOR (CSOR_NOR_ADM_SHIFT(4) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +080075 CSOR_NOR_TRHZ_80)
Tom Rini7b577ba2022-11-16 13:10:25 -050076#define CFG_SYS_NOR_FTIM0 (FTIM0_NOR_TACSE(0x4) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +080077 FTIM0_NOR_TEADC(0x5) | \
York Sunebcd9d62017-12-11 08:39:05 -080078 FTIM0_NOR_TAVDS(0x6) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +080079 FTIM0_NOR_TEAHC(0x5))
Tom Rini7b577ba2022-11-16 13:10:25 -050080#define CFG_SYS_NOR_FTIM1 (FTIM1_NOR_TACO(0x35) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +080081 FTIM1_NOR_TRAD_NOR(0x1a) | \
82 FTIM1_NOR_TSEQRAD_NOR(0x13))
Tom Rini7b577ba2022-11-16 13:10:25 -050083#define CFG_SYS_NOR_FTIM2 (FTIM2_NOR_TCS(0x8) | \
York Sunebcd9d62017-12-11 08:39:05 -080084 FTIM2_NOR_TCH(0x8) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +080085 FTIM2_NOR_TWPH(0xe) | \
86 FTIM2_NOR_TWP(0x1c))
Tom Rini7b577ba2022-11-16 13:10:25 -050087#define CFG_SYS_NOR_FTIM3 0
Shaohui Xie085ac1c2016-09-07 17:56:14 +080088
Shaohui Xie085ac1c2016-09-07 17:56:14 +080089#define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS, \
90 CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000}
91
Shaohui Xie085ac1c2016-09-07 17:56:14 +080092#define CONFIG_SYS_WRITE_SWAPPED_DATA
93
94/*
95 * NAND Flash Definitions
96 */
Shaohui Xie085ac1c2016-09-07 17:56:14 +080097
Tom Rinib4213492022-11-12 17:36:51 -050098#define CFG_SYS_NAND_BASE 0x7e800000
99#define CFG_SYS_NAND_BASE_PHYS CFG_SYS_NAND_BASE
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800100
Tom Rinib4213492022-11-12 17:36:51 -0500101#define CFG_SYS_NAND_CSPR_EXT (0x0)
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800102
Tom Rinib4213492022-11-12 17:36:51 -0500103#define CFG_SYS_NAND_CSPR (CSPR_PHYS_ADDR(CFG_SYS_NAND_BASE_PHYS) \
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800104 | CSPR_PORT_SIZE_8 \
105 | CSPR_MSEL_NAND \
106 | CSPR_V)
Tom Rinib4213492022-11-12 17:36:51 -0500107#define CFG_SYS_NAND_AMASK IFC_AMASK(64*1024)
108#define CFG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800109 | CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \
110 | CSOR_NAND_ECC_MODE_8 /* 8-bit ECC */ \
111 | CSOR_NAND_RAL_3 /* RAL = 3 Bytes */ \
112 | CSOR_NAND_PGS_4K /* Page Size = 4K */ \
113 | CSOR_NAND_SPRZ_224 /* Spare size = 224 */ \
114 | CSOR_NAND_PB(64)) /* 64 Pages Per Block */
115
Tom Rinib4213492022-11-12 17:36:51 -0500116#define CFG_SYS_NAND_FTIM0 (FTIM0_NAND_TCCST(0x7) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800117 FTIM0_NAND_TWP(0x18) | \
118 FTIM0_NAND_TWCHT(0x7) | \
119 FTIM0_NAND_TWH(0xa))
Tom Rinib4213492022-11-12 17:36:51 -0500120#define CFG_SYS_NAND_FTIM1 (FTIM1_NAND_TADLE(0x32) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800121 FTIM1_NAND_TWBE(0x39) | \
122 FTIM1_NAND_TRR(0xe) | \
123 FTIM1_NAND_TRP(0x18))
Tom Rinib4213492022-11-12 17:36:51 -0500124#define CFG_SYS_NAND_FTIM2 (FTIM2_NAND_TRAD(0xf) | \
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800125 FTIM2_NAND_TREH(0xa) | \
126 FTIM2_NAND_TWHRE(0x1e))
Tom Rinib4213492022-11-12 17:36:51 -0500127#define CFG_SYS_NAND_FTIM3 0x0
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800128
Tom Rinib4213492022-11-12 17:36:51 -0500129#define CFG_SYS_NAND_BASE_LIST { CFG_SYS_NAND_BASE }
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800130#define CONFIG_MTD_NAND_VERIFY_WRITE
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800131#endif
132
133#ifdef CONFIG_NAND_BOOT
Tom Rinib4213492022-11-12 17:36:51 -0500134#define CFG_SYS_NAND_U_BOOT_SIZE (768 << 10)
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800135#endif
136
Rajesh Bhagat9af0a0b2018-11-05 18:02:40 +0000137#if defined(CONFIG_TFABOOT) || \
138 defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800139#endif
140
141/*
142 * QIXIS Definitions
143 */
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800144
145#ifdef CONFIG_FSL_QIXIS
146#define QIXIS_BASE 0x7fb00000
147#define QIXIS_BASE_PHYS QIXIS_BASE
148#define CONFIG_SYS_I2C_FPGA_ADDR 0x66
149#define QIXIS_LBMAP_SWITCH 6
150#define QIXIS_LBMAP_MASK 0x0f
151#define QIXIS_LBMAP_SHIFT 0
152#define QIXIS_LBMAP_DFLTBANK 0x00
153#define QIXIS_LBMAP_ALTBANK 0x04
154#define QIXIS_LBMAP_NAND 0x09
155#define QIXIS_LBMAP_SD 0x00
156#define QIXIS_LBMAP_SD_QSPI 0xff
157#define QIXIS_LBMAP_QSPI 0xff
158#define QIXIS_RCW_SRC_NAND 0x110
159#define QIXIS_RCW_SRC_SD 0x040
160#define QIXIS_RCW_SRC_QSPI 0x045
161#define QIXIS_RST_CTL_RESET 0x41
162#define QIXIS_RCFG_CTL_RECONFIG_IDLE 0x20
163#define QIXIS_RCFG_CTL_RECONFIG_START 0x21
164#define QIXIS_RCFG_CTL_WATCHDOG_ENBLE 0x08
165
166#define CONFIG_SYS_FPGA_CSPR_EXT (0x0)
167#define CONFIG_SYS_FPGA_CSPR (CSPR_PHYS_ADDR(QIXIS_BASE_PHYS) | \
168 CSPR_PORT_SIZE_8 | \
169 CSPR_MSEL_GPCM | \
170 CSPR_V)
171#define CONFIG_SYS_FPGA_AMASK IFC_AMASK(64 * 1024)
172#define CONFIG_SYS_FPGA_CSOR (CSOR_NOR_ADM_SHIFT(4) | \
173 CSOR_NOR_NOR_MODE_AVD_NOR | \
174 CSOR_NOR_TRHZ_80)
175
176/*
177 * QIXIS Timing parameters for IFC GPCM
178 */
179#define CONFIG_SYS_FPGA_FTIM0 (FTIM0_GPCM_TACSE(0xc) | \
180 FTIM0_GPCM_TEADC(0x20) | \
181 FTIM0_GPCM_TEAHC(0x10))
182#define CONFIG_SYS_FPGA_FTIM1 (FTIM1_GPCM_TACO(0x50) | \
183 FTIM1_GPCM_TRAD(0x1f))
184#define CONFIG_SYS_FPGA_FTIM2 (FTIM2_GPCM_TCS(0x8) | \
185 FTIM2_GPCM_TCH(0x8) | \
186 FTIM2_GPCM_TWP(0xf0))
187#define CONFIG_SYS_FPGA_FTIM3 0x0
188#endif
189
Rajesh Bhagat9af0a0b2018-11-05 18:02:40 +0000190#ifdef CONFIG_TFABOOT
191#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT
192#define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR0_CSPR
Tom Rini7b577ba2022-11-16 13:10:25 -0500193#define CONFIG_SYS_AMASK0 CFG_SYS_NOR_AMASK
194#define CONFIG_SYS_CSOR0 CFG_SYS_NOR_CSOR
195#define CONFIG_SYS_CS0_FTIM0 CFG_SYS_NOR_FTIM0
196#define CONFIG_SYS_CS0_FTIM1 CFG_SYS_NOR_FTIM1
197#define CONFIG_SYS_CS0_FTIM2 CFG_SYS_NOR_FTIM2
198#define CONFIG_SYS_CS0_FTIM3 CFG_SYS_NOR_FTIM3
Rajesh Bhagat9af0a0b2018-11-05 18:02:40 +0000199#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR1_CSPR_EXT
200#define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR1_CSPR
Tom Rini7b577ba2022-11-16 13:10:25 -0500201#define CONFIG_SYS_AMASK1 CFG_SYS_NOR_AMASK
202#define CONFIG_SYS_CSOR1 CFG_SYS_NOR_CSOR
203#define CONFIG_SYS_CS1_FTIM0 CFG_SYS_NOR_FTIM0
204#define CONFIG_SYS_CS1_FTIM1 CFG_SYS_NOR_FTIM1
205#define CONFIG_SYS_CS1_FTIM2 CFG_SYS_NOR_FTIM2
206#define CONFIG_SYS_CS1_FTIM3 CFG_SYS_NOR_FTIM3
Tom Rinib4213492022-11-12 17:36:51 -0500207#define CONFIG_SYS_CSPR2_EXT CFG_SYS_NAND_CSPR_EXT
208#define CONFIG_SYS_CSPR2 CFG_SYS_NAND_CSPR
209#define CONFIG_SYS_AMASK2 CFG_SYS_NAND_AMASK
210#define CONFIG_SYS_CSOR2 CFG_SYS_NAND_CSOR
211#define CONFIG_SYS_CS2_FTIM0 CFG_SYS_NAND_FTIM0
212#define CONFIG_SYS_CS2_FTIM1 CFG_SYS_NAND_FTIM1
213#define CONFIG_SYS_CS2_FTIM2 CFG_SYS_NAND_FTIM2
214#define CONFIG_SYS_CS2_FTIM3 CFG_SYS_NAND_FTIM3
Rajesh Bhagat9af0a0b2018-11-05 18:02:40 +0000215#define CONFIG_SYS_CSPR3_EXT CONFIG_SYS_FPGA_CSPR_EXT
216#define CONFIG_SYS_CSPR3 CONFIG_SYS_FPGA_CSPR
217#define CONFIG_SYS_AMASK3 CONFIG_SYS_FPGA_AMASK
218#define CONFIG_SYS_CSOR3 CONFIG_SYS_FPGA_CSOR
219#define CONFIG_SYS_CS3_FTIM0 CONFIG_SYS_FPGA_FTIM0
220#define CONFIG_SYS_CS3_FTIM1 CONFIG_SYS_FPGA_FTIM1
221#define CONFIG_SYS_CS3_FTIM2 CONFIG_SYS_FPGA_FTIM2
222#define CONFIG_SYS_CS3_FTIM3 CONFIG_SYS_FPGA_FTIM3
223#else
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800224#ifdef CONFIG_NAND_BOOT
Tom Rinib4213492022-11-12 17:36:51 -0500225#define CONFIG_SYS_CSPR0_EXT CFG_SYS_NAND_CSPR_EXT
226#define CONFIG_SYS_CSPR0 CFG_SYS_NAND_CSPR
227#define CONFIG_SYS_AMASK0 CFG_SYS_NAND_AMASK
228#define CONFIG_SYS_CSOR0 CFG_SYS_NAND_CSOR
229#define CONFIG_SYS_CS0_FTIM0 CFG_SYS_NAND_FTIM0
230#define CONFIG_SYS_CS0_FTIM1 CFG_SYS_NAND_FTIM1
231#define CONFIG_SYS_CS0_FTIM2 CFG_SYS_NAND_FTIM2
232#define CONFIG_SYS_CS0_FTIM3 CFG_SYS_NAND_FTIM3
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800233#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR0_CSPR_EXT
234#define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR0_CSPR
Tom Rini7b577ba2022-11-16 13:10:25 -0500235#define CONFIG_SYS_AMASK1 CFG_SYS_NOR_AMASK
236#define CONFIG_SYS_CSOR1 CFG_SYS_NOR_CSOR
237#define CONFIG_SYS_CS1_FTIM0 CFG_SYS_NOR_FTIM0
238#define CONFIG_SYS_CS1_FTIM1 CFG_SYS_NOR_FTIM1
239#define CONFIG_SYS_CS1_FTIM2 CFG_SYS_NOR_FTIM2
240#define CONFIG_SYS_CS1_FTIM3 CFG_SYS_NOR_FTIM3
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800241#define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NOR1_CSPR_EXT
242#define CONFIG_SYS_CSPR2 CONFIG_SYS_NOR1_CSPR
Tom Rini7b577ba2022-11-16 13:10:25 -0500243#define CONFIG_SYS_AMASK2 CFG_SYS_NOR_AMASK
244#define CONFIG_SYS_CSOR2 CFG_SYS_NOR_CSOR
245#define CONFIG_SYS_CS2_FTIM0 CFG_SYS_NOR_FTIM0
246#define CONFIG_SYS_CS2_FTIM1 CFG_SYS_NOR_FTIM1
247#define CONFIG_SYS_CS2_FTIM2 CFG_SYS_NOR_FTIM2
248#define CONFIG_SYS_CS2_FTIM3 CFG_SYS_NOR_FTIM3
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800249#define CONFIG_SYS_CSPR3_EXT CONFIG_SYS_FPGA_CSPR_EXT
250#define CONFIG_SYS_CSPR3 CONFIG_SYS_FPGA_CSPR
251#define CONFIG_SYS_AMASK3 CONFIG_SYS_FPGA_AMASK
252#define CONFIG_SYS_CSOR3 CONFIG_SYS_FPGA_CSOR
253#define CONFIG_SYS_CS3_FTIM0 CONFIG_SYS_FPGA_FTIM0
254#define CONFIG_SYS_CS3_FTIM1 CONFIG_SYS_FPGA_FTIM1
255#define CONFIG_SYS_CS3_FTIM2 CONFIG_SYS_FPGA_FTIM2
256#define CONFIG_SYS_CS3_FTIM3 CONFIG_SYS_FPGA_FTIM3
257#else
258#define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT
259#define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR0_CSPR
Tom Rini7b577ba2022-11-16 13:10:25 -0500260#define CONFIG_SYS_AMASK0 CFG_SYS_NOR_AMASK
261#define CONFIG_SYS_CSOR0 CFG_SYS_NOR_CSOR
262#define CONFIG_SYS_CS0_FTIM0 CFG_SYS_NOR_FTIM0
263#define CONFIG_SYS_CS0_FTIM1 CFG_SYS_NOR_FTIM1
264#define CONFIG_SYS_CS0_FTIM2 CFG_SYS_NOR_FTIM2
265#define CONFIG_SYS_CS0_FTIM3 CFG_SYS_NOR_FTIM3
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800266#define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR1_CSPR_EXT
267#define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR1_CSPR
Tom Rini7b577ba2022-11-16 13:10:25 -0500268#define CONFIG_SYS_AMASK1 CFG_SYS_NOR_AMASK
269#define CONFIG_SYS_CSOR1 CFG_SYS_NOR_CSOR
270#define CONFIG_SYS_CS1_FTIM0 CFG_SYS_NOR_FTIM0
271#define CONFIG_SYS_CS1_FTIM1 CFG_SYS_NOR_FTIM1
272#define CONFIG_SYS_CS1_FTIM2 CFG_SYS_NOR_FTIM2
273#define CONFIG_SYS_CS1_FTIM3 CFG_SYS_NOR_FTIM3
Tom Rinib4213492022-11-12 17:36:51 -0500274#define CONFIG_SYS_CSPR2_EXT CFG_SYS_NAND_CSPR_EXT
275#define CONFIG_SYS_CSPR2 CFG_SYS_NAND_CSPR
276#define CONFIG_SYS_AMASK2 CFG_SYS_NAND_AMASK
277#define CONFIG_SYS_CSOR2 CFG_SYS_NAND_CSOR
278#define CONFIG_SYS_CS2_FTIM0 CFG_SYS_NAND_FTIM0
279#define CONFIG_SYS_CS2_FTIM1 CFG_SYS_NAND_FTIM1
280#define CONFIG_SYS_CS2_FTIM2 CFG_SYS_NAND_FTIM2
281#define CONFIG_SYS_CS2_FTIM3 CFG_SYS_NAND_FTIM3
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800282#define CONFIG_SYS_CSPR3_EXT CONFIG_SYS_FPGA_CSPR_EXT
283#define CONFIG_SYS_CSPR3 CONFIG_SYS_FPGA_CSPR
284#define CONFIG_SYS_AMASK3 CONFIG_SYS_FPGA_AMASK
285#define CONFIG_SYS_CSOR3 CONFIG_SYS_FPGA_CSOR
286#define CONFIG_SYS_CS3_FTIM0 CONFIG_SYS_FPGA_FTIM0
287#define CONFIG_SYS_CS3_FTIM1 CONFIG_SYS_FPGA_FTIM1
288#define CONFIG_SYS_CS3_FTIM2 CONFIG_SYS_FPGA_FTIM2
289#define CONFIG_SYS_CS3_FTIM3 CONFIG_SYS_FPGA_FTIM3
290#endif
Rajesh Bhagat9af0a0b2018-11-05 18:02:40 +0000291#endif
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800292
293/*
294 * I2C bus multiplexer
295 */
296#define I2C_MUX_PCA_ADDR_PRI 0x77
297#define I2C_MUX_PCA_ADDR_SEC 0x76 /* Secondary multiplexer */
298#define I2C_RETIMER_ADDR 0x18
299#define I2C_MUX_CH_DEFAULT 0x8
300#define I2C_MUX_CH_CH7301 0xC
301#define I2C_MUX_CH5 0xD
302#define I2C_MUX_CH6 0xE
303#define I2C_MUX_CH7 0xF
304
305#define I2C_MUX_CH_VOL_MONITOR 0xa
306
307/* Voltage monitor on channel 2*/
308#define I2C_VOL_MONITOR_ADDR 0x40
309#define I2C_VOL_MONITOR_BUS_V_OFFSET 0x2
310#define I2C_VOL_MONITOR_BUS_V_OVF 0x1
311#define I2C_VOL_MONITOR_BUS_V_SHIFT 3
312
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800313/* The lowest and highest voltage allowed for LS1046AQDS */
314#define VDD_MV_MIN 819
315#define VDD_MV_MAX 1212
316
317/*
318 * Miscellaneous configurable options
319 */
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800320
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800321/*
322 * Environment
323 */
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800324
Rajesh Bhagat9af0a0b2018-11-05 18:02:40 +0000325#ifdef CONFIG_TFABOOT
Biwen Li88dd2e82020-04-20 18:29:06 +0800326#define IFC_NAND_BOOTCOMMAND "run distro_bootcmd; run nand_bootcmd; " \
327 "env exists secureboot && esbc_halt;;"
328#define QSPI_NOR_BOOTCOMMAND "run distro_bootcmd; run nor_bootcmd" \
329 "env exists secureboot && esbc_halt;;"
330#define IFC_NOR_BOOTCOMMAND "run distro_bootcmd; run nor_bootcmd; " \
331 "env exists secureboot && esbc_halt;;"
332#define SD_BOOTCOMMAND "run distro_bootcmd; run sd_bootcmd; " \
333 "env exists secureboot && esbc_halt;;"
Rajesh Bhagat9af0a0b2018-11-05 18:02:40 +0000334#endif
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800335
Shaohui Xie085ac1c2016-09-07 17:56:14 +0800336#include <asm/fsl_secure_boot.h>
337
338#endif /* __LS1046AQDS_H__ */