Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2016 Freescale Semiconductor, Inc. |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __LS1046AQDS_H__ |
| 7 | #define __LS1046AQDS_H__ |
| 8 | |
| 9 | #include "ls1046a_common.h" |
| 10 | |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 11 | #define CONFIG_LAYERSCAPE_NS_ACCESS |
| 12 | |
| 13 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 |
| 14 | /* Physical Memory Map */ |
| 15 | #define CONFIG_CHIP_SELECTS_PER_CTRL 4 |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 16 | |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 17 | #define SPD_EEPROM_ADDRESS 0x51 |
| 18 | #define CONFIG_SYS_SPD_BUS_NUM 0 |
| 19 | |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 20 | #ifdef CONFIG_DDR_ECC |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 21 | #define CONFIG_MEM_INIT_VALUE 0xdeadbeef |
| 22 | #endif |
| 23 | |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 24 | #ifdef CONFIG_SYS_DPAA_FMAN |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 25 | #define RGMII_PHY1_ADDR 0x1 |
| 26 | #define RGMII_PHY2_ADDR 0x2 |
| 27 | #define SGMII_CARD_PORT1_PHY_ADDR 0x1C |
| 28 | #define SGMII_CARD_PORT2_PHY_ADDR 0x1D |
| 29 | #define SGMII_CARD_PORT3_PHY_ADDR 0x1E |
| 30 | #define SGMII_CARD_PORT4_PHY_ADDR 0x1F |
| 31 | /* PHY address on QSGMII riser card on slot 2 */ |
| 32 | #define QSGMII_CARD_PORT1_PHY_ADDR_S2 0x8 |
| 33 | #define QSGMII_CARD_PORT2_PHY_ADDR_S2 0x9 |
| 34 | #define QSGMII_CARD_PORT3_PHY_ADDR_S2 0xA |
| 35 | #define QSGMII_CARD_PORT4_PHY_ADDR_S2 0xB |
| 36 | #endif |
| 37 | |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 38 | /* IFC */ |
| 39 | #if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI) |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 40 | /* |
| 41 | * CONFIG_SYS_FLASH_BASE has the final address (core view) |
| 42 | * CONFIG_SYS_FLASH_BASE_PHYS has the final address (IFC view) |
| 43 | * CONFIG_SYS_FLASH_BASE_PHYS_EARLY has the temporary IFC address |
| 44 | * CONFIG_SYS_TEXT_BASE is linked to 0x60000000 for booting |
| 45 | */ |
| 46 | #define CONFIG_SYS_FLASH_BASE 0x60000000 |
| 47 | #define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE |
| 48 | #define CONFIG_SYS_FLASH_BASE_PHYS_EARLY 0x00000000 |
| 49 | |
Masahiro Yamada | e856bdc | 2017-02-11 22:43:54 +0900 | [diff] [blame] | 50 | #ifdef CONFIG_MTD_NOR_FLASH |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 51 | #define CONFIG_SYS_FLASH_QUIET_TEST |
| 52 | #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */ |
| 53 | #endif |
| 54 | #endif |
| 55 | |
Shaohui Xie | fdc2b54 | 2016-10-28 14:24:02 +0800 | [diff] [blame] | 56 | /* LPUART */ |
| 57 | #ifdef CONFIG_LPUART |
| 58 | #define CONFIG_LPUART_32B_REG |
| 59 | #define CFG_UART_MUX_MASK 0x6 |
| 60 | #define CFG_UART_MUX_SHIFT 1 |
| 61 | #define CFG_LPUART_EN 0x2 |
| 62 | #endif |
| 63 | |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 64 | /* EEPROM */ |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 65 | #define CONFIG_SYS_I2C_EEPROM_NXID |
| 66 | #define CONFIG_SYS_EEPROM_BUS_NUM 0 |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 67 | |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 68 | /* |
| 69 | * IFC Definitions |
| 70 | */ |
| 71 | #if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI) |
| 72 | #define CONFIG_SYS_NOR0_CSPR_EXT (0x0) |
| 73 | #define CONFIG_SYS_NOR0_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | \ |
| 74 | CSPR_PORT_SIZE_16 | \ |
| 75 | CSPR_MSEL_NOR | \ |
| 76 | CSPR_V) |
| 77 | #define CONFIG_SYS_NOR1_CSPR_EXT (0x0) |
| 78 | #define CONFIG_SYS_NOR1_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS \ |
| 79 | + 0x8000000) | \ |
| 80 | CSPR_PORT_SIZE_16 | \ |
| 81 | CSPR_MSEL_NOR | \ |
| 82 | CSPR_V) |
| 83 | #define CONFIG_SYS_NOR_AMASK IFC_AMASK(128 * 1024 * 1024) |
| 84 | |
| 85 | #define CONFIG_SYS_NOR_CSOR (CSOR_NOR_ADM_SHIFT(4) | \ |
| 86 | CSOR_NOR_TRHZ_80) |
| 87 | #define CONFIG_SYS_NOR_FTIM0 (FTIM0_NOR_TACSE(0x4) | \ |
| 88 | FTIM0_NOR_TEADC(0x5) | \ |
York Sun | 1b7910a | 2017-12-11 08:39:05 -0800 | [diff] [blame] | 89 | FTIM0_NOR_TAVDS(0x6) | \ |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 90 | FTIM0_NOR_TEAHC(0x5)) |
| 91 | #define CONFIG_SYS_NOR_FTIM1 (FTIM1_NOR_TACO(0x35) | \ |
| 92 | FTIM1_NOR_TRAD_NOR(0x1a) | \ |
| 93 | FTIM1_NOR_TSEQRAD_NOR(0x13)) |
York Sun | 1b7910a | 2017-12-11 08:39:05 -0800 | [diff] [blame] | 94 | #define CONFIG_SYS_NOR_FTIM2 (FTIM2_NOR_TCS(0x8) | \ |
| 95 | FTIM2_NOR_TCH(0x8) | \ |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 96 | FTIM2_NOR_TWPH(0xe) | \ |
| 97 | FTIM2_NOR_TWP(0x1c)) |
| 98 | #define CONFIG_SYS_NOR_FTIM3 0 |
| 99 | |
| 100 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ |
| 101 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */ |
| 102 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ |
| 103 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ |
| 104 | |
| 105 | #define CONFIG_SYS_FLASH_EMPTY_INFO |
| 106 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS, \ |
| 107 | CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000} |
| 108 | |
| 109 | #define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS |
| 110 | #define CONFIG_SYS_WRITE_SWAPPED_DATA |
| 111 | |
| 112 | /* |
| 113 | * NAND Flash Definitions |
| 114 | */ |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 115 | |
| 116 | #define CONFIG_SYS_NAND_BASE 0x7e800000 |
| 117 | #define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE |
| 118 | |
| 119 | #define CONFIG_SYS_NAND_CSPR_EXT (0x0) |
| 120 | |
| 121 | #define CONFIG_SYS_NAND_CSPR (CSPR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \ |
| 122 | | CSPR_PORT_SIZE_8 \ |
| 123 | | CSPR_MSEL_NAND \ |
| 124 | | CSPR_V) |
| 125 | #define CONFIG_SYS_NAND_AMASK IFC_AMASK(64*1024) |
| 126 | #define CONFIG_SYS_NAND_CSOR (CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \ |
| 127 | | CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \ |
| 128 | | CSOR_NAND_ECC_MODE_8 /* 8-bit ECC */ \ |
| 129 | | CSOR_NAND_RAL_3 /* RAL = 3 Bytes */ \ |
| 130 | | CSOR_NAND_PGS_4K /* Page Size = 4K */ \ |
| 131 | | CSOR_NAND_SPRZ_224 /* Spare size = 224 */ \ |
| 132 | | CSOR_NAND_PB(64)) /* 64 Pages Per Block */ |
| 133 | |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 134 | #define CONFIG_SYS_NAND_FTIM0 (FTIM0_NAND_TCCST(0x7) | \ |
| 135 | FTIM0_NAND_TWP(0x18) | \ |
| 136 | FTIM0_NAND_TWCHT(0x7) | \ |
| 137 | FTIM0_NAND_TWH(0xa)) |
| 138 | #define CONFIG_SYS_NAND_FTIM1 (FTIM1_NAND_TADLE(0x32) | \ |
| 139 | FTIM1_NAND_TWBE(0x39) | \ |
| 140 | FTIM1_NAND_TRR(0xe) | \ |
| 141 | FTIM1_NAND_TRP(0x18)) |
| 142 | #define CONFIG_SYS_NAND_FTIM2 (FTIM2_NAND_TRAD(0xf) | \ |
| 143 | FTIM2_NAND_TREH(0xa) | \ |
| 144 | FTIM2_NAND_TWHRE(0x1e)) |
| 145 | #define CONFIG_SYS_NAND_FTIM3 0x0 |
| 146 | |
| 147 | #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE } |
| 148 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
| 149 | #define CONFIG_MTD_NAND_VERIFY_WRITE |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 150 | #endif |
| 151 | |
| 152 | #ifdef CONFIG_NAND_BOOT |
| 153 | #define CONFIG_SPL_PAD_TO 0x40000 /* block aligned */ |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 154 | #define CONFIG_SYS_NAND_U_BOOT_SIZE (768 << 10) |
| 155 | #endif |
| 156 | |
Rajesh Bhagat | 50e2d41 | 2018-11-05 18:02:40 +0000 | [diff] [blame] | 157 | #if defined(CONFIG_TFABOOT) || \ |
| 158 | defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 159 | #define CONFIG_QIXIS_I2C_ACCESS |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 160 | #endif |
| 161 | |
| 162 | /* |
| 163 | * QIXIS Definitions |
| 164 | */ |
| 165 | #define CONFIG_FSL_QIXIS |
| 166 | |
| 167 | #ifdef CONFIG_FSL_QIXIS |
| 168 | #define QIXIS_BASE 0x7fb00000 |
| 169 | #define QIXIS_BASE_PHYS QIXIS_BASE |
| 170 | #define CONFIG_SYS_I2C_FPGA_ADDR 0x66 |
| 171 | #define QIXIS_LBMAP_SWITCH 6 |
| 172 | #define QIXIS_LBMAP_MASK 0x0f |
| 173 | #define QIXIS_LBMAP_SHIFT 0 |
| 174 | #define QIXIS_LBMAP_DFLTBANK 0x00 |
| 175 | #define QIXIS_LBMAP_ALTBANK 0x04 |
| 176 | #define QIXIS_LBMAP_NAND 0x09 |
| 177 | #define QIXIS_LBMAP_SD 0x00 |
| 178 | #define QIXIS_LBMAP_SD_QSPI 0xff |
| 179 | #define QIXIS_LBMAP_QSPI 0xff |
| 180 | #define QIXIS_RCW_SRC_NAND 0x110 |
| 181 | #define QIXIS_RCW_SRC_SD 0x040 |
| 182 | #define QIXIS_RCW_SRC_QSPI 0x045 |
| 183 | #define QIXIS_RST_CTL_RESET 0x41 |
| 184 | #define QIXIS_RCFG_CTL_RECONFIG_IDLE 0x20 |
| 185 | #define QIXIS_RCFG_CTL_RECONFIG_START 0x21 |
| 186 | #define QIXIS_RCFG_CTL_WATCHDOG_ENBLE 0x08 |
| 187 | |
| 188 | #define CONFIG_SYS_FPGA_CSPR_EXT (0x0) |
| 189 | #define CONFIG_SYS_FPGA_CSPR (CSPR_PHYS_ADDR(QIXIS_BASE_PHYS) | \ |
| 190 | CSPR_PORT_SIZE_8 | \ |
| 191 | CSPR_MSEL_GPCM | \ |
| 192 | CSPR_V) |
| 193 | #define CONFIG_SYS_FPGA_AMASK IFC_AMASK(64 * 1024) |
| 194 | #define CONFIG_SYS_FPGA_CSOR (CSOR_NOR_ADM_SHIFT(4) | \ |
| 195 | CSOR_NOR_NOR_MODE_AVD_NOR | \ |
| 196 | CSOR_NOR_TRHZ_80) |
| 197 | |
| 198 | /* |
| 199 | * QIXIS Timing parameters for IFC GPCM |
| 200 | */ |
| 201 | #define CONFIG_SYS_FPGA_FTIM0 (FTIM0_GPCM_TACSE(0xc) | \ |
| 202 | FTIM0_GPCM_TEADC(0x20) | \ |
| 203 | FTIM0_GPCM_TEAHC(0x10)) |
| 204 | #define CONFIG_SYS_FPGA_FTIM1 (FTIM1_GPCM_TACO(0x50) | \ |
| 205 | FTIM1_GPCM_TRAD(0x1f)) |
| 206 | #define CONFIG_SYS_FPGA_FTIM2 (FTIM2_GPCM_TCS(0x8) | \ |
| 207 | FTIM2_GPCM_TCH(0x8) | \ |
| 208 | FTIM2_GPCM_TWP(0xf0)) |
| 209 | #define CONFIG_SYS_FPGA_FTIM3 0x0 |
| 210 | #endif |
| 211 | |
Rajesh Bhagat | 50e2d41 | 2018-11-05 18:02:40 +0000 | [diff] [blame] | 212 | #ifdef CONFIG_TFABOOT |
| 213 | #define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT |
| 214 | #define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR0_CSPR |
| 215 | #define CONFIG_SYS_AMASK0 CONFIG_SYS_NOR_AMASK |
| 216 | #define CONFIG_SYS_CSOR0 CONFIG_SYS_NOR_CSOR |
| 217 | #define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NOR_FTIM0 |
| 218 | #define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NOR_FTIM1 |
| 219 | #define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NOR_FTIM2 |
| 220 | #define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NOR_FTIM3 |
| 221 | #define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR1_CSPR_EXT |
| 222 | #define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR1_CSPR |
| 223 | #define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK |
| 224 | #define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR |
| 225 | #define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0 |
| 226 | #define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1 |
| 227 | #define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2 |
| 228 | #define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3 |
| 229 | #define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NAND_CSPR_EXT |
| 230 | #define CONFIG_SYS_CSPR2 CONFIG_SYS_NAND_CSPR |
| 231 | #define CONFIG_SYS_AMASK2 CONFIG_SYS_NAND_AMASK |
| 232 | #define CONFIG_SYS_CSOR2 CONFIG_SYS_NAND_CSOR |
| 233 | #define CONFIG_SYS_CS2_FTIM0 CONFIG_SYS_NAND_FTIM0 |
| 234 | #define CONFIG_SYS_CS2_FTIM1 CONFIG_SYS_NAND_FTIM1 |
| 235 | #define CONFIG_SYS_CS2_FTIM2 CONFIG_SYS_NAND_FTIM2 |
| 236 | #define CONFIG_SYS_CS2_FTIM3 CONFIG_SYS_NAND_FTIM3 |
| 237 | #define CONFIG_SYS_CSPR3_EXT CONFIG_SYS_FPGA_CSPR_EXT |
| 238 | #define CONFIG_SYS_CSPR3 CONFIG_SYS_FPGA_CSPR |
| 239 | #define CONFIG_SYS_AMASK3 CONFIG_SYS_FPGA_AMASK |
| 240 | #define CONFIG_SYS_CSOR3 CONFIG_SYS_FPGA_CSOR |
| 241 | #define CONFIG_SYS_CS3_FTIM0 CONFIG_SYS_FPGA_FTIM0 |
| 242 | #define CONFIG_SYS_CS3_FTIM1 CONFIG_SYS_FPGA_FTIM1 |
| 243 | #define CONFIG_SYS_CS3_FTIM2 CONFIG_SYS_FPGA_FTIM2 |
| 244 | #define CONFIG_SYS_CS3_FTIM3 CONFIG_SYS_FPGA_FTIM3 |
| 245 | #else |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 246 | #ifdef CONFIG_NAND_BOOT |
| 247 | #define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NAND_CSPR_EXT |
| 248 | #define CONFIG_SYS_CSPR0 CONFIG_SYS_NAND_CSPR |
| 249 | #define CONFIG_SYS_AMASK0 CONFIG_SYS_NAND_AMASK |
| 250 | #define CONFIG_SYS_CSOR0 CONFIG_SYS_NAND_CSOR |
| 251 | #define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NAND_FTIM0 |
| 252 | #define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NAND_FTIM1 |
| 253 | #define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NAND_FTIM2 |
| 254 | #define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NAND_FTIM3 |
| 255 | #define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR0_CSPR_EXT |
| 256 | #define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR0_CSPR |
| 257 | #define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK |
| 258 | #define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR |
| 259 | #define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0 |
| 260 | #define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1 |
| 261 | #define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2 |
| 262 | #define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3 |
| 263 | #define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NOR1_CSPR_EXT |
| 264 | #define CONFIG_SYS_CSPR2 CONFIG_SYS_NOR1_CSPR |
| 265 | #define CONFIG_SYS_AMASK2 CONFIG_SYS_NOR_AMASK |
| 266 | #define CONFIG_SYS_CSOR2 CONFIG_SYS_NOR_CSOR |
| 267 | #define CONFIG_SYS_CS2_FTIM0 CONFIG_SYS_NOR_FTIM0 |
| 268 | #define CONFIG_SYS_CS2_FTIM1 CONFIG_SYS_NOR_FTIM1 |
| 269 | #define CONFIG_SYS_CS2_FTIM2 CONFIG_SYS_NOR_FTIM2 |
| 270 | #define CONFIG_SYS_CS2_FTIM3 CONFIG_SYS_NOR_FTIM3 |
| 271 | #define CONFIG_SYS_CSPR3_EXT CONFIG_SYS_FPGA_CSPR_EXT |
| 272 | #define CONFIG_SYS_CSPR3 CONFIG_SYS_FPGA_CSPR |
| 273 | #define CONFIG_SYS_AMASK3 CONFIG_SYS_FPGA_AMASK |
| 274 | #define CONFIG_SYS_CSOR3 CONFIG_SYS_FPGA_CSOR |
| 275 | #define CONFIG_SYS_CS3_FTIM0 CONFIG_SYS_FPGA_FTIM0 |
| 276 | #define CONFIG_SYS_CS3_FTIM1 CONFIG_SYS_FPGA_FTIM1 |
| 277 | #define CONFIG_SYS_CS3_FTIM2 CONFIG_SYS_FPGA_FTIM2 |
| 278 | #define CONFIG_SYS_CS3_FTIM3 CONFIG_SYS_FPGA_FTIM3 |
| 279 | #else |
| 280 | #define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT |
| 281 | #define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR0_CSPR |
| 282 | #define CONFIG_SYS_AMASK0 CONFIG_SYS_NOR_AMASK |
| 283 | #define CONFIG_SYS_CSOR0 CONFIG_SYS_NOR_CSOR |
| 284 | #define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NOR_FTIM0 |
| 285 | #define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NOR_FTIM1 |
| 286 | #define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NOR_FTIM2 |
| 287 | #define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NOR_FTIM3 |
| 288 | #define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR1_CSPR_EXT |
| 289 | #define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR1_CSPR |
| 290 | #define CONFIG_SYS_AMASK1 CONFIG_SYS_NOR_AMASK |
| 291 | #define CONFIG_SYS_CSOR1 CONFIG_SYS_NOR_CSOR |
| 292 | #define CONFIG_SYS_CS1_FTIM0 CONFIG_SYS_NOR_FTIM0 |
| 293 | #define CONFIG_SYS_CS1_FTIM1 CONFIG_SYS_NOR_FTIM1 |
| 294 | #define CONFIG_SYS_CS1_FTIM2 CONFIG_SYS_NOR_FTIM2 |
| 295 | #define CONFIG_SYS_CS1_FTIM3 CONFIG_SYS_NOR_FTIM3 |
| 296 | #define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NAND_CSPR_EXT |
| 297 | #define CONFIG_SYS_CSPR2 CONFIG_SYS_NAND_CSPR |
| 298 | #define CONFIG_SYS_AMASK2 CONFIG_SYS_NAND_AMASK |
| 299 | #define CONFIG_SYS_CSOR2 CONFIG_SYS_NAND_CSOR |
| 300 | #define CONFIG_SYS_CS2_FTIM0 CONFIG_SYS_NAND_FTIM0 |
| 301 | #define CONFIG_SYS_CS2_FTIM1 CONFIG_SYS_NAND_FTIM1 |
| 302 | #define CONFIG_SYS_CS2_FTIM2 CONFIG_SYS_NAND_FTIM2 |
| 303 | #define CONFIG_SYS_CS2_FTIM3 CONFIG_SYS_NAND_FTIM3 |
| 304 | #define CONFIG_SYS_CSPR3_EXT CONFIG_SYS_FPGA_CSPR_EXT |
| 305 | #define CONFIG_SYS_CSPR3 CONFIG_SYS_FPGA_CSPR |
| 306 | #define CONFIG_SYS_AMASK3 CONFIG_SYS_FPGA_AMASK |
| 307 | #define CONFIG_SYS_CSOR3 CONFIG_SYS_FPGA_CSOR |
| 308 | #define CONFIG_SYS_CS3_FTIM0 CONFIG_SYS_FPGA_FTIM0 |
| 309 | #define CONFIG_SYS_CS3_FTIM1 CONFIG_SYS_FPGA_FTIM1 |
| 310 | #define CONFIG_SYS_CS3_FTIM2 CONFIG_SYS_FPGA_FTIM2 |
| 311 | #define CONFIG_SYS_CS3_FTIM3 CONFIG_SYS_FPGA_FTIM3 |
| 312 | #endif |
Rajesh Bhagat | 50e2d41 | 2018-11-05 18:02:40 +0000 | [diff] [blame] | 313 | #endif |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 314 | |
| 315 | /* |
| 316 | * I2C bus multiplexer |
| 317 | */ |
| 318 | #define I2C_MUX_PCA_ADDR_PRI 0x77 |
| 319 | #define I2C_MUX_PCA_ADDR_SEC 0x76 /* Secondary multiplexer */ |
| 320 | #define I2C_RETIMER_ADDR 0x18 |
| 321 | #define I2C_MUX_CH_DEFAULT 0x8 |
| 322 | #define I2C_MUX_CH_CH7301 0xC |
| 323 | #define I2C_MUX_CH5 0xD |
| 324 | #define I2C_MUX_CH6 0xE |
| 325 | #define I2C_MUX_CH7 0xF |
| 326 | |
| 327 | #define I2C_MUX_CH_VOL_MONITOR 0xa |
| 328 | |
| 329 | /* Voltage monitor on channel 2*/ |
| 330 | #define I2C_VOL_MONITOR_ADDR 0x40 |
| 331 | #define I2C_VOL_MONITOR_BUS_V_OFFSET 0x2 |
| 332 | #define I2C_VOL_MONITOR_BUS_V_OVF 0x1 |
| 333 | #define I2C_VOL_MONITOR_BUS_V_SHIFT 3 |
| 334 | |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 335 | /* The lowest and highest voltage allowed for LS1046AQDS */ |
| 336 | #define VDD_MV_MIN 819 |
| 337 | #define VDD_MV_MAX 1212 |
| 338 | |
| 339 | /* |
| 340 | * Miscellaneous configurable options |
| 341 | */ |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 342 | |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 343 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 344 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 345 | |
| 346 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */ |
| 347 | |
| 348 | /* |
| 349 | * Environment |
| 350 | */ |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 351 | |
Rajesh Bhagat | 50e2d41 | 2018-11-05 18:02:40 +0000 | [diff] [blame] | 352 | #ifdef CONFIG_TFABOOT |
Biwen Li | d71f65e | 2020-04-20 18:29:06 +0800 | [diff] [blame] | 353 | #define IFC_NAND_BOOTCOMMAND "run distro_bootcmd; run nand_bootcmd; " \ |
| 354 | "env exists secureboot && esbc_halt;;" |
| 355 | #define QSPI_NOR_BOOTCOMMAND "run distro_bootcmd; run nor_bootcmd" \ |
| 356 | "env exists secureboot && esbc_halt;;" |
| 357 | #define IFC_NOR_BOOTCOMMAND "run distro_bootcmd; run nor_bootcmd; " \ |
| 358 | "env exists secureboot && esbc_halt;;" |
| 359 | #define SD_BOOTCOMMAND "run distro_bootcmd; run sd_bootcmd; " \ |
| 360 | "env exists secureboot && esbc_halt;;" |
Rajesh Bhagat | 50e2d41 | 2018-11-05 18:02:40 +0000 | [diff] [blame] | 361 | #endif |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 362 | |
Shaohui Xie | 126fe70 | 2016-09-07 17:56:14 +0800 | [diff] [blame] | 363 | #include <asm/fsl_secure_boot.h> |
| 364 | |
| 365 | #endif /* __LS1046AQDS_H__ */ |