2 * Copyright (C) 2013 Samsung Electronics
4 * SPDX-License-Identifier: GPL-2.0+
9 #include <asm/arch/pinmux.h>
10 #include <asm/arch/dwmmc.h>
11 #include <asm/arch/gpio.h>
12 #include <asm/arch/power.h>
14 DECLARE_GLOBAL_DATA_PTR;
16 #ifdef CONFIG_USB_EHCI_EXYNOS
17 int board_usb_init(int index, enum usb_init_type init)
19 struct exynos5_gpio_part1 *gpio = (struct exynos5_gpio_part1 *)
20 samsung_get_base_gpio_part1();
22 /* Configure gpios for usb 3503 hub:
23 * disconnect, toggle reset and connect
25 s5p_gpio_direction_output(&gpio->d1, 7, 0);
26 s5p_gpio_direction_output(&gpio->x3, 5, 0);
28 s5p_gpio_direction_output(&gpio->x3, 5, 1);
29 s5p_gpio_direction_output(&gpio->d1, 7, 1);
37 gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
46 for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
47 addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE);
48 gd->ram_size += get_ram_size((long *)addr, SDRAM_BANK_SIZE);
53 int power_init_board(void)
59 void dram_init_banksize(void)
64 for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
65 addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE);
66 size = get_ram_size((long *)addr, SDRAM_BANK_SIZE);
68 gd->bd->bi_dram[i].start = addr;
69 gd->bd->bi_dram[i].size = size;
73 #ifdef CONFIG_GENERIC_MMC
74 int board_mmc_init(bd_t *bis)
77 /* dwmmc initializattion for available channels */
78 ret = exynos_dwmmc_init(gd->fdt_blob);
80 debug("dwmmc init failed\n");
86 static int board_uart_init(void)
90 for (uart_id = PERIPH_ID_UART0; uart_id <= PERIPH_ID_UART3; uart_id++) {
91 err = exynos_pinmux_config(uart_id, PINMUX_FLAG_NONE);
93 debug("UART%d not configured\n",
94 (uart_id - PERIPH_ID_UART0));
101 #ifdef CONFIG_BOARD_EARLY_INIT_F
102 int board_early_init_f(void)
106 err = board_uart_init();
108 debug("UART init failed\n");
115 #ifdef CONFIG_DISPLAY_BOARDINFO
118 printf("\nBoard: Arndale\n");