]>
Commit | Line | Data |
---|---|---|
16dc702f A |
1 | /* |
2 | * (C) Copyright 2010 | |
3 | * Texas Instruments Incorporated. | |
4 | * Aneesh V <[email protected]> | |
5 | * Steve Sakoman <[email protected]> | |
6 | * | |
7 | * TI OMAP4 common configuration settings | |
8 | * | |
1a459660 | 9 | * SPDX-License-Identifier: GPL-2.0+ |
16dc702f A |
10 | */ |
11 | ||
6c0a032a EBS |
12 | #ifndef __CONFIG_TI_OMAP4_COMMON_H |
13 | #define __CONFIG_TI_OMAP4_COMMON_H | |
16dc702f A |
14 | |
15 | /* | |
16 | * High Level Configuration Options | |
17 | */ | |
16dc702f | 18 | #define CONFIG_OMAP4430 1 /* which is in a 4430 */ |
1d7b289c | 19 | #define CONFIG_MISC_INIT_R |
1d7b289c | 20 | |
1d7b289c LV |
21 | #ifndef CONFIG_SYS_L2CACHE_OFF |
22 | #define CONFIG_SYS_L2_PL310 1 | |
23 | #define CONFIG_SYS_PL310_BASE 0x48242000 | |
24 | #endif | |
16dc702f A |
25 | |
26 | /* Get CPU defs */ | |
27 | #include <asm/arch/cpu.h> | |
508a58fa | 28 | #include <asm/arch/omap.h> |
16dc702f | 29 | |
1d7b289c LV |
30 | /* Use General purpose timer 1 */ |
31 | #define CONFIG_SYS_TIMERBASE GPT2_BASE | |
16dc702f A |
32 | |
33 | /* | |
16dc702f | 34 | * Total Size Environment - 128k |
16dc702f A |
35 | */ |
36 | #define CONFIG_ENV_SIZE (128 << 10) | |
16dc702f A |
37 | |
38 | /* | |
1d7b289c LV |
39 | * For the DDR timing information we can either dynamically determine |
40 | * the timings to use or use pre-determined timings (based on using the | |
41 | * dynamic method. Default to the static timing infomation. | |
16dc702f | 42 | */ |
1d7b289c LV |
43 | #define CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS |
44 | #ifndef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS | |
45 | #define CONFIG_SYS_AUTOMATIC_SDRAM_DETECTION | |
46 | #define CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS | |
47 | #endif | |
48 | ||
9a0f4004 | 49 | #include <configs/ti_armv7_omap.h> |
16dc702f A |
50 | |
51 | /* | |
1d7b289c | 52 | * Hardware drivers |
16dc702f | 53 | */ |
c7b9686d | 54 | #define CONFIG_SYS_NS16550_CLK 48000000 |
53ee6342 | 55 | #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL) |
16dc702f A |
56 | #define CONFIG_SYS_NS16550_SERIAL |
57 | #define CONFIG_SYS_NS16550_REG_SIZE (-4) | |
16dc702f | 58 | #define CONFIG_SYS_NS16550_COM3 UART3_BASE |
53ee6342 TR |
59 | #endif |
60 | #define CONFIG_CONS_INDEX 3 | |
16dc702f | 61 | |
16dc702f | 62 | /* TWL6030 */ |
14fa2dd0 | 63 | #ifndef CONFIG_SPL_BUILD |
16dc702f | 64 | #define CONFIG_TWL6030_POWER 1 |
14fa2dd0 | 65 | #endif |
16dc702f | 66 | |
16dc702f | 67 | /* USB */ |
95de1e2f | 68 | #define CONFIG_USB_MUSB_UDC 1 |
16dc702f A |
69 | #define CONFIG_USB_OMAP3 1 |
70 | ||
71 | /* USB device configuration */ | |
72 | #define CONFIG_USB_DEVICE 1 | |
73 | #define CONFIG_USB_TTY 1 | |
16dc702f | 74 | |
16dc702f A |
75 | /* |
76 | * Environment setup | |
77 | */ | |
2a1a29c5 TR |
78 | #define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \ |
79 | "bootcmd_" #devtypel #instance "=" \ | |
80 | "setenv mmcdev " #instance"; "\ | |
81 | "setenv bootpart " #instance":2 ; "\ | |
82 | "run mmcboot\0" | |
83 | ||
84 | #define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \ | |
85 | #devtypel #instance " " | |
86 | ||
87 | #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \ | |
88 | #devtypel #instance " " | |
89 | ||
90 | #define BOOT_TARGET_DEVICES(func) \ | |
91 | func(MMC, mmc, 0) \ | |
92 | func(LEGACY_MMC, legacy_mmc, 0) \ | |
93 | func(MMC, mmc, 1) \ | |
94 | func(LEGACY_MMC, legacy_mmc, 1) \ | |
95 | func(PXE, pxe, na) \ | |
96 | func(DHCP, dhcp, na) | |
97 | ||
98 | #define CONFIG_BOOTCOMMAND \ | |
1e93cc84 LV |
99 | "if test ${boot_fit} -eq 1; then " \ |
100 | "run update_to_fit;" \ | |
101 | "fi;" \ | |
2a1a29c5 | 102 | "run findfdt; " \ |
18c534bb | 103 | "run envboot; " \ |
2a1a29c5 TR |
104 | "run distro_bootcmd" |
105 | ||
106 | #include <config_distro_bootcmd.h> | |
107 | ||
16dc702f | 108 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
fb3ad9bd | 109 | DEFAULT_LINUX_BOOT_ENV \ |
85d17be3 | 110 | DEFAULT_MMC_TI_ARGS \ |
1e93cc84 | 111 | DEFAULT_FIT_TI_ARGS \ |
d71a4916 | 112 | "console=ttyO2,115200n8\0" \ |
a7143215 | 113 | "fdtfile=undefined\0" \ |
143070df S |
114 | "bootpart=0:2\0" \ |
115 | "bootdir=/boot\0" \ | |
aaed0a23 | 116 | "bootfile=zImage\0" \ |
16dc702f A |
117 | "usbtty=cdc_acm\0" \ |
118 | "vram=16M\0" \ | |
ffe16911 | 119 | "loaduimage=load mmc ${mmcdev} ${loadaddr} uImage\0" \ |
ffe16911 | 120 | "uimageboot=echo Booting from mmc${mmcdev} ...; " \ |
85d17be3 | 121 | "run args_mmc; " \ |
ffe16911 | 122 | "bootm ${loadaddr}\0" \ |
143070df S |
123 | "findfdt="\ |
124 | "if test $board_name = sdp4430; then " \ | |
125 | "setenv fdtfile omap4-sdp.dtb; fi; " \ | |
126 | "if test $board_name = panda; then " \ | |
34f667bb | 127 | "setenv fdtfile omap4-panda.dtb; fi;" \ |
7d47d1ca DM |
128 | "if test $board_name = panda-a4; then " \ |
129 | "setenv fdtfile omap4-panda-a4.dtb; fi;" \ | |
34f667bb | 130 | "if test $board_name = panda-es; then " \ |
a7143215 | 131 | "setenv fdtfile omap4-panda-es.dtb; fi;" \ |
ffe16911 | 132 | "if test $board_name = duovero; then " \ |
99907176 | 133 | "setenv fdtfile omap4-duovero-parlor.dtb; fi;" \ |
a7143215 DM |
134 | "if test $fdtfile = undefined; then " \ |
135 | "echo WARNING: Could not determine device tree to use; fi; \0" \ | |
2a1a29c5 | 136 | BOOTENV |
16dc702f | 137 | |
dcc23576 LV |
138 | /* |
139 | * Defines for SPL | |
140 | * It is known that this will break HS devices. Since the current size of | |
141 | * SPL is overlapped with public stack and breaking non HS devices to boot. | |
142 | * So moving TEXT_BASE down to non-HS limit. | |
143 | */ | |
144 | #define CONFIG_SPL_TEXT_BASE 0x40300000 | |
983e3700 | 145 | #define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds" |
d3289aac TR |
146 | #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ |
147 | (128 << 20)) | |
16dc702f | 148 | |
70e71b61 EBS |
149 | #ifdef CONFIG_NAND |
150 | #define CONFIG_SPL_NAND_AM33XX_BCH /* ELM support */ | |
151 | #endif | |
152 | ||
4f80d5ba NM |
153 | #ifdef CONFIG_SPL_BUILD |
154 | /* No need for i2c in SPL mode as we will use SRI2C for PMIC access on OMAP4 */ | |
155 | #undef CONFIG_SYS_I2C | |
156 | #undef CONFIG_SYS_I2C_OMAP24XX | |
157 | #endif | |
158 | ||
6c0a032a | 159 | #endif /* __CONFIG_TI_OMAP4_COMMON_H */ |