2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2017-01-25 08:53:08 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2017 Grinn - http://grinn-global.com/
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CONFIG_CHILIBOARD_H
|
|
|
|
#define __CONFIG_CHILIBOARD_H
|
|
|
|
|
|
|
|
#include <configs/ti_am335x_common.h>
|
|
|
|
|
|
|
|
/* Clock Defines */
|
|
|
|
#define V_OSCK 24000000 /* Clock output from T2 */
|
|
|
|
#define V_SCLK (V_OSCK)
|
|
|
|
|
|
|
|
#define NANDARGS \
|
2017-10-22 21:55:07 +00:00
|
|
|
"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
|
|
|
|
"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
|
2017-01-25 08:53:08 +00:00
|
|
|
"nandargs=setenv bootargs console=${console} ${optargs} " \
|
|
|
|
"${mtdparts} " \
|
|
|
|
"root=${nandroot} " \
|
|
|
|
"rootfstype=${nandrootfstype}\0" \
|
|
|
|
"nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system\0" \
|
2022-05-22 13:22:08 +00:00
|
|
|
"nandrootfstype=ubifs rootwait\0" \
|
2017-01-25 08:53:08 +00:00
|
|
|
"nandboot=echo Booting from nand ...; " \
|
|
|
|
"run nandargs; " \
|
|
|
|
"nand read ${fdt_addr} NAND.u-boot-spl-os; " \
|
|
|
|
"nand read ${loadaddr} NAND.kernel; " \
|
|
|
|
"bootz ${loadaddr} - ${fdt_addr}\0"
|
|
|
|
|
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
|
|
"loadaddr=0x82000000\0" \
|
|
|
|
"fdt_addr=0x87800000\0" \
|
|
|
|
"boot_fdt=try\0" \
|
|
|
|
"console=ttyO0,115200n8\0" \
|
|
|
|
"image=zImage\0" \
|
2017-10-17 12:06:33 +00:00
|
|
|
"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
|
2017-01-25 08:53:08 +00:00
|
|
|
"ip_dyn=yes\0" \
|
|
|
|
"optargs=\0" \
|
|
|
|
"loadbootscript=" \
|
|
|
|
"load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
|
|
|
|
"bootscript=echo Running bootscript from mmc ...; " \
|
|
|
|
"source\0" \
|
|
|
|
"loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
|
|
|
|
"${boot_dir}/${image}\0" \
|
|
|
|
"loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} " \
|
|
|
|
"${boot_dir}/${fdt_file}\0" \
|
|
|
|
"mmcdev=0\0" \
|
|
|
|
"mmcpart=1\0" \
|
|
|
|
"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
|
|
|
|
"mmcargs=setenv bootargs console=${console},${baudrate} ${optargs} " \
|
|
|
|
"${mtdparts} " \
|
|
|
|
"root=${mmcroot}\0" \
|
|
|
|
"mmcloados=run mmcargs; " \
|
|
|
|
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
|
|
|
"if run loadfdt; then " \
|
|
|
|
"bootz ${loadaddr} - ${fdt_addr}; " \
|
|
|
|
"else " \
|
|
|
|
"if test ${boot_fdt} = try; then " \
|
|
|
|
"bootz; " \
|
|
|
|
"else " \
|
|
|
|
"echo WARN: Cannot load the DT; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else " \
|
|
|
|
"bootz; " \
|
|
|
|
"fi;\0" \
|
|
|
|
"mmcboot=mmc dev ${mmcdev}; " \
|
|
|
|
"if mmc rescan; then " \
|
|
|
|
"echo SD/MMC found on device ${mmcdev};" \
|
|
|
|
"if run loadimage; then " \
|
|
|
|
"run mmcloados;" \
|
|
|
|
"fi;" \
|
|
|
|
"fi;\0" \
|
|
|
|
"netargs=setenv bootargs console=${console},${baudrate} ${optargs} " \
|
|
|
|
"${mtdparts} " \
|
|
|
|
"root=/dev/nfs " \
|
|
|
|
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
|
|
|
|
"netboot=echo Booting from net ...; " \
|
|
|
|
"run netargs; " \
|
|
|
|
"if test ${ip_dyn} = yes; then " \
|
|
|
|
"setenv get_cmd dhcp; " \
|
|
|
|
"else " \
|
|
|
|
"setenv get_cmd tftp; " \
|
|
|
|
"fi; " \
|
|
|
|
"${get_cmd} ${image}; " \
|
|
|
|
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
|
|
|
"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
|
|
|
|
"bootz ${loadaddr} - ${fdt_addr}; " \
|
|
|
|
"else " \
|
|
|
|
"if test ${boot_fdt} = try; then " \
|
|
|
|
"bootz; " \
|
|
|
|
"else " \
|
|
|
|
"echo WARN: Cannot load the DT; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else " \
|
|
|
|
"bootz; " \
|
|
|
|
"fi;\0" \
|
|
|
|
NANDARGS
|
|
|
|
|
|
|
|
/* NS16550 Configuration */
|
|
|
|
#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* UART0 */
|
|
|
|
#define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
|
|
|
|
#define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */
|
|
|
|
#define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */
|
|
|
|
#define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
|
|
|
|
#define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
|
|
|
|
|
|
|
|
/* SPL */
|
|
|
|
/* Bootcount using the RTC block */
|
|
|
|
#define CONFIG_SYS_BOOTCOUNT_BE
|
|
|
|
|
|
|
|
/* NAND: device related configs */
|
|
|
|
/* NAND: driver related configs */
|
|
|
|
#define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
|
|
|
|
10, 11, 12, 13, 14, 15, 16, 17, \
|
|
|
|
18, 19, 20, 21, 22, 23, 24, 25, \
|
|
|
|
26, 27, 28, 29, 30, 31, 32, 33, \
|
|
|
|
34, 35, 36, 37, 38, 39, 40, 41, \
|
|
|
|
42, 43, 44, 45, 46, 47, 48, 49, \
|
|
|
|
50, 51, 52, 53, 54, 55, 56, 57, }
|
|
|
|
|
|
|
|
#define CONFIG_SYS_NAND_ECCSIZE 512
|
|
|
|
#define CONFIG_SYS_NAND_ECCBYTES 14
|
|
|
|
|
|
|
|
#if defined(CONFIG_ENV_IS_IN_NAND)
|
|
|
|
#define CONFIG_SYS_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Network. */
|
|
|
|
|
|
|
|
#endif /* ! __CONFIG_CHILIBOARD_H */
|