blob: 157b32a6a43d1e48236fc1a47226c89cdafa3670 [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
Heiko Schocher499c4982013-08-19 16:39:01 +020018#define CONFIG_SIEMENS_MACH_TYPE MACH_TYPE_PXM2
19
20#include "siemens-am33x-common.h"
21
Egli, Samuel121636f2014-04-24 17:57:52 +020022#define DDR_IOCTRL_VAL 0x18b
Heiko Schocher499c4982013-08-19 16:39:01 +020023#define DDR_PLL_FREQ 266
24
25#define BOARD_DFU_BUTTON_GPIO 59
Heiko Schocher499c4982013-08-19 16:39:01 +020026#define BOARD_LCD_POWER 111
27#define BOARD_BACK_LIGHT 112
28#define BOARD_TOUCH_POWER 57
29
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020030#define CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
31 "button_dfu0=59\0" \
32 "led0=117,0,1\0" \
33
Heiko Schocher499c4982013-08-19 16:39:01 +020034 /* 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
Heiko Schocher499c4982013-08-19 16:39:01 +020041#define CONFIG_PHY_ATHEROS
42
43#define CONFIG_FACTORYSET
44
Heiko Schocher499c4982013-08-19 16:39:01 +020045#ifndef CONFIG_SPL_BUILD
46
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020047/* Use common default */
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020048
Heiko Schocher499c4982013-08-19 16:39:01 +020049/* Default env settings */
50#define CONFIG_EXTRA_ENV_SETTINGS \
51 "hostname=pxm2\0" \
Heiko Schochercbec11a2016-06-07 08:55:45 +020052 "ubi_off=2048\0"\
Heiko Schocher499c4982013-08-19 16:39:01 +020053 "nand_img_size=0x500000\0" \
54 "optargs=\0" \
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020055 "preboot=draco_led 0\0" \
56 CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
Samuel Egli8069bfe2013-11-04 14:05:03 +010057 "splashpos=m,m\0" \
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020058 CONFIG_ENV_SETTINGS_V1 \
59 CONFIG_ENV_SETTINGS_NAND_V1 \
Heiko Schocher499c4982013-08-19 16:39:01 +020060 "mmc_dev=0\0" \
61 "mmc_root=/dev/mmcblk0p2 rw\0" \
62 "mmc_root_fs_type=ext4 rootwait\0" \
63 "mmc_load_uimage=" \
64 "mmc rescan; " \
65 "setenv bootfile uImage;" \
66 "fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}\0" \
67 "loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}\0" \
68 "importbootenv=echo Importing environment from mmc ...; " \
69 "env import -t $loadaddr $filesize\0" \
70 "mmc_args=run bootargs_defaults;" \
71 "mtdparts default;" \
72 "setenv bootargs ${bootargs} " \
73 "root=${mmc_root} ${mtdparts}" \
74 "rootfstype=${mmc_root_fs_type} ip=${ip_method} " \
75 "eth=${ethaddr} " \
76 "\0" \
77 "mmc_boot=run mmc_args; " \
78 "run mmc_load_uimage; " \
79 "bootm ${kloadaddr}\0" \
80 ""
81
82#ifndef CONFIG_RESTORE_FLASH
83/* set to negative value for no autoboot */
Heiko Schocher499c4982013-08-19 16:39:01 +020084
85#define CONFIG_BOOTCOMMAND \
86 "if dfubutton; then " \
87 "run dfu_start; " \
88 "reset; " \
89 "fi; " \
90 "if mmc rescan; then " \
91 "echo SD/MMC found on device ${mmc_dev};" \
92 "if run loadbootenv; then " \
93 "echo Loaded environment from ${bootenv};" \
94 "run importbootenv;" \
95 "fi;" \
96 "if test -n $uenvcmd; then " \
97 "echo Running uenvcmd ...;" \
98 "run uenvcmd;" \
99 "fi;" \
100 "if run mmc_load_uimage; then " \
101 "run mmc_args;" \
102 "bootm ${kloadaddr};" \
103 "fi;" \
104 "fi;" \
105 "run nand_boot;" \
Samuel Egli8069bfe2013-11-04 14:05:03 +0100106 "reset;"
Heiko Schocher499c4982013-08-19 16:39:01 +0200107
108#else
Heiko Schocher499c4982013-08-19 16:39:01 +0200109
110#define CONFIG_BOOTCOMMAND \
111 "setenv autoload no; " \
112 "dhcp; " \
113 "if tftp 80000000 debrick.scr; then " \
114 "source 80000000; " \
115 "fi"
116#endif
117#endif /* CONFIG_SPL_BUILD */
118
Heiko Schocher499c4982013-08-19 16:39:01 +0200119#if defined(CONFIG_VIDEO)
120#define CONFIG_VIDEO_DA8XX
Heiko Schocher499c4982013-08-19 16:39:01 +0200121#define CONFIG_SPLASH_SCREEN
122#define CONFIG_SPLASH_SCREEN_ALIGN
123#define CONFIG_VIDEO_LOGO
124#define CONFIG_VIDEO_BMP_RLE8
125#define CONFIG_VIDEO_BMP_LOGO
Heiko Schocher499c4982013-08-19 16:39:01 +0200126#define DA8XX_LCD_CNTL_BASE LCD_CNTL_BASE
127#define PWM_TICKS 0x1388
128#define PWM_DUTY 0x200
Heiko Schocher499c4982013-08-19 16:39:01 +0200129#endif
130
Heiko Schocher499c4982013-08-19 16:39:01 +0200131#endif /* ! __CONFIG_PXM2_H */