2014-10-03 10:21:06 +00:00
|
|
|
/*
|
2016-08-10 07:08:49 +00:00
|
|
|
* Copyright (C) 2012-2015 Panasonic Corporation
|
|
|
|
* Copyright (C) 2015-2016 Socionext Inc.
|
|
|
|
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
|
2014-10-03 10:21:06 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
|
|
*/
|
|
|
|
|
2016-02-06 03:30:11 +00:00
|
|
|
/* U-Boot - Common settings for UniPhier Family */
|
2014-10-03 10:21:06 +00:00
|
|
|
|
|
|
|
#ifndef __CONFIG_UNIPHIER_COMMON_H__
|
|
|
|
#define __CONFIG_UNIPHIER_COMMON_H__
|
|
|
|
|
2016-08-25 12:03:41 +00:00
|
|
|
#define CONFIG_ARMV7_PSCI_1_0
|
2016-08-10 07:08:49 +00:00
|
|
|
|
2015-01-13 03:44:39 +00:00
|
|
|
#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
|
|
|
|
|
2014-12-05 15:03:22 +00:00
|
|
|
#define CONFIG_SMC911X
|
|
|
|
|
2015-09-21 15:27:32 +00:00
|
|
|
/* dummy: referenced by examples/standalone/smc911x_eeprom.c */
|
|
|
|
#define CONFIG_SMC911X_BASE 0
|
2014-10-03 10:21:06 +00:00
|
|
|
#define CONFIG_SMC911X_32_BIT
|
|
|
|
|
|
|
|
/*-----------------------------------------------------------------------
|
|
|
|
* MMU and Cache Setting
|
|
|
|
*----------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
/* Comment out the following to enable L1 cache */
|
|
|
|
/* #define CONFIG_SYS_ICACHE_OFF */
|
|
|
|
/* #define CONFIG_SYS_DCACHE_OFF */
|
|
|
|
|
|
|
|
#define CONFIG_DISPLAY_CPUINFO
|
|
|
|
#define CONFIG_DISPLAY_BOARDINFO
|
|
|
|
#define CONFIG_BOARD_LATE_INIT
|
|
|
|
|
|
|
|
#define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024)
|
|
|
|
|
|
|
|
#define CONFIG_TIMESTAMP
|
|
|
|
|
|
|
|
/* FLASH related */
|
|
|
|
#define CONFIG_MTD_DEVICE
|
|
|
|
|
2016-10-08 04:25:27 +00:00
|
|
|
#ifndef CONFIG_MICRO_SUPPORT_CARD
|
|
|
|
#define CONFIG_SYS_NO_FLASH
|
|
|
|
#endif
|
2014-10-03 10:21:06 +00:00
|
|
|
|
|
|
|
#define CONFIG_FLASH_CFI_DRIVER
|
|
|
|
#define CONFIG_SYS_FLASH_CFI
|
|
|
|
|
|
|
|
#define CONFIG_SYS_MAX_FLASH_SECT 256
|
|
|
|
#define CONFIG_SYS_MONITOR_BASE 0
|
2016-03-22 16:40:05 +00:00
|
|
|
#define CONFIG_SYS_MONITOR_LEN 0x00080000 /* 512KB */
|
2014-10-03 10:21:06 +00:00
|
|
|
#define CONFIG_SYS_FLASH_BASE 0
|
|
|
|
|
|
|
|
/*
|
2016-10-08 04:25:26 +00:00
|
|
|
* flash_toggle does not work for our support card.
|
2014-10-03 10:21:06 +00:00
|
|
|
* We need to use flash_status_poll.
|
|
|
|
*/
|
|
|
|
#define CONFIG_SYS_CFI_FLASH_STATUS_POLL
|
|
|
|
|
|
|
|
#define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */
|
|
|
|
|
2015-09-11 11:17:45 +00:00
|
|
|
#define CONFIG_SYS_MAX_FLASH_BANKS_DETECT 1
|
2014-10-03 10:21:06 +00:00
|
|
|
|
|
|
|
/* serial console configuration */
|
|
|
|
#define CONFIG_BAUDRATE 115200
|
|
|
|
|
2016-04-21 05:43:18 +00:00
|
|
|
#if !defined(CONFIG_SPL_BUILD) && !defined(CONFIG_ARM64)
|
2014-10-03 10:21:06 +00:00
|
|
|
#define CONFIG_USE_ARCH_MEMSET
|
|
|
|
#define CONFIG_USE_ARCH_MEMCPY
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define CONFIG_SYS_LONGHELP /* undef to save memory */
|
|
|
|
|
|
|
|
#define CONFIG_CMDLINE_EDITING /* add command line history */
|
|
|
|
#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
|
|
|
|
/* Print Buffer Size */
|
|
|
|
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
|
|
|
|
#define CONFIG_SYS_MAXARGS 16 /* max number of command */
|
|
|
|
/* Boot Argument Buffer Size */
|
|
|
|
#define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
|
|
|
|
|
|
|
|
#define CONFIG_CONS_INDEX 1
|
|
|
|
|
2016-02-16 08:08:42 +00:00
|
|
|
/* #define CONFIG_ENV_IS_NOWHERE */
|
2014-10-03 10:21:06 +00:00
|
|
|
/* #define CONFIG_ENV_IS_IN_NAND */
|
2016-02-16 08:08:42 +00:00
|
|
|
#define CONFIG_ENV_IS_IN_MMC
|
|
|
|
#define CONFIG_ENV_OFFSET 0x80000
|
2014-10-03 10:21:06 +00:00
|
|
|
#define CONFIG_ENV_SIZE 0x2000
|
|
|
|
/* #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) */
|
|
|
|
|
2016-02-16 08:08:42 +00:00
|
|
|
#define CONFIG_SYS_MMC_ENV_DEV 0
|
|
|
|
#define CONFIG_SYS_MMC_ENV_PART 1
|
|
|
|
|
2016-04-21 05:43:18 +00:00
|
|
|
#ifdef CONFIG_ARM64
|
2016-06-15 05:46:09 +00:00
|
|
|
#define CPU_RELEASE_ADDR 0x80000000
|
2016-04-21 05:43:18 +00:00
|
|
|
#define COUNTER_FREQUENCY 50000000
|
|
|
|
#define CONFIG_GICV3
|
|
|
|
#define GICD_BASE 0x5fe00000
|
2016-05-24 12:14:01 +00:00
|
|
|
#if defined(CONFIG_ARCH_UNIPHIER_LD11)
|
|
|
|
#define GICR_BASE 0x5fe40000
|
|
|
|
#elif defined(CONFIG_ARCH_UNIPHIER_LD20)
|
2016-04-21 05:43:18 +00:00
|
|
|
#define GICR_BASE 0x5fe80000
|
2016-05-24 12:14:01 +00:00
|
|
|
#endif
|
2016-04-21 05:43:18 +00:00
|
|
|
#else
|
2014-10-03 10:21:06 +00:00
|
|
|
/* Time clock 1MHz */
|
|
|
|
#define CONFIG_SYS_TIMER_RATE 1000000
|
2016-04-21 05:43:18 +00:00
|
|
|
#endif
|
|
|
|
|
2014-10-03 10:21:06 +00:00
|
|
|
|
|
|
|
#define CONFIG_SYS_MAX_NAND_DEVICE 1
|
|
|
|
#define CONFIG_SYS_NAND_MAX_CHIPS 2
|
|
|
|
#define CONFIG_SYS_NAND_ONFI_DETECTION
|
|
|
|
|
|
|
|
#define CONFIG_NAND_DENALI_ECC_SIZE 1024
|
|
|
|
|
2016-03-18 07:41:43 +00:00
|
|
|
#ifdef CONFIG_ARCH_UNIPHIER_SLD3
|
2015-07-21 05:04:22 +00:00
|
|
|
#define CONFIG_SYS_NAND_REGS_BASE 0xf8100000
|
|
|
|
#define CONFIG_SYS_NAND_DATA_BASE 0xf8000000
|
|
|
|
#else
|
2014-10-03 10:21:06 +00:00
|
|
|
#define CONFIG_SYS_NAND_REGS_BASE 0x68100000
|
|
|
|
#define CONFIG_SYS_NAND_DATA_BASE 0x68000000
|
2015-07-21 05:04:22 +00:00
|
|
|
#endif
|
2014-10-03 10:21:06 +00:00
|
|
|
|
|
|
|
#define CONFIG_SYS_NAND_BASE (CONFIG_SYS_NAND_DATA_BASE + 0x10)
|
|
|
|
|
|
|
|
#define CONFIG_SYS_NAND_USE_FLASH_BBT
|
|
|
|
#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
|
|
|
|
|
2014-11-07 09:48:34 +00:00
|
|
|
/* USB */
|
|
|
|
#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
|
2015-02-26 17:27:01 +00:00
|
|
|
#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 4
|
2014-11-07 09:48:34 +00:00
|
|
|
#define CONFIG_FAT_WRITE
|
|
|
|
#define CONFIG_DOS_PARTITION
|
|
|
|
|
2016-02-18 10:52:49 +00:00
|
|
|
/* SD/MMC */
|
2016-02-16 08:08:39 +00:00
|
|
|
#define CONFIG_SUPPORT_EMMC_BOOT
|
2016-02-18 10:52:49 +00:00
|
|
|
#define CONFIG_GENERIC_MMC
|
|
|
|
|
2014-10-03 10:21:06 +00:00
|
|
|
/* memtest works on */
|
|
|
|
#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
|
|
|
|
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x01000000)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Network Configuration
|
|
|
|
*/
|
|
|
|
#define CONFIG_SERVERIP 192.168.11.1
|
|
|
|
#define CONFIG_IPADDR 192.168.11.10
|
|
|
|
#define CONFIG_GATEWAYIP 192.168.11.1
|
|
|
|
#define CONFIG_NETMASK 255.255.255.0
|
|
|
|
|
|
|
|
#define CONFIG_LOADADDR 0x84000000
|
|
|
|
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
|
|
|
|
|
|
|
|
#define CONFIG_CMDLINE_EDITING /* add command line history */
|
|
|
|
|
|
|
|
#define CONFIG_BOOTCOMMAND "run $bootmode"
|
|
|
|
|
|
|
|
#define CONFIG_ROOTPATH "/nfs/root/path"
|
|
|
|
#define CONFIG_NFSBOOTCOMMAND \
|
|
|
|
"setenv bootargs $bootargs root=/dev/nfs rw " \
|
|
|
|
"nfsroot=$serverip:$rootpath " \
|
|
|
|
"ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off;" \
|
2016-01-21 05:56:09 +00:00
|
|
|
"run __nfsboot"
|
2014-10-03 10:21:06 +00:00
|
|
|
|
2015-07-21 05:04:18 +00:00
|
|
|
#ifdef CONFIG_FIT
|
|
|
|
#define CONFIG_BOOTFILE "fitImage"
|
|
|
|
#define LINUXBOOT_ENV_SETTINGS \
|
|
|
|
"fit_addr=0x00100000\0" \
|
|
|
|
"fit_addr_r=0x84100000\0" \
|
|
|
|
"fit_size=0x00f00000\0" \
|
2015-09-21 15:27:38 +00:00
|
|
|
"norboot=setexpr fit_addr $nor_base + $fit_addr &&" \
|
2015-07-21 05:04:18 +00:00
|
|
|
"bootm $fit_addr\0" \
|
2015-09-21 15:27:38 +00:00
|
|
|
"nandboot=nand read $fit_addr_r $fit_addr $fit_size &&" \
|
2015-07-21 05:04:19 +00:00
|
|
|
"bootm $fit_addr_r\0" \
|
2015-09-21 15:27:38 +00:00
|
|
|
"tftpboot=tftpboot $fit_addr_r $bootfile &&" \
|
2016-01-21 05:56:09 +00:00
|
|
|
"bootm $fit_addr_r\0" \
|
|
|
|
"__nfsboot=run tftpboot\0"
|
2015-07-21 05:04:18 +00:00
|
|
|
#else
|
2016-04-21 05:43:18 +00:00
|
|
|
#ifdef CONFIG_ARM64
|
|
|
|
#define CONFIG_BOOTFILE "Image"
|
|
|
|
#define LINUXBOOT_CMD "booti"
|
|
|
|
#define KERNEL_ADDR_R "kernel_addr_r=0x80080000\0"
|
|
|
|
#define KERNEL_SIZE "kernel_size=0x00c00000\0"
|
|
|
|
#define RAMDISK_ADDR "ramdisk_addr=0x00e00000\0"
|
|
|
|
#else
|
2015-12-18 05:52:32 +00:00
|
|
|
#define CONFIG_BOOTFILE "zImage"
|
2016-04-21 05:43:18 +00:00
|
|
|
#define LINUXBOOT_CMD "bootz"
|
|
|
|
#define KERNEL_ADDR_R "kernel_addr_r=0x80208000\0"
|
|
|
|
#define KERNEL_SIZE "kernel_size=0x00800000\0"
|
|
|
|
#define RAMDISK_ADDR "ramdisk_addr=0x00a00000\0"
|
|
|
|
#endif
|
2015-07-21 05:04:18 +00:00
|
|
|
#define LINUXBOOT_ENV_SETTINGS \
|
|
|
|
"fdt_addr=0x00100000\0" \
|
|
|
|
"fdt_addr_r=0x84100000\0" \
|
|
|
|
"fdt_size=0x00008000\0" \
|
|
|
|
"kernel_addr=0x00200000\0" \
|
2016-04-21 05:43:18 +00:00
|
|
|
KERNEL_ADDR_R \
|
|
|
|
KERNEL_SIZE \
|
|
|
|
RAMDISK_ADDR \
|
2015-07-21 05:04:18 +00:00
|
|
|
"ramdisk_addr_r=0x84a00000\0" \
|
|
|
|
"ramdisk_size=0x00600000\0" \
|
2015-07-21 05:04:19 +00:00
|
|
|
"ramdisk_file=rootfs.cpio.uboot\0" \
|
2016-01-21 05:56:08 +00:00
|
|
|
"boot_common=setexpr bootm_low $kernel_addr_r '&' fe000000 &&" \
|
2016-04-21 05:43:18 +00:00
|
|
|
LINUXBOOT_CMD " $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0" \
|
2016-01-21 05:56:08 +00:00
|
|
|
"norboot=setexpr kernel_addr $nor_base + $kernel_addr &&" \
|
2016-04-21 05:43:22 +00:00
|
|
|
"setexpr kernel_size $kernel_size / 4 &&" \
|
|
|
|
"cp $kernel_addr $kernel_addr_r $kernel_size &&" \
|
2016-01-21 05:56:08 +00:00
|
|
|
"setexpr ramdisk_addr_r $nor_base + $ramdisk_addr &&" \
|
|
|
|
"setexpr fdt_addr_r $nor_base + $fdt_addr &&" \
|
|
|
|
"run boot_common\0" \
|
|
|
|
"nandboot=nand read $kernel_addr_r $kernel_addr $kernel_size &&" \
|
2015-07-21 05:04:18 +00:00
|
|
|
"nand read $ramdisk_addr_r $ramdisk_addr $ramdisk_size &&" \
|
|
|
|
"nand read $fdt_addr_r $fdt_addr $fdt_size &&" \
|
2016-01-21 05:56:08 +00:00
|
|
|
"run boot_common\0" \
|
|
|
|
"tftpboot=tftpboot $kernel_addr_r $bootfile &&" \
|
2015-07-21 05:04:19 +00:00
|
|
|
"tftpboot $ramdisk_addr_r $ramdisk_file &&" \
|
|
|
|
"tftpboot $fdt_addr_r $fdt_file &&" \
|
2016-01-21 05:56:09 +00:00
|
|
|
"run boot_common\0" \
|
|
|
|
"__nfsboot=tftpboot $kernel_addr_r $bootfile &&" \
|
|
|
|
"tftpboot $fdt_addr_r $fdt_file &&" \
|
|
|
|
"setenv ramdisk_addr_r - &&" \
|
2016-01-21 05:56:08 +00:00
|
|
|
"run boot_common\0"
|
2015-07-21 05:04:18 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
|
|
"netdev=eth0\0" \
|
|
|
|
"verify=n\0" \
|
2016-01-21 05:56:06 +00:00
|
|
|
"nor_base=0x42000000\0" \
|
2016-03-24 13:23:36 +00:00
|
|
|
"sramupdate=setexpr tmp_addr $nor_base + 0x50000 &&" \
|
|
|
|
"tftpboot $tmp_addr u-boot-spl.bin &&" \
|
|
|
|
"setexpr tmp_addr $nor_base + 0x60000 &&" \
|
|
|
|
"tftpboot $tmp_addr u-boot.bin\0" \
|
2016-02-16 08:08:41 +00:00
|
|
|
"emmcupdate=mmcsetn &&" \
|
|
|
|
"mmc partconf $mmc_first_dev 0 1 1 &&" \
|
|
|
|
"tftpboot u-boot-spl.bin &&" \
|
|
|
|
"mmc write $loadaddr 0 80 &&" \
|
2016-03-22 16:40:05 +00:00
|
|
|
"tftpboot u-boot.bin &&" \
|
2016-02-16 08:08:41 +00:00
|
|
|
"mmc write $loadaddr 80 780\0" \
|
2015-07-21 05:04:18 +00:00
|
|
|
"nandupdate=nand erase 0 0x00100000 &&" \
|
2016-02-02 03:53:31 +00:00
|
|
|
"tftpboot u-boot-spl.bin &&" \
|
2015-07-21 05:04:18 +00:00
|
|
|
"nand write $loadaddr 0 0x00010000 &&" \
|
2016-03-22 16:40:05 +00:00
|
|
|
"tftpboot u-boot.bin &&" \
|
2015-07-21 05:04:18 +00:00
|
|
|
"nand write $loadaddr 0x00010000 0x000f0000\0" \
|
|
|
|
LINUXBOOT_ENV_SETTINGS
|
2014-10-03 10:21:06 +00:00
|
|
|
|
2016-01-08 17:12:26 +00:00
|
|
|
#define CONFIG_SYS_BOOTMAPSZ 0x20000000
|
|
|
|
|
2015-09-11 11:17:49 +00:00
|
|
|
#define CONFIG_SYS_SDRAM_BASE 0x80000000
|
2014-10-03 10:21:06 +00:00
|
|
|
#define CONFIG_NR_DRAM_BANKS 2
|
2016-04-21 05:43:19 +00:00
|
|
|
/* for LD20; the last 64 byte is used for dynamic DDR PHY training */
|
|
|
|
#define CONFIG_SYS_MEM_TOP_HIDE 64
|
2014-10-03 10:21:06 +00:00
|
|
|
|
2016-04-21 05:43:18 +00:00
|
|
|
#if defined(CONFIG_ARM64)
|
|
|
|
#define CONFIG_SPL_TEXT_BASE 0x30000000
|
|
|
|
#elif defined(CONFIG_ARCH_UNIPHIER_SLD3) || \
|
|
|
|
defined(CONFIG_ARCH_UNIPHIER_LD4) || \
|
2016-03-18 07:41:43 +00:00
|
|
|
defined(CONFIG_ARCH_UNIPHIER_SLD8)
|
2014-12-05 15:03:22 +00:00
|
|
|
#define CONFIG_SPL_TEXT_BASE 0x00040000
|
2015-09-21 15:27:39 +00:00
|
|
|
#else
|
2014-12-05 15:03:22 +00:00
|
|
|
#define CONFIG_SPL_TEXT_BASE 0x00100000
|
|
|
|
#endif
|
|
|
|
|
2016-05-24 12:14:01 +00:00
|
|
|
#if defined(CONFIG_ARCH_UNIPHIER_LD11)
|
|
|
|
#define CONFIG_SPL_STACK (0x30014c00)
|
|
|
|
#elif defined(CONFIG_ARCH_UNIPHIER_LD20)
|
2016-04-21 05:43:18 +00:00
|
|
|
#define CONFIG_SPL_STACK (0x3001c000)
|
|
|
|
#else
|
2016-02-02 12:11:28 +00:00
|
|
|
#define CONFIG_SPL_STACK (0x00100000)
|
2016-04-21 05:43:18 +00:00
|
|
|
#endif
|
2015-03-22 15:07:28 +00:00
|
|
|
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE)
|
2014-10-03 10:21:06 +00:00
|
|
|
|
2015-03-22 15:07:24 +00:00
|
|
|
#define CONFIG_PANIC_HANG
|
|
|
|
|
2014-10-03 10:21:06 +00:00
|
|
|
#define CONFIG_SPL_FRAMEWORK
|
2016-06-04 13:39:08 +00:00
|
|
|
#ifdef CONFIG_ARM64
|
|
|
|
#define CONFIG_SPL_BOARD_LOAD_IMAGE
|
2016-04-21 05:43:18 +00:00
|
|
|
#endif
|
2014-10-03 10:21:06 +00:00
|
|
|
|
|
|
|
#define CONFIG_SPL_BOARD_INIT
|
|
|
|
|
|
|
|
#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x10000
|
2016-03-22 16:40:04 +00:00
|
|
|
|
2016-03-22 16:40:05 +00:00
|
|
|
/* subtract sizeof(struct image_header) */
|
|
|
|
#define CONFIG_SYS_UBOOT_BASE (0x60000 - 0x40)
|
2016-02-16 08:08:39 +00:00
|
|
|
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x80
|
2014-10-03 10:21:06 +00:00
|
|
|
|
2016-03-22 16:40:05 +00:00
|
|
|
#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
|
2015-03-22 15:07:27 +00:00
|
|
|
#define CONFIG_SPL_MAX_FOOTPRINT 0x10000
|
2016-03-24 13:22:23 +00:00
|
|
|
#define CONFIG_SPL_MAX_SIZE 0x10000
|
2016-05-24 12:14:01 +00:00
|
|
|
#if defined(CONFIG_ARCH_UNIPHIER_LD11)
|
|
|
|
#define CONFIG_SPL_BSS_START_ADDR 0x30012000
|
|
|
|
#elif defined(CONFIG_ARCH_UNIPHIER_LD20)
|
2016-04-21 05:43:18 +00:00
|
|
|
#define CONFIG_SPL_BSS_START_ADDR 0x30016000
|
2016-05-24 12:14:01 +00:00
|
|
|
#endif
|
2016-04-21 05:43:18 +00:00
|
|
|
#define CONFIG_SPL_BSS_MAX_SIZE 0x2000
|
2015-03-22 15:07:27 +00:00
|
|
|
|
2014-10-03 10:21:06 +00:00
|
|
|
#endif /* __CONFIG_UNIPHIER_COMMON_H__ */
|