mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
Disabled the cache commands config CONFIG_CMD_CACHE. This changes removes the icache and dcache commands. Signed-off-by: Karthick Shanmugham <kartshan@codeaurora.org> Change-Id: I0cfd4df12e452a15861f0df7f4512234113d315a
429 lines
10 KiB
C
429 lines
10 KiB
C
/*
|
|
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#ifndef _IPQ5018_H
|
|
#define _IPQ5018_H
|
|
|
|
#ifndef DO_DEPS_ONLY
|
|
#include <generated/asm-offsets.h>
|
|
#endif
|
|
|
|
#define CONFIG_IPQ5018
|
|
#undef CONFIG_QCA_DISABLE_SCM
|
|
#define CONFIG_SPI_FLASH_CYPRESS
|
|
#define CONFIG_SYS_NO_FLASH
|
|
#define CONFIG_SYS_CACHELINE_SIZE 64
|
|
#define CONFIG_IPQ_NO_RELOC
|
|
|
|
#define CONFIG_SYS_VSNPRINTF
|
|
|
|
/*
|
|
* Enable Early and Late init
|
|
* This config needs for secondary boot and to set BADOFF5E
|
|
* This config also need for spi-nor boot,
|
|
* set size and offset of hlos and rootfs
|
|
*/
|
|
#define CONFIG_BOARD_EARLY_INIT_F
|
|
#define CONFIG_BOARD_LATE_INIT
|
|
|
|
#define CONFIG_IPQ5018_UART
|
|
#define CONFIG_NR_DRAM_BANKS 1
|
|
#define CONFIG_SKIP_LOWLEVEL_INIT
|
|
|
|
#define CONFIG_SYS_BOOTM_LEN 0x4000000
|
|
|
|
#define CONFIG_ENV_SIZE_MAX (256 << 10) /* 256 KB */
|
|
|
|
/*
|
|
* PSCI Calls enable
|
|
*/
|
|
#define CONFIG_ARMV7_PSCI
|
|
|
|
/*
|
|
* Enable Flashwrite command
|
|
*/
|
|
#define CONFIG_CMD_FLASHWRITE
|
|
|
|
/*
|
|
* Enable Env overwrite support
|
|
*/
|
|
#define CONFIG_ENV_OVERWRITE
|
|
|
|
/*
|
|
* select serial console configuration
|
|
*/
|
|
#define CONFIG_CONS_INDEX 1
|
|
#define CONFIG_SYS_DEVICE_NULLDEV
|
|
|
|
/* allow to overwrite serial and ethaddr */
|
|
#define CONFIG_BAUDRATE 115200
|
|
#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
|
|
115200}
|
|
|
|
#define CONFIG_SYS_CBSIZE (512 * 2) /* Console I/O Buffer Size */
|
|
/*
|
|
|
|
svc_sp --> --------------
|
|
irq_sp --> | |
|
|
fiq_sp --> | |
|
|
bd --> | |
|
|
gd --> | |
|
|
pgt --> | |
|
|
malloc --> | |
|
|
text_base --> |------------|
|
|
*/
|
|
|
|
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE -\
|
|
CONFIG_SYS_MALLOC_LEN - CONFIG_ENV_SIZE -\
|
|
GENERATED_BD_INFO_SIZE)
|
|
|
|
#define CONFIG_SYS_MAXARGS 16
|
|
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
|
|
sizeof(CONFIG_SYS_PROMPT) + 16)
|
|
|
|
#define TLMM_BASE 0x01000000
|
|
#define GPIO_CONFIG_ADDR(x) (TLMM_BASE + (x)*0x1000)
|
|
#define GPIO_IN_OUT_ADDR(x) (TLMM_BASE + 0x4 + (x)*0x1000)
|
|
|
|
#define CONFIG_SYS_SDRAM_BASE 0x40000000
|
|
#define CONFIG_SYS_TEXT_BASE 0x4A920000
|
|
#define CONFIG_SYS_SDRAM_SIZE 0x10000000
|
|
#define CONFIG_MAX_RAM_BANK_SIZE CONFIG_SYS_SDRAM_SIZE
|
|
#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + (64 << 20))
|
|
|
|
#define QCA_KERNEL_START_ADDR CONFIG_SYS_SDRAM_BASE
|
|
#define QCA_DRAM_KERNEL_SIZE CONFIG_SYS_SDRAM_SIZE
|
|
#define QCA_BOOT_PARAMS_ADDR (QCA_KERNEL_START_ADDR + 0x100)
|
|
|
|
#define CONFIG_OF_COMBINE 1
|
|
|
|
|
|
#define CONFIG_QCA_SMEM_BASE 0x4AB00000
|
|
|
|
#define CONFIG_IPQ_FDT_HIGH 0x4A400000
|
|
#define CONFIG_ENV_IS_IN_SPI_FLASH 1
|
|
#define CONFIG_ENV_SECT_SIZE (64 * 1024)
|
|
|
|
#define CONFIG_QCA_UBOOT_OFFSET 0xA800000
|
|
#define CONFIG_UBOOT_END_ADDR 0x4AA00000
|
|
|
|
/*
|
|
* IPQ_TFTP_MIN_ADDR: Starting address of Linux HLOS region.
|
|
* CONFIG_TZ_END_ADDR: Ending address of Trust Zone and starting
|
|
* address of WLAN Area.
|
|
* TFTP file can only be written in Linux HLOS region and WLAN AREA.
|
|
*/
|
|
#define IPQ_TFTP_MIN_ADDR (CONFIG_SYS_SDRAM_BASE + (16 << 20))
|
|
#define CONFIG_TZ_END_ADDR (CONFIG_SYS_SDRAM_BASE + (88 << 21))
|
|
#define CONFIG_SYS_SDRAM_END ((long long)CONFIG_SYS_SDRAM_BASE + gd->ram_size)
|
|
|
|
#ifndef __ASSEMBLY__
|
|
#include <compiler.h>
|
|
extern loff_t board_env_offset;
|
|
extern loff_t board_env_range;
|
|
extern loff_t board_env_size;
|
|
#endif
|
|
|
|
#define CONFIG_IPQ5018_ENV 1
|
|
#define CONFIG_ENV_OFFSET board_env_offset
|
|
#define CONFIG_ENV_SIZE CONFIG_ENV_SIZE_MAX
|
|
#define CONFIG_ENV_RANGE board_env_range
|
|
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE_MAX + (500 << 10))
|
|
|
|
/*
|
|
* NAND Flash Configs
|
|
*/
|
|
|
|
/* CONFIG_QPIC_NAND: QPIC NAND in BAM mode
|
|
* CONFIG_IPQ_NAND: QPIC NAND in FIFO/block mode.
|
|
* BAM is enabled by default.
|
|
*/
|
|
#define CONFIG_CMD_MTDPARTS
|
|
#define CONFIG_SYS_NAND_SELF_INIT
|
|
|
|
#ifdef CONFIG_NAND_FLASH
|
|
#define CONFIG_CMD_NAND
|
|
#define CONFIG_ENV_IS_IN_NAND 1
|
|
#define CONFIG_QPIC_NAND
|
|
#define CONFIG_SYS_NAND_ONFI_DETECTION
|
|
#define CONFIG_CMD_NAND_YAFFS
|
|
#define CONFIG_MTD_DEVICE
|
|
#define CONFIG_MTD_PARTITIONS
|
|
#endif
|
|
|
|
#ifdef CONFIG_QPIC_SERIAL
|
|
#ifdef QSPI_SERIAL_DEBUG /* QSPI DEBUG */
|
|
#define qspi_debug(fmt,args...) printf (fmt ,##args)
|
|
#else
|
|
#define qspi_debug(fmt,args...)
|
|
#endif /* QSPI DEBUG */
|
|
#define CONFIG_PAGE_SCOPE_MULTI_PAGE_READ
|
|
#define CONFIG_QSPI_SERIAL_TRAINING
|
|
#endif
|
|
|
|
/*
|
|
* SPI Flash Configs
|
|
*/
|
|
#define CONFIG_QCA_SPI
|
|
#define CONFIG_SPI_FLASH
|
|
#define CONFIG_CMD_SF
|
|
#define CONFIG_SPI_FLASH_STMICRO
|
|
#define CONFIG_SPI_FLASH_WINBOND
|
|
#define CONFIG_SPI_FLASH_MACRONIX
|
|
#define CONFIG_SPI_FLASH_GIGADEVICE
|
|
#define CONFIG_SPI_FLASH_SPANSION
|
|
#define CONFIG_SF_DEFAULT_BUS 0
|
|
#define CONFIG_SF_DEFAULT_CS 0
|
|
#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
|
|
#define CONFIG_SF_DEFAULT_SPEED (48 * 1000 * 1000)
|
|
#define CONFIG_SPI_FLASH_BAR 1
|
|
#define CONFIG_SPI_FLASH_USE_4K_SECTORS
|
|
#define CONFIG_IPQ_4B_ADDR_SWITCH_REQD
|
|
|
|
#define CONFIG_QUP_SPI_USE_DMA 1
|
|
#define CONFIG_QCA_BAM 1
|
|
|
|
/*
|
|
* MMC configs
|
|
*/
|
|
#ifdef CONFIG_MMC_FLASH
|
|
#define CONFIG_QCA_MMC
|
|
#define CONFIG_MMC
|
|
#define CONFIG_CMD_MMC
|
|
#define CONFIG_GENERIC_MMC
|
|
#define CONFIG_SDHCI
|
|
#define CONFIG_SDHCI_QCA
|
|
#define CONFIG_ENV_IS_IN_MMC
|
|
#define CONFIG_SYS_MMC_ENV_DEV 0
|
|
#define CONFIG_SDHCI_SUPPORT
|
|
#define CONFIG_MMC_ADMA
|
|
#define CONFIG_EFI_PARTITION
|
|
/*
|
|
* eMMC controller support only 4-bit
|
|
* force SDHC driver to 4-bit mode
|
|
*/
|
|
#define CONFIG_MMC_FORCE_CAP_4BIT_BUSWIDTH
|
|
#endif
|
|
|
|
/*
|
|
* I2C Enable
|
|
*/
|
|
#ifdef CONFIG_IPQ5018_I2C
|
|
#define CONFIG_SYS_I2C_QUP
|
|
#define CONFIG_CMD_I2C
|
|
#define CONFIG_DM_I2C
|
|
#endif
|
|
|
|
/*
|
|
* GMAC Enable
|
|
*/
|
|
|
|
#define CONFIG_IPQ5018_GMAC
|
|
#define CONFIG_IPQ5018_MDIO
|
|
|
|
#define CONFIG_NET_RETRY_COUNT 5
|
|
#define CONFIG_SYS_RX_ETH_BUFFER 16
|
|
#define CONFIG_CMD_PING
|
|
#define CONFIG_CMD_DHCP
|
|
#define CONFIG_MII
|
|
#define CONFIG_IPADDR 192.168.10.10
|
|
#define CONFIG_NETMASK 255.255.255.0
|
|
#define CONFIG_SERVERIP 192.168.10.19
|
|
#define CONFIG_CMD_TFTPPUT
|
|
#define CONFIG_IPQ_MDIO 1
|
|
#define CONFIG_IPQ_ETH_INIT_DEFER
|
|
#define CONFIG_IPQ_NO_MACS 2
|
|
|
|
/*
|
|
* GEPHY
|
|
*/
|
|
#define CONFIG_GEPHY
|
|
|
|
/*
|
|
* USB Support
|
|
*/
|
|
#ifdef CONFIG_USB_XHCI_IPQ
|
|
#define CONFIG_USB_XHCI
|
|
#define CONFIG_USB_XHCI_DWC3
|
|
#define CONFIG_CMD_USB
|
|
#define CONFIG_USB_STORAGE
|
|
#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
|
|
#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
|
|
|
|
/*
|
|
* USB crashdump collection
|
|
*/
|
|
#define CONFIG_FS_FAT
|
|
#define CONFIG_FAT_WRITE
|
|
#define CONFIG_CMD_FAT
|
|
|
|
/*
|
|
* Block Device & Disk Partition Config
|
|
*/
|
|
#define HAVE_BLOCK_DEVICE
|
|
#define CONFIG_DOS_PARTITION
|
|
#endif
|
|
|
|
/*
|
|
* PCIE Enable
|
|
*/
|
|
#define PCI_MAX_DEVICES 2
|
|
#if defined(CONFIG_PCI_IPQ)
|
|
#define CONFIG_PCI
|
|
#define CONFIG_CMD_PCI
|
|
#define CONFIG_PCI_SCAN_SHOW
|
|
#endif
|
|
|
|
/*
|
|
* Expose SPI driver as a pseudo NAND driver to make use
|
|
* of U-Boot's MTD framework.
|
|
*/
|
|
#define CONFIG_SYS_MAX_NAND_DEVICE CONFIG_IPQ_MAX_NAND_DEVICE + \
|
|
CONFIG_IPQ_MAX_SPI_DEVICE
|
|
|
|
#define CONFIG_IPQ_MAX_NAND_DEVICE 1
|
|
#define CONFIG_IPQ_MAX_SPI_DEVICE 1
|
|
|
|
#define CONFIG_QPIC_NAND_NAND_INFO_IDX 0
|
|
#define CONFIG_IPQ_SPI_NOR_INFO_IDX 1
|
|
|
|
#define CONFIG_NAND_FLASH_INFO_IDX CONFIG_QPIC_NAND_NAND_INFO_IDX
|
|
#define CONFIG_SPI_FLASH_INFO_IDX CONFIG_IPQ_SPI_NOR_INFO_IDX
|
|
|
|
#define QCA_SPI_NOR_DEVICE "spi0.0"
|
|
|
|
/*
|
|
* U-Boot Env Configs
|
|
*/
|
|
#define CONFIG_OF_LIBFDT 1
|
|
#define CONFIG_SYS_HUSH_PARSER
|
|
#define CONFIG_CMD_XIMG
|
|
|
|
/* MTEST */
|
|
#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE + 0x1300000
|
|
#define CONFIG_SYS_MEMTEST_END CONFIG_SYS_MEMTEST_START + 0x100
|
|
|
|
/* NSS firmware loaded using bootm */
|
|
#define CONFIG_BOOTCOMMAND "bootipq"
|
|
#define CONFIG_BOOTARGS "console=ttyMSM0,115200n8"
|
|
#define QCA_ROOT_FS_PART_NAME "rootfs"
|
|
|
|
#define CONFIG_BOOTDELAY 5
|
|
|
|
#define NUM_ALT_PARTITION 16
|
|
|
|
#ifdef CONFIG_IPQ_TINY
|
|
/* undef gzip lib */
|
|
#undef CONFIG_GZIP
|
|
#undef CONFIG_ZLIB
|
|
|
|
#else
|
|
#define CONFIG_CMD_BOOTZ
|
|
|
|
/* Multicore CPU support */
|
|
#define CONFIG_SMP_CMD_SUPPORT
|
|
|
|
/* Mii command support */
|
|
#define CONFIG_CMD_MII
|
|
|
|
/* compress crash dump support */
|
|
#define CONFIG_CMD_ZIP
|
|
#define CONFIG_GZIP_COMPRESSED
|
|
|
|
/* Enable DTB compress */
|
|
#define CONFIG_COMPRESSED_DTB_MAX_SIZE 0x40000
|
|
#define CONFIG_COMPRESSED_DTB_BASE CONFIG_SYS_TEXT_BASE -\
|
|
CONFIG_COMPRESSED_DTB_MAX_SIZE
|
|
#endif
|
|
|
|
#define CONFIG_FDT_FIXUP_PARTITIONS
|
|
|
|
#define CONFIG_IPQ_FDT_FIXUP
|
|
/*
|
|
* Below Configs need to be updated after enabling reset_crashdump
|
|
* Included now to avoid build failure
|
|
*/
|
|
#define CONFIG_OF_BOARD_SETUP
|
|
|
|
#ifdef CONFIG_OF_BOARD_SETUP
|
|
#define DLOAD_DISABLE 0x1
|
|
#define SET_MAGIC 0x1
|
|
#define CLEAR_MAGIC 0x0
|
|
#define SCM_CMD_TZ_CONFIG_HW_FOR_RAM_DUMP_ID 0x9
|
|
#define SCM_CMD_TZ_FORCE_DLOAD_ID 0x10
|
|
#define SCM_CMD_TZ_PSHOLD 0x16
|
|
#define BOOT_VERSION 0
|
|
#define TZ_VERSION 1
|
|
#endif
|
|
|
|
|
|
#define CONFIG_IPQ5018_TZ_WONCE_4_ADDR 0x193d010
|
|
/*
|
|
* CRASH DUMP ENABLE
|
|
*/
|
|
#define CONFIG_QCA_APPSBL_DLOAD
|
|
#define CONFIG_IPQ5018_DMAGIC_ADDR 0x193D100
|
|
#ifdef CONFIG_QCA_APPSBL_DLOAD
|
|
|
|
#undef CONFIG_NET_RETRY_COUNT
|
|
#define CONFIG_NET_RETRY_COUNT 500
|
|
|
|
#define IPQ_TEMP_DUMP_ADDR 0x44000000
|
|
#endif
|
|
|
|
#define CONFIG_QCA_KERNEL_CRASHDUMP_ADDRESS *((unsigned int *)0x08600658)
|
|
#define CONFIG_CPU_CONTEXT_DUMP_SIZE 4096
|
|
#define TLV_BUF_OFFSET 1012 * 1024
|
|
#define CONFIG_TLV_DUMP_SIZE 12 * 1024
|
|
|
|
/* L1 cache line size is 64 bytes, L2 cache line size is 128 bytes
|
|
* Cache flush and invalidation based on L1 cache, so the cache line
|
|
* size is configured to 64 */
|
|
#define CONFIG_SYS_CACHELINE_SIZE 64
|
|
|
|
/*
|
|
* UBI write command
|
|
*/
|
|
#ifdef CONFIG_UBI_WRITE
|
|
#define CONFIG_CMD_UBI
|
|
#define CONFIG_RBTREE
|
|
#define IPQ_UBI_VOL_WRITE_SUPPORT
|
|
#endif
|
|
|
|
#undef CONFIG_BOOTM_NETBSD
|
|
#undef CONFIG_BOOTM_PLAN9
|
|
#undef CONFIG_BOOTM_RTEMS
|
|
#undef CONFIG_BOOTM_VXWORKS
|
|
|
|
#ifdef CONFIG_ART_COMPRESSED
|
|
/*
|
|
* This location use to keep comprssed data for
|
|
* uncompress process.
|
|
* default location is CONFIG_SYS_LOAD_ADDR if not defined.
|
|
*/
|
|
#define CONFIG_COMPRESSED_LOAD_ADDR (CONFIG_SYS_LOAD_ADDR + (1 << 22))
|
|
#endif
|
|
|
|
#ifdef CONFIG_SMP_CMD_SUPPORT
|
|
#define NR_CPUS 2
|
|
#endif
|
|
|
|
/*
|
|
* 96 MHz
|
|
*/
|
|
|
|
#define INTERNAL_96MHZ
|
|
|
|
/*#define CONFIG_IPQ_BT_SUPPORT*/
|
|
|
|
#endif /* _IPQ5018_H */
|