2 * Copyright (c) 2014 DENX
3 * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr>
5 * Derived from code written by Robert Aigner (ra@spiid.net)
7 * Itself derived from Beagle Board and 3430 SDP code by
8 * Richard Woodruff <r-woodruff2@ti.com>
9 * Syed Mohammed Khasim <khasim@ti.com>
11 * SPDX-License-Identifier: GPL-2.0+
18 #include <asm/arch/mem.h>
19 #include <asm/arch/mux.h>
20 #include <asm/arch/sys_proto.h>
22 #include <asm/mach-types.h>
23 #include <asm/omap_mmc.h>
26 DECLARE_GLOBAL_DATA_PTR
;
29 * MUSB port on OMAP3EVM Rev >= E requires extvbus programming.
31 u8
omap3_evm_need_extvbus(void)
35 /* TODO: verify if cairo handheld platform needs extvbus programming */
42 * Description: Early hardware init.
46 gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
47 /* board id for Linux */
48 gd
->bd
->bi_arch_number
= CONFIG_MACH_TYPE
;
50 gd
->bd
->bi_boot_params
= (OMAP34XX_SDRC_CS0
+ 0x100);
55 * Routine: set_muxconf_regs
56 * Description: Setting up the configuration Mux registers specific to the
57 * hardware. Many pins need to be moved from protect to primary
60 void set_muxconf_regs(void)
65 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
66 int board_mmc_init(bd_t
*bis
)
68 return omap_mmc_init(0, 0, 0, -1, -1);
72 #ifdef CONFIG_SPL_BUILD
74 * Routine: get_board_mem_timings
75 * Description: If we use SPL then there is no x-loader nor config header
76 * so we have to setup the DDR timings ourself on the first bank. This
77 * provides the timing values back to the function that configures
80 * The Cairo board uses SAMSUNG DDR - K4X51163PG-FGC6
82 void get_board_mem_timings(struct board_sdrc_timings
*timings
)
84 timings
->sharing
= SAMSUNG_SHARING
;
85 timings
->mcfg
= SAMSUNG_V_MCFG_165(128 << 20);
86 timings
->ctrla
= SAMSUNG_V_ACTIMA_165
;
87 timings
->ctrlb
= SAMSUNG_V_ACTIMB_165
;
88 timings
->rfr_ctrl
= SDP_3430_SDRC_RFR_CTRL_165MHz
;
89 timings
->mr
= SAMSUNG_V_MR_165
;
93 static const struct ns16550_platdata cairo_serial
= {
94 .base
= OMAP34XX_UART2
,
96 .clock
= V_NS16550_CLK
,
97 .fcr
= UART_FCR_DEFVAL
,
100 U_BOOT_DEVICE(cairo_uart
) = {
105 /* force SPL booting into U-Boot, not Linux */
106 #ifdef CONFIG_SPL_OS_BOOT
107 int spl_start_uboot(void)