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