blob: 3c7d81cfc0b8d27d1c5b9c6273b99b40e76aeeba [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Heiko Schocher499c4982013-08-19 16:39:01 +02002/*
3 * siemens pxm2
4 * (C) Copyright 2013 Siemens Schweiz AG
5 * (C) Heiko Schocher, DENX Software Engineering, hs@denx.de.
6 *
7 * Based on:
8 * U-Boot file:/include/configs/am335x_evm.h
9 *
10 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
Heiko Schocher499c4982013-08-19 16:39:01 +020011 */
12
13#ifndef __CONFIG_PXM2_H
14#define __CONFIG_PXM2_H
15
Heiko Schocher499c4982013-08-19 16:39:01 +020016#define CONFIG_SIEMENS_MACH_TYPE MACH_TYPE_PXM2
17
18#include "siemens-am33x-common.h"
19
Egli, Samuel121636f2014-04-24 17:57:52 +020020#define DDR_IOCTRL_VAL 0x18b
Heiko Schocher499c4982013-08-19 16:39:01 +020021#define DDR_PLL_FREQ 266
22
23#define BOARD_DFU_BUTTON_GPIO 59
Heiko Schocher499c4982013-08-19 16:39:01 +020024#define BOARD_LCD_POWER 111
25#define BOARD_BACK_LIGHT 112
26#define BOARD_TOUCH_POWER 57
27
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020028#define CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
29 "button_dfu0=59\0" \
30 "led0=117,0,1\0" \
31
Heiko Schocher499c4982013-08-19 16:39:01 +020032 /* Physical Memory Map */
33#define CONFIG_MAX_RAM_BANK_SIZE (512 << 20) /* 1GB */
34
35/* I2C Configuration */
36#define CONFIG_SYS_I2C_SPEED 400000
Heiko Schocher499c4982013-08-19 16:39:01 +020037
Heiko Schocher499c4982013-08-19 16:39:01 +020038#define CONFIG_FACTORYSET
39
Heiko Schocher499c4982013-08-19 16:39:01 +020040#ifndef CONFIG_SPL_BUILD
41
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020042/* Use common default */
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020043
Heiko Schocher499c4982013-08-19 16:39:01 +020044/* Default env settings */
45#define CONFIG_EXTRA_ENV_SETTINGS \
46 "hostname=pxm2\0" \
Heiko Schochercbec11a2016-06-07 08:55:45 +020047 "ubi_off=2048\0"\
Heiko Schocher499c4982013-08-19 16:39:01 +020048 "nand_img_size=0x500000\0" \
49 "optargs=\0" \
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020050 "preboot=draco_led 0\0" \
51 CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
Samuel Egli8069bfe2013-11-04 14:05:03 +010052 "splashpos=m,m\0" \
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020053 CONFIG_ENV_SETTINGS_V1 \
54 CONFIG_ENV_SETTINGS_NAND_V1 \
Heiko Schocher499c4982013-08-19 16:39:01 +020055 "mmc_dev=0\0" \
56 "mmc_root=/dev/mmcblk0p2 rw\0" \
57 "mmc_root_fs_type=ext4 rootwait\0" \
58 "mmc_load_uimage=" \
59 "mmc rescan; " \
60 "setenv bootfile uImage;" \
61 "fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}\0" \
62 "loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}\0" \
63 "importbootenv=echo Importing environment from mmc ...; " \
64 "env import -t $loadaddr $filesize\0" \
65 "mmc_args=run bootargs_defaults;" \
66 "mtdparts default;" \
67 "setenv bootargs ${bootargs} " \
68 "root=${mmc_root} ${mtdparts}" \
69 "rootfstype=${mmc_root_fs_type} ip=${ip_method} " \
70 "eth=${ethaddr} " \
71 "\0" \
72 "mmc_boot=run mmc_args; " \
73 "run mmc_load_uimage; " \
74 "bootm ${kloadaddr}\0" \
75 ""
76
77#ifndef CONFIG_RESTORE_FLASH
78/* set to negative value for no autoboot */
Heiko Schocher499c4982013-08-19 16:39:01 +020079
80#define CONFIG_BOOTCOMMAND \
81 "if dfubutton; then " \
82 "run dfu_start; " \
83 "reset; " \
84 "fi; " \
85 "if mmc rescan; then " \
86 "echo SD/MMC found on device ${mmc_dev};" \
87 "if run loadbootenv; then " \
88 "echo Loaded environment from ${bootenv};" \
89 "run importbootenv;" \
90 "fi;" \
91 "if test -n $uenvcmd; then " \
92 "echo Running uenvcmd ...;" \
93 "run uenvcmd;" \
94 "fi;" \
95 "if run mmc_load_uimage; then " \
96 "run mmc_args;" \
97 "bootm ${kloadaddr};" \
98 "fi;" \
99 "fi;" \
100 "run nand_boot;" \
Samuel Egli8069bfe2013-11-04 14:05:03 +0100101 "reset;"
Heiko Schocher499c4982013-08-19 16:39:01 +0200102
103#else
Heiko Schocher499c4982013-08-19 16:39:01 +0200104
105#define CONFIG_BOOTCOMMAND \
106 "setenv autoload no; " \
107 "dhcp; " \
108 "if tftp 80000000 debrick.scr; then " \
109 "source 80000000; " \
110 "fi"
111#endif
112#endif /* CONFIG_SPL_BUILD */
113
Heiko Schocher499c4982013-08-19 16:39:01 +0200114#if defined(CONFIG_VIDEO)
115#define CONFIG_VIDEO_DA8XX
Heiko Schocher499c4982013-08-19 16:39:01 +0200116#define CONFIG_VIDEO_LOGO
Heiko Schocher499c4982013-08-19 16:39:01 +0200117#define CONFIG_VIDEO_BMP_LOGO
Heiko Schocher499c4982013-08-19 16:39:01 +0200118#define DA8XX_LCD_CNTL_BASE LCD_CNTL_BASE
119#define PWM_TICKS 0x1388
120#define PWM_DUTY 0x200
Heiko Schocher499c4982013-08-19 16:39:01 +0200121#endif
122
Heiko Schocher499c4982013-08-19 16:39:01 +0200123#endif /* ! __CONFIG_PXM2_H */