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