Prepare v2023.10
[platform/kernel/u-boot.git] / include / configs / ti_armv7_keystone2.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Common configuration header file for all Keystone II EVM platforms
4  *
5  * (C) Copyright 2012-2014
6  *     Texas Instruments Incorporated, <www.ti.com>
7  */
8
9 #ifndef __CONFIG_KS2_EVM_H
10 #define __CONFIG_KS2_EVM_H
11
12 /* U-Boot Build Configuration */
13
14 /* SoC Configuration */
15
16 /* Memory Configuration */
17 #define CFG_SYS_LPAE_SDRAM_BASE 0x800000000
18 #define CFG_MAX_RAM_BANK_SIZE   (2 << 30)       /* 2GB */
19
20 #ifdef CONFIG_SYS_MALLOC_F_LEN
21 #define SPL_MALLOC_F_SIZE       CONFIG_SYS_MALLOC_F_LEN
22 #else
23 #define SPL_MALLOC_F_SIZE       0
24 #endif
25
26 /* SPL SPI Loader Configuration */
27 #define KEYSTONE_SPL_STACK_SIZE         (8 * 1024)
28
29 /* SRAM scratch space entries  */
30 #define SRAM_SCRATCH_SPACE_ADDR         0xc0c23fc
31
32 #define TI_SRAM_SCRATCH_BOARD_EEPROM_START      (SRAM_SCRATCH_SPACE_ADDR)
33 #define TI_SRAM_SCRATCH_BOARD_EEPROM_END        (SRAM_SCRATCH_SPACE_ADDR + 0x200)
34 #define KEYSTONE_SRAM_SCRATCH_SPACE_END         (TI_SRAM_SCRATCH_BOARD_EEPROM_END)
35
36 /* UART Configuration */
37 #define CFG_SYS_NS16550_COM1            KS2_UART0_BASE
38 #define CFG_SYS_NS16550_COM2            KS2_UART1_BASE
39
40 #ifndef CONFIG_SOC_K2G
41 #define CFG_SYS_NS16550_CLK             ks_clk_get_rate(KS2_CLK1_6)
42 #else
43 #define CFG_SYS_NS16550_CLK             ks_clk_get_rate(uart_pll_clk) / 2
44 #endif
45
46 /* SPI Configuration */
47 #define CFG_SYS_SPI_CLK         ks_clk_get_rate(KS2_CLK1_6)
48
49 /* Keystone net */
50 #define CFG_KSNET_MAC_ID_BASE           KS2_MAC_ID_BASE_ADDR
51 #define CFG_KSNET_NETCP_BASE                    KS2_NETCP_BASE
52 #define CFG_KSNET_SERDES_SGMII_BASE             KS2_SGMII_SERDES_BASE
53 #define CFG_KSNET_SERDES_SGMII2_BASE            KS2_SGMII_SERDES2_BASE
54 #define CFG_KSNET_SERDES_LANES_PER_SGMII        KS2_LANES_PER_SGMII_SERDES
55
56 /* EEPROM definitions */
57
58 /* NAND Configuration */
59 #define CFG_SYS_NAND_MASK_CLE           0x4000
60 #define CFG_SYS_NAND_MASK_ALE           0x2000
61 #define CFG_SYS_NAND_CS                 2
62
63 #define CFG_SYS_NAND_LARGEPAGE
64 #define CFG_SYS_NAND_BASE_LIST          { 0x30000000, }
65
66
67
68 /* U-Boot general configuration */
69
70 /* EDMA3 */
71
72
73 /* Now for the remaining common defines */
74 #include <configs/ti_armv7_common.h>
75
76 /* we may include files below only after all above definitions */
77 #include <asm/arch/hardware.h>
78 #include <asm/arch/clock.h>
79 #ifndef CONFIG_SOC_K2G
80 #define CFG_SYS_HZ_CLOCK                ks_clk_get_rate(KS2_CLK1_6)
81 #else
82 #define CFG_SYS_HZ_CLOCK                get_external_clk(sys_clk)
83 #endif
84
85 #endif /* __CONFIG_KS2_EVM_H */