blob: 2ad0c3018e66c2bc877a33b968aa105d776e545b [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
Heiko Schocher499c4982013-08-19 16:39:01 +020017#define CONFIG_SIEMENS_MACH_TYPE MACH_TYPE_PXM2
18
19#include "siemens-am33x-common.h"
20
Egli, Samuel121636f2014-04-24 17:57:52 +020021#define DDR_IOCTRL_VAL 0x18b
Heiko Schocher499c4982013-08-19 16:39:01 +020022#define DDR_PLL_FREQ 266
23
24#define BOARD_DFU_BUTTON_GPIO 59
Heiko Schocher499c4982013-08-19 16:39:01 +020025#define BOARD_LCD_POWER 111
26#define BOARD_BACK_LIGHT 112
27#define BOARD_TOUCH_POWER 57
28
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020029#define CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
30 "button_dfu0=59\0" \
31 "led0=117,0,1\0" \
32
Heiko Schocher499c4982013-08-19 16:39:01 +020033 /* Physical Memory Map */
34#define CONFIG_MAX_RAM_BANK_SIZE (512 << 20) /* 1GB */
35
36/* I2C Configuration */
37#define CONFIG_SYS_I2C_SPEED 400000
38#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
39
Heiko Schocher499c4982013-08-19 16:39:01 +020040#define CONFIG_PHY_ATHEROS
41
42#define CONFIG_FACTORYSET
43
Heiko Schocher499c4982013-08-19 16:39:01 +020044#ifndef CONFIG_SPL_BUILD
45
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020046/* Use common default */
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020047
Heiko Schocher499c4982013-08-19 16:39:01 +020048/* Default env settings */
49#define CONFIG_EXTRA_ENV_SETTINGS \
50 "hostname=pxm2\0" \
Heiko Schochercbec11a2016-06-07 08:55:45 +020051 "ubi_off=2048\0"\
Heiko Schocher499c4982013-08-19 16:39:01 +020052 "nand_img_size=0x500000\0" \
53 "optargs=\0" \
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020054 "preboot=draco_led 0\0" \
55 CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
Samuel Egli8069bfe2013-11-04 14:05:03 +010056 "splashpos=m,m\0" \
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020057 CONFIG_ENV_SETTINGS_V1 \
58 CONFIG_ENV_SETTINGS_NAND_V1 \
Heiko Schocher499c4982013-08-19 16:39:01 +020059 "mmc_dev=0\0" \
60 "mmc_root=/dev/mmcblk0p2 rw\0" \
61 "mmc_root_fs_type=ext4 rootwait\0" \
62 "mmc_load_uimage=" \
63 "mmc rescan; " \
64 "setenv bootfile uImage;" \
65 "fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}\0" \
66 "loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}\0" \
67 "importbootenv=echo Importing environment from mmc ...; " \
68 "env import -t $loadaddr $filesize\0" \
69 "mmc_args=run bootargs_defaults;" \
70 "mtdparts default;" \
71 "setenv bootargs ${bootargs} " \
72 "root=${mmc_root} ${mtdparts}" \
73 "rootfstype=${mmc_root_fs_type} ip=${ip_method} " \
74 "eth=${ethaddr} " \
75 "\0" \
76 "mmc_boot=run mmc_args; " \
77 "run mmc_load_uimage; " \
78 "bootm ${kloadaddr}\0" \
79 ""
80
81#ifndef CONFIG_RESTORE_FLASH
82/* set to negative value for no autoboot */
Heiko Schocher499c4982013-08-19 16:39:01 +020083
84#define CONFIG_BOOTCOMMAND \
85 "if dfubutton; then " \
86 "run dfu_start; " \
87 "reset; " \
88 "fi; " \
89 "if mmc rescan; then " \
90 "echo SD/MMC found on device ${mmc_dev};" \
91 "if run loadbootenv; then " \
92 "echo Loaded environment from ${bootenv};" \
93 "run importbootenv;" \
94 "fi;" \
95 "if test -n $uenvcmd; then " \
96 "echo Running uenvcmd ...;" \
97 "run uenvcmd;" \
98 "fi;" \
99 "if run mmc_load_uimage; then " \
100 "run mmc_args;" \
101 "bootm ${kloadaddr};" \
102 "fi;" \
103 "fi;" \
104 "run nand_boot;" \
Samuel Egli8069bfe2013-11-04 14:05:03 +0100105 "reset;"
Heiko Schocher499c4982013-08-19 16:39:01 +0200106
107#else
Heiko Schocher499c4982013-08-19 16:39:01 +0200108
109#define CONFIG_BOOTCOMMAND \
110 "setenv autoload no; " \
111 "dhcp; " \
112 "if tftp 80000000 debrick.scr; then " \
113 "source 80000000; " \
114 "fi"
115#endif
116#endif /* CONFIG_SPL_BUILD */
117
Heiko Schocher499c4982013-08-19 16:39:01 +0200118#if defined(CONFIG_VIDEO)
119#define CONFIG_VIDEO_DA8XX
Heiko Schocher499c4982013-08-19 16:39:01 +0200120#define CONFIG_SPLASH_SCREEN
121#define CONFIG_SPLASH_SCREEN_ALIGN
122#define CONFIG_VIDEO_LOGO
123#define CONFIG_VIDEO_BMP_RLE8
124#define CONFIG_VIDEO_BMP_LOGO
Heiko Schocher499c4982013-08-19 16:39:01 +0200125#define DA8XX_LCD_CNTL_BASE LCD_CNTL_BASE
126#define PWM_TICKS 0x1388
127#define PWM_DUTY 0x200
Heiko Schocher499c4982013-08-19 16:39:01 +0200128#endif
129
Heiko Schocher499c4982013-08-19 16:39:01 +0200130#endif /* ! __CONFIG_PXM2_H */