Merge "ipq5018: Tiny-nor support"

This commit is contained in:
Linux Build Service Account 2020-04-15 13:45:54 -07:00 committed by Gerrit - the friendly Code Review server
commit 28e69e89c5
9 changed files with 385 additions and 32 deletions

View file

@ -63,6 +63,7 @@ dtb-$(CONFIG_ARCH_IPQ40xx) += ipq40xx-dk01-c1.dtb \
ipq40xx-dk01-s1.dtb \
ipq40xx-dk06-c1.dtb
ifneq ($(CONFIG_IPQ_TINY),y)
dtb-$(CONFIG_ARCH_IPQ5018) += ipq5018-emulation.dtb \
ipq5018-mp02.1.dtb \
ipq5018-mp03.1.dtb \
@ -70,6 +71,9 @@ dtb-$(CONFIG_ARCH_IPQ5018) += ipq5018-emulation.dtb \
ipq5018-db-mp02.1.dtb \
ipq5018-db-mp03.1.dtb \
ipq5018-db-mp03.3.dtb
else
dtb-$(CONFIG_ARCH_IPQ5018) += ipq5018-emulation.dtb
endif
dtb-$(CONFIG_ARCH_IPQ6018) += ipq6018-cp01-c1.dtb \
ipq6018-cp02-c1.dtb \

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2016, 2018-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2015-2016, 2018-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
@ -18,6 +18,4 @@
#ifdef CONFIG_IPQ5018_I2C
void i2c_clock_config(void);
#endif
#define CLK_ENABLE 0x1
#endif /*IPQ5018_CLK_H*/

View file

@ -21,5 +21,20 @@ config USB_XHCI_IPQ
config PCI_IPQ
bool "Enable pci support for ipq5018"
config MMC_FLASH
bool "Enable MMC flash support for ipq5018"
config IPQ_TZT
bool "Enable TZ test command for ipq5018"
config UBI_WRITE
bool "Enable ubi volume write command for ipq5018"
config QPIC_SERIAL
bool "Enable QPIC serial spi nand for ipq5018"
config IPQ_TINY
bool "Enable Tiny support for ipq5018"
endif

View file

@ -472,6 +472,7 @@ static int do_boot_signedimg(cmd_tbl_t *cmdtp, int flag, int argc, char *const a
kernel_img_info.kernel_load_addr = request;
if (ipq_fs_on_nand) {
#ifdef CONFIG_CMD_UBI
/*
* The kernel will be available inside a UBI volume
*/
@ -512,6 +513,7 @@ static int do_boot_signedimg(cmd_tbl_t *cmdtp, int flag, int argc, char *const a
kernel_img_info.kernel_load_size =
(unsigned int)ubi_get_volume_size("kernel");
#endif
#ifdef CONFIG_QCA_MMC
} else if (sfi->flash_type == SMEM_BOOT_MMC_FLASH ||
((sfi->flash_type == SMEM_BOOT_SPI_FLASH) &&

View file

@ -23,9 +23,13 @@
#include <asm/arch-qca-common/scm.h>
#include <asm/arch-qca-common/iomap.h>
#include <ipq5018.h>
#ifdef CONFIG_QCA_MMC
#include <mmc.h>
#include <sdhci.h>
#endif
#ifdef CONFIG_USB_XHCI_IPQ
#include <usb.h>
#endif
#define DLOAD_MAGIC_COOKIE 0x10
#define DLOAD_DISABLED 0x40
@ -33,7 +37,11 @@
ipq_gmac_board_cfg_t gmac_cfg[CONFIG_IPQ_NO_MACS];
DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_QCA_MMC
struct sdhci_host mmc_host;
#endif
extern int ipq_spi_init(u16);
const char *rsvd_node = "/reserved-memory";
@ -511,7 +519,9 @@ void qpic_clk_enbale(void)
void board_nand_init(void)
{
#ifdef CONFIG_QPIC_SERIAL
qpic_nand_init(NULL);
#endif
#ifdef CONFIG_QCA_SPI
int gpio_node;

View file

@ -292,6 +292,8 @@
#define ARM_PSCI_TZ_FN_CPU_ON ARM_PSCI_TZ_FN(3)
#define ARM_PSCI_TZ_FN_AFFINITY_INFO ARM_PSCI_TZ_FN(4)
#define CLK_ENABLE 0x1
unsigned int __invoke_psci_fn_smc(unsigned int, unsigned int,
unsigned int, unsigned int);

View file

@ -18,8 +18,9 @@ CONFIG_SYS_EXTRA_OPTIONS=""
CONFIG_SYS_PROMPT="IPQ5018# "
#
# Commands
# Tiny support
#
# CONFIG_IPQ_TINY is not set
#
# Info commands
@ -53,7 +54,7 @@ CONFIG_CMD_ENV_EXISTS=y
CONFIG_CMD_MEMORY=y
CONFIG_CMD_CRC32=y
# CONFIG_LOOPW is not set
# CONFIG_CMD_MEMTEST is not set
CONFIG_CMD_MEMTEST=y
# CONFIG_CMD_MX_CYCLIC is not set
# CONFIG_CMD_MEMINFO is not set
@ -104,7 +105,8 @@ CONFIG_CMD_MISC=y
CONFIG_CMD_PART=y
CONFIG_PARTITION_UUIDS=y
# CONFIG_CMD_TIMER is not set
CONFIG_IPQ_TZT=y
CONFIG_UBI_WRITE=y
#
# Boot timing
#
@ -176,6 +178,7 @@ CONFIG_SIMPLE_BUS=y
#
# CONFIG_DM_I2C_COMPAT is not set
# CONFIG_CROS_EC_KEYB is not set
CONFIG_IPQ5018_I2C=y
#
# LED Support
@ -194,6 +197,7 @@ CONFIG_SIMPLE_BUS=y
# MMC Host controller Support
#
# CONFIG_DM_MMC is not set
CONFIG_MMC_FLASH=y
#
# NAND Device Support
@ -206,6 +210,11 @@ CONFIG_SIMPLE_BUS=y
# Generic NAND options
#
#
# Serial NAND
#
CONFIG_QPIC_SERIAL=y
#
# SPI Flash Support

View file

@ -0,0 +1,323 @@
CONFIG_ARM=y
CONFIG_HAS_VBAR=y
CONFIG_CPU_V7=y
CONFIG_ARCH_IPQ5018=y
CONFIG_SYS_MALLOC_F_LEN=0x400
CONFIG_SYS_MALLOC_F=y
CONFIG_DM_SERIAL=y
CONFIG_DEFAULT_DEVICE_TREE=""
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EXPERT=y
CONFIG_SYS_MALLOC_CLEAR_ON_INIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
# CONFIG_FIT_SIGNATURE is not set
CONFIG_SYS_EXTRA_OPTIONS=""
CONFIG_SYS_PROMPT="IPQ5018# "
#
# Tiny support
#
CONFIG_IPQ_TINY=y
#
# Info commands
#
CONFIG_CMD_BDI=y
CONFIG_CMD_CONSOLE=y
#
# Boot commands
#
# CONFIG_CMD_BOOTD is not set
CONFIG_CMD_BOOTM=y
# CONFIG_CMD_GO is not set
# CONFIG_CMD_RUN is not set
# CONFIG_CMD_IMI is not set
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_XIMG is not set
#
# Environment commands
#
CONFIG_CMD_EXPORTENV=y
CONFIG_CMD_IMPORTENV=y
CONFIG_CMD_EDITENV=y
CONFIG_CMD_SAVEENV=y
CONFIG_CMD_ENV_EXISTS=y
#
# Memory commands
#
CONFIG_CMD_MEMORY=y
CONFIG_CMD_CRC32=y
# CONFIG_LOOPW is not set
# CONFIG_CMD_MEMTEST is not set
# CONFIG_CMD_MX_CYCLIC is not set
# CONFIG_CMD_MEMINFO is not set
#
# Device access commands
#
CONFIG_CMD_DM=y
# CONFIG_CMD_DEMO is not set
# CONFIG_CMD_LOADB is not set
# CONFIG_CMD_LOADS is not set
CONFIG_CMD_FLASH=y
# CONFIG_CMD_NAND is not set
# CONFIG_CMD_SF is not set
# CONFIG_CMD_SPI is not set
# CONFIG_CMD_I2C is not set
# CONFIG_CMD_USB is not set
# CONFIG_CMD_FPGA is not set
#
# Shell scripting commands
#
CONFIG_CMD_ECHO=y
CONFIG_CMD_ITEST=y
CONFIG_CMD_SOURCE=y
CONFIG_CMD_SETEXPR=y
#
# Network commands
#
CONFIG_CMD_NET=y
# CONFIG_CMD_TFTPPUT is not set
# CONFIG_CMD_TFTPSRV is not set
# CONFIG_CMD_RARP is not set
# CONFIG_CMD_DHCP is not set
# CONFIG_CMD_NFS is not set
# CONFIG_CMD_PING is not set
# CONFIG_CMD_CDP is not set
# CONFIG_CMD_SNTP is not set
# CONFIG_CMD_DNS is not set
# CONFIG_CMD_LINK_LOCAL is not set
#
# Misc commands
#
# CONFIG_CMD_TIME is not set
CONFIG_CMD_MISC=y
CONFIG_CMD_PART=y
CONFIG_PARTITION_UUIDS=y
# CONFIG_CMD_TIMER is not set
# CONFIG_IPQ_TZT is not set
# CONFIG_UBI_WRITE is not set
#
# Boot timing
#
# CONFIG_BOOTSTAGE is not set
CONFIG_BOOTSTAGE_USER_COUNT=20
CONFIG_BOOTSTAGE_STASH_ADDR=0
CONFIG_BOOTSTAGE_STASH_SIZE=4096
#
# Power commands
#
#
# Security commands
#
CONFIG_SUPPORT_OF_CONTROL=y
#
# Device Tree Control
#
CONFIG_OF_CONTROL=y
CONFIG_OF_SEPARATE=y
# CONFIG_OF_EMBED is not set
CONFIG_NET=y
# CONFIG_NET_RANDOM_ETHADDR is not set
# CONFIG_NETCONSOLE is not set
#
# Device Drivers
#
#
# Generic Driver Options
#
CONFIG_DM=y
CONFIG_DM_WARN=y
CONFIG_DM_DEVICE_REMOVE=y
CONFIG_DM_STDIO=y
CONFIG_DM_SEQ_ALIAS=y
# CONFIG_REGMAP is not set
# CONFIG_DEVRES is not set
CONFIG_SIMPLE_BUS=y
# CONFIG_CLK is not set
# CONFIG_CPU is not set
#
# Hardware crypto devices
#
# CONFIG_FSL_CAAM is not set
#
# Demo for driver model
#
# CONFIG_DM_DEMO is not set
#
# DFU support
#
# CONFIG_DFU_TFTP is not set
#
# GPIO Support
#
# CONFIG_LPC32XX_GPIO is not set
# CONFIG_VYBRID_GPIO is not set
#
# I2C support
#
# CONFIG_DM_I2C_COMPAT is not set
# CONFIG_CROS_EC_KEYB is not set
# CONFIG_IPQ5018_I2C is not set
#
# LED Support
#
# CONFIG_LED is not set
#
# Multifunction device drivers
#
# CONFIG_CROS_EC is not set
# CONFIG_FSL_SEC_MON is not set
# CONFIG_PCA9551_LED is not set
# CONFIG_RESET is not set
#
# MMC Host controller Support
#
# CONFIG_DM_MMC is not set
# CONFIG_MMC_FLASH is not set
#
# NAND Device Support
#
# CONFIG_NAND_DENALI is not set
# CONFIG_NAND_VF610_NFC is not set
# CONFIG_NAND_PXA3XX is not set
#
# Generic NAND options
#
#
# Serial NAND
#
# CONFIG_QPIC_SERIAL is not set
#
# SPI Flash Support
#
# CONFIG_SPI_FLASH is not set
# CONFIG_DM_ETH is not set
# CONFIG_PHYLIB is not set
# CONFIG_NETDEVICES is not set
#
# PCI
#
# CONFIG_DM_PCI is not set
# CONFIG_PCI_IPQ is not set
#
# Pin controllers
#
# CONFIG_PINCTRL is not set
#
# Power
#
# CONFIG_DM_PMIC is not set
# CONFIG_DM_REGULATOR is not set
# CONFIG_RAM is not set
#
# Real Time Clock
#
# CONFIG_DM_RTC is not set
#
# Serial drivers
#
CONFIG_REQUIRE_SERIAL_CONSOLE=y
# CONFIG_DEBUG_UART is not set
#
# Sound support
#
# CONFIG_SOUND is not set
#
# SPI Support
#
# CONFIG_FSL_ESPI is not set
# CONFIG_TI_QSPI is not set
# CONFIG_DM_THERMAL is not set
#
# TPM support
#
#
# USB support
#
# CONFIG_USB is not set
# CONFIG_DM_USB is not set
# CONFIG_USB_XHCI_IPQ is not set
#
# Graphics support
#
# CONFIG_VIDEO_VESA is not set
# CONFIG_VIDEO_LCD_ANX9804 is not set
# CONFIG_VIDEO_LCD_SSD2828 is not set
# CONFIG_DISPLAY_PORT is not set
# CONFIG_VIDEO_TEGRA124 is not set
# CONFIG_VIDEO_BRIDGE is not set
# CONFIG_PHYS_TO_BUS is not set
#
# File systems
#
#
# Library routines
#
# CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED is not set
CONFIG_HAVE_PRIVATE_LIBGCC=y
# CONFIG_USE_PRIVATE_LIBGCC is not set
CONFIG_SYS_HZ=1000
# CONFIG_SYS_VSNPRINTF is not set
CONFIG_REGEX=y
# CONFIG_LIB_RAND is not set
# CONFIG_CMD_DHRYSTONE is not set
# CONFIG_RSA is not set
# CONFIG_TPM is not set
#
# Hashing Support
#
# CONFIG_SHA1 is not set
# CONFIG_SHA256 is not set
# CONFIG_SHA_HW_ACCEL is not set
#
# Compression Support
#
# CONFIG_LZ4 is not set
# CONFIG_ERRNO_STR is not set
# CONFIG_UNIT_TEST is not set

View file

@ -32,6 +32,8 @@
/*
* 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
@ -49,12 +51,6 @@
*/
#define CONFIG_ARMV7_PSCI
/*
* Block Device & Disk Partition Config
*/
#define HAVE_BLOCK_DEVICE
#define CONFIG_DOS_PARTITION
/*
* Enable Flashwrite command
*/
@ -157,11 +153,9 @@ extern loff_t board_env_size;
#define CONFIG_CMD_NAND_YAFFS
#define CONFIG_SYS_NAND_SELF_INIT
#define CONFIG_SYS_NAND_ONFI_DETECTION
#ifdef CONFIG_QPIC_SERIAL
#define CONFIG_PAGE_SCOPE_MULTI_PAGE_READ
/* QSPI Flash configs
*/
#define CONFIG_QPIC_SERIAL
#endif
/*
* SPI Flash Configs
@ -189,9 +183,8 @@ extern loff_t board_env_size;
/*
* MMC configs
*/
#ifdef CONFIG_MMC_FLASH
#define CONFIG_QCA_MMC
#ifdef CONFIG_QCA_MMC
#define CONFIG_MMC
#define CONFIG_CMD_MMC
#define CONFIG_GENERIC_MMC
@ -211,8 +204,6 @@ extern loff_t board_env_size;
/*
* I2C Enable
*/
#define CONFIG_IPQ5018_I2C
#ifdef CONFIG_IPQ5018_I2C
#define CONFIG_SYS_I2C_QUP
#define CONFIG_CMD_I2C
@ -250,6 +241,11 @@ extern loff_t board_env_size;
#define CONFIG_USB_STORAGE
#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
/*
* Block Device & Disk Partition Config
*/
#define HAVE_BLOCK_DEVICE
#define CONFIG_DOS_PARTITION
#endif
/*
@ -288,7 +284,6 @@ extern loff_t board_env_size;
#define CONFIG_CMD_XIMG
/* MTEST */
#define CONFIG_CMD_MEMTEST
#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE + 0x1300000
#define CONFIG_SYS_MEMTEST_END CONFIG_SYS_MEMTEST_START + 0x100
@ -304,7 +299,6 @@ extern loff_t board_env_size;
#define CONFIG_MTD_PARTITIONS
#define NUM_ALT_PARTITION 16
#define CONFIG_CMD_UBI
#define CONFIG_RBTREE
#define CONFIG_CMD_BOOTZ
@ -337,9 +331,7 @@ extern loff_t board_env_size;
#define CONFIG_QCA_APPSBL_DLOAD
#define CONFIG_IPQ5018_DMAGIC_ADDR 0x193D100
#ifdef CONFIG_QCA_APPSBL_DLOAD
#define CONFIG_CMD_TFTPPUT
#define CONFIG_CMD_TFTPPUT
/* We will be uploading very big files */
#undef CONFIG_NET_RETRY_COUNT
#define CONFIG_NET_RETRY_COUNT 500
@ -356,14 +348,12 @@ extern loff_t board_env_size;
* size is configured to 64 */
#define CONFIG_SYS_CACHELINE_SIZE 64
/*
* Tz Xpu test ccommand
*/
#define CONFIG_IPQ_TZT
/*
* UBI write command
*/
#ifdef CONFIG_UBI_WRITE
#define CONFIG_CMD_UBI
#define IPQ_UBI_VOL_WRITE_SUPPORT
#endif
#endif /* _IPQ5018_H */