blob: 4776e97ed6a89a88a93273c937b0c17fbab6def7 [file] [log] [blame]
Heiko Schocherc0dcece2013-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 Schocherc0dcece2013-08-19 16:39:01 +020018#define CONFIG_SIEMENS_MACH_TYPE MACH_TYPE_PXM2
19
20#include "siemens-am33x-common.h"
21
22#define CONFIG_SYS_MPUCLK 720
Egli, Samuel9fc2ed42014-04-24 17:57:52 +020023#define DDR_IOCTRL_VAL 0x18b
Heiko Schocherc0dcece2013-08-19 16:39:01 +020024#define DDR_PLL_FREQ 266
25
26#define BOARD_DFU_BUTTON_GPIO 59
Heiko Schocherc0dcece2013-08-19 16:39:01 +020027#define BOARD_LCD_POWER 111
28#define BOARD_BACK_LIGHT 112
29#define BOARD_TOUCH_POWER 57
30
Heiko Schocher61159b72015-06-16 14:59:34 +020031#define CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
32 "button_dfu0=59\0" \
33 "led0=117,0,1\0" \
34
Heiko Schocherc0dcece2013-08-19 16:39:01 +020035 /* Physical Memory Map */
36#define CONFIG_MAX_RAM_BANK_SIZE (512 << 20) /* 1GB */
37
38/* I2C Configuration */
39#define CONFIG_SYS_I2C_SPEED 400000
40#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
41
Heiko Schocherc0dcece2013-08-19 16:39:01 +020042#define CONFIG_PHY_ATHEROS
43
44#define CONFIG_FACTORYSET
45
Heiko Schocherc0dcece2013-08-19 16:39:01 +020046/* Watchdog */
47#define CONFIG_OMAP_WATCHDOG
48
49#ifndef CONFIG_SPL_BUILD
50
Heiko Schocher61159b72015-06-16 14:59:34 +020051/* Use common default */
52#define MTDPARTS_DEFAULT MTDPARTS_DEFAULT_V1
53
Heiko Schocherc0dcece2013-08-19 16:39:01 +020054/* Default env settings */
55#define CONFIG_EXTRA_ENV_SETTINGS \
56 "hostname=pxm2\0" \
Heiko Schocher6b3943f2016-06-07 08:55:45 +020057 "ubi_off=2048\0"\
Heiko Schocherc0dcece2013-08-19 16:39:01 +020058 "nand_img_size=0x500000\0" \
59 "optargs=\0" \
Heiko Schocher61159b72015-06-16 14:59:34 +020060 "preboot=draco_led 0\0" \
61 CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
Samuel Egli56eb3da2013-11-04 14:05:03 +010062 "splashpos=m,m\0" \
Heiko Schocher61159b72015-06-16 14:59:34 +020063 CONFIG_ENV_SETTINGS_V1 \
64 CONFIG_ENV_SETTINGS_NAND_V1 \
Heiko Schocherc0dcece2013-08-19 16:39:01 +020065 "mmc_dev=0\0" \
66 "mmc_root=/dev/mmcblk0p2 rw\0" \
67 "mmc_root_fs_type=ext4 rootwait\0" \
68 "mmc_load_uimage=" \
69 "mmc rescan; " \
70 "setenv bootfile uImage;" \
71 "fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}\0" \
72 "loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}\0" \
73 "importbootenv=echo Importing environment from mmc ...; " \
74 "env import -t $loadaddr $filesize\0" \
75 "mmc_args=run bootargs_defaults;" \
76 "mtdparts default;" \
77 "setenv bootargs ${bootargs} " \
78 "root=${mmc_root} ${mtdparts}" \
79 "rootfstype=${mmc_root_fs_type} ip=${ip_method} " \
80 "eth=${ethaddr} " \
81 "\0" \
82 "mmc_boot=run mmc_args; " \
83 "run mmc_load_uimage; " \
84 "bootm ${kloadaddr}\0" \
85 ""
86
87#ifndef CONFIG_RESTORE_FLASH
88/* set to negative value for no autoboot */
Heiko Schocherc0dcece2013-08-19 16:39:01 +020089
90#define CONFIG_BOOTCOMMAND \
91 "if dfubutton; then " \
92 "run dfu_start; " \
93 "reset; " \
94 "fi; " \
95 "if mmc rescan; then " \
96 "echo SD/MMC found on device ${mmc_dev};" \
97 "if run loadbootenv; then " \
98 "echo Loaded environment from ${bootenv};" \
99 "run importbootenv;" \
100 "fi;" \
101 "if test -n $uenvcmd; then " \
102 "echo Running uenvcmd ...;" \
103 "run uenvcmd;" \
104 "fi;" \
105 "if run mmc_load_uimage; then " \
106 "run mmc_args;" \
107 "bootm ${kloadaddr};" \
108 "fi;" \
109 "fi;" \
110 "run nand_boot;" \
Samuel Egli56eb3da2013-11-04 14:05:03 +0100111 "reset;"
Heiko Schocherc0dcece2013-08-19 16:39:01 +0200112
113#else
Heiko Schocherc0dcece2013-08-19 16:39:01 +0200114
115#define CONFIG_BOOTCOMMAND \
116 "setenv autoload no; " \
117 "dhcp; " \
118 "if tftp 80000000 debrick.scr; then " \
119 "source 80000000; " \
120 "fi"
121#endif
122#endif /* CONFIG_SPL_BUILD */
123
Heiko Schocherc0dcece2013-08-19 16:39:01 +0200124#if defined(CONFIG_VIDEO)
125#define CONFIG_VIDEO_DA8XX
Heiko Schocherc0dcece2013-08-19 16:39:01 +0200126#define CONFIG_SPLASH_SCREEN
127#define CONFIG_SPLASH_SCREEN_ALIGN
128#define CONFIG_VIDEO_LOGO
129#define CONFIG_VIDEO_BMP_RLE8
130#define CONFIG_VIDEO_BMP_LOGO
131#define CONFIG_CMD_BMP
132#define DA8XX_LCD_CNTL_BASE LCD_CNTL_BASE
133#define PWM_TICKS 0x1388
134#define PWM_DUTY 0x200
Heiko Schocherc0dcece2013-08-19 16:39:01 +0200135#endif
136
Heiko Schocherc0dcece2013-08-19 16:39:01 +0200137#endif /* ! __CONFIG_PXM2_H */