Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2014 Freescale Semiconductor, Inc. |
Biwen Li | 9ebde88 | 2019-12-31 15:33:44 +0800 | [diff] [blame] | 4 | * Copyright 2019 NXP |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <common.h> |
Simon Glass | d96c260 | 2019-12-28 10:44:58 -0700 | [diff] [blame] | 8 | #include <clock_legacy.h> |
Simon Glass | 807765b | 2019-12-28 10:44:54 -0700 | [diff] [blame] | 9 | #include <fdt_support.h> |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 10 | #include <i2c.h> |
Simon Glass | 5255932 | 2019-11-14 12:57:46 -0700 | [diff] [blame] | 11 | #include <init.h> |
Simon Glass | 90526e9 | 2020-05-10 11:39:56 -0600 | [diff] [blame] | 12 | #include <net.h> |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 13 | #include <asm/io.h> |
| 14 | #include <asm/arch/immap_ls102xa.h> |
| 15 | #include <asm/arch/clock.h> |
| 16 | #include <asm/arch/fsl_serdes.h> |
Zhuoyu Zhang | 03c2244 | 2015-08-17 18:55:12 +0800 | [diff] [blame] | 17 | #include <asm/arch/ls102xa_devdis.h> |
Yao Yuan | 7ba0261 | 2015-12-05 14:59:10 +0800 | [diff] [blame] | 18 | #include <asm/arch/ls102xa_soc.h> |
Yao Yuan | 09227dd | 2015-03-03 16:35:18 +0800 | [diff] [blame] | 19 | #include <hwconfig.h> |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 20 | #include <mmc.h> |
Mingkai Hu | 435acd8 | 2015-10-26 19:47:41 +0800 | [diff] [blame] | 21 | #include <fsl_csu.h> |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 22 | #include <fsl_ifc.h> |
York Sun | a88cc3b | 2015-04-29 10:35:35 -0700 | [diff] [blame] | 23 | #include <fsl_immap.h> |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 24 | #include <netdev.h> |
| 25 | #include <fsl_mdio.h> |
| 26 | #include <tsec.h> |
Ruchika Gupta | 4ba4a09 | 2014-10-15 11:39:06 +0530 | [diff] [blame] | 27 | #include <fsl_sec.h> |
Zhuoyu Zhang | 03c2244 | 2015-08-17 18:55:12 +0800 | [diff] [blame] | 28 | #include <fsl_devdis.h> |
Alison Wang | 8415bb6 | 2014-12-03 15:00:48 +0800 | [diff] [blame] | 29 | #include <spl.h> |
Tang Yuantian | 99e1bd4 | 2015-05-14 17:20:28 +0800 | [diff] [blame] | 30 | #include "../common/sleep.h" |
Zhao Qiang | eaa859e | 2014-09-26 16:25:33 +0800 | [diff] [blame] | 31 | #ifdef CONFIG_U_QE |
Qianyu Gong | 2459afb | 2016-02-18 13:01:59 +0800 | [diff] [blame] | 32 | #include <fsl_qe.h> |
Zhao Qiang | eaa859e | 2014-09-26 16:25:33 +0800 | [diff] [blame] | 33 | #endif |
Aneesh Bansal | d041288 | 2016-01-22 16:37:26 +0530 | [diff] [blame] | 34 | #include <fsl_validate.h> |
Zhao Qiang | eaa859e | 2014-09-26 16:25:33 +0800 | [diff] [blame] | 35 | |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 36 | |
| 37 | DECLARE_GLOBAL_DATA_PTR; |
| 38 | |
| 39 | #define VERSION_MASK 0x00FF |
| 40 | #define BANK_MASK 0x0001 |
| 41 | #define CONFIG_RESET 0x1 |
| 42 | #define INIT_RESET 0x1 |
| 43 | |
| 44 | #define CPLD_SET_MUX_SERDES 0x20 |
| 45 | #define CPLD_SET_BOOT_BANK 0x40 |
| 46 | |
| 47 | #define BOOT_FROM_UPPER_BANK 0x0 |
| 48 | #define BOOT_FROM_LOWER_BANK 0x1 |
| 49 | |
| 50 | #define LANEB_SATA (0x01) |
| 51 | #define LANEB_SGMII1 (0x02) |
| 52 | #define LANEC_SGMII1 (0x04) |
| 53 | #define LANEC_PCIEX1 (0x08) |
| 54 | #define LANED_PCIEX2 (0x10) |
| 55 | #define LANED_SGMII2 (0x20) |
| 56 | |
| 57 | #define MASK_LANE_B 0x1 |
| 58 | #define MASK_LANE_C 0x2 |
| 59 | #define MASK_LANE_D 0x4 |
| 60 | #define MASK_SGMII 0x8 |
| 61 | |
| 62 | #define KEEP_STATUS 0x0 |
| 63 | #define NEED_RESET 0x1 |
| 64 | |
Yao Yuan | 09227dd | 2015-03-03 16:35:18 +0800 | [diff] [blame] | 65 | #define SOFT_MUX_ON_I2C3_IFC 0x2 |
| 66 | #define SOFT_MUX_ON_CAN3_USB2 0x8 |
| 67 | #define SOFT_MUX_ON_QE_LCD 0x10 |
| 68 | |
| 69 | #define PIN_I2C3_IFC_MUX_I2C3 0x0 |
| 70 | #define PIN_I2C3_IFC_MUX_IFC 0x1 |
| 71 | #define PIN_CAN3_USB2_MUX_USB2 0x0 |
| 72 | #define PIN_CAN3_USB2_MUX_CAN3 0x1 |
| 73 | #define PIN_QE_LCD_MUX_LCD 0x0 |
| 74 | #define PIN_QE_LCD_MUX_QE 0x1 |
| 75 | |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 76 | struct cpld_data { |
| 77 | u8 cpld_ver; /* cpld revision */ |
| 78 | u8 cpld_ver_sub; /* cpld sub revision */ |
| 79 | u8 pcba_ver; /* pcb revision number */ |
| 80 | u8 system_rst; /* reset system by cpld */ |
| 81 | u8 soft_mux_on; /* CPLD override physical switches Enable */ |
| 82 | u8 cfg_rcw_src1; /* Reset config word 1 */ |
| 83 | u8 cfg_rcw_src2; /* Reset config word 2 */ |
| 84 | u8 vbank; /* Flash bank selection Control */ |
| 85 | u8 gpio; /* GPIO for TWR-ELEV */ |
| 86 | u8 i2c3_ifc_mux; |
| 87 | u8 mux_spi2; |
| 88 | u8 can3_usb2_mux; /* CAN3 and USB2 Selection */ |
| 89 | u8 qe_lcd_mux; /* QE and LCD Selection */ |
| 90 | u8 serdes_mux; /* Multiplexed pins for SerDes Lanes */ |
| 91 | u8 global_rst; /* reset with init CPLD reg to default */ |
| 92 | u8 rev1; /* Reserved */ |
| 93 | u8 rev2; /* Reserved */ |
| 94 | }; |
| 95 | |
Alison Wang | 947cee1 | 2015-10-15 17:54:40 +0800 | [diff] [blame] | 96 | #if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI) |
Tom Rini | 68ae777 | 2018-01-03 09:01:33 -0500 | [diff] [blame] | 97 | static void cpld_show(void) |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 98 | { |
| 99 | struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE); |
| 100 | |
| 101 | printf("CPLD: V%x.%x\nPCBA: V%x.0\nVBank: %d\n", |
| 102 | in_8(&cpld_data->cpld_ver) & VERSION_MASK, |
| 103 | in_8(&cpld_data->cpld_ver_sub) & VERSION_MASK, |
| 104 | in_8(&cpld_data->pcba_ver) & VERSION_MASK, |
| 105 | in_8(&cpld_data->vbank) & BANK_MASK); |
| 106 | |
| 107 | #ifdef CONFIG_DEBUG |
| 108 | printf("soft_mux_on =%x\n", |
| 109 | in_8(&cpld_data->soft_mux_on)); |
| 110 | printf("cfg_rcw_src1 =%x\n", |
| 111 | in_8(&cpld_data->cfg_rcw_src1)); |
| 112 | printf("cfg_rcw_src2 =%x\n", |
| 113 | in_8(&cpld_data->cfg_rcw_src2)); |
| 114 | printf("vbank =%x\n", |
| 115 | in_8(&cpld_data->vbank)); |
| 116 | printf("gpio =%x\n", |
| 117 | in_8(&cpld_data->gpio)); |
| 118 | printf("i2c3_ifc_mux =%x\n", |
| 119 | in_8(&cpld_data->i2c3_ifc_mux)); |
| 120 | printf("mux_spi2 =%x\n", |
| 121 | in_8(&cpld_data->mux_spi2)); |
| 122 | printf("can3_usb2_mux =%x\n", |
| 123 | in_8(&cpld_data->can3_usb2_mux)); |
| 124 | printf("qe_lcd_mux =%x\n", |
| 125 | in_8(&cpld_data->qe_lcd_mux)); |
| 126 | printf("serdes_mux =%x\n", |
| 127 | in_8(&cpld_data->serdes_mux)); |
| 128 | #endif |
| 129 | } |
Alison Wang | d612f0a | 2014-12-09 17:38:02 +0800 | [diff] [blame] | 130 | #endif |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 131 | |
| 132 | int checkboard(void) |
| 133 | { |
| 134 | puts("Board: LS1021ATWR\n"); |
Alison Wang | 947cee1 | 2015-10-15 17:54:40 +0800 | [diff] [blame] | 135 | #if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI) |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 136 | cpld_show(); |
Alison Wang | d612f0a | 2014-12-09 17:38:02 +0800 | [diff] [blame] | 137 | #endif |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 138 | |
| 139 | return 0; |
| 140 | } |
| 141 | |
| 142 | void ddrmc_init(void) |
| 143 | { |
| 144 | struct ccsr_ddr *ddr = (struct ccsr_ddr *)CONFIG_SYS_FSL_DDR_ADDR; |
Shengzhou Liu | 93a6d32 | 2016-09-01 14:50:36 +0800 | [diff] [blame] | 145 | u32 temp_sdram_cfg, tmp; |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 146 | |
| 147 | out_be32(&ddr->sdram_cfg, DDR_SDRAM_CFG); |
| 148 | |
| 149 | out_be32(&ddr->cs0_bnds, DDR_CS0_BNDS); |
| 150 | out_be32(&ddr->cs0_config, DDR_CS0_CONFIG); |
| 151 | |
| 152 | out_be32(&ddr->timing_cfg_0, DDR_TIMING_CFG_0); |
| 153 | out_be32(&ddr->timing_cfg_1, DDR_TIMING_CFG_1); |
| 154 | out_be32(&ddr->timing_cfg_2, DDR_TIMING_CFG_2); |
| 155 | out_be32(&ddr->timing_cfg_3, DDR_TIMING_CFG_3); |
| 156 | out_be32(&ddr->timing_cfg_4, DDR_TIMING_CFG_4); |
| 157 | out_be32(&ddr->timing_cfg_5, DDR_TIMING_CFG_5); |
| 158 | |
Tang Yuantian | 99e1bd4 | 2015-05-14 17:20:28 +0800 | [diff] [blame] | 159 | #ifdef CONFIG_DEEP_SLEEP |
| 160 | if (is_warm_boot()) { |
| 161 | out_be32(&ddr->sdram_cfg_2, |
| 162 | DDR_SDRAM_CFG_2 & ~SDRAM_CFG2_D_INIT); |
| 163 | out_be32(&ddr->init_addr, CONFIG_SYS_SDRAM_BASE); |
| 164 | out_be32(&ddr->init_ext_addr, (1 << 31)); |
| 165 | |
| 166 | /* DRAM VRef will not be trained */ |
| 167 | out_be32(&ddr->ddr_cdr2, |
| 168 | DDR_DDR_CDR2 & ~DDR_CDR2_VREF_TRAIN_EN); |
| 169 | } else |
| 170 | #endif |
| 171 | { |
| 172 | out_be32(&ddr->sdram_cfg_2, DDR_SDRAM_CFG_2); |
| 173 | out_be32(&ddr->ddr_cdr2, DDR_DDR_CDR2); |
| 174 | } |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 175 | |
| 176 | out_be32(&ddr->sdram_mode, DDR_SDRAM_MODE); |
| 177 | out_be32(&ddr->sdram_mode_2, DDR_SDRAM_MODE_2); |
| 178 | |
| 179 | out_be32(&ddr->sdram_interval, DDR_SDRAM_INTERVAL); |
| 180 | |
| 181 | out_be32(&ddr->ddr_wrlvl_cntl, DDR_DDR_WRLVL_CNTL); |
| 182 | |
| 183 | out_be32(&ddr->ddr_wrlvl_cntl_2, DDR_DDR_WRLVL_CNTL_2); |
| 184 | out_be32(&ddr->ddr_wrlvl_cntl_3, DDR_DDR_WRLVL_CNTL_3); |
| 185 | |
| 186 | out_be32(&ddr->ddr_cdr1, DDR_DDR_CDR1); |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 187 | |
| 188 | out_be32(&ddr->sdram_clk_cntl, DDR_SDRAM_CLK_CNTL); |
| 189 | out_be32(&ddr->ddr_zq_cntl, DDR_DDR_ZQ_CNTL); |
| 190 | |
| 191 | out_be32(&ddr->cs0_config_2, DDR_CS0_CONFIG_2); |
Shengzhou Liu | 93a6d32 | 2016-09-01 14:50:36 +0800 | [diff] [blame] | 192 | |
| 193 | /* DDR erratum A-009942 */ |
| 194 | tmp = in_be32(&ddr->debug[28]); |
| 195 | out_be32(&ddr->debug[28], tmp | 0x0070006f); |
| 196 | |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 197 | udelay(1); |
Tang Yuantian | 99e1bd4 | 2015-05-14 17:20:28 +0800 | [diff] [blame] | 198 | |
| 199 | #ifdef CONFIG_DEEP_SLEEP |
| 200 | if (is_warm_boot()) { |
| 201 | /* enter self-refresh */ |
| 202 | temp_sdram_cfg = in_be32(&ddr->sdram_cfg_2); |
| 203 | temp_sdram_cfg |= SDRAM_CFG2_FRC_SR; |
| 204 | out_be32(&ddr->sdram_cfg_2, temp_sdram_cfg); |
| 205 | |
| 206 | temp_sdram_cfg = (DDR_SDRAM_CFG_MEM_EN | SDRAM_CFG_BI); |
| 207 | } else |
| 208 | #endif |
| 209 | temp_sdram_cfg = (DDR_SDRAM_CFG_MEM_EN & ~SDRAM_CFG_BI); |
| 210 | |
| 211 | out_be32(&ddr->sdram_cfg, DDR_SDRAM_CFG | temp_sdram_cfg); |
| 212 | |
| 213 | #ifdef CONFIG_DEEP_SLEEP |
| 214 | if (is_warm_boot()) { |
| 215 | /* exit self-refresh */ |
| 216 | temp_sdram_cfg = in_be32(&ddr->sdram_cfg_2); |
| 217 | temp_sdram_cfg &= ~SDRAM_CFG2_FRC_SR; |
| 218 | out_be32(&ddr->sdram_cfg_2, temp_sdram_cfg); |
| 219 | } |
| 220 | #endif |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 221 | } |
| 222 | |
| 223 | int dram_init(void) |
| 224 | { |
| 225 | #if (!defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)) |
| 226 | ddrmc_init(); |
| 227 | #endif |
| 228 | |
Alison Wang | 1580970 | 2019-03-06 14:49:14 +0800 | [diff] [blame] | 229 | erratum_a008850_post(); |
| 230 | |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 231 | gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); |
Tang Yuantian | 99e1bd4 | 2015-05-14 17:20:28 +0800 | [diff] [blame] | 232 | |
| 233 | #if defined(CONFIG_DEEP_SLEEP) && !defined(CONFIG_SPL_BUILD) |
| 234 | fsl_dp_resume(); |
| 235 | #endif |
| 236 | |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 237 | return 0; |
| 238 | } |
| 239 | |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 240 | int board_eth_init(bd_t *bis) |
| 241 | { |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 242 | return pci_eth_init(bis); |
| 243 | } |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 244 | |
Alison Wang | 947cee1 | 2015-10-15 17:54:40 +0800 | [diff] [blame] | 245 | #if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI) |
Tom Rini | 68ae777 | 2018-01-03 09:01:33 -0500 | [diff] [blame] | 246 | static void convert_serdes_mux(int type, int need_reset) |
| 247 | { |
| 248 | char current_serdes; |
| 249 | struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE); |
| 250 | |
| 251 | current_serdes = cpld_data->serdes_mux; |
| 252 | |
| 253 | switch (type) { |
| 254 | case LANEB_SATA: |
| 255 | current_serdes &= ~MASK_LANE_B; |
| 256 | break; |
| 257 | case LANEB_SGMII1: |
| 258 | current_serdes |= (MASK_LANE_B | MASK_SGMII | MASK_LANE_C); |
| 259 | break; |
| 260 | case LANEC_SGMII1: |
| 261 | current_serdes &= ~(MASK_LANE_B | MASK_SGMII | MASK_LANE_C); |
| 262 | break; |
| 263 | case LANED_SGMII2: |
| 264 | current_serdes |= MASK_LANE_D; |
| 265 | break; |
| 266 | case LANEC_PCIEX1: |
| 267 | current_serdes |= MASK_LANE_C; |
| 268 | break; |
| 269 | case (LANED_PCIEX2 | LANEC_PCIEX1): |
| 270 | current_serdes |= MASK_LANE_C; |
| 271 | current_serdes &= ~MASK_LANE_D; |
| 272 | break; |
| 273 | default: |
| 274 | printf("CPLD serdes MUX: unsupported MUX type 0x%x\n", type); |
| 275 | return; |
| 276 | } |
| 277 | |
| 278 | cpld_data->soft_mux_on |= CPLD_SET_MUX_SERDES; |
| 279 | cpld_data->serdes_mux = current_serdes; |
| 280 | |
| 281 | if (need_reset == 1) { |
| 282 | printf("Reset board to enable configuration\n"); |
| 283 | cpld_data->system_rst = CONFIG_RESET; |
| 284 | } |
| 285 | } |
| 286 | |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 287 | int config_serdes_mux(void) |
| 288 | { |
| 289 | struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); |
| 290 | u32 protocol = in_be32(&gur->rcwsr[4]) & RCWSR4_SRDS1_PRTCL_MASK; |
| 291 | |
| 292 | protocol >>= RCWSR4_SRDS1_PRTCL_SHIFT; |
| 293 | switch (protocol) { |
| 294 | case 0x10: |
| 295 | convert_serdes_mux(LANEB_SATA, KEEP_STATUS); |
| 296 | convert_serdes_mux(LANED_PCIEX2 | |
| 297 | LANEC_PCIEX1, KEEP_STATUS); |
| 298 | break; |
| 299 | case 0x20: |
| 300 | convert_serdes_mux(LANEB_SGMII1, KEEP_STATUS); |
| 301 | convert_serdes_mux(LANEC_PCIEX1, KEEP_STATUS); |
| 302 | convert_serdes_mux(LANED_SGMII2, KEEP_STATUS); |
| 303 | break; |
| 304 | case 0x30: |
| 305 | convert_serdes_mux(LANEB_SATA, KEEP_STATUS); |
| 306 | convert_serdes_mux(LANEC_SGMII1, KEEP_STATUS); |
| 307 | convert_serdes_mux(LANED_SGMII2, KEEP_STATUS); |
| 308 | break; |
| 309 | case 0x70: |
| 310 | convert_serdes_mux(LANEB_SATA, KEEP_STATUS); |
| 311 | convert_serdes_mux(LANEC_PCIEX1, KEEP_STATUS); |
| 312 | convert_serdes_mux(LANED_SGMII2, KEEP_STATUS); |
| 313 | break; |
| 314 | } |
| 315 | |
| 316 | return 0; |
| 317 | } |
Alison Wang | d612f0a | 2014-12-09 17:38:02 +0800 | [diff] [blame] | 318 | #endif |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 319 | |
Alison Wang | 947cee1 | 2015-10-15 17:54:40 +0800 | [diff] [blame] | 320 | #if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI) |
Yao Yuan | 09227dd | 2015-03-03 16:35:18 +0800 | [diff] [blame] | 321 | int config_board_mux(void) |
| 322 | { |
| 323 | struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE); |
| 324 | int conflict_flag; |
| 325 | |
| 326 | conflict_flag = 0; |
| 327 | if (hwconfig("i2c3")) { |
| 328 | conflict_flag++; |
| 329 | cpld_data->soft_mux_on |= SOFT_MUX_ON_I2C3_IFC; |
| 330 | cpld_data->i2c3_ifc_mux = PIN_I2C3_IFC_MUX_I2C3; |
| 331 | } |
| 332 | |
| 333 | if (hwconfig("ifc")) { |
| 334 | conflict_flag++; |
| 335 | /* some signals can not enable simultaneous*/ |
| 336 | if (conflict_flag > 1) |
| 337 | goto conflict; |
| 338 | cpld_data->soft_mux_on |= SOFT_MUX_ON_I2C3_IFC; |
| 339 | cpld_data->i2c3_ifc_mux = PIN_I2C3_IFC_MUX_IFC; |
| 340 | } |
| 341 | |
| 342 | conflict_flag = 0; |
| 343 | if (hwconfig("usb2")) { |
| 344 | conflict_flag++; |
| 345 | cpld_data->soft_mux_on |= SOFT_MUX_ON_CAN3_USB2; |
| 346 | cpld_data->can3_usb2_mux = PIN_CAN3_USB2_MUX_USB2; |
| 347 | } |
| 348 | |
| 349 | if (hwconfig("can3")) { |
| 350 | conflict_flag++; |
| 351 | /* some signals can not enable simultaneous*/ |
| 352 | if (conflict_flag > 1) |
| 353 | goto conflict; |
| 354 | cpld_data->soft_mux_on |= SOFT_MUX_ON_CAN3_USB2; |
| 355 | cpld_data->can3_usb2_mux = PIN_CAN3_USB2_MUX_CAN3; |
| 356 | } |
| 357 | |
| 358 | conflict_flag = 0; |
| 359 | if (hwconfig("lcd")) { |
| 360 | conflict_flag++; |
| 361 | cpld_data->soft_mux_on |= SOFT_MUX_ON_QE_LCD; |
| 362 | cpld_data->qe_lcd_mux = PIN_QE_LCD_MUX_LCD; |
| 363 | } |
| 364 | |
| 365 | if (hwconfig("qe")) { |
| 366 | conflict_flag++; |
| 367 | /* some signals can not enable simultaneous*/ |
| 368 | if (conflict_flag > 1) |
| 369 | goto conflict; |
| 370 | cpld_data->soft_mux_on |= SOFT_MUX_ON_QE_LCD; |
| 371 | cpld_data->qe_lcd_mux = PIN_QE_LCD_MUX_QE; |
| 372 | } |
| 373 | |
| 374 | return 0; |
| 375 | |
| 376 | conflict: |
| 377 | printf("WARNING: pin conflict! MUX setting may failed!\n"); |
| 378 | return 0; |
| 379 | } |
| 380 | #endif |
| 381 | |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 382 | int board_early_init_f(void) |
| 383 | { |
| 384 | struct ccsr_scfg *scfg = (struct ccsr_scfg *)CONFIG_SYS_FSL_SCFG_ADDR; |
| 385 | |
| 386 | #ifdef CONFIG_TSEC_ENET |
Claudiu Manoil | ebe4c1e | 2015-08-12 13:29:14 +0300 | [diff] [blame] | 387 | /* clear BD & FR bits for BE BD's and frame data */ |
| 388 | clrbits_be32(&scfg->etsecdmamcr, SCFG_ETSECDMAMCR_LE_BD_FR); |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 389 | out_be32(&scfg->etsecmcr, SCFG_ETSECCMCR_GE2_CLK125); |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 390 | #endif |
| 391 | |
| 392 | #ifdef CONFIG_FSL_IFC |
| 393 | init_early_memctl_regs(); |
| 394 | #endif |
| 395 | |
Yao Yuan | 7ba0261 | 2015-12-05 14:59:10 +0800 | [diff] [blame] | 396 | arch_soc_init(); |
Alison Wang | 7df50fd | 2015-01-15 17:29:29 +0800 | [diff] [blame] | 397 | |
Tang Yuantian | 99e1bd4 | 2015-05-14 17:20:28 +0800 | [diff] [blame] | 398 | #if defined(CONFIG_DEEP_SLEEP) |
tang yuantian | 0210a36 | 2015-09-24 15:52:02 +0800 | [diff] [blame] | 399 | if (is_warm_boot()) { |
| 400 | timer_init(); |
| 401 | dram_init(); |
| 402 | } |
Tang Yuantian | 99e1bd4 | 2015-05-14 17:20:28 +0800 | [diff] [blame] | 403 | #endif |
| 404 | |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 405 | return 0; |
| 406 | } |
| 407 | |
Alison Wang | 8415bb6 | 2014-12-03 15:00:48 +0800 | [diff] [blame] | 408 | #ifdef CONFIG_SPL_BUILD |
| 409 | void board_init_f(ulong dummy) |
| 410 | { |
tang yuantian | 0210a36 | 2015-09-24 15:52:02 +0800 | [diff] [blame] | 411 | void (*second_uboot)(void); |
| 412 | |
Alison Wang | 8415bb6 | 2014-12-03 15:00:48 +0800 | [diff] [blame] | 413 | /* Clear the BSS */ |
| 414 | memset(__bss_start, 0, __bss_end - __bss_start); |
| 415 | |
| 416 | get_clocks(); |
| 417 | |
Tang Yuantian | 99e1bd4 | 2015-05-14 17:20:28 +0800 | [diff] [blame] | 418 | #if defined(CONFIG_DEEP_SLEEP) |
| 419 | if (is_warm_boot()) |
| 420 | fsl_dp_disable_console(); |
| 421 | #endif |
| 422 | |
Alison Wang | 8415bb6 | 2014-12-03 15:00:48 +0800 | [diff] [blame] | 423 | preloader_console_init(); |
| 424 | |
Alison Wang | f668c52 | 2018-10-16 16:19:22 +0800 | [diff] [blame] | 425 | timer_init(); |
Alison Wang | 8415bb6 | 2014-12-03 15:00:48 +0800 | [diff] [blame] | 426 | dram_init(); |
| 427 | |
Alison Wang | 8f0c7cb | 2015-07-09 10:50:07 +0800 | [diff] [blame] | 428 | /* Allow OCRAM access permission as R/W */ |
Mingkai Hu | 435acd8 | 2015-10-26 19:47:41 +0800 | [diff] [blame] | 429 | #ifdef CONFIG_LAYERSCAPE_NS_ACCESS |
| 430 | enable_layerscape_ns_access(); |
Alison Wang | 8f0c7cb | 2015-07-09 10:50:07 +0800 | [diff] [blame] | 431 | #endif |
| 432 | |
tang yuantian | 0210a36 | 2015-09-24 15:52:02 +0800 | [diff] [blame] | 433 | /* |
| 434 | * if it is woken up from deep sleep, then jump to second |
| 435 | * stage uboot and continue executing without recopying |
| 436 | * it from SD since it has already been reserved in memeory |
| 437 | * in last boot. |
| 438 | */ |
| 439 | if (is_warm_boot()) { |
| 440 | second_uboot = (void (*)(void))CONFIG_SYS_TEXT_BASE; |
| 441 | second_uboot(); |
| 442 | } |
| 443 | |
Alison Wang | 8415bb6 | 2014-12-03 15:00:48 +0800 | [diff] [blame] | 444 | board_init_r(NULL, 0); |
| 445 | } |
| 446 | #endif |
| 447 | |
chenhui zhao | 933db81 | 2015-05-15 14:42:30 +0800 | [diff] [blame] | 448 | #ifdef CONFIG_DEEP_SLEEP |
| 449 | /* program the regulator (MC34VR500) to support deep sleep */ |
| 450 | void ls1twr_program_regulator(void) |
| 451 | { |
chenhui zhao | 933db81 | 2015-05-15 14:42:30 +0800 | [diff] [blame] | 452 | u8 i2c_device_id; |
| 453 | |
| 454 | #define LS1TWR_I2C_BUS_MC34VR500 1 |
| 455 | #define MC34VR500_ADDR 0x8 |
| 456 | #define MC34VR500_DEVICEID 0x4 |
| 457 | #define MC34VR500_DEVICEID_MASK 0x0f |
Biwen Li | 9ebde88 | 2019-12-31 15:33:44 +0800 | [diff] [blame] | 458 | #ifdef CONFIG_DM_I2C |
| 459 | struct udevice *dev; |
| 460 | int ret; |
chenhui zhao | 933db81 | 2015-05-15 14:42:30 +0800 | [diff] [blame] | 461 | |
Biwen Li | 9ebde88 | 2019-12-31 15:33:44 +0800 | [diff] [blame] | 462 | ret = i2c_get_chip_for_busnum(LS1TWR_I2C_BUS_MC34VR500, MC34VR500_ADDR, |
| 463 | 1, &dev); |
| 464 | if (ret) { |
| 465 | printf("%s: Cannot find udev for a bus %d\n", __func__, |
| 466 | LS1TWR_I2C_BUS_MC34VR500); |
| 467 | return; |
| 468 | } |
| 469 | i2c_device_id = dm_i2c_reg_read(dev, 0x0) & |
| 470 | MC34VR500_DEVICEID_MASK; |
| 471 | if (i2c_device_id != MC34VR500_DEVICEID) { |
| 472 | printf("The regulator (MC34VR500) does not exist. The device does not support deep sleep.\n"); |
| 473 | return; |
| 474 | } |
| 475 | |
| 476 | dm_i2c_reg_write(dev, 0x31, 0x4); |
| 477 | dm_i2c_reg_write(dev, 0x4d, 0x4); |
| 478 | dm_i2c_reg_write(dev, 0x6d, 0x38); |
| 479 | dm_i2c_reg_write(dev, 0x6f, 0x37); |
| 480 | dm_i2c_reg_write(dev, 0x71, 0x30); |
| 481 | #else |
| 482 | unsigned int i2c_bus; |
chenhui zhao | 933db81 | 2015-05-15 14:42:30 +0800 | [diff] [blame] | 483 | i2c_bus = i2c_get_bus_num(); |
| 484 | i2c_set_bus_num(LS1TWR_I2C_BUS_MC34VR500); |
| 485 | i2c_device_id = i2c_reg_read(MC34VR500_ADDR, 0x0) & |
| 486 | MC34VR500_DEVICEID_MASK; |
| 487 | if (i2c_device_id != MC34VR500_DEVICEID) { |
| 488 | printf("The regulator (MC34VR500) does not exist. The device does not support deep sleep.\n"); |
| 489 | return; |
| 490 | } |
| 491 | |
| 492 | i2c_reg_write(MC34VR500_ADDR, 0x31, 0x4); |
| 493 | i2c_reg_write(MC34VR500_ADDR, 0x4d, 0x4); |
| 494 | i2c_reg_write(MC34VR500_ADDR, 0x6d, 0x38); |
| 495 | i2c_reg_write(MC34VR500_ADDR, 0x6f, 0x37); |
| 496 | i2c_reg_write(MC34VR500_ADDR, 0x71, 0x30); |
| 497 | |
| 498 | i2c_set_bus_num(i2c_bus); |
Biwen Li | 9ebde88 | 2019-12-31 15:33:44 +0800 | [diff] [blame] | 499 | #endif |
chenhui zhao | 933db81 | 2015-05-15 14:42:30 +0800 | [diff] [blame] | 500 | } |
| 501 | #endif |
| 502 | |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 503 | int board_init(void) |
| 504 | { |
Hou Zhiqiang | b392a6d | 2016-08-02 19:03:27 +0800 | [diff] [blame] | 505 | #ifdef CONFIG_SYS_FSL_ERRATUM_A010315 |
| 506 | erratum_a010315(); |
| 507 | #endif |
| 508 | |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 509 | #ifndef CONFIG_SYS_FSL_NO_SERDES |
| 510 | fsl_serdes_init(); |
Alison Wang | 947cee1 | 2015-10-15 17:54:40 +0800 | [diff] [blame] | 511 | #if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI) |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 512 | config_serdes_mux(); |
| 513 | #endif |
Alison Wang | d612f0a | 2014-12-09 17:38:02 +0800 | [diff] [blame] | 514 | #endif |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 515 | |
Alison Wang | a08b192 | 2016-02-05 12:48:17 +0800 | [diff] [blame] | 516 | ls102xa_smmu_stream_id_init(); |
Xiubo Li | 660673a | 2014-11-21 17:40:59 +0800 | [diff] [blame] | 517 | |
Zhao Qiang | eaa859e | 2014-09-26 16:25:33 +0800 | [diff] [blame] | 518 | #ifdef CONFIG_U_QE |
| 519 | u_qe_init(); |
| 520 | #endif |
| 521 | |
chenhui zhao | 933db81 | 2015-05-15 14:42:30 +0800 | [diff] [blame] | 522 | #ifdef CONFIG_DEEP_SLEEP |
| 523 | ls1twr_program_regulator(); |
| 524 | #endif |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 525 | return 0; |
| 526 | } |
| 527 | |
Sumit Garg | e7e720c | 2016-06-14 13:52:40 -0400 | [diff] [blame] | 528 | #if defined(CONFIG_SPL_BUILD) |
| 529 | void spl_board_init(void) |
| 530 | { |
| 531 | ls102xa_smmu_stream_id_init(); |
| 532 | } |
| 533 | #endif |
| 534 | |
tang yuantian | 4632ad7 | 2015-10-16 16:06:05 +0800 | [diff] [blame] | 535 | #ifdef CONFIG_BOARD_LATE_INIT |
| 536 | int board_late_init(void) |
| 537 | { |
Aneesh Bansal | d041288 | 2016-01-22 16:37:26 +0530 | [diff] [blame] | 538 | #ifdef CONFIG_CHAIN_OF_TRUST |
| 539 | fsl_setenv_chain_of_trust(); |
| 540 | #endif |
tang yuantian | 4632ad7 | 2015-10-16 16:06:05 +0800 | [diff] [blame] | 541 | |
| 542 | return 0; |
| 543 | } |
| 544 | #endif |
| 545 | |
Ruchika Gupta | 4ba4a09 | 2014-10-15 11:39:06 +0530 | [diff] [blame] | 546 | #if defined(CONFIG_MISC_INIT_R) |
| 547 | int misc_init_r(void) |
| 548 | { |
Zhuoyu Zhang | 03c2244 | 2015-08-17 18:55:12 +0800 | [diff] [blame] | 549 | #ifdef CONFIG_FSL_DEVICE_DISABLE |
| 550 | device_disable(devdis_tbl, ARRAY_SIZE(devdis_tbl)); |
| 551 | #endif |
Alison Wang | 947cee1 | 2015-10-15 17:54:40 +0800 | [diff] [blame] | 552 | #if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI) |
Yao Yuan | 09227dd | 2015-03-03 16:35:18 +0800 | [diff] [blame] | 553 | config_board_mux(); |
| 554 | #endif |
| 555 | |
Ruchika Gupta | 4ba4a09 | 2014-10-15 11:39:06 +0530 | [diff] [blame] | 556 | #ifdef CONFIG_FSL_CAAM |
| 557 | return sec_init(); |
| 558 | #endif |
| 559 | } |
| 560 | #endif |
| 561 | |
Tang Yuantian | 99e1bd4 | 2015-05-14 17:20:28 +0800 | [diff] [blame] | 562 | #if defined(CONFIG_DEEP_SLEEP) |
| 563 | void board_sleep_prepare(void) |
| 564 | { |
Mingkai Hu | 435acd8 | 2015-10-26 19:47:41 +0800 | [diff] [blame] | 565 | #ifdef CONFIG_LAYERSCAPE_NS_ACCESS |
| 566 | enable_layerscape_ns_access(); |
Tang Yuantian | 99e1bd4 | 2015-05-14 17:20:28 +0800 | [diff] [blame] | 567 | #endif |
| 568 | } |
| 569 | #endif |
| 570 | |
Simon Glass | e895a4b | 2014-10-23 18:58:47 -0600 | [diff] [blame] | 571 | int ft_board_setup(void *blob, bd_t *bd) |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 572 | { |
| 573 | ft_cpu_setup(blob, bd); |
Simon Glass | e895a4b | 2014-10-23 18:58:47 -0600 | [diff] [blame] | 574 | |
Minghuan Lian | d42bd34 | 2015-03-12 10:58:48 +0800 | [diff] [blame] | 575 | #ifdef CONFIG_PCI |
| 576 | ft_pci_setup(blob, bd); |
Minghuan Lian | da41902 | 2014-10-31 13:43:44 +0800 | [diff] [blame] | 577 | #endif |
| 578 | |
Simon Glass | e895a4b | 2014-10-23 18:58:47 -0600 | [diff] [blame] | 579 | return 0; |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 580 | } |
| 581 | |
| 582 | u8 flash_read8(void *addr) |
| 583 | { |
| 584 | return __raw_readb(addr + 1); |
| 585 | } |
| 586 | |
| 587 | void flash_write16(u16 val, void *addr) |
| 588 | { |
| 589 | u16 shftval = (((val >> 8) & 0xff) | ((val << 8) & 0xff00)); |
| 590 | |
| 591 | __raw_writew(shftval, addr); |
| 592 | } |
| 593 | |
| 594 | u16 flash_read16(void *addr) |
| 595 | { |
| 596 | u16 val = __raw_readw(addr); |
| 597 | |
| 598 | return (((val) >> 8) & 0x00ff) | (((val) << 8) & 0xff00); |
| 599 | } |
| 600 | |
Tom Rini | 68ae777 | 2018-01-03 09:01:33 -0500 | [diff] [blame] | 601 | #if !defined(CONFIG_QSPI_BOOT) && !defined(CONFIG_SD_BOOT_QSPI) \ |
| 602 | && !defined(CONFIG_SPL_BUILD) |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 603 | static void convert_flash_bank(char bank) |
| 604 | { |
| 605 | struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE); |
| 606 | |
| 607 | printf("Now switch to boot from flash bank %d.\n", bank); |
| 608 | cpld_data->soft_mux_on = CPLD_SET_BOOT_BANK; |
| 609 | cpld_data->vbank = bank; |
| 610 | |
| 611 | printf("Reset board to enable configuration.\n"); |
| 612 | cpld_data->system_rst = CONFIG_RESET; |
| 613 | } |
| 614 | |
| 615 | static int flash_bank_cmd(cmd_tbl_t *cmdtp, int flag, int argc, |
| 616 | char * const argv[]) |
| 617 | { |
| 618 | if (argc != 2) |
| 619 | return CMD_RET_USAGE; |
| 620 | if (strcmp(argv[1], "0") == 0) |
| 621 | convert_flash_bank(BOOT_FROM_UPPER_BANK); |
| 622 | else if (strcmp(argv[1], "1") == 0) |
| 623 | convert_flash_bank(BOOT_FROM_LOWER_BANK); |
| 624 | else |
| 625 | return CMD_RET_USAGE; |
| 626 | |
| 627 | return 0; |
| 628 | } |
| 629 | |
| 630 | U_BOOT_CMD( |
| 631 | boot_bank, 2, 0, flash_bank_cmd, |
| 632 | "Flash bank Selection Control", |
| 633 | "bank[0-upper bank/1-lower bank] (e.g. boot_bank 0)" |
| 634 | ); |
| 635 | |
| 636 | static int cpld_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, |
| 637 | char * const argv[]) |
| 638 | { |
| 639 | struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE); |
| 640 | |
| 641 | if (argc > 2) |
| 642 | return CMD_RET_USAGE; |
| 643 | if ((argc == 1) || (strcmp(argv[1], "conf") == 0)) |
| 644 | cpld_data->system_rst = CONFIG_RESET; |
| 645 | else if (strcmp(argv[1], "init") == 0) |
| 646 | cpld_data->global_rst = INIT_RESET; |
| 647 | else |
| 648 | return CMD_RET_USAGE; |
| 649 | |
| 650 | return 0; |
| 651 | } |
| 652 | |
| 653 | U_BOOT_CMD( |
| 654 | cpld_reset, 2, 0, cpld_reset_cmd, |
| 655 | "Reset via CPLD", |
| 656 | "conf\n" |
| 657 | " -reset with current CPLD configuration\n" |
| 658 | "init\n" |
| 659 | " -reset and initial CPLD configuration with default value" |
| 660 | |
| 661 | ); |
| 662 | |
Tom Rini | 68ae777 | 2018-01-03 09:01:33 -0500 | [diff] [blame] | 663 | static void print_serdes_mux(void) |
Wang Huan | c8a7d9d | 2014-09-05 13:52:45 +0800 | [diff] [blame] | 664 | { |
| 665 | char current_serdes; |
| 666 | struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE); |
| 667 | |
| 668 | current_serdes = cpld_data->serdes_mux; |
| 669 | |
| 670 | printf("Serdes Lane B: "); |
| 671 | if ((current_serdes & MASK_LANE_B) == 0) |
| 672 | printf("SATA,\n"); |
| 673 | else |
| 674 | printf("SGMII 1,\n"); |
| 675 | |
| 676 | printf("Serdes Lane C: "); |
| 677 | if ((current_serdes & MASK_LANE_C) == 0) |
| 678 | printf("SGMII 1,\n"); |
| 679 | else |
| 680 | printf("PCIe,\n"); |
| 681 | |
| 682 | printf("Serdes Lane D: "); |
| 683 | if ((current_serdes & MASK_LANE_D) == 0) |
| 684 | printf("PCIe,\n"); |
| 685 | else |
| 686 | printf("SGMII 2,\n"); |
| 687 | |
| 688 | printf("SGMII 1 is on lane "); |
| 689 | if ((current_serdes & MASK_SGMII) == 0) |
| 690 | printf("C.\n"); |
| 691 | else |
| 692 | printf("B.\n"); |
| 693 | } |
| 694 | |
| 695 | static int serdes_mux_cmd(cmd_tbl_t *cmdtp, int flag, int argc, |
| 696 | char * const argv[]) |
| 697 | { |
| 698 | if (argc != 2) |
| 699 | return CMD_RET_USAGE; |
| 700 | if (strcmp(argv[1], "sata") == 0) { |
| 701 | printf("Set serdes lane B to SATA.\n"); |
| 702 | convert_serdes_mux(LANEB_SATA, NEED_RESET); |
| 703 | } else if (strcmp(argv[1], "sgmii1b") == 0) { |
| 704 | printf("Set serdes lane B to SGMII 1.\n"); |
| 705 | convert_serdes_mux(LANEB_SGMII1, NEED_RESET); |
| 706 | } else if (strcmp(argv[1], "sgmii1c") == 0) { |
| 707 | printf("Set serdes lane C to SGMII 1.\n"); |
| 708 | convert_serdes_mux(LANEC_SGMII1, NEED_RESET); |
| 709 | } else if (strcmp(argv[1], "sgmii2") == 0) { |
| 710 | printf("Set serdes lane D to SGMII 2.\n"); |
| 711 | convert_serdes_mux(LANED_SGMII2, NEED_RESET); |
| 712 | } else if (strcmp(argv[1], "pciex1") == 0) { |
| 713 | printf("Set serdes lane C to PCIe X1.\n"); |
| 714 | convert_serdes_mux(LANEC_PCIEX1, NEED_RESET); |
| 715 | } else if (strcmp(argv[1], "pciex2") == 0) { |
| 716 | printf("Set serdes lane C & lane D to PCIe X2.\n"); |
| 717 | convert_serdes_mux((LANED_PCIEX2 | LANEC_PCIEX1), NEED_RESET); |
| 718 | } else if (strcmp(argv[1], "show") == 0) { |
| 719 | print_serdes_mux(); |
| 720 | } else { |
| 721 | return CMD_RET_USAGE; |
| 722 | } |
| 723 | |
| 724 | return 0; |
| 725 | } |
| 726 | |
| 727 | U_BOOT_CMD( |
| 728 | lane_bank, 2, 0, serdes_mux_cmd, |
| 729 | "Multiplexed function setting for SerDes Lanes", |
| 730 | "sata\n" |
| 731 | " -change lane B to sata\n" |
| 732 | "lane_bank sgmii1b\n" |
| 733 | " -change lane B to SGMII1\n" |
| 734 | "lane_bank sgmii1c\n" |
| 735 | " -change lane C to SGMII1\n" |
| 736 | "lane_bank sgmii2\n" |
| 737 | " -change lane D to SGMII2\n" |
| 738 | "lane_bank pciex1\n" |
| 739 | " -change lane C to PCIeX1\n" |
| 740 | "lane_bank pciex2\n" |
| 741 | " -change lane C & lane D to PCIeX2\n" |
| 742 | "\nWARNING: If you aren't familiar with the setting of serdes, don't try to change anything!\n" |
| 743 | ); |
Alison Wang | d612f0a | 2014-12-09 17:38:02 +0800 | [diff] [blame] | 744 | #endif |