blob: 79f3f48df87e4f8250a15b35d99becd56f162bf1 [file] [log] [blame]
Lars Poeschel67b4a792013-01-11 00:53:31 +00001/*
2 * pcm051.h
3 *
4 * Phytec phyCORE-AM335x (pcm051) boards information header
5 *
6 * Copyright (C) 2013 Lemonage Software GmbH
7 * Author Lars Poeschel <poeschel@lemonage.de>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation version 2.
12 *
13 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
14 * kind, whether express or implied; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
18
19#ifndef __CONFIG_PCM051_H
20#define __CONFIG_PCM051_H
21
Matwey V. Kornilovf23537e2014-07-26 18:48:45 +040022#include <configs/ti_am335x_common.h>
Lars Poeschel67b4a792013-01-11 00:53:31 +000023
Lars Poeschel67b4a792013-01-11 00:53:31 +000024#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
Lars Poeschel67b4a792013-01-11 00:53:31 +000025#define CONFIG_MACH_TYPE MACH_TYPE_PCM051
26
Lars Poeschel67b4a792013-01-11 00:53:31 +000027/* set to negative value for no autoboot */
Lars Poeschel67b4a792013-01-11 00:53:31 +000028#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
29#define CONFIG_EXTRA_ENV_SETTINGS \
30 "loadaddr=0x80007fc0\0" \
31 "fdtaddr=0x80000000\0" \
32 "rdaddr=0x81000000\0" \
33 "bootfile=uImage\0" \
34 "fdtfile=pcm051.dtb\0" \
35 "console=ttyO0,115200n8\0" \
36 "optargs=\0" \
37 "mmcdev=0\0" \
38 "mmcroot=/dev/mmcblk0p2 ro\0" \
39 "mmcrootfstype=ext4 rootwait\0" \
40 "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
41 "ramrootfstype=ext2\0" \
42 "mmcargs=setenv bootargs console=${console} " \
43 "${optargs} " \
44 "root=${mmcroot} " \
45 "rootfstype=${mmcrootfstype}\0" \
46 "bootenv=uEnv.txt\0" \
matwey.kornilov@gmail.comf45df482014-12-27 22:10:44 +030047 "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
48 "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
49 "source ${loadaddr}\0" \
Lars Poeschel67b4a792013-01-11 00:53:31 +000050 "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
51 "importbootenv=echo Importing environment from mmc ...; " \
52 "env import -t $loadaddr $filesize\0" \
53 "ramargs=setenv bootargs console=${console} " \
54 "${optargs} " \
55 "root=${ramroot} " \
56 "rootfstype=${ramrootfstype}\0" \
57 "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
58 "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
59 "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \
60 "mmcboot=echo Booting from mmc ...; " \
61 "run mmcargs; " \
62 "bootm ${loadaddr}\0" \
63 "ramboot=echo Booting from ramdisk ...; " \
64 "run ramargs; " \
65 "bootm ${loadaddr}\0" \
66
67#define CONFIG_BOOTCOMMAND \
68 "mmc dev ${mmcdev}; if mmc rescan; then " \
69 "echo SD/MMC found on device ${mmcdev};" \
matwey.kornilov@gmail.comf45df482014-12-27 22:10:44 +030070 "if run loadbootscript; then " \
71 "run bootscript;" \
72 "else " \
73 "if run loadbootenv; then " \
74 "echo Loaded environment from ${bootenv};" \
75 "run importbootenv;" \
76 "fi;" \
77 "if test -n $uenvcmd; then " \
78 "echo Running uenvcmd ...;" \
79 "run uenvcmd;" \
80 "fi;" \
81 "if run loaduimage; then " \
82 "run mmcboot;" \
83 "fi;" \
84 "fi ;" \
Lars Poeschel67b4a792013-01-11 00:53:31 +000085 "fi;" \
86
87/* Clock Defines */
88#define V_OSCK 25000000 /* Clock output from T2 */
89#define V_SCLK (V_OSCK)
90
Lars Poeschel67b4a792013-01-11 00:53:31 +000091/*
92 * memtest works on 8 MB in DRAM after skipping 32MB from
93 * start addr of ram disk
94 */
Tom Rinif3b6a1d2013-08-09 11:22:13 -040095#define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + (64 << 20))
Lars Poeschel67b4a792013-01-11 00:53:31 +000096#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \
97 + (8 * 1024 * 1024))
98
Lars Poeschel67b4a792013-01-11 00:53:31 +000099#define CONFIG_SF_DEFAULT_SPEED 24000000
100
Lars Poeschel67b4a792013-01-11 00:53:31 +0000101#define CONFIG_CONS_INDEX 1
102/* NS16550 Configuration */
Lars Poeschel67b4a792013-01-11 00:53:31 +0000103#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
104#define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
105#define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */
106#define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */
107#define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
108#define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
109
110/* I2C Configuration */
Lars Poeschel67b4a792013-01-11 00:53:31 +0000111#define CONFIG_ENV_EEPROM_IS_ON_I2C
112#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
113#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
Lars Poeschel67b4a792013-01-11 00:53:31 +0000114
Lars Poeschel67b4a792013-01-11 00:53:31 +0000115#define CONFIG_SYS_BAUDRATE_TABLE { 110, 300, 600, 1200, 2400, \
1164800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 }
117
SRICHARAN R669b3372013-04-24 00:41:25 +0000118/* CPU */
Lars Poeschel67b4a792013-01-11 00:53:31 +0000119
Matwey V. Kornilovf23537e2014-07-26 18:48:45 +0400120#ifdef CONFIG_SPI_BOOT
Lars Poeschel67b4a792013-01-11 00:53:31 +0000121#define CONFIG_SPL_SPI_LOAD
Lars Poeschel67b4a792013-01-11 00:53:31 +0000122#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000
123#define CONFIG_SYS_SPI_U_BOOT_SIZE 0x40000
Lars Poeschel67b4a792013-01-11 00:53:31 +0000124#endif
125
126/*
127 * USB configuration
128 */
129#define CONFIG_USB_MUSB_DSPS
Paul Kocialkowskif34dfcb2015-08-04 17:04:06 +0200130#define CONFIG_USB_MUSB_PIO_ONLY
Lars Poeschel67b4a792013-01-11 00:53:31 +0000131#define CONFIG_AM335X_USB0
132#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
133#define CONFIG_AM335X_USB1
134#define CONFIG_AM335X_USB1_MODE MUSB_HOST
135
Lars Poeschel67b4a792013-01-11 00:53:31 +0000136#define CONFIG_PHY_SMSC
137
138#endif /* ! __CONFIG_PCM051_H */