Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2013 SAMSUNG Electronics |
| 4 | * Rajeshwari Shinde <rajeshwari.s@samsung.com> |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <cros_ec.h> |
| 9 | #include <errno.h> |
| 10 | #include <fdtdec.h> |
| 11 | #include <spi.h> |
| 12 | #include <tmu.h> |
| 13 | #include <netdev.h> |
| 14 | #include <asm/io.h> |
Simon Glass | 37f1162 | 2014-10-20 19:48:37 -0600 | [diff] [blame] | 15 | #include <asm/gpio.h> |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 16 | #include <asm/arch/board.h> |
| 17 | #include <asm/arch/cpu.h> |
| 18 | #include <asm/arch/dwmmc.h> |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 19 | #include <asm/arch/mmc.h> |
| 20 | #include <asm/arch/pinmux.h> |
| 21 | #include <asm/arch/power.h> |
Ajay Kumar | 1176348 | 2014-09-05 16:53:30 +0530 | [diff] [blame] | 22 | #include <asm/arch/system.h> |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 23 | #include <asm/arch/sromc.h> |
Piotr Wilczek | 2c3eed5 | 2014-03-07 14:59:45 +0100 | [diff] [blame] | 24 | #include <lcd.h> |
Przemyslaw Marczak | 110aa29 | 2015-04-20 20:07:50 +0200 | [diff] [blame] | 25 | #include <i2c.h> |
Lukasz Majewski | 7573b96 | 2015-03-03 17:32:03 +0100 | [diff] [blame] | 26 | #include <usb.h> |
Joonyoung Shim | 95d3a1d | 2015-05-22 18:14:24 +0200 | [diff] [blame] | 27 | #include <dwc3-uboot.h> |
| 28 | #include <samsung/misc.h> |
Thomas Abraham | 8d84faa | 2016-04-23 22:18:14 +0530 | [diff] [blame] | 29 | #include <dm/pinctrl.h> |
| 30 | #include <dm.h> |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 31 | |
| 32 | DECLARE_GLOBAL_DATA_PTR; |
| 33 | |
Jeroen Hofstee | 5cd8294 | 2014-10-08 22:57:28 +0200 | [diff] [blame] | 34 | __weak int exynos_early_init_f(void) |
Piotr Wilczek | 942d0a9 | 2014-03-07 14:59:43 +0100 | [diff] [blame] | 35 | { |
| 36 | return 0; |
| 37 | } |
Piotr Wilczek | 942d0a9 | 2014-03-07 14:59:43 +0100 | [diff] [blame] | 38 | |
Jeroen Hofstee | 5cd8294 | 2014-10-08 22:57:28 +0200 | [diff] [blame] | 39 | __weak int exynos_power_init(void) |
Piotr Wilczek | 942d0a9 | 2014-03-07 14:59:43 +0100 | [diff] [blame] | 40 | { |
| 41 | return 0; |
| 42 | } |
Piotr Wilczek | 942d0a9 | 2014-03-07 14:59:43 +0100 | [diff] [blame] | 43 | |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 44 | #if defined CONFIG_EXYNOS_TMU |
| 45 | /* Boot Time Thermal Analysis for SoC temperature threshold breach */ |
| 46 | static void boot_temp_check(void) |
| 47 | { |
| 48 | int temp; |
| 49 | |
| 50 | switch (tmu_monitor(&temp)) { |
| 51 | case TMU_STATUS_NORMAL: |
| 52 | break; |
| 53 | case TMU_STATUS_TRIPPED: |
| 54 | /* |
| 55 | * Status TRIPPED ans WARNING means corresponding threshold |
| 56 | * breach |
| 57 | */ |
| 58 | puts("EXYNOS_TMU: TRIPPING! Device power going down ...\n"); |
| 59 | set_ps_hold_ctrl(); |
| 60 | hang(); |
| 61 | break; |
| 62 | case TMU_STATUS_WARNING: |
| 63 | puts("EXYNOS_TMU: WARNING! Temperature very high\n"); |
| 64 | break; |
| 65 | case TMU_STATUS_INIT: |
| 66 | /* |
| 67 | * TMU_STATUS_INIT means something is wrong with temperature |
| 68 | * sensing and TMU status was changed back from NORMAL to INIT. |
| 69 | */ |
| 70 | puts("EXYNOS_TMU: WARNING! Temperature sensing not done\n"); |
| 71 | break; |
| 72 | default: |
| 73 | debug("EXYNOS_TMU: Unknown TMU state\n"); |
| 74 | } |
| 75 | } |
| 76 | #endif |
| 77 | |
| 78 | int board_init(void) |
| 79 | { |
| 80 | gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); |
| 81 | #if defined CONFIG_EXYNOS_TMU |
| 82 | if (tmu_init(gd->fdt_blob) != TMU_STATUS_NORMAL) { |
| 83 | debug("%s: Failed to init TMU\n", __func__); |
| 84 | return -1; |
| 85 | } |
| 86 | boot_temp_check(); |
| 87 | #endif |
Przemyslaw Marczak | c32a04c | 2015-02-17 14:50:25 +0100 | [diff] [blame] | 88 | #ifdef CONFIG_TZSW_RESERVED_DRAM_SIZE |
| 89 | /* The last few MB of memory can be reserved for secure firmware */ |
| 90 | ulong size = CONFIG_TZSW_RESERVED_DRAM_SIZE; |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 91 | |
Przemyslaw Marczak | c32a04c | 2015-02-17 14:50:25 +0100 | [diff] [blame] | 92 | gd->ram_size -= size; |
| 93 | gd->bd->bi_dram[CONFIG_NR_DRAM_BANKS - 1].size -= size; |
| 94 | #endif |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 95 | return exynos_init(); |
| 96 | } |
| 97 | |
| 98 | int dram_init(void) |
| 99 | { |
Łukasz Majewski | 33d7a19 | 2015-03-04 10:54:48 +0100 | [diff] [blame] | 100 | unsigned int i; |
Thomas Abraham | 8d84faa | 2016-04-23 22:18:14 +0530 | [diff] [blame] | 101 | unsigned long addr; |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 102 | |
| 103 | for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { |
| 104 | addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE); |
| 105 | gd->ram_size += get_ram_size((long *)addr, SDRAM_BANK_SIZE); |
| 106 | } |
| 107 | return 0; |
| 108 | } |
| 109 | |
Simon Glass | 2f949c3 | 2017-03-31 08:40:32 -0600 | [diff] [blame] | 110 | int dram_init_banksize(void) |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 111 | { |
Łukasz Majewski | 33d7a19 | 2015-03-04 10:54:48 +0100 | [diff] [blame] | 112 | unsigned int i; |
Thomas Abraham | 8d84faa | 2016-04-23 22:18:14 +0530 | [diff] [blame] | 113 | unsigned long addr, size; |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 114 | |
| 115 | for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { |
| 116 | addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE); |
| 117 | size = get_ram_size((long *)addr, SDRAM_BANK_SIZE); |
| 118 | |
| 119 | gd->bd->bi_dram[i].start = addr; |
| 120 | gd->bd->bi_dram[i].size = size; |
| 121 | } |
Simon Glass | 2f949c3 | 2017-03-31 08:40:32 -0600 | [diff] [blame] | 122 | |
| 123 | return 0; |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 124 | } |
| 125 | |
| 126 | static int board_uart_init(void) |
| 127 | { |
Thomas Abraham | 8d84faa | 2016-04-23 22:18:14 +0530 | [diff] [blame] | 128 | #ifndef CONFIG_PINCTRL_EXYNOS |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 129 | int err, uart_id, ret = 0; |
| 130 | |
| 131 | for (uart_id = PERIPH_ID_UART0; uart_id <= PERIPH_ID_UART3; uart_id++) { |
| 132 | err = exynos_pinmux_config(uart_id, PINMUX_FLAG_NONE); |
| 133 | if (err) { |
| 134 | debug("UART%d not configured\n", |
| 135 | (uart_id - PERIPH_ID_UART0)); |
| 136 | ret |= err; |
| 137 | } |
| 138 | } |
| 139 | return ret; |
Thomas Abraham | 8d84faa | 2016-04-23 22:18:14 +0530 | [diff] [blame] | 140 | #else |
| 141 | return 0; |
| 142 | #endif |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 143 | } |
| 144 | |
| 145 | #ifdef CONFIG_BOARD_EARLY_INIT_F |
| 146 | int board_early_init_f(void) |
| 147 | { |
| 148 | int err; |
Przemyslaw Marczak | 4d2a92c | 2014-09-01 13:50:49 +0200 | [diff] [blame] | 149 | #ifdef CONFIG_BOARD_TYPES |
| 150 | set_board_type(); |
| 151 | #endif |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 152 | err = board_uart_init(); |
| 153 | if (err) { |
| 154 | debug("UART init failed\n"); |
| 155 | return err; |
| 156 | } |
| 157 | |
| 158 | #ifdef CONFIG_SYS_I2C_INIT_BOARD |
| 159 | board_i2c_init(gd->fdt_blob); |
| 160 | #endif |
Ajay Kumar | 1176348 | 2014-09-05 16:53:30 +0530 | [diff] [blame] | 161 | |
Piotr Wilczek | 942d0a9 | 2014-03-07 14:59:43 +0100 | [diff] [blame] | 162 | return exynos_early_init_f(); |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 163 | } |
| 164 | #endif |
| 165 | |
Przemyslaw Marczak | 110aa29 | 2015-04-20 20:07:50 +0200 | [diff] [blame] | 166 | #if defined(CONFIG_POWER) || defined(CONFIG_DM_PMIC) |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 167 | int power_init_board(void) |
| 168 | { |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 169 | set_ps_hold_ctrl(); |
| 170 | |
Piotr Wilczek | 942d0a9 | 2014-03-07 14:59:43 +0100 | [diff] [blame] | 171 | return exynos_power_init(); |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 172 | } |
| 173 | #endif |
| 174 | |
Piotr Wilczek | 2c3eed5 | 2014-03-07 14:59:45 +0100 | [diff] [blame] | 175 | #ifdef CONFIG_SMC911X |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 176 | static int decode_sromc(const void *blob, struct fdt_sromc *config) |
| 177 | { |
| 178 | int err; |
| 179 | int node; |
| 180 | |
| 181 | node = fdtdec_next_compatible(blob, 0, COMPAT_SAMSUNG_EXYNOS5_SROMC); |
| 182 | if (node < 0) { |
| 183 | debug("Could not find SROMC node\n"); |
| 184 | return node; |
| 185 | } |
| 186 | |
| 187 | config->bank = fdtdec_get_int(blob, node, "bank", 0); |
| 188 | config->width = fdtdec_get_int(blob, node, "width", 2); |
| 189 | |
| 190 | err = fdtdec_get_int_array(blob, node, "srom-timing", config->timing, |
| 191 | FDT_SROM_TIMING_COUNT); |
| 192 | if (err < 0) { |
| 193 | debug("Could not decode SROMC configuration Error: %s\n", |
| 194 | fdt_strerror(err)); |
| 195 | return -FDT_ERR_NOTFOUND; |
| 196 | } |
| 197 | return 0; |
| 198 | } |
Piotr Wilczek | 2c3eed5 | 2014-03-07 14:59:45 +0100 | [diff] [blame] | 199 | #endif |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 200 | |
| 201 | int board_eth_init(bd_t *bis) |
| 202 | { |
| 203 | #ifdef CONFIG_SMC911X |
| 204 | u32 smc_bw_conf, smc_bc_conf; |
| 205 | struct fdt_sromc config; |
| 206 | fdt_addr_t base_addr; |
| 207 | int node; |
| 208 | |
| 209 | node = decode_sromc(gd->fdt_blob, &config); |
| 210 | if (node < 0) { |
| 211 | debug("%s: Could not find sromc configuration\n", __func__); |
| 212 | return 0; |
| 213 | } |
| 214 | node = fdtdec_next_compatible(gd->fdt_blob, node, COMPAT_SMSC_LAN9215); |
| 215 | if (node < 0) { |
| 216 | debug("%s: Could not find lan9215 configuration\n", __func__); |
| 217 | return 0; |
| 218 | } |
| 219 | |
| 220 | /* We now have a node, so any problems from now on are errors */ |
| 221 | base_addr = fdtdec_get_addr(gd->fdt_blob, node, "reg"); |
| 222 | if (base_addr == FDT_ADDR_T_NONE) { |
| 223 | debug("%s: Could not find lan9215 address\n", __func__); |
| 224 | return -1; |
| 225 | } |
| 226 | |
| 227 | /* Ethernet needs data bus width of 16 bits */ |
| 228 | if (config.width != 2) { |
| 229 | debug("%s: Unsupported bus width %d\n", __func__, |
| 230 | config.width); |
| 231 | return -1; |
| 232 | } |
| 233 | smc_bw_conf = SROMC_DATA16_WIDTH(config.bank) |
| 234 | | SROMC_BYTE_ENABLE(config.bank); |
| 235 | |
| 236 | smc_bc_conf = SROMC_BC_TACS(config.timing[FDT_SROM_TACS]) | |
| 237 | SROMC_BC_TCOS(config.timing[FDT_SROM_TCOS]) | |
| 238 | SROMC_BC_TACC(config.timing[FDT_SROM_TACC]) | |
| 239 | SROMC_BC_TCOH(config.timing[FDT_SROM_TCOH]) | |
| 240 | SROMC_BC_TAH(config.timing[FDT_SROM_TAH]) | |
| 241 | SROMC_BC_TACP(config.timing[FDT_SROM_TACP]) | |
| 242 | SROMC_BC_PMC(config.timing[FDT_SROM_PMC]); |
| 243 | |
| 244 | /* Select and configure the SROMC bank */ |
| 245 | exynos_pinmux_config(PERIPH_ID_SROMC, config.bank); |
| 246 | s5p_config_sromc(config.bank, smc_bw_conf, smc_bc_conf); |
| 247 | return smc911x_initialize(0, base_addr); |
| 248 | #endif |
| 249 | return 0; |
| 250 | } |
| 251 | |
Masahiro Yamada | 0a78017 | 2017-05-09 20:31:39 +0900 | [diff] [blame] | 252 | #ifdef CONFIG_MMC |
Przemyslaw Marczak | 0ae6f51 | 2014-09-01 13:50:45 +0200 | [diff] [blame] | 253 | static int init_mmc(void) |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 254 | { |
Masahiro Yamada | 7db8c17 | 2016-12-07 22:10:28 +0900 | [diff] [blame] | 255 | #ifdef CONFIG_MMC_SDHCI |
Przemyslaw Marczak | 0ae6f51 | 2014-09-01 13:50:45 +0200 | [diff] [blame] | 256 | return exynos_mmc_init(gd->fdt_blob); |
| 257 | #else |
| 258 | return 0; |
| 259 | #endif |
| 260 | } |
| 261 | |
| 262 | static int init_dwmmc(void) |
| 263 | { |
Masahiro Yamada | 7942e91 | 2017-01-10 13:32:04 +0900 | [diff] [blame] | 264 | #ifdef CONFIG_MMC_DW |
Przemyslaw Marczak | 0ae6f51 | 2014-09-01 13:50:45 +0200 | [diff] [blame] | 265 | return exynos_dwmmc_init(gd->fdt_blob); |
| 266 | #else |
| 267 | return 0; |
Piotr Wilczek | 2c3eed5 | 2014-03-07 14:59:45 +0100 | [diff] [blame] | 268 | #endif |
Przemyslaw Marczak | 0ae6f51 | 2014-09-01 13:50:45 +0200 | [diff] [blame] | 269 | } |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 270 | |
Przemyslaw Marczak | 0ae6f51 | 2014-09-01 13:50:45 +0200 | [diff] [blame] | 271 | int board_mmc_init(bd_t *bis) |
| 272 | { |
| 273 | int ret; |
| 274 | |
| 275 | if (get_boot_mode() == BOOT_MODE_SD) { |
| 276 | ret = init_mmc(); |
| 277 | ret |= init_dwmmc(); |
| 278 | } else { |
| 279 | ret = init_dwmmc(); |
| 280 | ret |= init_mmc(); |
| 281 | } |
| 282 | |
Jaehoon Chung | b775da7 | 2014-05-16 13:59:49 +0900 | [diff] [blame] | 283 | if (ret) |
| 284 | debug("mmc init failed\n"); |
Przemyslaw Marczak | 0ae6f51 | 2014-09-01 13:50:45 +0200 | [diff] [blame] | 285 | |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 286 | return ret; |
| 287 | } |
| 288 | #endif |
Piotr Wilczek | 3df7aff | 2014-03-07 14:59:42 +0100 | [diff] [blame] | 289 | |
| 290 | #ifdef CONFIG_DISPLAY_BOARDINFO |
| 291 | int checkboard(void) |
| 292 | { |
Przemyslaw Marczak | 4d2a92c | 2014-09-01 13:50:49 +0200 | [diff] [blame] | 293 | const char *board_info; |
Piotr Wilczek | 3df7aff | 2014-03-07 14:59:42 +0100 | [diff] [blame] | 294 | |
Przemyslaw Marczak | 4d2a92c | 2014-09-01 13:50:49 +0200 | [diff] [blame] | 295 | board_info = fdt_getprop(gd->fdt_blob, 0, "model", NULL); |
| 296 | printf("Board: %s\n", board_info ? board_info : "unknown"); |
| 297 | #ifdef CONFIG_BOARD_TYPES |
| 298 | board_info = get_board_type(); |
Przemyslaw Marczak | 5b8bbbf | 2015-10-27 13:07:54 +0100 | [diff] [blame] | 299 | if (board_info) |
| 300 | printf("Type: %s\n", board_info); |
Przemyslaw Marczak | 4d2a92c | 2014-09-01 13:50:49 +0200 | [diff] [blame] | 301 | #endif |
Piotr Wilczek | 3df7aff | 2014-03-07 14:59:42 +0100 | [diff] [blame] | 302 | return 0; |
| 303 | } |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 304 | #endif |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 305 | |
| 306 | #ifdef CONFIG_BOARD_LATE_INIT |
| 307 | int board_late_init(void) |
| 308 | { |
| 309 | stdio_print_current_devices(); |
| 310 | |
Vadim Bendebury | e5d1579 | 2014-02-27 13:26:02 -0700 | [diff] [blame] | 311 | if (cros_ec_get_error()) { |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 312 | /* Force console on */ |
| 313 | gd->flags &= ~GD_FLG_SILENT; |
| 314 | |
| 315 | printf("cros-ec communications failure %d\n", |
Vadim Bendebury | e5d1579 | 2014-02-27 13:26:02 -0700 | [diff] [blame] | 316 | cros_ec_get_error()); |
Rajeshwari Birje | 987b0dd | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 317 | puts("\nPlease reset with Power+Refresh\n\n"); |
| 318 | panic("Cannot init cros-ec device"); |
| 319 | return -1; |
| 320 | } |
| 321 | return 0; |
| 322 | } |
| 323 | #endif |
| 324 | |
Piotr Wilczek | 2c3eed5 | 2014-03-07 14:59:45 +0100 | [diff] [blame] | 325 | #ifdef CONFIG_MISC_INIT_R |
| 326 | int misc_init_r(void) |
| 327 | { |
| 328 | #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG |
| 329 | set_board_info(); |
| 330 | #endif |
| 331 | #ifdef CONFIG_LCD_MENU |
| 332 | keys_init(); |
| 333 | check_boot_mode(); |
| 334 | #endif |
| 335 | #ifdef CONFIG_CMD_BMP |
| 336 | if (panel_info.logo_on) |
| 337 | draw_logo(); |
| 338 | #endif |
| 339 | return 0; |
| 340 | } |
| 341 | #endif |
Joonyoung Shim | 7a3e806 | 2015-01-15 11:45:56 +0900 | [diff] [blame] | 342 | |
| 343 | void reset_misc(void) |
| 344 | { |
| 345 | struct gpio_desc gpio = {}; |
| 346 | int node; |
| 347 | |
| 348 | node = fdt_node_offset_by_compatible(gd->fdt_blob, 0, |
| 349 | "samsung,emmc-reset"); |
| 350 | if (node < 0) |
| 351 | return; |
| 352 | |
Simon Glass | 1d9af1f | 2017-05-30 21:47:09 -0600 | [diff] [blame] | 353 | gpio_request_by_name_nodev(offset_to_ofnode(node), "reset-gpio", 0, |
| 354 | &gpio, GPIOD_IS_OUT); |
Joonyoung Shim | 7a3e806 | 2015-01-15 11:45:56 +0900 | [diff] [blame] | 355 | |
| 356 | if (dm_gpio_is_valid(&gpio)) { |
| 357 | /* |
| 358 | * Reset eMMC |
| 359 | * |
| 360 | * FIXME: Need to optimize delay time. Minimum 1usec pulse is |
| 361 | * required by 'JEDEC Standard No.84-A441' (eMMC) |
| 362 | * document but real delay time is expected to greater |
| 363 | * than 1usec. |
| 364 | */ |
| 365 | dm_gpio_set_value(&gpio, 0); |
| 366 | mdelay(10); |
| 367 | dm_gpio_set_value(&gpio, 1); |
| 368 | } |
| 369 | } |
Lukasz Majewski | 7573b96 | 2015-03-03 17:32:03 +0100 | [diff] [blame] | 370 | |
| 371 | int board_usb_cleanup(int index, enum usb_init_type init) |
| 372 | { |
Joonyoung Shim | 95d3a1d | 2015-05-22 18:14:24 +0200 | [diff] [blame] | 373 | #ifdef CONFIG_USB_DWC3 |
| 374 | dwc3_uboot_exit(index); |
| 375 | #endif |
Lukasz Majewski | 7573b96 | 2015-03-03 17:32:03 +0100 | [diff] [blame] | 376 | return 0; |
| 377 | } |