blob: d797a2ce4d7b2774207fdbe5d0a1fc3bb68bfb08 [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
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, Samuel9fc2ed42014-04-24 17:57:52 +020024#define DDR_IOCTRL_VAL 0x18b
Heiko Schocherc0dcece2013-08-19 16:39:01 +020025#define DDR_PLL_FREQ 266
26
27#define BOARD_DFU_BUTTON_GPIO 59
Heiko Schocherc0dcece2013-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 Schocher61159b72015-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 Schocherc0dcece2013-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 Schocherc0dcece2013-08-19 16:39:01 +020043#define CONFIG_PHY_ATHEROS
44
45#define CONFIG_FACTORYSET
46
Heiko Schocherc0dcece2013-08-19 16:39:01 +020047/* Watchdog */
48#define CONFIG_OMAP_WATCHDOG
49
50#ifndef CONFIG_SPL_BUILD
51
Heiko Schocher61159b72015-06-16 14:59:34 +020052/* Use common default */
53#define MTDPARTS_DEFAULT MTDPARTS_DEFAULT_V1
54
Heiko Schocherc0dcece2013-08-19 16:39:01 +020055/* Default env settings */
56#define CONFIG_EXTRA_ENV_SETTINGS \
57 "hostname=pxm2\0" \
Heiko Schocher6b3943f2016-06-07 08:55:45 +020058 "ubi_off=2048\0"\
Heiko Schocherc0dcece2013-08-19 16:39:01 +020059 "nand_img_size=0x500000\0" \
60 "optargs=\0" \
Heiko Schocher61159b72015-06-16 14:59:34 +020061 "preboot=draco_led 0\0" \
62 CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
Samuel Egli56eb3da2013-11-04 14:05:03 +010063 "splashpos=m,m\0" \
Heiko Schocher61159b72015-06-16 14:59:34 +020064 CONFIG_ENV_SETTINGS_V1 \
65 CONFIG_ENV_SETTINGS_NAND_V1 \
Heiko Schocherc0dcece2013-08-19 16:39:01 +020066 "mmc_dev=0\0" \
67 "mmc_root=/dev/mmcblk0p2 rw\0" \
68 "mmc_root_fs_type=ext4 rootwait\0" \
69 "mmc_load_uimage=" \
70 "mmc rescan; " \
71 "setenv bootfile uImage;" \
72 "fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}\0" \
73 "loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}\0" \
74 "importbootenv=echo Importing environment from mmc ...; " \
75 "env import -t $loadaddr $filesize\0" \
76 "mmc_args=run bootargs_defaults;" \
77 "mtdparts default;" \
78 "setenv bootargs ${bootargs} " \
79 "root=${mmc_root} ${mtdparts}" \
80 "rootfstype=${mmc_root_fs_type} ip=${ip_method} " \
81 "eth=${ethaddr} " \
82 "\0" \
83 "mmc_boot=run mmc_args; " \
84 "run mmc_load_uimage; " \
85 "bootm ${kloadaddr}\0" \
86 ""
87
88#ifndef CONFIG_RESTORE_FLASH
89/* set to negative value for no autoboot */
Heiko Schocherc0dcece2013-08-19 16:39:01 +020090
91#define CONFIG_BOOTCOMMAND \
92 "if dfubutton; then " \
93 "run dfu_start; " \
94 "reset; " \
95 "fi; " \
96 "if mmc rescan; then " \
97 "echo SD/MMC found on device ${mmc_dev};" \
98 "if run loadbootenv; then " \
99 "echo Loaded environment from ${bootenv};" \
100 "run importbootenv;" \
101 "fi;" \
102 "if test -n $uenvcmd; then " \
103 "echo Running uenvcmd ...;" \
104 "run uenvcmd;" \
105 "fi;" \
106 "if run mmc_load_uimage; then " \
107 "run mmc_args;" \
108 "bootm ${kloadaddr};" \
109 "fi;" \
110 "fi;" \
111 "run nand_boot;" \
Samuel Egli56eb3da2013-11-04 14:05:03 +0100112 "reset;"
Heiko Schocherc0dcece2013-08-19 16:39:01 +0200113
114#else
Heiko Schocherc0dcece2013-08-19 16:39:01 +0200115
116#define CONFIG_BOOTCOMMAND \
117 "setenv autoload no; " \
118 "dhcp; " \
119 "if tftp 80000000 debrick.scr; then " \
120 "source 80000000; " \
121 "fi"
122#endif
123#endif /* CONFIG_SPL_BUILD */
124
Heiko Schocherc0dcece2013-08-19 16:39:01 +0200125#if defined(CONFIG_VIDEO)
126#define CONFIG_VIDEO_DA8XX
Heiko Schocherc0dcece2013-08-19 16:39:01 +0200127#define CONFIG_SPLASH_SCREEN
128#define CONFIG_SPLASH_SCREEN_ALIGN
129#define CONFIG_VIDEO_LOGO
130#define CONFIG_VIDEO_BMP_RLE8
131#define CONFIG_VIDEO_BMP_LOGO
132#define CONFIG_CMD_BMP
133#define DA8XX_LCD_CNTL_BASE LCD_CNTL_BASE
134#define PWM_TICKS 0x1388
135#define PWM_DUTY 0x200
Heiko Schocherc0dcece2013-08-19 16:39:01 +0200136#endif
137
Heiko Schocherc0dcece2013-08-19 16:39:01 +0200138#endif /* ! __CONFIG_PXM2_H */