Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2014 Freescale Semiconductor, Inc. |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <command.h> |
Simon Glass | 0af6e2d | 2019-08-01 09:46:52 -0600 | [diff] [blame] | 8 | #include <env.h> |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 9 | #include <i2c.h> |
Simon Glass | a7b5130 | 2019-11-14 12:57:46 -0700 | [diff] [blame^] | 10 | #include <init.h> |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 11 | #include <netdev.h> |
| 12 | #include <linux/compiler.h> |
| 13 | #include <asm/mmu.h> |
| 14 | #include <asm/processor.h> |
| 15 | #include <asm/immap_85xx.h> |
| 16 | #include <asm/fsl_law.h> |
| 17 | #include <asm/fsl_serdes.h> |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 18 | #include <asm/fsl_liodn.h> |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 19 | #include <fm_eth.h> |
| 20 | #include "t102xrdb.h" |
York Sun | f9a0363 | 2016-12-28 08:43:34 -0800 | [diff] [blame] | 21 | #ifdef CONFIG_TARGET_T1024RDB |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 22 | #include "cpld.h" |
York Sun | 940ee4a | 2016-12-28 08:43:33 -0800 | [diff] [blame] | 23 | #elif defined(CONFIG_TARGET_T1023RDB) |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 24 | #include <i2c.h> |
| 25 | #include <mmc.h> |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 26 | #endif |
tang yuantian | 8dc02f3 | 2014-12-17 15:42:54 +0800 | [diff] [blame] | 27 | #include "../common/sleep.h" |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 28 | |
| 29 | DECLARE_GLOBAL_DATA_PTR; |
| 30 | |
York Sun | 940ee4a | 2016-12-28 08:43:33 -0800 | [diff] [blame] | 31 | #ifdef CONFIG_TARGET_T1023RDB |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 32 | enum { |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 33 | GPIO1_SD_SEL = 0x00020000, /* GPIO1_14, 0: eMMC, 1:SD/MMC */ |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 34 | GPIO1_EMMC_SEL, |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 35 | GPIO3_GET_VERSION, /* GPIO3_4/5, 00:RevB, 01: RevC */ |
| 36 | GPIO3_BRD_VER_MASK = 0x0c000000, |
| 37 | GPIO3_OFFSET = 0x2000, |
| 38 | I2C_GET_BANK, |
| 39 | I2C_SET_BANK0, |
| 40 | I2C_SET_BANK4, |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 41 | }; |
| 42 | #endif |
| 43 | |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 44 | int checkboard(void) |
| 45 | { |
| 46 | struct cpu_type *cpu = gd->arch.cpu; |
| 47 | static const char *freq[3] = {"100.00MHZ", "125.00MHz", "156.25MHZ"}; |
Shengzhou Liu | ccc57ef | 2014-12-17 16:51:08 +0800 | [diff] [blame] | 48 | ccsr_gur_t __iomem *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); |
| 49 | u32 srds_s1; |
| 50 | |
| 51 | srds_s1 = in_be32(&gur->rcwsr[4]) & FSL_CORENET2_RCWSR4_SRDS1_PRTCL; |
| 52 | srds_s1 >>= FSL_CORENET2_RCWSR4_SRDS1_PRTCL_SHIFT; |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 53 | |
| 54 | printf("Board: %sRDB, ", cpu->name); |
York Sun | f9a0363 | 2016-12-28 08:43:34 -0800 | [diff] [blame] | 55 | #if defined(CONFIG_TARGET_T1024RDB) |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 56 | printf("Board rev: 0x%02x CPLD ver: 0x%02x, ", |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 57 | CPLD_READ(hw_ver), CPLD_READ(sw_ver)); |
York Sun | 940ee4a | 2016-12-28 08:43:33 -0800 | [diff] [blame] | 58 | #elif defined(CONFIG_TARGET_T1023RDB) |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 59 | printf("Rev%c, ", t1023rdb_ctrl(GPIO3_GET_VERSION) + 'B'); |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 60 | #endif |
| 61 | printf("boot from "); |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 62 | |
| 63 | #ifdef CONFIG_SDCARD |
| 64 | puts("SD/MMC\n"); |
| 65 | #elif CONFIG_SPIFLASH |
| 66 | puts("SPI\n"); |
York Sun | f9a0363 | 2016-12-28 08:43:34 -0800 | [diff] [blame] | 67 | #elif defined(CONFIG_TARGET_T1024RDB) |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 68 | u8 reg; |
| 69 | |
| 70 | reg = CPLD_READ(flash_csr); |
| 71 | |
| 72 | if (reg & CPLD_BOOT_SEL) { |
| 73 | puts("NAND\n"); |
| 74 | } else { |
| 75 | reg = ((reg & CPLD_LBMAP_MASK) >> CPLD_LBMAP_SHIFT); |
| 76 | printf("NOR vBank%d\n", reg); |
| 77 | } |
York Sun | 940ee4a | 2016-12-28 08:43:33 -0800 | [diff] [blame] | 78 | #elif defined(CONFIG_TARGET_T1023RDB) |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 79 | #ifdef CONFIG_NAND |
| 80 | puts("NAND\n"); |
| 81 | #else |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 82 | printf("NOR vBank%d\n", t1023rdb_ctrl(I2C_GET_BANK)); |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 83 | #endif |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 84 | #endif |
| 85 | |
| 86 | puts("SERDES Reference Clocks:\n"); |
Shengzhou Liu | ccc57ef | 2014-12-17 16:51:08 +0800 | [diff] [blame] | 87 | if (srds_s1 == 0x95) |
| 88 | printf("SD1_CLK1=%s, SD1_CLK2=%s\n", freq[2], freq[0]); |
| 89 | else |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 90 | printf("SD1_CLK1=%s, SD1_CLK2=%s\n", freq[0], freq[1]); |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 91 | |
| 92 | return 0; |
| 93 | } |
| 94 | |
York Sun | f9a0363 | 2016-12-28 08:43:34 -0800 | [diff] [blame] | 95 | #ifdef CONFIG_TARGET_T1024RDB |
Shengzhou Liu | ccc57ef | 2014-12-17 16:51:08 +0800 | [diff] [blame] | 96 | static void board_mux_lane(void) |
| 97 | { |
| 98 | ccsr_gur_t __iomem *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); |
| 99 | u32 srds_prtcl_s1; |
| 100 | u8 reg = CPLD_READ(misc_ctl_status); |
| 101 | |
| 102 | srds_prtcl_s1 = in_be32(&gur->rcwsr[4]) & |
| 103 | FSL_CORENET2_RCWSR4_SRDS1_PRTCL; |
| 104 | srds_prtcl_s1 >>= FSL_CORENET2_RCWSR4_SRDS1_PRTCL_SHIFT; |
| 105 | |
| 106 | if (srds_prtcl_s1 == 0x95) { |
| 107 | /* Route Lane B to PCIE */ |
| 108 | CPLD_WRITE(misc_ctl_status, reg & ~CPLD_PCIE_SGMII_MUX); |
| 109 | } else { |
| 110 | /* Route Lane B to SGMII */ |
| 111 | CPLD_WRITE(misc_ctl_status, reg | CPLD_PCIE_SGMII_MUX); |
| 112 | } |
| 113 | CPLD_WRITE(boot_override, CPLD_OVERRIDE_MUX_EN); |
| 114 | } |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 115 | #endif |
Shengzhou Liu | ccc57ef | 2014-12-17 16:51:08 +0800 | [diff] [blame] | 116 | |
tang yuantian | 8dc02f3 | 2014-12-17 15:42:54 +0800 | [diff] [blame] | 117 | int board_early_init_f(void) |
| 118 | { |
| 119 | #if defined(CONFIG_DEEP_SLEEP) |
| 120 | if (is_warm_boot()) |
| 121 | fsl_dp_disable_console(); |
| 122 | #endif |
| 123 | |
| 124 | return 0; |
| 125 | } |
| 126 | |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 127 | int board_early_init_r(void) |
| 128 | { |
| 129 | #ifdef CONFIG_SYS_FLASH_BASE |
| 130 | const unsigned int flashbase = CONFIG_SYS_FLASH_BASE; |
| 131 | int flash_esel = find_tlb_idx((void *)flashbase, 1); |
| 132 | /* |
| 133 | * Remap Boot flash region to caching-inhibited |
| 134 | * so that flash can be erased properly. |
| 135 | */ |
| 136 | |
| 137 | /* Flush d-cache and invalidate i-cache of any FLASH data */ |
| 138 | flush_dcache(); |
| 139 | invalidate_icache(); |
| 140 | if (flash_esel == -1) { |
| 141 | /* very unlikely unless something is messed up */ |
| 142 | puts("Error: Could not find TLB for FLASH BASE\n"); |
| 143 | flash_esel = 2; /* give our best effort to continue */ |
| 144 | } else { |
| 145 | /* invalidate existing TLB entry for flash + promjet */ |
| 146 | disable_tlb(flash_esel); |
| 147 | } |
| 148 | |
| 149 | set_tlb(1, flashbase, CONFIG_SYS_FLASH_BASE_PHYS, |
| 150 | MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, |
| 151 | 0, flash_esel, BOOKE_PAGESZ_256M, 1); |
| 152 | #endif |
| 153 | |
York Sun | f9a0363 | 2016-12-28 08:43:34 -0800 | [diff] [blame] | 154 | #ifdef CONFIG_TARGET_T1024RDB |
Shengzhou Liu | ccc57ef | 2014-12-17 16:51:08 +0800 | [diff] [blame] | 155 | board_mux_lane(); |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 156 | #endif |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 157 | |
| 158 | return 0; |
| 159 | } |
| 160 | |
| 161 | unsigned long get_board_sys_clk(void) |
| 162 | { |
| 163 | return CONFIG_SYS_CLK_FREQ; |
| 164 | } |
| 165 | |
| 166 | unsigned long get_board_ddr_clk(void) |
| 167 | { |
| 168 | return CONFIG_DDR_CLK_FREQ; |
| 169 | } |
| 170 | |
Shengzhou Liu | 52c4853 | 2017-04-10 16:00:08 +0800 | [diff] [blame] | 171 | #ifdef CONFIG_TARGET_T1024RDB |
| 172 | void board_reset(void) |
| 173 | { |
| 174 | CPLD_WRITE(reset_ctl1, CPLD_LBMAP_RESET); |
| 175 | } |
| 176 | #endif |
| 177 | |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 178 | int misc_init_r(void) |
| 179 | { |
| 180 | return 0; |
| 181 | } |
| 182 | |
| 183 | int ft_board_setup(void *blob, bd_t *bd) |
| 184 | { |
| 185 | phys_addr_t base; |
| 186 | phys_size_t size; |
| 187 | |
| 188 | ft_cpu_setup(blob, bd); |
| 189 | |
Simon Glass | da1a134 | 2017-08-03 12:22:15 -0600 | [diff] [blame] | 190 | base = env_get_bootm_low(); |
| 191 | size = env_get_bootm_size(); |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 192 | |
| 193 | fdt_fixup_memory(blob, (u64)base, (u64)size); |
| 194 | |
| 195 | #ifdef CONFIG_PCI |
| 196 | pci_of_setup(blob, bd); |
| 197 | #endif |
| 198 | |
| 199 | fdt_fixup_liodn(blob); |
Sriram Dash | 9fd465c | 2016-09-16 17:12:15 +0530 | [diff] [blame] | 200 | fsl_fdt_fixup_dr_usb(blob, bd); |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 201 | |
| 202 | #ifdef CONFIG_SYS_DPAA_FMAN |
| 203 | fdt_fixup_fman_ethernet(blob); |
| 204 | fdt_fixup_board_enet(blob); |
| 205 | #endif |
| 206 | |
York Sun | 940ee4a | 2016-12-28 08:43:33 -0800 | [diff] [blame] | 207 | #ifdef CONFIG_TARGET_T1023RDB |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 208 | if (t1023rdb_ctrl(GPIO3_GET_VERSION) > 0) |
| 209 | fdt_enable_nor(blob); |
| 210 | #endif |
| 211 | |
Shengzhou Liu | 4991240 | 2014-11-24 17:11:56 +0800 | [diff] [blame] | 212 | return 0; |
| 213 | } |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 214 | |
York Sun | 940ee4a | 2016-12-28 08:43:33 -0800 | [diff] [blame] | 215 | #ifdef CONFIG_TARGET_T1023RDB |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 216 | /* Enable NOR flash for RevC */ |
| 217 | static void fdt_enable_nor(void *blob) |
| 218 | { |
| 219 | int nodeoff = fdt_node_offset_by_compatible(blob, 0, "cfi-flash"); |
| 220 | |
| 221 | if (nodeoff >= 0) |
| 222 | fdt_status_okay(blob, nodeoff); |
| 223 | else |
| 224 | printf("WARNING unable to set status for NOR\n"); |
| 225 | } |
| 226 | |
| 227 | int board_mmc_getcd(struct mmc *mmc) |
| 228 | { |
| 229 | ccsr_gpio_t __iomem *pgpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR); |
| 230 | u32 val = in_be32(&pgpio->gpdat); |
| 231 | |
| 232 | /* GPIO1_14, 0: eMMC, 1: SD/MMC */ |
| 233 | val &= GPIO1_SD_SEL; |
| 234 | |
| 235 | return val ? -1 : 1; |
| 236 | } |
| 237 | |
| 238 | int board_mmc_getwp(struct mmc *mmc) |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 239 | { |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 240 | ccsr_gpio_t __iomem *pgpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR); |
| 241 | u32 val = in_be32(&pgpio->gpdat); |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 242 | |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 243 | val &= GPIO1_SD_SEL; |
| 244 | |
| 245 | return val ? -1 : 0; |
| 246 | } |
| 247 | |
| 248 | static u32 t1023rdb_ctrl(u32 ctrl_type) |
| 249 | { |
| 250 | ccsr_gpio_t __iomem *pgpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR); |
| 251 | ccsr_gur_t __iomem *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); |
| 252 | u32 val, orig_bus = i2c_get_bus_num(); |
| 253 | u8 tmp; |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 254 | |
| 255 | switch (ctrl_type) { |
| 256 | case GPIO1_SD_SEL: |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 257 | val = in_be32(&pgpio->gpdat); |
| 258 | val |= GPIO1_SD_SEL; |
| 259 | out_be32(&pgpio->gpdat, val); |
| 260 | setbits_be32(&pgpio->gpdir, GPIO1_SD_SEL); |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 261 | break; |
| 262 | case GPIO1_EMMC_SEL: |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 263 | val = in_be32(&pgpio->gpdat); |
| 264 | val &= ~GPIO1_SD_SEL; |
| 265 | out_be32(&pgpio->gpdat, val); |
| 266 | setbits_be32(&pgpio->gpdir, GPIO1_SD_SEL); |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 267 | break; |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 268 | case GPIO3_GET_VERSION: |
| 269 | pgpio = (ccsr_gpio_t *)(CONFIG_SYS_MPC85xx_GPIO_ADDR |
| 270 | + GPIO3_OFFSET); |
| 271 | val = in_be32(&pgpio->gpdat); |
| 272 | val = ((val & GPIO3_BRD_VER_MASK) >> 26) & 0x3; |
| 273 | if (val == 0x3) /* GPIO3_4/5 not used on RevB */ |
| 274 | val = 0; |
| 275 | return val; |
| 276 | case I2C_GET_BANK: |
| 277 | i2c_set_bus_num(I2C_PCA6408_BUS_NUM); |
| 278 | i2c_read(I2C_PCA6408_ADDR, 0, 1, &tmp, 1); |
| 279 | tmp &= 0x7; |
| 280 | tmp = ((tmp & 1) << 2) | (tmp & 2) | ((tmp & 4) >> 2); |
| 281 | i2c_set_bus_num(orig_bus); |
| 282 | return tmp; |
| 283 | case I2C_SET_BANK0: |
| 284 | i2c_set_bus_num(I2C_PCA6408_BUS_NUM); |
| 285 | tmp = 0x0; |
| 286 | i2c_write(I2C_PCA6408_ADDR, 1, 1, &tmp, 1); |
| 287 | tmp = 0xf8; |
| 288 | i2c_write(I2C_PCA6408_ADDR, 3, 1, &tmp, 1); |
| 289 | /* asserting HRESET_REQ */ |
| 290 | out_be32(&gur->rstcr, 0x2); |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 291 | break; |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 292 | case I2C_SET_BANK4: |
| 293 | i2c_set_bus_num(I2C_PCA6408_BUS_NUM); |
| 294 | tmp = 0x1; |
| 295 | i2c_write(I2C_PCA6408_ADDR, 1, 1, &tmp, 1); |
| 296 | tmp = 0xf8; |
| 297 | i2c_write(I2C_PCA6408_ADDR, 3, 1, &tmp, 1); |
| 298 | out_be32(&gur->rstcr, 0x2); |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 299 | break; |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 300 | default: |
| 301 | break; |
| 302 | } |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 303 | return 0; |
| 304 | } |
| 305 | |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 306 | static int switch_cmd(cmd_tbl_t *cmdtp, int flag, int argc, |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 307 | char * const argv[]) |
| 308 | { |
| 309 | if (argc < 2) |
| 310 | return CMD_RET_USAGE; |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 311 | if (!strcmp(argv[1], "bank0")) |
| 312 | t1023rdb_ctrl(I2C_SET_BANK0); |
| 313 | else if (!strcmp(argv[1], "bank4") || !strcmp(argv[1], "altbank")) |
| 314 | t1023rdb_ctrl(I2C_SET_BANK4); |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 315 | else if (!strcmp(argv[1], "sd")) |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 316 | t1023rdb_ctrl(GPIO1_SD_SEL); |
| 317 | else if (!strcmp(argv[1], "emmc")) |
| 318 | t1023rdb_ctrl(GPIO1_EMMC_SEL); |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 319 | else |
| 320 | return CMD_RET_USAGE; |
| 321 | return 0; |
| 322 | } |
| 323 | |
| 324 | U_BOOT_CMD( |
Shengzhou Liu | 0a19789 | 2015-06-17 16:37:01 +0800 | [diff] [blame] | 325 | switch, 2, 0, switch_cmd, |
| 326 | "for bank0/bank4/sd/emmc switch control in runtime", |
| 327 | "command (e.g. switch bank4)" |
Shengzhou Liu | 00d7e5b | 2015-03-27 15:48:34 +0800 | [diff] [blame] | 328 | ); |
| 329 | #endif |