blob: 921d33124db066b2e05ccfd34191f7fcdf352aeb [file] [log] [blame]
Ash Charles9cb110e2014-05-07 08:24:11 -07001/*
2 * Copyright (C) 2013 Gumstix, Inc. - http://www.gumstix.com/
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#ifndef __CONFIG_PEPPER_H
8#define __CONFIG_PEPPER_H
9
10#define CONFIG_MMC
11#include <configs/ti_am335x_common.h>
12
13#undef CONFIG_BOARD_LATE_INIT
14#undef CONFIG_SPL_OS_BOOT
15
16/* Clock defines */
17#define V_OSCK 24000000 /* Clock output from T2 */
18#define V_SCLK (V_OSCK)
19
Adam YH Lee3dc3c982015-06-01 14:29:09 -070020#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
21
Ash Charles9cb110e2014-05-07 08:24:11 -070022/* Mach type */
23#define MACH_TYPE_PEPPER 4207 /* Until the next sync */
24#define CONFIG_MACH_TYPE MACH_TYPE_PEPPER
25
26#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
27#define CONFIG_ENV_IS_NOWHERE
Ash Charles9cb110e2014-05-07 08:24:11 -070028
29#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
30#define CONFIG_EXTRA_ENV_SETTINGS \
31 DEFAULT_LINUX_BOOT_ENV \
32 "bootdir=/boot\0" \
33 "bootfile=zImage\0" \
34 "fdtfile=am335x-pepper.dtb\0" \
35 "console=ttyO0,115200n8\0" \
36 "optargs=\0" \
37 "mmcdev=0\0" \
38 "mmcroot=/dev/mmcblk0p2 rw\0" \
Adam YH Leebc08c762015-07-20 11:50:40 -070039 "mmcrootfstype=ext4 rootwait\0" \
Ash Charles9cb110e2014-05-07 08:24:11 -070040 "mmcargs=setenv bootargs console=${console} " \
41 "${optargs} " \
42 "root=${mmcroot} " \
43 "rootfstype=${mmcrootfstype}\0" \
44 "bootenv=uEnv.txt\0" \
45 "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
46 "importbootenv=echo Importing environment from mmc ...; " \
47 "env import -t ${loadaddr} ${filesize}\0" \
48 "mmcload=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}; " \
49 "load mmc ${mmcdev}:2 ${fdtaddr} ${bootdir}/${fdtfile}\0" \
50 "loaduimage=fatload mmc ${mmcdev}:1 ${loadaddr} uImage\0" \
51 "uimageboot=echo Booting from mmc${mmcdev} ...; " \
52 "run mmcargs; " \
53 "bootm ${loadaddr}\0" \
54 "mmcboot=echo Booting from mmc ...; " \
55 "run mmcargs; " \
56 "bootz ${loadaddr} - ${fdtaddr}\0" \
57 "ubiboot=echo Booting from nand (ubifs) ...; " \
58 "run ubiargs; run ubiload; " \
59 "bootz ${loadaddr} - ${fdtaddr}\0" \
60
61#define CONFIG_BOOTCOMMAND \
62 "mmc dev ${mmcdev}; if mmc rescan; then " \
63 "echo SD/MMC found on device ${mmcdev};" \
64 "if run loadbootenv; then " \
65 "echo Loaded environment from ${bootenv};" \
66 "run importbootenv;" \
67 "fi;" \
68 "if test -n $uenvcmd; then " \
69 "echo Running uenvcmd ...;" \
70 "run uenvcmd;" \
71 "fi;" \
72 "if run mmcload; then " \
73 "run mmcboot;" \
74 "fi;" \
75 "if run loaduimage; then " \
76 "run uimageboot;" \
77 "fi;" \
78 "fi;" \
79
80/* Serial console configuration */
81#define CONFIG_CONS_INDEX 1 /* UART0 */
82#define CONFIG_SERIAL1 1
83#define CONFIG_SYS_NS16550_COM1 0x44e09000
84
85/* Ethernet support */
86#define CONFIG_PHY_GIGE
87#define CONFIG_PHYLIB
88#define CONFIG_PHY_ADDR 0
89#define CONFIG_PHY_MICREL
90#define CONFIG_PHY_MICREL_KSZ9021
91#define CONFIG_PHY_RESET_DELAY 1000
92
93/* SPL */
94#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
95
96#endif /* __CONFIG_PEPPER_H */