blob: 92ce741768d66ce49d99c6e95e6214a47212845f [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Adrian Alonso98810772015-09-03 11:49:28 -05002/*
3 * Copyright (C) 2015 Freescale Semiconductor, Inc.
4 *
5 * Configuration settings for the Freescale i.MX7D SABRESD board.
Adrian Alonso98810772015-09-03 11:49:28 -05006 */
7
8#ifndef __MX7D_SABRESD_CONFIG_H
9#define __MX7D_SABRESD_CONFIG_H
10
11#include "mx7_common.h"
12
Adrian Alonso98810772015-09-03 11:49:28 -050013#define PHYS_SDRAM_SIZE SZ_1G
14
Fabio Estevam82bf1a02016-02-22 18:41:48 -030015#define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR
16
Adrian Alonso98810772015-09-03 11:49:28 -050017/* MMC Config*/
18#define CONFIG_SYS_FSL_ESDHC_ADDR 0
19
Adrian Alonso98810772015-09-03 11:49:28 -050020#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
21
Peng Fan48509ae2016-01-28 16:55:08 +080022#ifdef CONFIG_IMX_BOOTAUX
23/* Set to QSPI1 A flash at default */
24#define CONFIG_SYS_AUXCORE_BOOTDATA 0x60000000
Peng Fan48509ae2016-01-28 16:55:08 +080025
26#define UPDATE_M4_ENV \
27 "m4image=m4_qspi.bin\0" \
28 "loadm4image=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4image}\0" \
29 "update_m4_from_sd=" \
30 "if sf probe 0:0; then " \
31 "if run loadm4image; then " \
32 "setexpr fw_sz ${filesize} + 0xffff; " \
33 "setexpr fw_sz ${fw_sz} / 0x10000; " \
34 "setexpr fw_sz ${fw_sz} * 0x10000; " \
35 "sf erase 0x0 ${fw_sz}; " \
36 "sf write ${loadaddr} 0x0 ${filesize}; " \
37 "fi; " \
38 "fi\0" \
39 "m4boot=sf probe 0:0; bootaux "__stringify(CONFIG_SYS_AUXCORE_BOOTDATA)"\0"
40#else
41#define UPDATE_M4_ENV ""
42#endif
43
Adrian Alonso98810772015-09-03 11:49:28 -050044#define CONFIG_MFG_ENV_SETTINGS \
45 "mfgtool_args=setenv bootargs console=${console},${baudrate} " \
46 "rdinit=/linuxrc " \
47 "g_mass_storage.stall=0 g_mass_storage.removable=1 " \
48 "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\
49 "g_mass_storage.iSerialNumber=\"\" "\
50 "clk_ignore_unused "\
51 "\0" \
52 "initrd_addr=0x83800000\0" \
53 "initrd_high=0xffffffff\0" \
54 "bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};\0" \
55
Tzu-Jung Lee7db27142015-10-27 23:00:50 +000056#define CONFIG_DFU_ENV_SETTINGS \
57 "dfu_alt_info=image raw 0 0x800000;"\
58 "u-boot raw 0 0x4000;"\
59 "bootimg part 0 1;"\
60 "rootfs part 0 2\0" \
61
Adrian Alonso98810772015-09-03 11:49:28 -050062#define CONFIG_EXTRA_ENV_SETTINGS \
Peng Fan48509ae2016-01-28 16:55:08 +080063 UPDATE_M4_ENV \
Adrian Alonso98810772015-09-03 11:49:28 -050064 CONFIG_MFG_ENV_SETTINGS \
Tzu-Jung Lee7db27142015-10-27 23:00:50 +000065 CONFIG_DFU_ENV_SETTINGS \
Adrian Alonso98810772015-09-03 11:49:28 -050066 "script=boot.scr\0" \
67 "image=zImage\0" \
68 "console=ttymxc0\0" \
69 "fdt_high=0xffffffff\0" \
Joris Offouga9e75d142019-12-08 18:02:31 +010070 "finduuid=part uuid mmc 0:1 uuid\0" \
Adrian Alonso98810772015-09-03 11:49:28 -050071 "initrd_high=0xffffffff\0" \
Joris Offouga9e75d142019-12-08 18:02:31 +010072 "fdtfile=imx7d-sdb.dtb\0" \
Adrian Alonso98810772015-09-03 11:49:28 -050073 "fdt_addr=0x83000000\0" \
Joris Offouga9e75d142019-12-08 18:02:31 +010074 "fdt_addr_r=0x83000000\0" \
Tom Rini9004ee02021-08-23 10:25:30 -040075 "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
76 "pxefile_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Jan Kiszka2a6f0e62020-03-16 12:50:09 +010077 "ramdisk_addr_r=0x83100000\0" \
78 "ramdiskaddr=0x83100000\0" \
Tom Rini9004ee02021-08-23 10:25:30 -040079 "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Peng Fan55be1ed2015-10-29 15:54:53 +080080 "videomode=video=ctfb:x:480,y:272,depth:24,pclk:108695,le:8,ri:4,up:2,lo:4,hs:41,vs:10,sync:0,vmode:0\0" \
Joris Offouga9e75d142019-12-08 18:02:31 +010081 BOOTENV
Adrian Alonso98810772015-09-03 11:49:28 -050082
Joris Offouga9e75d142019-12-08 18:02:31 +010083#define BOOT_TARGET_DEVICES(func) \
84 func(MMC, mmc, 0) \
85 func(DHCP, dhcp, na) \
86 func(PXE, pxe, na)
87
88#include <config_distro_bootcmd.h>
Adrian Alonso98810772015-09-03 11:49:28 -050089
Adrian Alonso98810772015-09-03 11:49:28 -050090#define CONFIG_SYS_HZ 1000
91
Adrian Alonso98810772015-09-03 11:49:28 -050092/* Physical Memory Map */
Adrian Alonso98810772015-09-03 11:49:28 -050093#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
94
95#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
96#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
97#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
98
99#define CONFIG_SYS_INIT_SP_OFFSET \
100 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
101#define CONFIG_SYS_INIT_SP_ADDR \
102 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
103
Masahiro Yamada8cea9b52017-02-11 22:43:54 +0900104/* environment organization */
Peng Fan62f92602015-12-22 17:04:24 +0800105
106/*
107 * If want to use nand, define CONFIG_NAND_MXS and rework board
108 * to support nand, since emmc has pin conflicts with nand
109 */
110#ifdef CONFIG_NAND_MXS
Peng Fan62f92602015-12-22 17:04:24 +0800111/* NAND stuff */
112#define CONFIG_SYS_MAX_NAND_DEVICE 1
113#define CONFIG_SYS_NAND_BASE 0x40000000
Peng Fan62f92602015-12-22 17:04:24 +0800114
115/* DMA stuff, needed for GPMI/MXS NAND support */
Peng Fan62f92602015-12-22 17:04:24 +0800116#endif
117
Peng Fan62f92602015-12-22 17:04:24 +0800118#ifdef CONFIG_NAND_MXS
119#define CONFIG_SYS_FSL_USDHC_NUM 1
120#else
Adrian Alonso98810772015-09-03 11:49:28 -0500121#define CONFIG_SYS_FSL_USDHC_NUM 2
Peng Fan62f92602015-12-22 17:04:24 +0800122#endif
Adrian Alonso98810772015-09-03 11:49:28 -0500123
Adrian Alonso98810772015-09-03 11:49:28 -0500124/* USB Configs */
Adrian Alonso98810772015-09-03 11:49:28 -0500125#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
Adrian Alonso98810772015-09-03 11:49:28 -0500126
Tzu-Jung Lee7db27142015-10-27 23:00:50 +0000127#define CONFIG_USBD_HS
Tzu-Jung Lee7db27142015-10-27 23:00:50 +0000128
Anatolij Gustschine22e08e2021-10-04 17:33:12 +0200129#ifdef CONFIG_DM_VIDEO
Peng Fan55be1ed2015-10-29 15:54:53 +0800130#define CONFIG_VIDEO_LOGO
Peng Fan55be1ed2015-10-29 15:54:53 +0800131#define CONFIG_VIDEO_BMP_LOGO
132#endif
133
Adrian Alonso98810772015-09-03 11:49:28 -0500134#endif /* __CONFIG_H */