]>
Commit | Line | Data |
---|---|---|
1c1b7c37 LP |
1 | /* |
2 | * pcm051.h | |
3 | * | |
4 | * Phytec phyCORE-AM335x (pcm051) boards information header | |
5 | * | |
6 | * Copyright (C) 2013 Lemonage Software GmbH | |
7 | * Author Lars Poeschel <[email protected]> | |
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 | ||
b640b460 | 22 | #include <configs/ti_am335x_common.h> |
1c1b7c37 | 23 | |
1c1b7c37 | 24 | #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ |
1c1b7c37 LP |
25 | #define MACH_TYPE_PCM051 4144 /* Until the next sync */ |
26 | #define CONFIG_MACH_TYPE MACH_TYPE_PCM051 | |
27 | ||
1c1b7c37 | 28 | /* set to negative value for no autoboot */ |
1c1b7c37 LP |
29 | #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG |
30 | #define CONFIG_EXTRA_ENV_SETTINGS \ | |
31 | "loadaddr=0x80007fc0\0" \ | |
32 | "fdtaddr=0x80000000\0" \ | |
33 | "rdaddr=0x81000000\0" \ | |
34 | "bootfile=uImage\0" \ | |
35 | "fdtfile=pcm051.dtb\0" \ | |
36 | "console=ttyO0,115200n8\0" \ | |
37 | "optargs=\0" \ | |
38 | "mmcdev=0\0" \ | |
39 | "mmcroot=/dev/mmcblk0p2 ro\0" \ | |
40 | "mmcrootfstype=ext4 rootwait\0" \ | |
41 | "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \ | |
42 | "ramrootfstype=ext2\0" \ | |
43 | "mmcargs=setenv bootargs console=${console} " \ | |
44 | "${optargs} " \ | |
45 | "root=${mmcroot} " \ | |
46 | "rootfstype=${mmcrootfstype}\0" \ | |
47 | "bootenv=uEnv.txt\0" \ | |
1ee9c6c0 | 48 | "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ |
49 | "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ | |
50 | "source ${loadaddr}\0" \ | |
1c1b7c37 LP |
51 | "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ |
52 | "importbootenv=echo Importing environment from mmc ...; " \ | |
53 | "env import -t $loadaddr $filesize\0" \ | |
54 | "ramargs=setenv bootargs console=${console} " \ | |
55 | "${optargs} " \ | |
56 | "root=${ramroot} " \ | |
57 | "rootfstype=${ramrootfstype}\0" \ | |
58 | "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ | |
59 | "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \ | |
60 | "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \ | |
61 | "mmcboot=echo Booting from mmc ...; " \ | |
62 | "run mmcargs; " \ | |
63 | "bootm ${loadaddr}\0" \ | |
64 | "ramboot=echo Booting from ramdisk ...; " \ | |
65 | "run ramargs; " \ | |
66 | "bootm ${loadaddr}\0" \ | |
67 | ||
68 | #define CONFIG_BOOTCOMMAND \ | |
69 | "mmc dev ${mmcdev}; if mmc rescan; then " \ | |
70 | "echo SD/MMC found on device ${mmcdev};" \ | |
1ee9c6c0 | 71 | "if run loadbootscript; then " \ |
72 | "run bootscript;" \ | |
73 | "else " \ | |
74 | "if run loadbootenv; then " \ | |
75 | "echo Loaded environment from ${bootenv};" \ | |
76 | "run importbootenv;" \ | |
77 | "fi;" \ | |
78 | "if test -n $uenvcmd; then " \ | |
79 | "echo Running uenvcmd ...;" \ | |
80 | "run uenvcmd;" \ | |
81 | "fi;" \ | |
82 | "if run loaduimage; then " \ | |
83 | "run mmcboot;" \ | |
84 | "fi;" \ | |
85 | "fi ;" \ | |
1c1b7c37 LP |
86 | "fi;" \ |
87 | ||
88 | /* Clock Defines */ | |
89 | #define V_OSCK 25000000 /* Clock output from T2 */ | |
90 | #define V_SCLK (V_OSCK) | |
91 | ||
1c1b7c37 LP |
92 | /* |
93 | * memtest works on 8 MB in DRAM after skipping 32MB from | |
94 | * start addr of ram disk | |
95 | */ | |
73feefdc | 96 | #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + (64 << 20)) |
1c1b7c37 LP |
97 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \ |
98 | + (8 * 1024 * 1024)) | |
99 | ||
1c1b7c37 LP |
100 | #define CONFIG_SF_DEFAULT_SPEED 24000000 |
101 | ||
1c1b7c37 LP |
102 | #define CONFIG_CONS_INDEX 1 |
103 | /* NS16550 Configuration */ | |
1c1b7c37 LP |
104 | #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */ |
105 | #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */ | |
106 | #define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */ | |
107 | #define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */ | |
108 | #define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */ | |
109 | #define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */ | |
110 | ||
111 | /* I2C Configuration */ | |
1c1b7c37 LP |
112 | #define CONFIG_CMD_EEPROM |
113 | #define CONFIG_ENV_EEPROM_IS_ON_I2C | |
114 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */ | |
115 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 | |
1c1b7c37 | 116 | |
1c1b7c37 LP |
117 | #define CONFIG_SYS_BAUDRATE_TABLE { 110, 300, 600, 1200, 2400, \ |
118 | 4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 } | |
119 | ||
47c6ea07 | 120 | /* CPU */ |
1c1b7c37 LP |
121 | #define CONFIG_ENV_IS_NOWHERE |
122 | ||
1c1b7c37 LP |
123 | #define CONFIG_SPL_YMODEM_SUPPORT |
124 | #define CONFIG_SPL_NET_SUPPORT | |
ba1bee43 | 125 | #define CONFIG_SPL_ENV_SUPPORT |
1c1b7c37 LP |
126 | #define CONFIG_SPL_NET_VCI_STRING "pcm051 U-Boot SPL" |
127 | #define CONFIG_SPL_ETH_SUPPORT | |
b640b460 MK |
128 | #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds" |
129 | ||
130 | #ifdef CONFIG_SPI_BOOT | |
1c1b7c37 LP |
131 | #define CONFIG_SPL_SPI_SUPPORT |
132 | #define CONFIG_SPL_SPI_FLASH_SUPPORT | |
133 | #define CONFIG_SPL_SPI_LOAD | |
1c1b7c37 LP |
134 | #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000 |
135 | #define CONFIG_SYS_SPI_U_BOOT_SIZE 0x40000 | |
1c1b7c37 LP |
136 | #endif |
137 | ||
138 | /* | |
139 | * USB configuration | |
140 | */ | |
141 | #define CONFIG_USB_MUSB_DSPS | |
142 | #define CONFIG_ARCH_MISC_INIT | |
95de1e2f | 143 | #define CONFIG_USB_MUSB_PIO_ONLY |
1c1b7c37 LP |
144 | #define CONFIG_AM335X_USB0 |
145 | #define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL | |
146 | #define CONFIG_AM335X_USB1 | |
147 | #define CONFIG_AM335X_USB1_MODE MUSB_HOST | |
148 | ||
95de1e2f | 149 | #ifdef CONFIG_USB_MUSB_HOST |
1c1b7c37 LP |
150 | #define CONFIG_USB_STORAGE |
151 | #endif | |
152 | ||
95de1e2f | 153 | #ifdef CONFIG_USB_MUSB_GADGET |
1c1b7c37 LP |
154 | #define CONFIG_USB_ETHER |
155 | #define CONFIG_USB_ETH_RNDIS | |
95de1e2f | 156 | #endif /* CONFIG_USB_MUSB_GADGET */ |
1c1b7c37 | 157 | |
1c1b7c37 LP |
158 | #define CONFIG_PHY_GIGE |
159 | #define CONFIG_PHYLIB | |
1c1b7c37 LP |
160 | #define CONFIG_PHY_SMSC |
161 | ||
162 | #endif /* ! __CONFIG_PCM051_H */ |