1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright 2017, 2020-2021 NXP
6 #ifndef __LS1088A_QDS_H
7 #define __LS1088A_QDS_H
9 #include "ls1088a_common.h"
13 unsigned long get_board_sys_clk(void);
17 #define CONFIG_MISC_INIT_R
20 #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
21 #define CONFIG_QIXIS_I2C_ACCESS
24 #define CONFIG_SYS_CLK_FREQ 100000000
26 #define CONFIG_QIXIS_I2C_ACCESS
27 #define CONFIG_SYS_CLK_FREQ get_board_sys_clk()
30 #define COUNTER_FREQUENCY_REAL (CONFIG_SYS_CLK_FREQ/4)
31 #define COUNTER_FREQUENCY 25000000 /* 25MHz */
33 #define CONFIG_DIMM_SLOTS_PER_CTLR 1
35 #define CONFIG_MEM_INIT_VALUE 0xdeadbeef
36 #define SPD_EEPROM_ADDRESS 0x51
37 #define CONFIG_SYS_SPD_BUS_NUM 0
43 #if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI)
44 #define CONFIG_SYS_NOR0_CSPR_EXT (0x0)
45 #define CONFIG_SYS_NOR_AMASK IFC_AMASK(128*1024*1024)
46 #define CONFIG_SYS_NOR_AMASK_EARLY IFC_AMASK(64*1024*1024)
48 #define CONFIG_SYS_NOR0_CSPR \
49 (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | \
53 #define CONFIG_SYS_NOR0_CSPR_EARLY \
54 (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS_EARLY) | \
58 #define CONFIG_SYS_NOR1_CSPR \
59 (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH1_BASE_PHYS) | \
63 #define CONFIG_SYS_NOR1_CSPR_EARLY \
64 (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH1_BASE_PHYS_EARLY) | \
68 #define CONFIG_SYS_NOR_CSOR CSOR_NOR_ADM_SHIFT(12)
69 #define CONFIG_SYS_NOR_FTIM0 (FTIM0_NOR_TACSE(0x4) | \
70 FTIM0_NOR_TEADC(0x5) | \
71 FTIM0_NOR_TAVDS(0x6) | \
73 #define CONFIG_SYS_NOR_FTIM1 (FTIM1_NOR_TACO(0x35) | \
74 FTIM1_NOR_TRAD_NOR(0x1a) | \
75 FTIM1_NOR_TSEQRAD_NOR(0x13))
76 #define CONFIG_SYS_NOR_FTIM2 (FTIM2_NOR_TCS(0x8) | \
77 FTIM2_NOR_TCH(0x8) | \
78 FTIM2_NOR_TWPH(0xe) | \
80 #define CONFIG_SYS_NOR_FTIM3 0x04000000
81 #define CONFIG_SYS_IFC_CCR 0x01000000
84 #define CONFIG_SYS_FLASH_QUIET_TEST
85 #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */
87 #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */
88 #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */
89 #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
90 #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
92 #define CONFIG_SYS_FLASH_EMPTY_INFO
93 #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE,\
94 CONFIG_SYS_FLASH_BASE + 0x40000000}
98 #define CONFIG_NAND_FSL_IFC
99 #define CONFIG_SYS_NAND_MAX_ECCPOS 256
100 #define CONFIG_SYS_NAND_MAX_OOBFREE 2
102 #define CONFIG_SYS_NAND_CSPR_EXT (0x0)
103 #define CONFIG_SYS_NAND_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
104 | CSPR_PORT_SIZE_8 /* Port Size = 8 bit */ \
105 | CSPR_MSEL_NAND /* MSEL = NAND */ \
107 #define CONFIG_SYS_NAND_AMASK IFC_AMASK(64 * 1024)
109 #define CONFIG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \
110 | CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \
111 | CSOR_NAND_ECC_MODE_4 /* 4-bit ECC */ \
112 | CSOR_NAND_RAL_3 /* RAL = 3Byes */ \
113 | CSOR_NAND_PGS_2K /* Page Size = 2K */ \
114 | CSOR_NAND_SPRZ_64/* Spare size = 64 */ \
115 | CSOR_NAND_PB(64)) /*Pages Per Block = 64*/
117 #define CONFIG_SYS_NAND_ONFI_DETECTION
119 /* ONFI NAND Flash mode0 Timing Params */
120 #define CONFIG_SYS_NAND_FTIM0 (FTIM0_NAND_TCCST(0x07) | \
121 FTIM0_NAND_TWP(0x18) | \
122 FTIM0_NAND_TWCHT(0x07) | \
123 FTIM0_NAND_TWH(0x0a))
124 #define CONFIG_SYS_NAND_FTIM1 (FTIM1_NAND_TADLE(0x32) | \
125 FTIM1_NAND_TWBE(0x39) | \
126 FTIM1_NAND_TRR(0x0e) | \
127 FTIM1_NAND_TRP(0x18))
128 #define CONFIG_SYS_NAND_FTIM2 (FTIM2_NAND_TRAD(0x0f) | \
129 FTIM2_NAND_TREH(0x0a) | \
130 FTIM2_NAND_TWHRE(0x1e))
131 #define CONFIG_SYS_NAND_FTIM3 0x0
133 #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
134 #define CONFIG_SYS_MAX_NAND_DEVICE 1
135 #define CONFIG_MTD_NAND_VERIFY_WRITE
137 #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
139 #define CONFIG_FSL_QIXIS
140 #define CONFIG_SYS_I2C_FPGA_ADDR 0x66
141 #define QIXIS_LBMAP_SWITCH 6
142 #define QIXIS_QMAP_MASK 0xe0
143 #define QIXIS_QMAP_SHIFT 5
144 #define QIXIS_LBMAP_MASK 0x0f
145 #define QIXIS_LBMAP_SHIFT 0
146 #define QIXIS_LBMAP_DFLTBANK 0x0e
147 #define QIXIS_LBMAP_ALTBANK 0x2e
148 #define QIXIS_LBMAP_SD 0x00
149 #define QIXIS_LBMAP_EMMC 0x00
150 #define QIXIS_LBMAP_IFC 0x00
151 #define QIXIS_LBMAP_SD_QSPI 0x0e
152 #define QIXIS_LBMAP_QSPI 0x0e
153 #define QIXIS_RCW_SRC_IFC 0x25
154 #define QIXIS_RCW_SRC_SD 0x40
155 #define QIXIS_RCW_SRC_EMMC 0x41
156 #define QIXIS_RCW_SRC_QSPI 0x62
157 #define QIXIS_RST_CTL_RESET 0x41
158 #define QIXIS_RCFG_CTL_RECONFIG_IDLE 0x20
159 #define QIXIS_RCFG_CTL_RECONFIG_START 0x21
160 #define QIXIS_RCFG_CTL_WATCHDOG_ENBLE 0x08
161 #define QIXIS_RST_FORCE_MEM 0x01
162 #define QIXIS_STAT_PRES1 0xb
163 #define QIXIS_SDID_MASK 0x07
164 #define QIXIS_ESDHC_NO_ADAPTER 0x7
166 #define CONFIG_SYS_FPGA_CSPR_EXT (0x0)
167 #define CONFIG_SYS_FPGA_CSPR (CSPR_PHYS_ADDR(QIXIS_BASE_PHYS_EARLY) \
171 #define SYS_FPGA_CSPR_FINAL (CSPR_PHYS_ADDR(QIXIS_BASE_PHYS) \
176 #define SYS_FPGA_AMASK IFC_AMASK(64 * 1024)
177 #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
178 #define CONFIG_SYS_FPGA_CSOR CSOR_GPCM_ADM_SHIFT(0)
180 #define CONFIG_SYS_FPGA_CSOR CSOR_GPCM_ADM_SHIFT(12)
182 /* QIXIS Timing parameters*/
183 #define SYS_FPGA_CS_FTIM0 (FTIM0_GPCM_TACSE(0x0e) | \
184 FTIM0_GPCM_TEADC(0x0e) | \
185 FTIM0_GPCM_TEAHC(0x0e))
186 #define SYS_FPGA_CS_FTIM1 (FTIM1_GPCM_TACO(0xff) | \
187 FTIM1_GPCM_TRAD(0x3f))
188 #define SYS_FPGA_CS_FTIM2 (FTIM2_GPCM_TCS(0xf) | \
189 FTIM2_GPCM_TCH(0xf) | \
190 FTIM2_GPCM_TWP(0x3E))
191 #define SYS_FPGA_CS_FTIM3 0x0
193 #ifdef CONFIG_TFABOOT
194 #define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT
195 #define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR0_CSPR_EARLY
196 #define CONFIG_SYS_CSPR0_FINAL CONFIG_SYS_NOR0_CSPR
197 #define CONFIG_SYS_AMASK0 CONFIG_SYS_NOR_AMASK
198 #define CONFIG_SYS_CSOR0 CONFIG_SYS_NOR_CSOR
199 #define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NOR_FTIM0
200 #define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NOR_FTIM1
201 #define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NOR_FTIM2
202 #define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NOR_FTIM3
203 #define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR0_CSPR_EXT
204 #define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR1_CSPR_EARLY
205 #define CONFIG_SYS_CSPR1_FINAL CONFIG_SYS_NOR1_CSPR
206 #define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK_EARLY
207 #define CONFIG_SYS_AMASK1_FINAL CONFIG_SYS_NOR_AMASK
208 #define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR
209 #define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0
210 #define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1
211 #define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2
212 #define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3
213 #define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NAND_CSPR_EXT
214 #define CONFIG_SYS_CSPR2 CONFIG_SYS_NAND_CSPR
215 #define CONFIG_SYS_AMASK2 CONFIG_SYS_NAND_AMASK
216 #define CONFIG_SYS_CSOR2 CONFIG_SYS_NAND_CSOR
217 #define CONFIG_SYS_CS2_FTIM0 CONFIG_SYS_NAND_FTIM0
218 #define CONFIG_SYS_CS2_FTIM1 CONFIG_SYS_NAND_FTIM1
219 #define CONFIG_SYS_CS2_FTIM2 CONFIG_SYS_NAND_FTIM2
220 #define CONFIG_SYS_CS2_FTIM3 CONFIG_SYS_NAND_FTIM3
221 #define CONFIG_SYS_CSPR3_EXT CONFIG_SYS_FPGA_CSPR_EXT
222 #define CONFIG_SYS_CSPR3 CONFIG_SYS_FPGA_CSPR
223 #define CONFIG_SYS_CSPR3_FINAL SYS_FPGA_CSPR_FINAL
224 #define CONFIG_SYS_AMASK3 SYS_FPGA_AMASK
225 #define CONFIG_SYS_CSOR3 CONFIG_SYS_FPGA_CSOR
226 #define CONFIG_SYS_CS3_FTIM0 SYS_FPGA_CS_FTIM0
227 #define CONFIG_SYS_CS3_FTIM1 SYS_FPGA_CS_FTIM1
228 #define CONFIG_SYS_CS3_FTIM2 SYS_FPGA_CS_FTIM2
229 #define CONFIG_SYS_CS3_FTIM3 SYS_FPGA_CS_FTIM3
231 #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
232 #define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NAND_CSPR_EXT
233 #define CONFIG_SYS_CSPR0 CONFIG_SYS_NAND_CSPR
234 #define CONFIG_SYS_AMASK0 CONFIG_SYS_NAND_AMASK
235 #define CONFIG_SYS_CSOR0 CONFIG_SYS_NAND_CSOR
236 #define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NAND_FTIM0
237 #define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NAND_FTIM1
238 #define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NAND_FTIM2
239 #define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NAND_FTIM3
240 #define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_FPGA_CSPR_EXT
241 #define CONFIG_SYS_CSPR2 CONFIG_SYS_FPGA_CSPR
242 #define CONFIG_SYS_CSPR2_FINAL SYS_FPGA_CSPR_FINAL
243 #define CONFIG_SYS_AMASK2 SYS_FPGA_AMASK
244 #define CONFIG_SYS_CSOR2 CONFIG_SYS_FPGA_CSOR
245 #define CONFIG_SYS_CS2_FTIM0 SYS_FPGA_CS_FTIM0
246 #define CONFIG_SYS_CS2_FTIM1 SYS_FPGA_CS_FTIM1
247 #define CONFIG_SYS_CS2_FTIM2 SYS_FPGA_CS_FTIM2
248 #define CONFIG_SYS_CS2_FTIM3 SYS_FPGA_CS_FTIM3
250 #define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT
251 #define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR0_CSPR_EARLY
252 #define CONFIG_SYS_CSPR0_FINAL CONFIG_SYS_NOR0_CSPR
253 #define CONFIG_SYS_AMASK0 CONFIG_SYS_NOR_AMASK
254 #define CONFIG_SYS_CSOR0 CONFIG_SYS_NOR_CSOR
255 #define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NOR_FTIM0
256 #define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NOR_FTIM1
257 #define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NOR_FTIM2
258 #define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NOR_FTIM3
259 #define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR0_CSPR_EXT
260 #define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR1_CSPR_EARLY
261 #define CONFIG_SYS_CSPR1_FINAL CONFIG_SYS_NOR1_CSPR
262 #define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK_EARLY
263 #define CONFIG_SYS_AMASK1_FINAL CONFIG_SYS_NOR_AMASK
264 #define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR
265 #define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0
266 #define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1
267 #define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2
268 #define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3
269 #define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NAND_CSPR_EXT
270 #define CONFIG_SYS_CSPR2 CONFIG_SYS_NAND_CSPR
271 #define CONFIG_SYS_AMASK2 CONFIG_SYS_NAND_AMASK
272 #define CONFIG_SYS_CSOR2 CONFIG_SYS_NAND_CSOR
273 #define CONFIG_SYS_CS2_FTIM0 CONFIG_SYS_NAND_FTIM0
274 #define CONFIG_SYS_CS2_FTIM1 CONFIG_SYS_NAND_FTIM1
275 #define CONFIG_SYS_CS2_FTIM2 CONFIG_SYS_NAND_FTIM2
276 #define CONFIG_SYS_CS2_FTIM3 CONFIG_SYS_NAND_FTIM3
277 #define CONFIG_SYS_CSPR3_EXT CONFIG_SYS_FPGA_CSPR_EXT
278 #define CONFIG_SYS_CSPR3 CONFIG_SYS_FPGA_CSPR
279 #define CONFIG_SYS_CSPR3_FINAL SYS_FPGA_CSPR_FINAL
280 #define CONFIG_SYS_AMASK3 SYS_FPGA_AMASK
281 #define CONFIG_SYS_CSOR3 CONFIG_SYS_FPGA_CSOR
282 #define CONFIG_SYS_CS3_FTIM0 SYS_FPGA_CS_FTIM0
283 #define CONFIG_SYS_CS3_FTIM1 SYS_FPGA_CS_FTIM1
284 #define CONFIG_SYS_CS3_FTIM2 SYS_FPGA_CS_FTIM2
285 #define CONFIG_SYS_CS3_FTIM3 SYS_FPGA_CS_FTIM3
289 #define CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS 5000
292 * I2C bus multiplexer
294 #define I2C_MUX_PCA_ADDR_PRI 0x77
295 #define I2C_MUX_PCA_ADDR_SEC 0x76 /* Secondary multiplexer */
296 #define I2C_RETIMER_ADDR 0x18
297 #define I2C_RETIMER_ADDR2 0x19
298 #define I2C_MUX_CH_DEFAULT 0x8
299 #define I2C_MUX_CH5 0xD
301 #define I2C_MUX_CH_VOL_MONITOR 0xA
303 /* Voltage monitor on channel 2*/
304 #define I2C_VOL_MONITOR_ADDR 0x63
305 #define I2C_VOL_MONITOR_BUS_V_OFFSET 0x2
306 #define I2C_VOL_MONITOR_BUS_V_OVF 0x1
307 #define I2C_VOL_MONITOR_BUS_V_SHIFT 3
308 #define I2C_SVDD_MONITOR_ADDR 0x4F
310 #define CONFIG_VID_FLS_ENV "ls1088aqds_vdd_mv"
313 /* The lowest and highest voltage allowed for LS1088AQDS */
314 #define VDD_MV_MIN 819
315 #define VDD_MV_MAX 1212
317 #define CONFIG_VOL_MONITOR_LTC3882_SET
318 #define CONFIG_VOL_MONITOR_LTC3882_READ
320 #define PWM_CHANNEL0 0x0
326 #define CONFIG_SYS_I2C_RTC_ADDR 0x51 /* Channel 3*/
329 #define CONFIG_SYS_I2C_EEPROM_NXID
330 #define CONFIG_SYS_EEPROM_BUS_NUM 0
332 #ifdef CONFIG_FSL_DSPI
333 #define CONFIG_SPI_FLASH_STMICRO
334 #define CONFIG_SPI_FLASH_SST
335 #define CONFIG_SPI_FLASH_EON
336 #if !defined(CONFIG_TFABOOT) && \
337 !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI)
341 #ifdef CONFIG_SPL_BUILD
342 #define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE
344 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
347 #define CONFIG_FSL_MEMAC
350 #define CONFIG_ESDHC_DETECT_QUIRK ((readb(QIXIS_BASE + QIXIS_STAT_PRES1) & \
351 QIXIS_SDID_MASK) != QIXIS_ESDHC_NO_ADAPTER)
354 "kernelheader_addr_r=0x80200000\0" \
355 "fdtheader_addr_r=0x80100000\0" \
356 "kernel_addr_r=0x81000000\0" \
357 "fdt_addr_r=0x90000000\0" \
358 "load_addr=0xa0000000\0"
360 /* Initial environment variables */
361 #ifdef CONFIG_NXP_ESBC
362 #undef CONFIG_EXTRA_ENV_SETTINGS
363 #define CONFIG_EXTRA_ENV_SETTINGS \
365 "hwconfig=fsl_ddr:bank_intlv=auto\0" \
366 "loadaddr=0x90100000\0" \
367 "kernel_addr=0x100000\0" \
368 "ramdisk_addr=0x800000\0" \
369 "ramdisk_size=0x2000000\0" \
370 "fdt_high=0xa0000000\0" \
371 "initrd_high=0xffffffffffffffff\0" \
372 "kernel_start=0x1000000\0" \
373 "kernel_load=0xa0000000\0" \
374 "kernel_size=0x2800000\0" \
375 "mcinitcmd=sf probe 0:0;sf read 0xa0a00000 0xa00000 0x200000;" \
376 "sf read 0xa0640000 0x640000 0x4000; esbc_validate 0xa0640000;" \
377 "sf read 0xa0e00000 0xe00000 0x100000;" \
378 "sf read 0xa0680000 0x680000 0x4000;esbc_validate 0xa0680000;" \
379 "fsl_mc start mc 0xa0a00000 0xa0e00000\0" \
380 "mcmemsize=0x70000000 \0"
381 #else /* if !(CONFIG_NXP_ESBC) */
382 #ifdef CONFIG_TFABOOT
383 #define QSPI_MC_INIT_CMD \
384 "sf probe 0:0;sf read 0x80a00000 0xA00000 0x200000;" \
385 "sf read 0x80e00000 0xE00000 0x100000;" \
386 "fsl_mc start mc 0x80a00000 0x80e00000\0"
387 #define SD_MC_INIT_CMD \
388 "mmcinfo;mmc read 0x80a00000 0x5000 0x1000;" \
389 "mmc read 0x80e00000 0x7000 0x800;" \
390 "fsl_mc start mc 0x80a00000 0x80e00000\0"
391 #define IFC_MC_INIT_CMD \
392 "fsl_mc start mc 0x580A00000 0x580E00000\0"
394 #undef CONFIG_EXTRA_ENV_SETTINGS
395 #define CONFIG_EXTRA_ENV_SETTINGS \
397 "hwconfig=fsl_ddr:bank_intlv=auto\0" \
398 "loadaddr=0x90100000\0" \
399 "kernel_addr=0x100000\0" \
400 "kernel_addr_sd=0x800\0" \
401 "ramdisk_addr=0x800000\0" \
402 "ramdisk_size=0x2000000\0" \
403 "fdt_high=0xa0000000\0" \
404 "initrd_high=0xffffffffffffffff\0" \
405 "kernel_start=0x1000000\0" \
406 "kernel_start_sd=0x8000\0" \
407 "kernel_load=0xa0000000\0" \
408 "kernel_size=0x2800000\0" \
409 "kernel_size_sd=0x14000\0" \
410 "mcinitcmd=sf probe 0:0;sf read 0x80a00000 0xA00000 0x200000;" \
411 "sf read 0x80e00000 0xE00000 0x100000;" \
412 "fsl_mc start mc 0x80a00000 0x80e00000\0" \
413 "mcmemsize=0x70000000 \0" \
414 "BOARD=ls1088aqds\0" \
415 "scriptaddr=0x80000000\0" \
416 "scripthdraddr=0x80080000\0" \
418 "boot_scripts=ls1088aqds_boot.scr\0" \
419 "boot_script_hdr=hdr_ls1088aqds_bs.out\0" \
420 "scan_dev_for_boot_part=" \
421 "part list ${devtype} ${devnum} devplist; " \
422 "env exists devplist || setenv devplist 1; " \
423 "for distro_bootpart in ${devplist}; do " \
424 "if fstype ${devtype} " \
425 "${devnum}:${distro_bootpart} " \
426 "bootfstype; then " \
427 "run scan_dev_for_boot; " \
431 "load ${devtype} ${devnum}:${distro_bootpart} " \
432 "${scriptaddr} ${prefix}${script}; " \
433 "env exists secureboot && load ${devtype} " \
434 "${devnum}:${distro_bootpart} " \
435 "${scripthdraddr} ${prefix}${boot_script_hdr}; "\
436 "env exists secureboot " \
437 "&& esbc_validate ${scripthdraddr};" \
438 "source ${scriptaddr}\0" \
439 "qspi_bootcmd=echo Trying load from qspi..; " \
441 "sf read 0x80001000 0xd00000 0x100000; " \
442 "fsl_mc lazyapply dpl 0x80001000 && " \
443 "sf read $kernel_load $kernel_start " \
444 "$kernel_size && bootm $kernel_load#$BOARD\0" \
445 "sd_bootcmd=echo Trying load from sd card..; " \
446 "mmcinfo;mmc read 0x80001000 0x6800 0x800; "\
447 "fsl_mc lazyapply dpl 0x80001000 && " \
448 "mmc read $kernel_load $kernel_start_sd " \
449 "$kernel_size_sd && bootm $kernel_load#$BOARD\0" \
450 "nor_bootcmd=echo Trying load from nor..; " \
451 "fsl_mc lazyapply dpl 0x580d00000 && " \
452 "cp.b $kernel_start $kernel_load " \
453 "$kernel_size && bootm $kernel_load#$BOARD\0"
455 #if defined(CONFIG_QSPI_BOOT)
456 #undef CONFIG_EXTRA_ENV_SETTINGS
457 #define CONFIG_EXTRA_ENV_SETTINGS \
459 "hwconfig=fsl_ddr:bank_intlv=auto\0" \
460 "loadaddr=0x90100000\0" \
461 "kernel_addr=0x100000\0" \
462 "ramdisk_addr=0x800000\0" \
463 "ramdisk_size=0x2000000\0" \
464 "fdt_high=0xa0000000\0" \
465 "initrd_high=0xffffffffffffffff\0" \
466 "kernel_start=0x1000000\0" \
467 "kernel_load=0xa0000000\0" \
468 "kernel_size=0x2800000\0" \
469 "mcinitcmd=sf probe 0:0;sf read 0x80a00000 0xA00000 0x200000;" \
470 "sf read 0x80e00000 0xE00000 0x100000;" \
471 "fsl_mc start mc 0x80a00000 0x80e00000\0" \
472 "mcmemsize=0x70000000 \0"
473 #elif defined(CONFIG_SD_BOOT)
474 #undef CONFIG_EXTRA_ENV_SETTINGS
475 #define CONFIG_EXTRA_ENV_SETTINGS \
477 "hwconfig=fsl_ddr:bank_intlv=auto\0" \
478 "loadaddr=0x90100000\0" \
479 "kernel_addr=0x800\0" \
480 "ramdisk_addr=0x800000\0" \
481 "ramdisk_size=0x2000000\0" \
482 "fdt_high=0xa0000000\0" \
483 "initrd_high=0xffffffffffffffff\0" \
484 "kernel_start=0x8000\0" \
485 "kernel_load=0xa0000000\0" \
486 "kernel_size=0x14000\0" \
487 "mcinitcmd=mmcinfo;mmc read 0x80a00000 0x5000 0x1000;" \
488 "mmc read 0x80e00000 0x7000 0x800;" \
489 "fsl_mc start mc 0x80a00000 0x80e00000\0" \
490 "mcmemsize=0x70000000 \0"
492 #undef CONFIG_EXTRA_ENV_SETTINGS
493 #define CONFIG_EXTRA_ENV_SETTINGS \
495 "hwconfig=fsl_ddr:bank_intlv=auto\0" \
496 "loadaddr=0x90100000\0" \
497 "kernel_addr=0x100000\0" \
498 "ramdisk_addr=0x800000\0" \
499 "ramdisk_size=0x2000000\0" \
500 "fdt_high=0xa0000000\0" \
501 "initrd_high=0xffffffffffffffff\0" \
502 "kernel_start=0x1000000\0" \
503 "kernel_load=0xa0000000\0" \
504 "kernel_size=0x2800000\0" \
505 "mcinitcmd=fsl_mc start mc 0x580A00000 0x580E00000\0" \
506 "mcmemsize=0x70000000 \0"
508 #endif /* CONFIG_TFABOOT */
509 #endif /* CONFIG_NXP_ESBC */
511 #ifdef CONFIG_TFABOOT
512 #define QSPI_NOR_BOOTCOMMAND "run distro_bootcmd; run qspi_bootcmd; " \
513 "env exists secureboot && esbc_halt;;"
514 #define IFC_NOR_BOOTCOMMAND "run distro_bootcmd; run nor_bootcmd; " \
515 "env exists secureboot && esbc_halt;;"
516 #define SD_BOOTCOMMAND "run distro_bootcmd; run sd_bootcmd; " \
517 "env exists secureboot && esbc_halt;;"
520 #ifdef CONFIG_FSL_MC_ENET
521 #define CONFIG_FSL_MEMAC
522 #define RGMII_PHY1_ADDR 0x1
523 #define RGMII_PHY2_ADDR 0x2
524 #define SGMII_CARD_PORT1_PHY_ADDR 0x1C
525 #define SGMII_CARD_PORT2_PHY_ADDR 0x1d
526 #define SGMII_CARD_PORT3_PHY_ADDR 0x1E
527 #define SGMII_CARD_PORT4_PHY_ADDR 0x1F
529 #define XQSGMII_CARD_PHY1_PORT0_ADDR 0x0
530 #define XQSGMII_CARD_PHY1_PORT1_ADDR 0x1
531 #define XQSGMII_CARD_PHY1_PORT2_ADDR 0x2
532 #define XQSGMII_CARD_PHY1_PORT3_ADDR 0x3
533 #define XQSGMII_CARD_PHY2_PORT0_ADDR 0x4
534 #define XQSGMII_CARD_PHY2_PORT1_ADDR 0x5
535 #define XQSGMII_CARD_PHY2_PORT2_ADDR 0x6
536 #define XQSGMII_CARD_PHY2_PORT3_ADDR 0x7
537 #define XQSGMII_CARD_PHY3_PORT0_ADDR 0x8
538 #define XQSGMII_CARD_PHY3_PORT1_ADDR 0x9
539 #define XQSGMII_CARD_PHY3_PORT2_ADDR 0xa
540 #define XQSGMII_CARD_PHY3_PORT3_ADDR 0xb
541 #define XQSGMII_CARD_PHY4_PORT0_ADDR 0xc
542 #define XQSGMII_CARD_PHY4_PORT1_ADDR 0xd
543 #define XQSGMII_CARD_PHY4_PORT2_ADDR 0xe
544 #define XQSGMII_CARD_PHY4_PORT3_ADDR 0xf
546 #define CONFIG_ETHPRIME "DPMAC1@xgmii"
547 #define CONFIG_PHY_GIGE /* Include GbE speed/duplex detection */
551 #define BOOT_TARGET_DEVICES(func) \
554 func(SCSI, scsi, 0) \
556 #include <config_distro_bootcmd.h>
558 #include <asm/fsl_secure_boot.h>
560 #endif /* __LS1088A_QDS_H */