blob: 99a201c4035e37eae887c680e3f1300a1cdd6423 [file] [log] [blame]
Heiko Schocher499c4982013-08-19 16:39:01 +02001/*
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
Egli, Samuel121636f2014-04-24 17:57:52 +020024#define DDR_IOCTRL_VAL 0x18b
Heiko Schocher499c4982013-08-19 16:39:01 +020025#define DDR_PLL_FREQ 266
26
27#define BOARD_DFU_BUTTON_GPIO 59
Heiko Schocher499c4982013-08-19 16:39:01 +020028#define BOARD_LCD_POWER 111
29#define BOARD_BACK_LIGHT 112
30#define BOARD_TOUCH_POWER 57
31
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020032#define CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
33 "button_dfu0=59\0" \
34 "led0=117,0,1\0" \
35
Heiko Schocher499c4982013-08-19 16:39:01 +020036 /* 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
Heiko Schocher499c4982013-08-19 16:39:01 +020043#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x300
44
Heiko Schocher499c4982013-08-19 16:39:01 +020045#define CONFIG_PHY_ATHEROS
46
47#define CONFIG_FACTORYSET
48
Heiko Schocher499c4982013-08-19 16:39:01 +020049/* Watchdog */
50#define CONFIG_OMAP_WATCHDOG
51
52#ifndef CONFIG_SPL_BUILD
53
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020054/* Use common default */
55#define MTDPARTS_DEFAULT MTDPARTS_DEFAULT_V1
56
Heiko Schocher499c4982013-08-19 16:39:01 +020057/* Default env settings */
58#define CONFIG_EXTRA_ENV_SETTINGS \
59 "hostname=pxm2\0" \
Heiko Schochercbec11a2016-06-07 08:55:45 +020060 "ubi_off=2048\0"\
Heiko Schocher499c4982013-08-19 16:39:01 +020061 "nand_img_size=0x500000\0" \
62 "optargs=\0" \
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020063 "preboot=draco_led 0\0" \
64 CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
Samuel Egli8069bfe2013-11-04 14:05:03 +010065 "splashpos=m,m\0" \
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020066 CONFIG_ENV_SETTINGS_V1 \
67 CONFIG_ENV_SETTINGS_NAND_V1 \
Heiko Schocher499c4982013-08-19 16:39:01 +020068 "mmc_dev=0\0" \
69 "mmc_root=/dev/mmcblk0p2 rw\0" \
70 "mmc_root_fs_type=ext4 rootwait\0" \
71 "mmc_load_uimage=" \
72 "mmc rescan; " \
73 "setenv bootfile uImage;" \
74 "fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}\0" \
75 "loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}\0" \
76 "importbootenv=echo Importing environment from mmc ...; " \
77 "env import -t $loadaddr $filesize\0" \
78 "mmc_args=run bootargs_defaults;" \
79 "mtdparts default;" \
80 "setenv bootargs ${bootargs} " \
81 "root=${mmc_root} ${mtdparts}" \
82 "rootfstype=${mmc_root_fs_type} ip=${ip_method} " \
83 "eth=${ethaddr} " \
84 "\0" \
85 "mmc_boot=run mmc_args; " \
86 "run mmc_load_uimage; " \
87 "bootm ${kloadaddr}\0" \
88 ""
89
90#ifndef CONFIG_RESTORE_FLASH
91/* set to negative value for no autoboot */
Heiko Schocher499c4982013-08-19 16:39:01 +020092
93#define CONFIG_BOOTCOMMAND \
94 "if dfubutton; then " \
95 "run dfu_start; " \
96 "reset; " \
97 "fi; " \
98 "if mmc rescan; then " \
99 "echo SD/MMC found on device ${mmc_dev};" \
100 "if run loadbootenv; then " \
101 "echo Loaded environment from ${bootenv};" \
102 "run importbootenv;" \
103 "fi;" \
104 "if test -n $uenvcmd; then " \
105 "echo Running uenvcmd ...;" \
106 "run uenvcmd;" \
107 "fi;" \
108 "if run mmc_load_uimage; then " \
109 "run mmc_args;" \
110 "bootm ${kloadaddr};" \
111 "fi;" \
112 "fi;" \
113 "run nand_boot;" \
Samuel Egli8069bfe2013-11-04 14:05:03 +0100114 "reset;"
Heiko Schocher499c4982013-08-19 16:39:01 +0200115
116#else
Heiko Schocher499c4982013-08-19 16:39:01 +0200117
118#define CONFIG_BOOTCOMMAND \
119 "setenv autoload no; " \
120 "dhcp; " \
121 "if tftp 80000000 debrick.scr; then " \
122 "source 80000000; " \
123 "fi"
124#endif
125#endif /* CONFIG_SPL_BUILD */
126
127#define CONFIG_VIDEO
128#if defined(CONFIG_VIDEO)
129#define CONFIG_VIDEO_DA8XX
130#define CONFIG_CFB_CONSOLE
131#define CONFIG_VGA_AS_SINGLE_DEVICE
132#define CONFIG_SPLASH_SCREEN
133#define CONFIG_SPLASH_SCREEN_ALIGN
134#define CONFIG_VIDEO_LOGO
135#define CONFIG_VIDEO_BMP_RLE8
136#define CONFIG_VIDEO_BMP_LOGO
137#define CONFIG_CMD_BMP
138#define DA8XX_LCD_CNTL_BASE LCD_CNTL_BASE
139#define PWM_TICKS 0x1388
140#define PWM_DUTY 0x200
Samuel Egli8069bfe2013-11-04 14:05:03 +0100141#define CONFIG_SYS_CONSOLE_BG_COL 0xff
142#define CONFIG_SYS_CONSOLE_FG_COL 0x00
Heiko Schocher499c4982013-08-19 16:39:01 +0200143#endif
144
Heiko Schocher499c4982013-08-19 16:39:01 +0200145#endif /* ! __CONFIG_PXM2_H */