1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (C) Copyright 2013 Siemens Schweiz AG
4  * (C) Heiko Schocher, DENX Software Engineering, hs@denx.de.
5  *
6  * Based on:
7  * U-Boot file:/include/configs/am335x_evm.h
8  *
9  * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
10  */
11 
12 #ifndef __CONFIG_DRACO_H
13 #define __CONFIG_DRACO_H
14 
15 #define CONFIG_SIEMENS_MACH_TYPE	MACH_TYPE_DRACO
16 
17 #include "siemens-am33x-common.h"
18 
19 #define DDR_PLL_FREQ	303
20 
21 #define BOARD_DFU_BUTTON_GPIO	27	/* Use as default */
22 #define GPIO_LAN9303_NRST	88	/* GPIO2_24 = gpio88 */
23 
24 #define CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
25 	"button_dfu0=27\0" \
26 	"led0=103,1,0\0" \
27 	"led1=64,0,1\0"
28 
29  /* Physical Memory Map */
30 #define CONFIG_MAX_RAM_BANK_SIZE	(1024 << 20)	/* 1GB */
31 
32 /* I2C Configuration */
33 #define CONFIG_SYS_I2C_SPEED		100000
34 
35 #define CONFIG_SYS_I2C_EEPROM_ADDR              0x50
36 #define EEPROM_ADDR_DDR3 0x90
37 #define EEPROM_ADDR_CHIP 0x120
38 
39 #define CONFIG_FACTORYSET
40 
41 /* Define own nand partitions */
42 #define CONFIG_ENV_RANGE        (4 * CONFIG_SYS_ENV_SECT_SIZE)
43 
44 #ifndef CONFIG_SPL_BUILD
45 
46 /* Default env settings */
47 #define CONFIG_EXTRA_ENV_SETTINGS \
48 	"hostname=draco\0" \
49 	"ubi_off=2048\0"\
50 	"nand_img_size=0x400000\0" \
51 	"optargs=\0" \
52 	"preboot=draco_led 0\0" \
53 	CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
54 	CONFIG_ENV_SETTINGS_V2 \
55 	CONFIG_ENV_SETTINGS_NAND_V2
56 
57 #ifndef CONFIG_RESTORE_FLASH
58 /* set to negative value for no autoboot */
59 
60 #define CONFIG_BOOTCOMMAND \
61 "if dfubutton; then " \
62 	"run dfu_start; " \
63 	"reset; " \
64 "fi;" \
65 "run nand_boot;" \
66 "run nand_boot_backup;" \
67 "reset;"
68 
69 #else
70 
71 #define CONFIG_BOOTCOMMAND			\
72 	"setenv autoload no; "			\
73 	"dhcp; "				\
74 	"if tftp 80000000 debrick.scr; then "	\
75 		"source 80000000; "		\
76 	"fi"
77 #endif
78 #endif	/* CONFIG_SPL_BUILD */
79 #endif	/* ! __CONFIG_DRACO_H */
80