18defd5e5a63332b5412e4e4780a27e6af8f1488
[platform/kernel/u-boot.git] / include / configs / ls2080a_common.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright 2017 NXP
4  * Copyright (C) 2014 Freescale Semiconductor
5  */
6
7 #ifndef __LS2_COMMON_H
8 #define __LS2_COMMON_H
9
10 #include <asm/arch/stream_id_lsch3.h>
11 #include <asm/arch/config.h>
12
13 /* Link Definitions */
14
15 /* We need architecture specific misc initializations */
16
17 /* Link Definitions */
18
19 #define CONFIG_VERY_BIG_RAM
20 #define CFG_SYS_DDR_SDRAM_BASE  0x80000000UL
21 #define CFG_SYS_FSL_DDR_SDRAM_BASE_PHY  0
22 #define CFG_SYS_SDRAM_BASE              CFG_SYS_DDR_SDRAM_BASE
23 #define CFG_SYS_DDR_BLOCK2_BASE 0x8080000000ULL
24
25 /*
26  * SMP Definitinos
27  */
28 #define CPU_RELEASE_ADDR                secondary_boot_addr
29
30 /*
31  * This is not an accurate number. It is used in start.S. The frequency
32  * will be udpated later when get_bus_freq(0) is available.
33  */
34
35 /* GPIO */
36
37 /* I2C */
38
39 /* Serial Port */
40 #define CFG_SYS_NS16550_CLK          (get_serial_clock())
41
42 /*
43  * During booting, IFC is mapped at the region of 0x30000000.
44  * But this region is limited to 256MB. To accommodate NOR, promjet
45  * and FPGA. This region is divided as below:
46  * 0x30000000 - 0x37ffffff : 128MB : NOR flash
47  * 0x38000000 - 0x3BFFFFFF : 64MB  : Promjet
48  * 0x3C000000 - 0x40000000 : 64MB  : FPGA etc
49  *
50  * To accommodate bigger NOR flash and other devices, we will map IFC
51  * chip selects to as below:
52  * 0x5_1000_0000..0x5_1fff_ffff Memory Hole
53  * 0x5_2000_0000..0x5_3fff_ffff IFC CSx (FPGA, NAND and others 512MB)
54  * 0x5_4000_0000..0x5_7fff_ffff ASIC or others 1GB
55  * 0x5_8000_0000..0x5_bfff_ffff IFC CS0 1GB (NOR/Promjet)
56  * 0x5_C000_0000..0x5_ffff_ffff IFC CS1 1GB (NOR/Promjet)
57  *
58  * For e.g. NOR flash at CS0 will be mapped to 0x580000000 after relocation.
59  * CFG_SYS_FLASH_BASE has the final address (core view)
60  * CFG_SYS_FLASH_BASE_PHYS has the final address (IFC view)
61  * CFG_SYS_FLASH_BASE_PHYS_EARLY has the temporary IFC address
62  * CONFIG_TEXT_BASE is linked to 0x30000000 for booting
63  */
64
65 #define CFG_SYS_FLASH_BASE                      0x580000000ULL
66 #define CFG_SYS_FLASH_BASE_PHYS         0x80000000
67 #define CFG_SYS_FLASH_BASE_PHYS_EARLY   0x00000000
68
69 #define CFG_SYS_FLASH1_BASE_PHYS                0xC0000000
70 #define CFG_SYS_FLASH1_BASE_PHYS_EARLY  0x8000000
71
72 #ifndef __ASSEMBLY__
73 unsigned long long get_qixis_addr(void);
74 #endif
75 #define QIXIS_BASE                              get_qixis_addr()
76 #define QIXIS_BASE_PHYS                         0x20000000
77 #define QIXIS_BASE_PHYS_EARLY                   0xC000000
78 #define QIXIS_STAT_PRES1                        0xb
79 #define QIXIS_SDID_MASK                         0x07
80 #define QIXIS_ESDHC_NO_ADAPTER                  0x7
81
82 #define CFG_SYS_NAND_BASE                       0x530000000ULL
83 #define CFG_SYS_NAND_BASE_PHYS          0x30000000
84
85 /* MC firmware */
86 /* TODO Actual DPL max length needs to be confirmed with the MC FW team */
87 #define CFG_SYS_LS_MC_DPC_MAX_LENGTH        0x20000
88 #define CFG_SYS_LS_MC_DRAM_DPC_OFFSET    0x00F00000
89 #define CFG_SYS_LS_MC_DPL_MAX_LENGTH        0x20000
90 #define CFG_SYS_LS_MC_DRAM_DPL_OFFSET    0x00F20000
91 /* For LS2085A */
92 #define CFG_SYS_LS_MC_AIOP_IMG_MAX_LENGTH       0x200000
93 #define CFG_SYS_LS_MC_DRAM_AIOP_IMG_OFFSET      0x07000000
94
95 /*
96  * Carve out a DDR region which will not be used by u-boot/Linux
97  *
98  * It will be used by MC and Debug Server. The MC region must be
99  * 512MB aligned, so the min size to hide is 512MB.
100  */
101 #ifdef CONFIG_FSL_MC_ENET
102 #define CFG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE               (128UL * 1024 * 1024)
103 #endif
104
105 /* Miscellaneous configurable options */
106
107 /* Physical Memory Map */
108 /* fixme: these need to be checked against the board */
109
110 #define CONFIG_HWCONFIG
111 #define HWCONFIG_BUFFER_SIZE            128
112
113 /* Initial environment variables */
114 #define CONFIG_EXTRA_ENV_SETTINGS               \
115         "hwconfig=fsl_ddr:bank_intlv=auto\0"    \
116         "loadaddr=0x80100000\0"                 \
117         "kernel_addr=0x100000\0"                \
118         "ramdisk_addr=0x800000\0"               \
119         "ramdisk_size=0x2000000\0"              \
120         "fdt_high=0xa0000000\0"                 \
121         "initrd_high=0xffffffffffffffff\0"      \
122         "kernel_start=0x581000000\0"            \
123         "kernel_load=0xa0000000\0"              \
124         "kernel_size=0x2800000\0"               \
125         "console=ttyAMA0,38400n8\0"             \
126         "mcinitcmd=fsl_mc start mc 0x580a00000" \
127         " 0x580e00000 \0"
128
129 #ifdef CONFIG_NAND_BOOT
130 #define CFG_SYS_NAND_U_BOOT_DST 0x80400000
131 #define CFG_SYS_NAND_U_BOOT_START       CFG_SYS_NAND_U_BOOT_DST
132 #endif
133
134 #include <asm/arch/soc.h>
135
136 #endif /* __LS2_COMMON_H */