2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2014-09-01 11:50:53 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 Samsung Electronics
|
|
|
|
* Sanghee Kim <sh0130.kim@samsung.com>
|
|
|
|
* Piotr Wilczek <p.wilczek@samsung.com>
|
|
|
|
* Przemyslaw Marczak <p.marczak@samsung.com>
|
|
|
|
*
|
|
|
|
* Configuation settings for the Odroid-U3 (EXYNOS4412) board.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CONFIG_ODROID_U3_H
|
|
|
|
#define __CONFIG_ODROID_U3_H
|
|
|
|
|
2014-10-08 04:01:44 +00:00
|
|
|
#include <configs/exynos4-common.h>
|
2014-09-01 11:50:53 +00:00
|
|
|
|
|
|
|
#ifndef CONFIG_SYS_L2CACHE_OFF
|
|
|
|
#define CONFIG_SYS_L2_PL310
|
|
|
|
#define CONFIG_SYS_PL310_BASE 0x10502000
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define CONFIG_SYS_SDRAM_BASE 0x40000000
|
|
|
|
#define SDRAM_BANK_SIZE (256 << 20) /* 256 MB */
|
|
|
|
#define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE
|
|
|
|
|
|
|
|
#include <linux/sizes.h>
|
|
|
|
|
|
|
|
/* Partitions name */
|
|
|
|
#define PARTS_BOOT "boot"
|
|
|
|
#define PARTS_ROOT "platform"
|
|
|
|
|
|
|
|
#define CONFIG_DFU_ALT \
|
|
|
|
"uImage fat 0 1;" \
|
|
|
|
"zImage fat 0 1;" \
|
|
|
|
"Image.itb fat 0 1;" \
|
|
|
|
"uInitrd fat 0 1;" \
|
|
|
|
"exynos4412-odroidu3.dtb fat 0 1;" \
|
|
|
|
"exynos4412-odroidx2.dtb fat 0 1;" \
|
|
|
|
""PARTS_BOOT" part 0 1;" \
|
|
|
|
""PARTS_ROOT" part 0 2\0" \
|
|
|
|
|
|
|
|
#define CONFIG_SET_DFU_ALT_BUF_LEN (SZ_1K)
|
|
|
|
|
|
|
|
#define CONFIG_DFU_ALT_BOOT_EMMC \
|
|
|
|
"u-boot raw 0x3e 0x800 mmcpart 1;" \
|
|
|
|
"bl1 raw 0x0 0x1e mmcpart 1;" \
|
|
|
|
"bl2 raw 0x1e 0x1d mmcpart 1;" \
|
|
|
|
"tzsw raw 0x83e 0x138 mmcpart 1\0"
|
|
|
|
|
|
|
|
#define CONFIG_DFU_ALT_BOOT_SD \
|
|
|
|
"u-boot raw 0x3f 0x800;" \
|
|
|
|
"bl1 raw 0x1 0x1e;" \
|
|
|
|
"bl2 raw 0x1f 0x1d;" \
|
|
|
|
"tzsw raw 0x83f 0x138\0"
|
|
|
|
|
2018-07-25 03:18:34 +00:00
|
|
|
#define BOOT_TARGET_DEVICES(func) \
|
2020-01-16 15:25:35 +00:00
|
|
|
func(MMC, mmc, 2) \
|
2018-07-25 03:18:34 +00:00
|
|
|
func(MMC, mmc, 0)
|
|
|
|
|
|
|
|
#include <config_distro_bootcmd.h>
|
|
|
|
|
2014-09-01 11:50:53 +00:00
|
|
|
/*
|
|
|
|
* Bootable media layout:
|
|
|
|
* dev: SD eMMC(part boot)
|
|
|
|
* BL1 1 0
|
|
|
|
* BL2 31 30
|
|
|
|
* UBOOT 63 62
|
|
|
|
* TZSW 2111 2110
|
|
|
|
* ENV 2560 2560(part user)
|
|
|
|
*
|
|
|
|
* MBR Primary partiions:
|
|
|
|
* Num Name Size Offset
|
|
|
|
* 1. BOOT: 100MiB 2MiB
|
|
|
|
* 2. ROOT: -
|
|
|
|
*/
|
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
2015-10-09 12:26:23 +00:00
|
|
|
"loadbootscript=load mmc ${mmcbootdev}:${mmcbootpart} ${scriptaddr} " \
|
|
|
|
"boot.scr\0" \
|
2018-07-25 03:18:32 +00:00
|
|
|
"loadkernel=load mmc ${mmcbootdev}:${mmcbootpart} ${kernel_addr_r} " \
|
2014-09-01 11:50:53 +00:00
|
|
|
"${kernelname}\0" \
|
2018-07-25 03:18:32 +00:00
|
|
|
"loadinitrd=load mmc ${mmcbootdev}:${mmcbootpart} ${ramdisk_addr_r} " \
|
2014-09-01 11:50:53 +00:00
|
|
|
"${initrdname}\0" \
|
2018-07-25 03:18:32 +00:00
|
|
|
"loaddtb=load mmc ${mmcbootdev}:${mmcbootpart} ${fdt_addr_r} " \
|
2014-09-01 11:50:53 +00:00
|
|
|
"${fdtfile}\0" \
|
|
|
|
"check_ramdisk=" \
|
|
|
|
"if run loadinitrd; then " \
|
2018-07-25 03:18:32 +00:00
|
|
|
"setenv initrd_addr ${ramdisk_addr_r};" \
|
2014-09-01 11:50:53 +00:00
|
|
|
"else " \
|
|
|
|
"setenv initrd_addr -;" \
|
|
|
|
"fi;\0" \
|
|
|
|
"check_dtb=" \
|
|
|
|
"if run loaddtb; then " \
|
2018-07-25 03:18:32 +00:00
|
|
|
"setenv fdt_addr ${fdt_addr_r};" \
|
2014-09-01 11:50:53 +00:00
|
|
|
"else " \
|
|
|
|
"setenv fdt_addr;" \
|
|
|
|
"fi;\0" \
|
|
|
|
"kernel_args=" \
|
|
|
|
"setenv bootargs root=/dev/mmcblk${mmcrootdev}p${mmcrootpart}" \
|
|
|
|
" rootwait ${console} ${opts}\0" \
|
2015-10-09 12:26:23 +00:00
|
|
|
"boot_script=" \
|
|
|
|
"run loadbootscript;" \
|
|
|
|
"source ${scriptaddr}\0" \
|
2014-09-01 11:50:53 +00:00
|
|
|
"boot_fit=" \
|
|
|
|
"setenv kernelname Image.itb;" \
|
|
|
|
"run loadkernel;" \
|
|
|
|
"run kernel_args;" \
|
2019-02-22 18:36:43 +00:00
|
|
|
"bootm ${kernel_addr_r}#${board_name}\0" \
|
2014-09-01 11:50:53 +00:00
|
|
|
"boot_uimg=" \
|
|
|
|
"setenv kernelname uImage;" \
|
|
|
|
"run check_dtb;" \
|
|
|
|
"run check_ramdisk;" \
|
|
|
|
"run loadkernel;" \
|
|
|
|
"run kernel_args;" \
|
2018-07-25 03:18:32 +00:00
|
|
|
"bootm ${kernel_addr_r} ${initrd_addr} ${fdt_addr};\0" \
|
2014-09-01 11:50:53 +00:00
|
|
|
"boot_zimg=" \
|
|
|
|
"setenv kernelname zImage;" \
|
|
|
|
"run check_dtb;" \
|
|
|
|
"run check_ramdisk;" \
|
|
|
|
"run loadkernel;" \
|
|
|
|
"run kernel_args;" \
|
2018-07-25 03:18:32 +00:00
|
|
|
"bootz ${kernel_addr_r} ${initrd_addr} ${fdt_addr};\0" \
|
2014-09-01 11:50:53 +00:00
|
|
|
"autoboot=" \
|
2020-01-17 13:12:58 +00:00
|
|
|
"if test -e mmc ${mmcbootdev} boot.scr; then; " \
|
2015-10-09 12:26:23 +00:00
|
|
|
"run boot_script; " \
|
2020-01-17 13:12:58 +00:00
|
|
|
"elif test -e mmc ${mmcbootdev} Image.itb; then; " \
|
2014-09-01 11:50:53 +00:00
|
|
|
"run boot_fit;" \
|
2020-01-17 13:12:58 +00:00
|
|
|
"elif test -e mmc ${mmcbootdev} zImage; then; " \
|
2014-09-01 11:50:53 +00:00
|
|
|
"run boot_zimg;" \
|
2020-01-17 13:12:58 +00:00
|
|
|
"elif test -e mmc ${mmcbootdev} uImage; then; " \
|
2014-09-01 11:50:53 +00:00
|
|
|
"run boot_uimg;" \
|
|
|
|
"fi;\0" \
|
2020-09-17 06:52:01 +00:00
|
|
|
"console=console=ttySAC1,115200n8\0" \
|
2014-09-01 11:50:53 +00:00
|
|
|
"mmcbootdev=0\0" \
|
|
|
|
"mmcbootpart=1\0" \
|
|
|
|
"mmcrootdev=0\0" \
|
|
|
|
"mmcrootpart=2\0" \
|
|
|
|
"dfu_alt_system="CONFIG_DFU_ALT \
|
|
|
|
"dfu_alt_info=Please reset the board\0" \
|
|
|
|
"consoleon=set console console=ttySAC1,115200n8; save; reset\0" \
|
|
|
|
"consoleoff=set console console=ram; save; reset\0" \
|
|
|
|
"initrdname=uInitrd\0" \
|
2018-07-25 03:18:32 +00:00
|
|
|
"ramdisk_addr_r=0x42000000\0" \
|
2015-10-09 12:26:23 +00:00
|
|
|
"scriptaddr=0x42000000\0" \
|
2018-07-25 03:18:32 +00:00
|
|
|
"fdt_addr_r=0x40800000\0" \
|
2018-07-25 03:18:34 +00:00
|
|
|
"kernel_addr_r=0x41000000\0" \
|
|
|
|
BOOTENV
|
2014-09-01 11:50:53 +00:00
|
|
|
|
|
|
|
/* GPT */
|
|
|
|
|
|
|
|
/* Security subsystem - enable hw_rand() */
|
|
|
|
#define CONFIG_EXYNOS_ACE_SHA
|
|
|
|
|
2014-10-29 16:22:43 +00:00
|
|
|
/* USB */
|
|
|
|
#define CONFIG_USB_EHCI_EXYNOS
|
|
|
|
|
2014-09-01 11:50:53 +00:00
|
|
|
/*
|
|
|
|
* Supported Odroid boards: X3, U3
|
|
|
|
* TODO: Add Odroid X support
|
|
|
|
*/
|
|
|
|
#define CONFIG_MISC_COMMON
|
|
|
|
|
|
|
|
#endif /* __CONFIG_H */
|