]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
0257930b | 2 | /* |
39af3d8a | 3 | * LG Optimus Black codename sniper config |
0257930b PK |
4 | * |
5 | * Copyright (C) 2015 Paul Kocialkowski <[email protected]> | |
0257930b PK |
6 | */ |
7 | ||
8 | #ifndef __CONFIG_H | |
9 | #define __CONFIG_H | |
10 | ||
11 | #include <asm/arch/cpu.h> | |
12 | #include <asm/arch/omap.h> | |
13 | ||
14 | /* | |
15 | * CPU | |
16 | */ | |
17 | ||
0257930b | 18 | #define CONFIG_ARM_ARCH_CP15_ERRATA |
0257930b | 19 | |
0257930b PK |
20 | /* |
21 | * Board | |
22 | */ | |
23 | ||
0257930b PK |
24 | /* |
25 | * Clocks | |
26 | */ | |
27 | ||
28 | #define CONFIG_SYS_TIMERBASE OMAP34XX_GPT2 | |
29 | #define CONFIG_SYS_PTV 2 | |
30 | ||
31 | #define V_NS16550_CLK 48000000 | |
32 | #define V_OSCK 26000000 | |
33 | #define V_SCLK (V_OSCK >> 1) | |
34 | ||
35 | /* | |
36 | * DRAM | |
37 | */ | |
38 | ||
0257930b PK |
39 | #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 |
40 | #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 | |
41 | ||
42 | /* | |
43 | * Memory | |
44 | */ | |
45 | ||
23a004a6 PK |
46 | #define CONFIG_SYS_SDRAM_BASE 0x80000000 |
47 | #define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \ | |
0257930b PK |
48 | GENERATED_GBL_DATA_SIZE) |
49 | ||
50 | #define CONFIG_SYS_MALLOC_LEN (1024 * 1024 + CONFIG_ENV_SIZE) | |
51 | ||
0257930b PK |
52 | /* |
53 | * I2C | |
54 | */ | |
55 | ||
0257930b PK |
56 | #define CONFIG_I2C_MULTI_BUS |
57 | ||
0257930b PK |
58 | /* |
59 | * Input | |
60 | */ | |
61 | ||
0257930b PK |
62 | /* |
63 | * SPL | |
64 | */ | |
65 | ||
fa2f81b0 TR |
66 | #define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \ |
67 | CONFIG_SPL_TEXT_BASE) | |
0257930b PK |
68 | #define CONFIG_SPL_BSS_START_ADDR 0x80000000 |
69 | #define CONFIG_SPL_BSS_MAX_SIZE (512 * 1024) | |
70 | #define CONFIG_SYS_SPL_MALLOC_START 0x80208000 | |
71 | #define CONFIG_SYS_SPL_MALLOC_SIZE (1024 * 1024) | |
72 | #define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK | |
73 | ||
0257930b PK |
74 | #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img" |
75 | ||
0257930b | 76 | #define CONFIG_SYS_CBSIZE 512 |
0257930b PK |
77 | |
78 | /* | |
79 | * Serial | |
80 | */ | |
81 | ||
4fb60552 | 82 | #ifdef CONFIG_SPL_BUILD |
0257930b PK |
83 | #define CONFIG_SYS_NS16550_SERIAL |
84 | #define CONFIG_SYS_NS16550_REG_SIZE (-4) | |
0257930b PK |
85 | #endif |
86 | ||
c7b9686d | 87 | #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK |
0257930b | 88 | #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3 |
0257930b | 89 | |
0257930b PK |
90 | #define CONFIG_SYS_BAUDRATE_TABLE { 4800, 9600, 19200, 38400, 57600, \ |
91 | 115200 } | |
92 | ||
93 | /* | |
94 | * Environment | |
95 | */ | |
96 | ||
0257930b PK |
97 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
98 | "kernel_addr_r=0x82000000\0" \ | |
1d3a8664 PK |
99 | "loadaddr=0x82000000\0" \ |
100 | "fdt_addr_r=0x88000000\0" \ | |
101 | "fdtaddr=0x88000000\0" \ | |
102 | "ramdisk_addr_r=0x88080000\0" \ | |
103 | "pxefile_addr_r=0x80100000\0" \ | |
104 | "scriptaddr=0x80000000\0" \ | |
105 | "bootm_size=0x10000000\0" \ | |
0257930b PK |
106 | "boot_mmc_dev=0\0" \ |
107 | "kernel_mmc_part=3\0" \ | |
108 | "recovery_mmc_part=4\0" \ | |
1d3a8664 PK |
109 | "fdtfile=omap3-sniper.dtb\0" \ |
110 | "bootfile=/boot/extlinux/extlinux.conf\0" \ | |
5fcbca52 | 111 | "bootargs=console=ttyO2,115200 vram=5M,0x9FA00000 omapfb.vram=0:5M\0" |
0257930b PK |
112 | |
113 | /* | |
1d3a8664 | 114 | * ATAGs |
0257930b PK |
115 | */ |
116 | ||
0257930b PK |
117 | #define CONFIG_SETUP_MEMORY_TAGS |
118 | #define CONFIG_CMDLINE_TAG | |
119 | #define CONFIG_INITRD_TAG | |
120 | #define CONFIG_REVISION_TAG | |
9f4e1e94 | 121 | #define CONFIG_SERIAL_TAG |
0257930b PK |
122 | |
123 | /* | |
124 | * Boot | |
125 | */ | |
126 | ||
127 | #define CONFIG_SYS_LOAD_ADDR 0x82000000 | |
0257930b | 128 | |
0257930b PK |
129 | #define CONFIG_BOOTCOMMAND \ |
130 | "setenv boot_mmc_part ${kernel_mmc_part}; " \ | |
957efd4b PK |
131 | "if test reboot-${reboot-mode} = reboot-r; then " \ |
132 | "echo recovery; setenv boot_mmc_part ${recovery_mmc_part}; fi; " \ | |
fbdd3299 PK |
133 | "if test reboot-${reboot-mode} = reboot-b; then " \ |
134 | "echo fastboot; fastboot 0; fi; " \ | |
0257930b PK |
135 | "part start mmc ${boot_mmc_dev} ${boot_mmc_part} boot_mmc_start; " \ |
136 | "part size mmc ${boot_mmc_dev} ${boot_mmc_part} boot_mmc_size; " \ | |
137 | "mmc dev ${boot_mmc_dev}; " \ | |
138 | "mmc read ${kernel_addr_r} ${boot_mmc_start} ${boot_mmc_size} && " \ | |
139 | "bootm ${kernel_addr_r};" | |
140 | ||
0257930b | 141 | #endif |