2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2016-06-03 13:11:34 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2016 Freescale Semiconductor
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __LS1012A_COMMON_H
|
|
|
|
#define __LS1012A_COMMON_H
|
|
|
|
|
|
|
|
#define CONFIG_GICV2
|
|
|
|
|
|
|
|
#include <asm/arch/config.h>
|
2017-03-22 06:36:29 +00:00
|
|
|
#include <asm/arch/stream_id_lsch2.h>
|
2016-06-03 13:11:34 +00:00
|
|
|
|
2017-01-10 08:44:15 +00:00
|
|
|
#define CONFIG_SYS_CLK_FREQ 125000000
|
2016-06-03 13:11:34 +00:00
|
|
|
|
|
|
|
#define CONFIG_SKIP_LOWLEVEL_INIT
|
|
|
|
|
2018-11-05 18:02:53 +00:00
|
|
|
#ifdef CONFIG_TFABOOT
|
|
|
|
#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_TEXT_BASE
|
|
|
|
#else
|
2016-06-03 13:11:34 +00:00
|
|
|
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_FSL_OCRAM_BASE + 0xfff0)
|
2018-11-05 18:02:53 +00:00
|
|
|
#endif
|
2016-06-03 13:11:34 +00:00
|
|
|
#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_DDR_SDRAM_BASE + 0x10000000)
|
|
|
|
|
|
|
|
#define CONFIG_SYS_DDR_SDRAM_BASE 0x80000000
|
|
|
|
#define CONFIG_SYS_FSL_DDR_SDRAM_BASE_PHY 0
|
|
|
|
#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
|
2017-01-30 11:35:22 +00:00
|
|
|
#define CONFIG_SYS_DDR_BLOCK2_BASE 0x880000000ULL
|
2016-06-03 13:11:34 +00:00
|
|
|
|
|
|
|
/* Generic Timer Definitions */
|
2017-10-12 06:29:26 +00:00
|
|
|
#define COUNTER_FREQUENCY 25000000 /* 25MHz */
|
2016-06-03 13:11:34 +00:00
|
|
|
|
|
|
|
/* CSU */
|
|
|
|
#define CONFIG_LAYERSCAPE_NS_ACCESS
|
|
|
|
|
|
|
|
/* Size of malloc() pool */
|
|
|
|
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128 * 1024)
|
|
|
|
|
|
|
|
/*SPI device */
|
2018-11-05 18:02:53 +00:00
|
|
|
#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_TFABOOT)
|
2016-06-03 13:11:34 +00:00
|
|
|
#define CONFIG_SYS_FMAN_FW_ADDR 0x400d0000
|
|
|
|
#define CONFIG_SPI_FLASH_SPANSION
|
|
|
|
#define CONFIG_FSL_SPI_INTERFACE
|
|
|
|
#define CONFIG_SF_DATAFLASH
|
|
|
|
|
|
|
|
#define QSPI0_AMBA_BASE 0x40000000
|
|
|
|
#define CONFIG_SPI_FLASH_SPANSION
|
|
|
|
|
2017-04-25 09:21:38 +00:00
|
|
|
#define FSL_QSPI_FLASH_SIZE SZ_64M
|
2016-06-03 13:11:34 +00:00
|
|
|
#define FSL_QSPI_FLASH_NUM 2
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Environment
|
|
|
|
*/
|
|
|
|
#define CONFIG_ENV_OVERWRITE
|
|
|
|
#endif
|
|
|
|
|
2018-01-03 07:53:10 +00:00
|
|
|
/* SATA */
|
|
|
|
#define CONFIG_SCSI_AHCI_PLAT
|
|
|
|
|
|
|
|
#define CONFIG_SYS_SATA AHCI_BASE_ADDR
|
|
|
|
|
|
|
|
#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1
|
|
|
|
#define CONFIG_SYS_SCSI_MAX_LUN 1
|
|
|
|
#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
|
|
|
|
CONFIG_SYS_SCSI_MAX_LUN)
|
|
|
|
|
2016-06-03 13:11:34 +00:00
|
|
|
/* I2C */
|
|
|
|
#define CONFIG_SYS_I2C
|
|
|
|
|
|
|
|
#define CONFIG_SYS_NS16550_SERIAL
|
|
|
|
#define CONFIG_SYS_NS16550_REG_SIZE 1
|
2017-01-10 08:44:15 +00:00
|
|
|
#define CONFIG_SYS_NS16550_CLK (get_serial_clock())
|
2016-06-03 13:11:34 +00:00
|
|
|
|
|
|
|
#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
|
|
|
|
|
|
|
|
#define CONFIG_SYS_HZ 1000
|
|
|
|
|
|
|
|
#define CONFIG_HWCONFIG
|
|
|
|
#define HWCONFIG_BUFFER_SIZE 128
|
|
|
|
|
2017-11-30 11:14:38 +00:00
|
|
|
#ifndef CONFIG_SPL_BUILD
|
|
|
|
#define BOOT_TARGET_DEVICES(func) \
|
|
|
|
func(MMC, mmc, 0) \
|
2019-02-19 06:44:04 +00:00
|
|
|
func(USB, usb, 0) \
|
|
|
|
func(SCSI, scsi, 0) \
|
|
|
|
func(DHCP, dhcp, na)
|
2017-11-30 11:14:38 +00:00
|
|
|
#include <config_distro_bootcmd.h>
|
|
|
|
#endif
|
|
|
|
|
2016-06-03 13:11:34 +00:00
|
|
|
/* Initial environment variables */
|
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
|
|
"verify=no\0" \
|
|
|
|
"loadaddr=0x80100000\0" \
|
|
|
|
"kernel_addr=0x100000\0" \
|
|
|
|
"fdt_high=0xffffffffffffffff\0" \
|
|
|
|
"initrd_high=0xffffffffffffffff\0" \
|
2017-11-13 23:35:10 +00:00
|
|
|
"kernel_start=0x1000000\0" \
|
2016-06-03 13:11:34 +00:00
|
|
|
"kernel_load=0xa0000000\0" \
|
|
|
|
"kernel_size=0x2800000\0" \
|
|
|
|
|
2017-11-30 11:14:38 +00:00
|
|
|
#undef CONFIG_BOOTCOMMAND
|
2018-11-05 18:02:53 +00:00
|
|
|
#ifdef CONFIG_TFABOOT
|
|
|
|
#define QSPI_NOR_BOOTCOMMAND "pfe stop; sf probe 0:0; sf read $kernel_load "\
|
|
|
|
"$kernel_start $kernel_size && "\
|
|
|
|
"bootm $kernel_load"
|
|
|
|
#else
|
2018-03-08 10:00:35 +00:00
|
|
|
#define CONFIG_BOOTCOMMAND "pfe stop; sf probe 0:0; sf read $kernel_load "\
|
|
|
|
"$kernel_start $kernel_size && "\
|
|
|
|
"bootm $kernel_load"
|
2018-11-05 18:02:53 +00:00
|
|
|
#endif
|
2016-06-03 13:11:34 +00:00
|
|
|
|
|
|
|
/* Monitor Command Prompt */
|
|
|
|
#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
|
|
|
|
#define CONFIG_SYS_MAXARGS 64 /* max command args */
|
|
|
|
|
|
|
|
#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */
|
|
|
|
|
2017-05-17 14:23:10 +00:00
|
|
|
#include <asm/arch/soc.h>
|
|
|
|
|
2016-06-03 13:11:34 +00:00
|
|
|
#endif /* __LS1012A_COMMON_H */
|