blob: ff3cd74ac314a8fa4b1c3739b84ad0441d3fc6a4 [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
Ash Charles9cb110e2014-05-07 08:24:11 -070010#include <configs/ti_am335x_common.h>
11
Ash Charles9cb110e2014-05-07 08:24:11 -070012/* Clock defines */
13#define V_OSCK 24000000 /* Clock output from T2 */
14#define V_SCLK (V_OSCK)
15
Adam YH Lee3dc3c982015-06-01 14:29:09 -070016#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
17
Ash Charles9cb110e2014-05-07 08:24:11 -070018/* Mach type */
Ash Charles9cb110e2014-05-07 08:24:11 -070019#define CONFIG_MACH_TYPE MACH_TYPE_PEPPER
20
21#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
Ash Charles9cb110e2014-05-07 08:24:11 -070022
23#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
24#define CONFIG_EXTRA_ENV_SETTINGS \
25 DEFAULT_LINUX_BOOT_ENV \
26 "bootdir=/boot\0" \
27 "bootfile=zImage\0" \
28 "fdtfile=am335x-pepper.dtb\0" \
29 "console=ttyO0,115200n8\0" \
30 "optargs=\0" \
31 "mmcdev=0\0" \
32 "mmcroot=/dev/mmcblk0p2 rw\0" \
Adam YH Leebc08c762015-07-20 11:50:40 -070033 "mmcrootfstype=ext4 rootwait\0" \
Ash Charles9cb110e2014-05-07 08:24:11 -070034 "mmcargs=setenv bootargs console=${console} " \
35 "${optargs} " \
36 "root=${mmcroot} " \
37 "rootfstype=${mmcrootfstype}\0" \
38 "bootenv=uEnv.txt\0" \
39 "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
40 "importbootenv=echo Importing environment from mmc ...; " \
41 "env import -t ${loadaddr} ${filesize}\0" \
42 "mmcload=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}; " \
43 "load mmc ${mmcdev}:2 ${fdtaddr} ${bootdir}/${fdtfile}\0" \
44 "loaduimage=fatload mmc ${mmcdev}:1 ${loadaddr} uImage\0" \
45 "uimageboot=echo Booting from mmc${mmcdev} ...; " \
46 "run mmcargs; " \
47 "bootm ${loadaddr}\0" \
48 "mmcboot=echo Booting from mmc ...; " \
49 "run mmcargs; " \
50 "bootz ${loadaddr} - ${fdtaddr}\0" \
51 "ubiboot=echo Booting from nand (ubifs) ...; " \
52 "run ubiargs; run ubiload; " \
53 "bootz ${loadaddr} - ${fdtaddr}\0" \
54
55#define CONFIG_BOOTCOMMAND \
56 "mmc dev ${mmcdev}; if mmc rescan; then " \
57 "echo SD/MMC found on device ${mmcdev};" \
58 "if run loadbootenv; then " \
59 "echo Loaded environment from ${bootenv};" \
60 "run importbootenv;" \
61 "fi;" \
62 "if test -n $uenvcmd; then " \
63 "echo Running uenvcmd ...;" \
64 "run uenvcmd;" \
65 "fi;" \
66 "if run mmcload; then " \
67 "run mmcboot;" \
68 "fi;" \
69 "if run loaduimage; then " \
70 "run uimageboot;" \
71 "fi;" \
72 "fi;" \
73
74/* Serial console configuration */
75#define CONFIG_CONS_INDEX 1 /* UART0 */
76#define CONFIG_SERIAL1 1
77#define CONFIG_SYS_NS16550_COM1 0x44e09000
78
79/* Ethernet support */
80#define CONFIG_PHY_GIGE
81#define CONFIG_PHYLIB
82#define CONFIG_PHY_ADDR 0
83#define CONFIG_PHY_MICREL
84#define CONFIG_PHY_MICREL_KSZ9021
85#define CONFIG_PHY_RESET_DELAY 1000
86
87/* SPL */
Lokesh Vutla899fd3e2017-04-26 13:37:07 +053088#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
Ash Charles9cb110e2014-05-07 08:24:11 -070089
90#endif /* __CONFIG_PEPPER_H */