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