2 * WORK Microwave work_92105 board support
4 * (C) Copyright 2014 DENX Software Engineering GmbH
5 * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr>
7 * SPDX-License-Identifier: GPL-2.0+
12 #include <asm/arch/sys_proto.h>
13 #include <asm/arch/cpu.h>
14 #include <asm/arch/emc.h>
17 #include "work_92105_display.h"
19 struct emc_dram_settings dram_64mb = {
20 .cmddelay = 0x0001C000,
21 .config0 = 0x00005682,
22 .rascas0 = 0x00000302,
23 .rdconfig = 0x00000011,
39 const struct emc_dram_settings dram_128mb = {
40 .cmddelay = 0x0001C000,
41 .config0 = 0x00005882,
42 .rascas0 = 0x00000302,
43 .rdconfig = 0x00000011,
59 void spl_board_init(void)
61 /* initialize serial port for console */
62 lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART);
63 /* initialize console */
64 preloader_console_init();
65 /* init DDR and NAND to chainload U-Boot */
66 ddr_init(&dram_128mb);
68 * If this is actually a 64MB module, then the highest column
69 * bit in any address will be ignored, and thus address 0x80000000
70 * should be mirrored at address 0x80000800. Test this.
72 writel(0x31415926, 0x80000000); /* write Pi at 0x80000000 */
73 writel(0x16180339, 0x80000800); /* write Phi at 0x80000800 */
74 if (readl(0x80000000) == 0x16180339) /* check 0x80000000 */ {
75 /* actually 64MB mirrored: reconfigure controller */
78 /* initialize NAND controller to load U-Boot from NAND */
79 lpc32xx_mlc_nand_init();
82 u32 spl_boot_device(void)
84 return BOOT_DEVICE_NAND;