Convert CONFIG_SYS_I2C_EEPROM_CCID et al to Kconfig
[platform/kernel/u-boot.git] / include / configs / ti_omap4_common.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (C) Copyright 2010
4  * Texas Instruments Incorporated.
5  * Aneesh V       <aneesh@ti.com>
6  * Steve Sakoman  <steve@sakoman.com>
7  *
8  * TI OMAP4 common configuration settings
9  */
10
11 #ifndef __CONFIG_TI_OMAP4_COMMON_H
12 #define __CONFIG_TI_OMAP4_COMMON_H
13
14 #ifndef CONFIG_SYS_L2CACHE_OFF
15 #define CONFIG_SYS_L2_PL310             1
16 #define CONFIG_SYS_PL310_BASE   0x48242000
17 #endif
18
19 /* Get CPU defs */
20 #include <asm/arch/cpu.h>
21 #include <asm/arch/omap.h>
22
23 /* Use General purpose timer 1 */
24 #define CONFIG_SYS_TIMERBASE            GPT2_BASE
25
26 #include <configs/ti_armv7_omap.h>
27
28 /*
29  * Hardware drivers
30  */
31 #define CONFIG_SYS_NS16550_CLK          48000000
32 #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL)
33 #define CONFIG_SYS_NS16550_SERIAL
34 #define CONFIG_SYS_NS16550_REG_SIZE     (-4)
35 #define CONFIG_SYS_NS16550_COM3         UART3_BASE
36 #endif
37
38 /* TWL6030 */
39 #define CONFIG_TWL6030_POWER            1
40
41 /*
42  * Environment setup
43  */
44 #define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
45         "bootcmd_" #devtypel #instance "=" \
46         "setenv mmcdev " #instance"; "\
47         "setenv bootpart " #instance":2 ; "\
48         "run mmcboot\0"
49
50 #define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \
51         #devtypel #instance " "
52
53 #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
54         #devtypel #instance " "
55
56 #define BOOT_TARGET_DEVICES(func) \
57         func(MMC, mmc, 0) \
58         func(LEGACY_MMC, legacy_mmc, 0) \
59         func(MMC, mmc, 1) \
60         func(LEGACY_MMC, legacy_mmc, 1) \
61         func(PXE, pxe, na) \
62         func(DHCP, dhcp, na)
63
64 #include <config_distro_bootcmd.h>
65 #include <environment/ti/mmc.h>
66
67 #define CONFIG_EXTRA_ENV_SETTINGS \
68         DEFAULT_LINUX_BOOT_ENV \
69         DEFAULT_MMC_TI_ARGS \
70         DEFAULT_FIT_TI_ARGS \
71         "console=ttyO2,115200n8\0" \
72         "fdtfile=undefined\0" \
73         "bootpart=0:2\0" \
74         "bootdir=/boot\0" \
75         "bootfile=zImage\0" \
76         "usbtty=cdc_acm\0" \
77         "vram=16M\0" \
78         "loaduimage=load mmc ${mmcdev} ${loadaddr} uImage\0" \
79         "uimageboot=echo Booting from mmc${mmcdev} ...; " \
80                 "run args_mmc; " \
81                 "bootm ${loadaddr}\0" \
82         "findfdt="\
83                 "if test $board_name = sdp4430; then " \
84                         "setenv fdtfile omap4-sdp.dtb; fi; " \
85                 "if test $board_name = panda; then " \
86                         "setenv fdtfile omap4-panda.dtb; fi;" \
87                 "if test $board_name = panda-a4; then " \
88                         "setenv fdtfile omap4-panda-a4.dtb; fi;" \
89                 "if test $board_name = panda-es; then " \
90                         "setenv fdtfile omap4-panda-es.dtb; fi;" \
91                 "if test $board_name = duovero; then " \
92                         "setenv fdtfile omap4-duovero-parlor.dtb; fi;" \
93                 "if test $fdtfile = undefined; then " \
94                         "echo WARNING: Could not determine device tree to use; fi; \0" \
95         BOOTENV
96
97 /*
98  * Defines for SPL
99  * It is known that this will break HS devices. Since the current size of
100  * SPL is overlapped with public stack and breaking non HS devices to boot.
101  * So moving TEXT_BASE down to non-HS limit.
102  */
103
104 #ifdef CONFIG_SPL_BUILD
105 /* No need for i2c in SPL mode as we will use SRI2C for PMIC access on OMAP4 */
106 #endif
107
108 #endif /* __CONFIG_TI_OMAP4_COMMON_H */