1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 3 /* 4 * Menlosystems M53Menlo configuration 5 * Copyright (C) 2012-2017 Marek Vasut <marex@denx.de> 6 * Copyright (C) 2014-2017 Olaf Mandel <o.mandel@menlosystems.com> 7 */ 8 9 #ifndef __M53MENLO_CONFIG_H__ 10 #define __M53MENLO_CONFIG_H__ 11 12 #include <asm/arch/imx-regs.h> 13 14 /* 15 * Memory configurations 16 */ 17 #define PHYS_SDRAM_1 CSD0_BASE_ADDR 18 #define PHYS_SDRAM_1_SIZE (gd->bd->bi_dram[0].size) 19 #define PHYS_SDRAM_2 CSD1_BASE_ADDR 20 #define PHYS_SDRAM_2_SIZE (gd->bd->bi_dram[1].size) 21 #define PHYS_SDRAM_SIZE (gd->ram_size) 22 23 #define CFG_SYS_SDRAM_BASE (PHYS_SDRAM_1) 24 #define CFG_SYS_INIT_RAM_ADDR (IRAM_BASE_ADDR) 25 #define CFG_SYS_INIT_RAM_SIZE (IRAM_SIZE) 26 27 /* 28 * U-Boot general configurations 29 */ 30 31 /* 32 * Serial Driver 33 */ 34 #define CFG_MXC_UART_BASE UART1_BASE 35 36 /* 37 * MMC Driver 38 */ 39 #ifdef CONFIG_CMD_MMC 40 #define CFG_SYS_FSL_ESDHC_ADDR 0 41 #endif 42 43 /* 44 * NAND 45 */ 46 #ifdef CONFIG_CMD_NAND 47 #define CFG_SYS_NAND_BASE NFC_BASE_ADDR_AXI 48 #define CFG_MXC_NAND_REGS_BASE NFC_BASE_ADDR_AXI 49 #define CFG_MXC_NAND_IP_REGS_BASE NFC_BASE_ADDR 50 #define CFG_SYS_NAND_LARGEPAGE 51 #endif 52 53 /* 54 * Ethernet on SOC (FEC) 55 */ 56 #ifdef CONFIG_CMD_NET 57 #define CFG_FEC_MXC_PHYADDR 0x0 58 #endif 59 60 /* 61 * RTC 62 */ 63 #ifdef CONFIG_CMD_DATE 64 #define CFG_SYS_I2C_RTC_ADDR 0x68 65 #endif 66 67 /* 68 * USB 69 */ 70 #ifdef CONFIG_CMD_USB 71 #define CFG_MXC_USB_FLAGS 0 72 #endif 73 74 /* LVDS display */ 75 #define CFG_SYS_LDB_CLOCK 33260000 76 77 /* Watchdog */ 78 79 /* 80 * Extra Environments 81 */ 82 83 #define CFG_EXTRA_ENV_SETTINGS \ 84 "consdev=ttymxc0\0" \ 85 "baudrate=115200\0" \ 86 "bootscript=boot.scr\0" \ 87 "mmcdev=0\0" \ 88 "mmcpart=1\0" \ 89 "rootpath=/srv/\0" \ 90 "kernel_addr_r=0x72000000\0" \ 91 "netdev=eth0\0" \ 92 "splashsource=mmc_fs\0" \ 93 "splashfile=boot/usplash.bmp.gz\0" \ 94 "splashimage=0x88000000\0" \ 95 "splashpos=m,m\0" \ 96 "stdout=serial,vidconsole\0" \ 97 "stderr=serial,vidconsole\0" \ 98 "addcons=" \ 99 "setenv bootargs ${bootargs} " \ 100 "console=${consdev},${baudrate}\0" \ 101 "addip=" \ 102 "setenv bootargs ${bootargs} " \ 103 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ 104 ":${hostname}:${netdev}:off\0" \ 105 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ 106 "addmisc=" \ 107 "setenv bootargs ${bootargs} ${miscargs}\0" \ 108 "addargs=run addcons addmisc addmtd\0" \ 109 "mmcload=" \ 110 "mmc rescan || reset ; load mmc ${mmcdev}:${mmcpart} " \ 111 "${kernel_addr_r} boot/${bootfile} || reset\0" \ 112 "miscargs=nohlt panic=1\0" \ 113 "mmcargs=setenv bootargs root=/dev/mmcblk0p${mmcpart} rw " \ 114 "rootwait\0" \ 115 "mmc_mmc=" \ 116 "run mmcload mmcargs addargs || reset ; " \ 117 "bootm ${kernel_addr_r} ; reset\0" \ 118 "netload=tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \ 119 "net_nfs=" \ 120 "run netload nfsargs addip addargs ; " \ 121 "bootm ${kernel_addr_r}\0" \ 122 "nfsargs=" \ 123 "setenv bootargs root=/dev/nfs rw " \ 124 "nfsroot=${serverip}:${rootpath}${hostname},v3,tcp\0" \ 125 "try_bootscript=" \ 126 "mmc rescan;" \ 127 "if test -e mmc 0:1 ${bootscript} ; then " \ 128 "if load mmc 0:1 ${kernel_addr_r} ${bootscript};" \ 129 "then ; " \ 130 "echo Running bootscript... ; " \ 131 "source ${kernel_addr_r} ; " \ 132 "fi ; " \ 133 "fi\0" 134 135 #endif /* __M53MENLO_CONFIG_H__ */ 136