2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2012-09-24 08:09:32 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2012 Freescale Semiconductor, Inc.
|
|
|
|
*
|
|
|
|
* Configuration settings for the Freescale i.MX6Q SabreSD board.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MX6QSABRE_COMMON_CONFIG_H
|
|
|
|
#define __MX6QSABRE_COMMON_CONFIG_H
|
|
|
|
|
2020-05-10 17:40:09 +00:00
|
|
|
#include <linux/stringify.h>
|
|
|
|
|
2013-02-26 12:28:29 +00:00
|
|
|
#include "mx6_common.h"
|
|
|
|
|
2012-09-24 08:09:32 +00:00
|
|
|
/* MMC Configs */
|
2022-10-29 00:27:13 +00:00
|
|
|
#define CFG_SYS_FSL_ESDHC_ADDR 0
|
2012-09-24 08:09:32 +00:00
|
|
|
|
2014-01-06 15:27:20 +00:00
|
|
|
#ifdef CONFIG_SUPPORT_EMMC_BOOT
|
|
|
|
#define EMMC_ENV \
|
|
|
|
"emmcdev=2\0" \
|
|
|
|
"update_emmc_firmware=" \
|
|
|
|
"if test ${ip_dyn} = yes; then " \
|
|
|
|
"setenv get_cmd dhcp; " \
|
|
|
|
"else " \
|
|
|
|
"setenv get_cmd tftp; " \
|
|
|
|
"fi; " \
|
|
|
|
"if ${get_cmd} ${update_sd_firmware_filename}; then " \
|
2015-03-03 14:48:41 +00:00
|
|
|
"if mmc dev ${emmcdev} 1; then " \
|
2014-01-06 15:27:20 +00:00
|
|
|
"setexpr fw_sz ${filesize} / 0x200; " \
|
|
|
|
"setexpr fw_sz ${fw_sz} + 1; " \
|
|
|
|
"mmc write ${loadaddr} 0x2 ${fw_sz}; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi\0"
|
|
|
|
#else
|
|
|
|
#define EMMC_ENV ""
|
|
|
|
#endif
|
|
|
|
|
2012-09-24 08:09:32 +00:00
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
|
|
"script=boot.scr\0" \
|
2014-01-16 21:58:03 +00:00
|
|
|
"image=zImage\0" \
|
2019-06-20 20:34:35 +00:00
|
|
|
"fdtfile=undefined\0" \
|
2013-12-16 22:44:04 +00:00
|
|
|
"fdt_addr=0x18000000\0" \
|
2013-01-10 09:45:09 +00:00
|
|
|
"boot_fdt=try\0" \
|
|
|
|
"ip_dyn=yes\0" \
|
2016-10-18 02:12:39 +00:00
|
|
|
"console=" CONSOLE_DEV "\0" \
|
2015-09-23 03:52:33 +00:00
|
|
|
"dfuspi=dfu 0 sf 0:0:10000000:0\0" \
|
|
|
|
"dfu_alt_info_spl=spl raw 0x400\0" \
|
|
|
|
"dfu_alt_info_img=u-boot raw 0x10000\0" \
|
|
|
|
"dfu_alt_info=spl raw 0x400\0" \
|
2012-09-24 08:09:32 +00:00
|
|
|
"fdt_high=0xffffffff\0" \
|
|
|
|
"initrd_high=0xffffffff\0" \
|
2021-08-23 14:25:30 +00:00
|
|
|
"splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
|
2013-01-10 09:00:53 +00:00
|
|
|
"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
|
2013-06-04 15:05:39 +00:00
|
|
|
"mmcpart=1\0" \
|
2017-07-10 18:59:12 +00:00
|
|
|
"finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
|
2013-04-19 03:41:57 +00:00
|
|
|
"update_sd_firmware=" \
|
|
|
|
"if test ${ip_dyn} = yes; then " \
|
|
|
|
"setenv get_cmd dhcp; " \
|
|
|
|
"else " \
|
|
|
|
"setenv get_cmd tftp; " \
|
|
|
|
"fi; " \
|
|
|
|
"if mmc dev ${mmcdev}; then " \
|
|
|
|
"if ${get_cmd} ${update_sd_firmware_filename}; then " \
|
|
|
|
"setexpr fw_sz ${filesize} / 0x200; " \
|
|
|
|
"setexpr fw_sz ${fw_sz} + 1; " \
|
|
|
|
"mmc write ${loadaddr} 0x2 ${fw_sz}; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi\0" \
|
2014-01-06 15:27:20 +00:00
|
|
|
EMMC_ENV \
|
2012-09-24 08:09:32 +00:00
|
|
|
"mmcargs=setenv bootargs console=${console},${baudrate} " \
|
2017-07-10 18:59:12 +00:00
|
|
|
"root=PARTUUID=${uuid} rootwait rw\0" \
|
2012-09-24 08:09:32 +00:00
|
|
|
"loadbootscript=" \
|
2021-02-04 18:00:32 +00:00
|
|
|
"load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script} || " \
|
|
|
|
"load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${script};\0" \
|
2012-09-24 08:09:32 +00:00
|
|
|
"bootscript=echo Running bootscript from mmc ...; " \
|
|
|
|
"source\0" \
|
2021-02-04 18:00:32 +00:00
|
|
|
"loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image} || " \
|
|
|
|
"load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${image}\0" \
|
|
|
|
"loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile} || " \
|
|
|
|
"load mmc ${mmcdev}:${mmcpart} ${fdt_addr} boot/${fdtfile}\0" \
|
2013-01-10 09:45:09 +00:00
|
|
|
"mmcboot=echo Booting from mmc ...; " \
|
2017-07-10 18:59:12 +00:00
|
|
|
"run finduuid; " \
|
2012-09-24 08:09:32 +00:00
|
|
|
"run mmcargs; " \
|
2013-01-10 09:45:09 +00:00
|
|
|
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
|
|
|
"if run loadfdt; then " \
|
2014-01-16 21:58:03 +00:00
|
|
|
"bootz ${loadaddr} - ${fdt_addr}; " \
|
2013-01-10 09:45:09 +00:00
|
|
|
"else " \
|
|
|
|
"if test ${boot_fdt} = try; then " \
|
2014-01-16 21:58:03 +00:00
|
|
|
"bootz; " \
|
2013-01-10 09:45:09 +00:00
|
|
|
"else " \
|
|
|
|
"echo WARN: Cannot load the DT; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else " \
|
2014-01-16 21:58:03 +00:00
|
|
|
"bootz; " \
|
2013-01-10 09:45:09 +00:00
|
|
|
"fi;\0" \
|
2012-09-24 08:09:32 +00:00
|
|
|
"netargs=setenv bootargs console=${console},${baudrate} " \
|
|
|
|
"root=/dev/nfs " \
|
|
|
|
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
|
|
|
|
"netboot=echo Booting from net ...; " \
|
|
|
|
"run netargs; " \
|
2013-01-10 09:45:09 +00:00
|
|
|
"if test ${ip_dyn} = yes; then " \
|
|
|
|
"setenv get_cmd dhcp; " \
|
|
|
|
"else " \
|
|
|
|
"setenv get_cmd tftp; " \
|
|
|
|
"fi; " \
|
2014-01-16 21:58:03 +00:00
|
|
|
"${get_cmd} ${image}; " \
|
2013-01-10 09:45:09 +00:00
|
|
|
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
2019-06-20 20:34:35 +00:00
|
|
|
"if ${get_cmd} ${fdt_addr} ${fdtfile}; then " \
|
2014-01-16 21:58:03 +00:00
|
|
|
"bootz ${loadaddr} - ${fdt_addr}; " \
|
2013-01-10 09:45:09 +00:00
|
|
|
"else " \
|
|
|
|
"if test ${boot_fdt} = try; then " \
|
2014-01-16 21:58:03 +00:00
|
|
|
"bootz; " \
|
2013-01-10 09:45:09 +00:00
|
|
|
"else " \
|
|
|
|
"echo WARN: Cannot load the DT; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else " \
|
2014-01-16 21:58:03 +00:00
|
|
|
"bootz; " \
|
2015-07-11 03:38:46 +00:00
|
|
|
"fi;\0" \
|
|
|
|
"findfdt="\
|
2019-06-20 20:34:35 +00:00
|
|
|
"if test $fdtfile = undefined; then " \
|
imx: mx6qpsabreauto: Add MX6QP SABREAUTO CPU3 board support
1. Add DDR script for mx6qpsabreauto board.
2. On CPU3 board, enet RGMII tx clock is from internal PLL. Set the GPR5[9]
and init the enet pll output to 125Mhz.
3. On CPU3 board, SW1ABC=VDDSOC_IN, SW2=VDDARM_IN.
Build target: mx6qpsabreauto_config
Boot Log:
U-Boot 2015.07-rc2-00071-gfd985ff (Jun 29 2015 - 22:10:55 +0800)
CPU: Freescale i.MX6QP rev1.0 996 MHz (running at 792 MHz)
CPU: Automotive temperature grade (-40C to 125C) at 34C
Reset cause: POR
Board: MX6Q-Sabreauto revA
I2C: ready
DRAM: 2 GiB
PMIC: PFUZE100 ID=0x10
Flash: 32 MiB
NAND: 0 MiB
MMC: FSL_SDHC: 0
*** Warning - bad CRC, using default environment
No panel detected: default to HDMI
Display: HDMI (1024x768)
In: serial
Out: serial
Err: serial
Net: FEC [PRIME]
Hit any key to stop autoboot: 0
Note:
In this patch, we still add a new config mx6qpsabreauto_config,
since SPL is not supported now, and IMX_CONFIG is needed at
build time, so add this config. Future, when SPL is converted,
this config can be removed.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
2015-07-11 03:38:47 +00:00
|
|
|
"if test $board_name = SABREAUTO && test $board_rev = MX6QP; then " \
|
2019-06-20 20:34:35 +00:00
|
|
|
"setenv fdtfile imx6qp-sabreauto.dtb; fi; " \
|
2015-07-11 03:38:46 +00:00
|
|
|
"if test $board_name = SABREAUTO && test $board_rev = MX6Q; then " \
|
2019-06-20 20:34:35 +00:00
|
|
|
"setenv fdtfile imx6q-sabreauto.dtb; fi; " \
|
2015-07-11 03:38:46 +00:00
|
|
|
"if test $board_name = SABREAUTO && test $board_rev = MX6DL; then " \
|
2019-06-20 20:34:35 +00:00
|
|
|
"setenv fdtfile imx6dl-sabreauto.dtb; fi; " \
|
2015-10-15 10:05:59 +00:00
|
|
|
"if test $board_name = SABRESD && test $board_rev = MX6QP; then " \
|
2019-06-20 20:34:35 +00:00
|
|
|
"setenv fdtfile imx6qp-sabresd.dtb; fi; " \
|
2015-07-11 03:38:46 +00:00
|
|
|
"if test $board_name = SABRESD && test $board_rev = MX6Q; then " \
|
2019-06-20 20:34:35 +00:00
|
|
|
"setenv fdtfile imx6q-sabresd.dtb; fi; " \
|
2015-07-11 03:38:46 +00:00
|
|
|
"if test $board_name = SABRESD && test $board_rev = MX6DL; then " \
|
2019-06-20 20:34:35 +00:00
|
|
|
"setenv fdtfile imx6dl-sabresd.dtb; fi; " \
|
|
|
|
"if test $fdtfile = undefined; then " \
|
2015-07-11 03:38:46 +00:00
|
|
|
"echo WARNING: Could not determine dtb to use; fi; " \
|
|
|
|
"fi;\0" \
|
|
|
|
|
2012-09-24 08:09:32 +00:00
|
|
|
/* Physical Memory Map */
|
|
|
|
#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
|
|
|
|
|
|
|
|
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
|
|
|
|
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
|
|
|
|
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
|
|
|
|
|
2015-05-22 16:30:45 +00:00
|
|
|
/* Environment organization */
|
2012-09-24 08:09:32 +00:00
|
|
|
|
2014-09-22 16:55:53 +00:00
|
|
|
/* Framebuffer */
|
|
|
|
#define CONFIG_IMX_HDMI
|
|
|
|
#define CONFIG_IMX_VIDEO_SKIP
|
|
|
|
|
2015-02-26 19:58:55 +00:00
|
|
|
#define CONFIG_USBD_HS
|
|
|
|
|
2012-09-24 08:09:32 +00:00
|
|
|
#endif /* __MX6QSABRE_COMMON_CONFIG_H */
|