1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2017 Grinn - http://grinn-global.com/
6 #ifndef __CONFIG_CHILIBOARD_H
7 #define __CONFIG_CHILIBOARD_H
9 #include <configs/ti_am335x_common.h>
11 #ifndef CONFIG_SPL_BUILD
12 # define CONFIG_TIMESTAMP
16 #define V_OSCK 24000000 /* Clock output from T2 */
17 #define V_SCLK (V_OSCK)
20 "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
21 "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
22 "nandargs=setenv bootargs console=${console} ${optargs} " \
25 "rootfstype=${nandrootfstype}\0" \
26 "nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system\0" \
27 "nandrootfstype=ubifs rootwait=1\0" \
28 "nandboot=echo Booting from nand ...; " \
30 "nand read ${fdt_addr} NAND.u-boot-spl-os; " \
31 "nand read ${loadaddr} NAND.kernel; " \
32 "bootz ${loadaddr} - ${fdt_addr}\0"
34 #define CONFIG_EXTRA_ENV_SETTINGS \
35 "loadaddr=0x82000000\0" \
36 "fdt_addr=0x87800000\0" \
38 "console=ttyO0,115200n8\0" \
40 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
44 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
45 "bootscript=echo Running bootscript from mmc ...; " \
47 "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} " \
48 "${boot_dir}/${image}\0" \
49 "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} " \
50 "${boot_dir}/${fdt_file}\0" \
53 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
54 "mmcargs=setenv bootargs console=${console},${baudrate} ${optargs} " \
57 "mmcloados=run mmcargs; " \
58 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
59 "if run loadfdt; then " \
60 "bootz ${loadaddr} - ${fdt_addr}; " \
62 "if test ${boot_fdt} = try; then " \
65 "echo WARN: Cannot load the DT; " \
71 "mmcboot=mmc dev ${mmcdev}; " \
72 "if mmc rescan; then " \
73 "echo SD/MMC found on device ${mmcdev};" \
74 "if run loadimage; then " \
78 "netargs=setenv bootargs console=${console},${baudrate} ${optargs} " \
81 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
82 "netboot=echo Booting from net ...; " \
84 "if test ${ip_dyn} = yes; then " \
85 "setenv get_cmd dhcp; " \
87 "setenv get_cmd tftp; " \
89 "${get_cmd} ${image}; " \
90 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
91 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
92 "bootz ${loadaddr} - ${fdt_addr}; " \
94 "if test ${boot_fdt} = try; then " \
97 "echo WARN: Cannot load the DT; " \
105 /* NS16550 Configuration */
106 #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* UART0 */
107 #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
108 #define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */
109 #define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */
110 #define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
111 #define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
114 #define CONFIG_POWER_TPS65217
117 /* Bootcount using the RTC block */
118 #define CONFIG_SYS_BOOTCOUNT_BE
120 /* NAND: device related configs */
121 /* NAND: driver related configs */
122 #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
123 10, 11, 12, 13, 14, 15, 16, 17, \
124 18, 19, 20, 21, 22, 23, 24, 25, \
125 26, 27, 28, 29, 30, 31, 32, 33, \
126 34, 35, 36, 37, 38, 39, 40, 41, \
127 42, 43, 44, 45, 46, 47, 48, 49, \
128 50, 51, 52, 53, 54, 55, 56, 57, }
130 #define CONFIG_SYS_NAND_ECCSIZE 512
131 #define CONFIG_SYS_NAND_ECCBYTES 14
132 /* NAND: SPL related configs */
134 /* USB configuration */
135 #define CONFIG_AM335X_USB1
136 #define CONFIG_AM335X_USB1_MODE MUSB_HOST
139 * Disable MMC DM for SPL build and can be re-enabled after adding
142 #ifdef CONFIG_SPL_BUILD
147 #if defined(CONFIG_ENV_IS_IN_NAND)
148 #define CONFIG_SYS_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE
153 #endif /* ! __CONFIG_CHILIBOARD_H */