blob: b5b342b3538361cfcc3dbd71ef5275e1b604a70a [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Fabio Estevame2d282a2013-03-15 10:43:48 +00002/*
3 * Copyright (C) 2013 Freescale Semiconductor, Inc.
4 *
5 * Configuration settings for the Wandboard.
Fabio Estevame2d282a2013-03-15 10:43:48 +00006 */
7
8#ifndef __CONFIG_H
9#define __CONFIG_H
10
Eric Nelson02824dc2013-11-26 17:40:30 -070011#include "mx6_common.h"
Fabio Estevame2d282a2013-03-15 10:43:48 +000012
Tom Rini4db38662022-12-04 10:04:55 -050013#define CFG_MXC_UART_BASE UART1_BASE
Fabio Estevame2d282a2013-03-15 10:43:48 +000014
Fabio Estevame2d282a2013-03-15 10:43:48 +000015/* MMC Configuration */
Tom Rini6cc04542022-10-28 20:27:13 -040016#define CFG_SYS_FSL_USDHC_NUM 2
17#define CFG_SYS_FSL_ESDHC_ADDR 0
Fabio Estevame2d282a2013-03-15 10:43:48 +000018
Tom Rini0613c362022-12-04 10:03:50 -050019#define CFG_EXTRA_ENV_SETTINGS \
Otavio Salvador97294a42018-06-11 15:08:04 -030020 "console=ttymxc0\0" \
Otavio Salvadord727ab32013-07-20 17:21:19 -030021 "splashpos=m,m\0" \
Tom Rini72d81362021-08-23 10:25:30 -040022 "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Fabio Estevam0d1ea052015-05-11 20:50:22 -030023 "fdtfile=undefined\0" \
Fabio Estevame2d282a2013-03-15 10:43:48 +000024 "fdt_high=0xffffffff\0" \
25 "initrd_high=0xffffffff\0" \
Vagrant Cascadianacc6bb52015-10-27 12:49:40 -070026 "fdt_addr_r=0x18000000\0" \
Otavio Salvador6584a1b2013-12-16 20:44:04 -020027 "fdt_addr=0x18000000\0" \
Fabio Estevame2d282a2013-03-15 10:43:48 +000028 "ip_dyn=yes\0" \
Otavio Salvador1e1cbde2013-04-19 03:41:59 +000029 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
Fabio Berton84b46902017-07-10 17:04:09 -030030 "finduuid=part uuid mmc 0:1 uuid\0" \
Otavio Salvador0798d572013-04-19 03:42:00 +000031 "update_sd_firmware_filename=u-boot.imx\0" \
32 "update_sd_firmware=" \
33 "if test ${ip_dyn} = yes; then " \
34 "setenv get_cmd dhcp; " \
35 "else " \
36 "setenv get_cmd tftp; " \
37 "fi; " \
38 "if mmc dev ${mmcdev}; then " \
39 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
40 "setexpr fw_sz ${filesize} / 0x200; " \
41 "setexpr fw_sz ${fw_sz} + 1; " \
42 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
43 "fi; " \
44 "fi\0" \
Fabio Estevam0d1ea052015-05-11 20:50:22 -030045 "findfdt="\
Fabio Estevame1f07152017-10-14 09:17:54 -030046 "if test $board_name = D1 && test $board_rev = MX6QP ; then " \
47 "setenv fdtfile imx6qp-wandboard-revd1.dtb; fi; " \
Fabio Estevam066d97c2017-10-02 15:47:29 -030048 "if test $board_name = D1 && test $board_rev = MX6Q ; then " \
49 "setenv fdtfile imx6q-wandboard-revd1.dtb; fi; " \
50 "if test $board_name = D1 && test $board_rev = MX6DL ; then " \
51 "setenv fdtfile imx6dl-wandboard-revd1.dtb; fi; " \
Fabio Estevam9a8804a2015-05-21 19:24:05 -030052 "if test $board_name = C1 && test $board_rev = MX6Q ; then " \
Fabio Estevam0d1ea052015-05-11 20:50:22 -030053 "setenv fdtfile imx6q-wandboard.dtb; fi; " \
Fabio Estevam9a8804a2015-05-21 19:24:05 -030054 "if test $board_name = C1 && test $board_rev = MX6DL ; then " \
Fabio Estevam0d1ea052015-05-11 20:50:22 -030055 "setenv fdtfile imx6dl-wandboard.dtb; fi; " \
Fabio Estevam9a8804a2015-05-21 19:24:05 -030056 "if test $board_name = B1 && test $board_rev = MX6Q ; then " \
57 "setenv fdtfile imx6q-wandboard-revb1.dtb; fi; " \
58 "if test $board_name = B1 && test $board_rev = MX6DL ; then " \
59 "setenv fdtfile imx6dl-wandboard-revb1.dtb; fi; " \
Fabio Estevam0d1ea052015-05-11 20:50:22 -030060 "if test $fdtfile = undefined; then " \
61 "echo WARNING: Could not determine dtb to use; fi; \0" \
Tom Rini72d81362021-08-23 10:25:30 -040062 "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
63 "pxefile_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Vagrant Cascadianacc6bb52015-10-27 12:49:40 -070064 "ramdisk_addr_r=0x13000000\0" \
65 "ramdiskaddr=0x13000000\0" \
Tom Rini72d81362021-08-23 10:25:30 -040066 "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Vagrant Cascadianacc6bb52015-10-27 12:49:40 -070067 BOOTENV
68
69#define BOOT_TARGET_DEVICES(func) \
70 func(MMC, mmc, 0) \
71 func(MMC, mmc, 1) \
Heinrich Schuchardtc2f3dad2019-06-23 09:49:43 +020072 func(MMC, mmc, 2) \
Vagrant Cascadian3b225992017-07-27 12:46:24 -040073 func(SATA, sata, 0) \
Vagrant Cascadianacc6bb52015-10-27 12:49:40 -070074 func(USB, usb, 0) \
75 func(PXE, pxe, na) \
76 func(DHCP, dhcp, na)
Fabio Estevame2d282a2013-03-15 10:43:48 +000077
Vagrant Cascadianacc6bb52015-10-27 12:49:40 -070078#include <config_distro_bootcmd.h>
Simon Glass1af3c7f2020-05-10 11:40:09 -060079#include <linux/stringify.h>
Fabio Estevame2d282a2013-03-15 10:43:48 +000080
Fabio Estevame2d282a2013-03-15 10:43:48 +000081/* Physical Memory Map */
Fabio Estevame2d282a2013-03-15 10:43:48 +000082#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
83
Tom Riniaa6e94d2022-11-16 13:10:37 -050084#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
Tom Rini65cc0e22022-11-16 13:10:41 -050085#define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
86#define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
Fabio Estevame2d282a2013-03-15 10:43:48 +000087
Peter Robinson056845c2015-05-22 17:30:45 +010088/* Environment organization */
Fabio Estevame2d282a2013-03-15 10:43:48 +000089
Fabio Estevame2d282a2013-03-15 10:43:48 +000090#endif /* __CONFIG_H * */