blob: 46f48009dd32e2ae3dd1787ef11c7d741ac10dd0 [file] [log] [blame]
Heiko Schocher499c4982013-08-19 16:39:01 +02001/*
2 * siemens rut
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_RUT_H
15#define __CONFIG_RUT_H
16
Heiko Schocher499c4982013-08-19 16:39:01 +020017#define CONFIG_SIEMENS_MACH_TYPE MACH_TYPE_RUT
18
19#include "siemens-am33x-common.h"
20
Heiko Schocher499c4982013-08-19 16:39:01 +020021#define RUT_IOCTRL_VAL 0x18b
22#define DDR_PLL_FREQ 303
23
24 /* Physical Memory Map */
25#define CONFIG_MAX_RAM_BANK_SIZE (256 << 20) /* 256 MiB */
26
27/* I2C Configuration */
28#define CONFIG_SYS_I2C_SPEED 100000
29
30#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
31#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
32#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 /* 64 byte pages */
33#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* take up to 10 msec */
34
Heiko Schocher499c4982013-08-19 16:39:01 +020035#define CONFIG_PHY_NATSEMI
36
37#define CONFIG_FACTORYSET
38
Heiko Schocher499c4982013-08-19 16:39:01 +020039/* Watchdog */
40#define WATCHDOG_TRIGGER_GPIO 14
41
42#ifndef CONFIG_SPL_BUILD
43
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020044/* Use common default */
Heiko Schocherd17c3fc2015-06-16 14:59:34 +020045
Heiko Schocher499c4982013-08-19 16:39:01 +020046/* Default env settings */
47#define CONFIG_EXTRA_ENV_SETTINGS \
48 "hostname=rut\0" \
Heiko Schochercbec11a2016-06-07 08:55:45 +020049 "ubi_off=2048\0"\
Samuel Egli8069bfe2013-11-04 14:05:03 +010050 "nand_img_size=0x500000\0" \
51 "splashpos=m,m\0" \
Heiko Schocher499c4982013-08-19 16:39:01 +020052 "optargs=fixrtc --no-log consoleblank=0 \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 mmc rescan; then " \
82 "echo SD/MMC found on device ${mmc_dev};" \
83 "if run loadbootenv; then " \
84 "echo Loaded environment from ${bootenv};" \
85 "run importbootenv;" \
86 "fi;" \
87 "if test -n $uenvcmd; then " \
88 "echo Running uenvcmd ...;" \
89 "run uenvcmd;" \
90 "fi;" \
91 "if run mmc_load_uimage; then " \
92 "run mmc_args;" \
93 "bootm ${kloadaddr};" \
94 "fi;" \
95 "fi;" \
96 "run nand_boot;" \
Samuel Egli8069bfe2013-11-04 14:05:03 +010097 "reset;"
Heiko Schocher499c4982013-08-19 16:39:01 +020098
99#else
Heiko Schocher499c4982013-08-19 16:39:01 +0200100
101#define CONFIG_BOOTCOMMAND \
102 "setenv autoload no; " \
103 "dhcp; " \
104 "if tftp 80000000 debrick.scr; then " \
105 "source 80000000; " \
106 "fi"
107#endif
108
109#endif /* CONFIG_SPL_BUILD */
110
Heiko Schocher499c4982013-08-19 16:39:01 +0200111#if defined(CONFIG_VIDEO)
112#define CONFIG_VIDEO_DA8XX
Heiko Schocher499c4982013-08-19 16:39:01 +0200113#define CONFIG_SPLASH_SCREEN
114#define CONFIG_SPLASH_SCREEN_ALIGN
115#define CONFIG_VIDEO_LOGO
116#define CONFIG_VIDEO_BMP_RLE8
117#define CONFIG_VIDEO_BMP_LOGO
Heiko Schocher499c4982013-08-19 16:39:01 +0200118#define DA8XX_LCD_CNTL_BASE LCD_CNTL_BASE
119
120#define CONFIG_SPI
Heiko Schocher499c4982013-08-19 16:39:01 +0200121
122#define BOARD_LCD_RESET 115 /* Bank 3 pin 19 */
Heiko Schocher499c4982013-08-19 16:39:01 +0200123#define CONFIG_FORMIKE
Samuel Egli8069bfe2013-11-04 14:05:03 +0100124#define DISPL_PLL_SPREAD_SPECTRUM
Heiko Schocher499c4982013-08-19 16:39:01 +0200125#endif
126
Heiko Schocher499c4982013-08-19 16:39:01 +0200127#endif /* ! __CONFIG_RUT_H */