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