xref: /openbmc/u-boot/include/configs/pxm2.h (revision eb5ba3ae)
1 /*
2  * siemens pxm2
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  * SPDX-License-Identifier:	GPL-2.0+
12  */
13 
14 #ifndef __CONFIG_PXM2_H
15 #define __CONFIG_PXM2_H
16 
17 #define CONFIG_SIEMENS_PXM2
18 #define CONFIG_SIEMENS_MACH_TYPE	MACH_TYPE_PXM2
19 
20 #include "siemens-am33x-common.h"
21 
22 #define DDR_IOCTRL_VAL		0x18b
23 #define DDR_PLL_FREQ		266
24 
25 #define BOARD_DFU_BUTTON_GPIO	59
26 #define BOARD_LCD_POWER		111
27 #define BOARD_BACK_LIGHT	112
28 #define BOARD_TOUCH_POWER	57
29 
30 #define CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
31 	"button_dfu0=59\0" \
32 	"led0=117,0,1\0" \
33 
34  /* Physical Memory Map */
35 #define CONFIG_MAX_RAM_BANK_SIZE	(512 << 20)	/* 1GB */
36 
37 /* I2C Configuration */
38 #define CONFIG_SYS_I2C_SPEED		400000
39 #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
40 
41 #define CONFIG_PHY_ATHEROS
42 
43 #define CONFIG_FACTORYSET
44 
45 /* Watchdog */
46 #define CONFIG_OMAP_WATCHDOG
47 
48 #ifndef CONFIG_SPL_BUILD
49 
50 /* Use common default */
51 #define MTDPARTS_DEFAULT	MTDPARTS_DEFAULT_V1
52 
53 /* Default env settings */
54 #define CONFIG_EXTRA_ENV_SETTINGS \
55 	"hostname=pxm2\0" \
56 	"ubi_off=2048\0"\
57 	"nand_img_size=0x500000\0" \
58 	"optargs=\0" \
59 	"preboot=draco_led 0\0" \
60 	CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
61 	"splashpos=m,m\0"	\
62 	CONFIG_ENV_SETTINGS_V1 \
63 	CONFIG_ENV_SETTINGS_NAND_V1 \
64 	"mmc_dev=0\0" \
65 	"mmc_root=/dev/mmcblk0p2 rw\0" \
66 	"mmc_root_fs_type=ext4 rootwait\0" \
67 	"mmc_load_uimage=" \
68 		"mmc rescan; " \
69 		"setenv bootfile uImage;" \
70 		"fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}\0" \
71 	"loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}\0" \
72 	"importbootenv=echo Importing environment from mmc ...; " \
73 		"env import -t $loadaddr $filesize\0" \
74 	"mmc_args=run bootargs_defaults;" \
75 		"mtdparts default;" \
76 		"setenv bootargs ${bootargs} " \
77 		"root=${mmc_root} ${mtdparts}" \
78 		"rootfstype=${mmc_root_fs_type} ip=${ip_method} " \
79 		"eth=${ethaddr} " \
80 		"\0" \
81 	"mmc_boot=run mmc_args; " \
82 		"run mmc_load_uimage; " \
83 		"bootm ${kloadaddr}\0" \
84 	""
85 
86 #ifndef CONFIG_RESTORE_FLASH
87 /* set to negative value for no autoboot */
88 
89 #define CONFIG_BOOTCOMMAND \
90 	"if dfubutton; then " \
91 		"run dfu_start; " \
92 		"reset; " \
93 	"fi; " \
94 	"if mmc rescan; then " \
95 		"echo SD/MMC found on device ${mmc_dev};" \
96 		"if run loadbootenv; then " \
97 			"echo Loaded environment from ${bootenv};" \
98 			"run importbootenv;" \
99 		"fi;" \
100 		"if test -n $uenvcmd; then " \
101 			"echo Running uenvcmd ...;" \
102 			"run uenvcmd;" \
103 		"fi;" \
104 		"if run mmc_load_uimage; then " \
105 			"run mmc_args;" \
106 			"bootm ${kloadaddr};" \
107 		"fi;" \
108 	"fi;" \
109 	"run nand_boot;" \
110 	"reset;"
111 
112 #else
113 
114 #define CONFIG_BOOTCOMMAND			\
115 	"setenv autoload no; "			\
116 	"dhcp; "				\
117 	"if tftp 80000000 debrick.scr; then "	\
118 		"source 80000000; "		\
119 	"fi"
120 #endif
121 #endif	/* CONFIG_SPL_BUILD */
122 
123 #if defined(CONFIG_VIDEO)
124 #define CONFIG_VIDEO_DA8XX
125 #define CONFIG_SPLASH_SCREEN
126 #define CONFIG_SPLASH_SCREEN_ALIGN
127 #define CONFIG_VIDEO_LOGO
128 #define CONFIG_VIDEO_BMP_RLE8
129 #define CONFIG_VIDEO_BMP_LOGO
130 #define DA8XX_LCD_CNTL_BASE	LCD_CNTL_BASE
131 #define PWM_TICKS	0x1388
132 #define PWM_DUTY	0x200
133 #endif
134 
135 #endif	/* ! __CONFIG_PXM2_H */
136