2018-05-07 05:58:06 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2013-04-10 17:32:58 +08:00
|
|
|
/*
|
|
|
|
* Copyright 2013 Freescale Semiconductor, Inc.
|
|
|
|
*
|
|
|
|
* Configuration settings for the Freescale i.MX6SL EVK board.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CONFIG_H
|
|
|
|
#define __CONFIG_H
|
|
|
|
|
2014-01-09 18:57:12 +08:00
|
|
|
#include "mx6_common.h"
|
2013-04-10 17:32:58 +08:00
|
|
|
|
2015-08-17 16:11:05 +08:00
|
|
|
#ifdef CONFIG_SPL
|
|
|
|
#include "imx6_spl.h"
|
|
|
|
#endif
|
|
|
|
|
2017-01-26 09:42:36 +08:00
|
|
|
#define CONFIG_MACH_TYPE MACH_TYPE_MX6SL_EVK
|
2013-04-10 17:32:58 +08:00
|
|
|
|
|
|
|
/* Size of malloc() pool */
|
|
|
|
#define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M)
|
|
|
|
|
|
|
|
#define CONFIG_MXC_UART
|
|
|
|
#define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR
|
|
|
|
|
|
|
|
/* MMC Configs */
|
2014-09-15 14:59:18 +08:00
|
|
|
#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
|
2013-04-10 17:32:58 +08:00
|
|
|
|
2015-02-12 09:36:28 +08:00
|
|
|
/* I2C Configs */
|
|
|
|
#define CONFIG_SYS_I2C_MXC
|
2015-09-22 04:43:38 +08:00
|
|
|
#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
|
|
|
|
#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
|
2015-03-21 01:20:40 +08:00
|
|
|
#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
|
2015-02-12 09:36:28 +08:00
|
|
|
#define CONFIG_SYS_I2C_SPEED 100000
|
|
|
|
|
2013-09-13 11:36:28 +08:00
|
|
|
#define CONFIG_FEC_MXC
|
|
|
|
#define CONFIG_MII
|
|
|
|
#define IMX_FEC_BASE ENET_BASE_ADDR
|
|
|
|
#define CONFIG_FEC_XCV_TYPE RMII
|
|
|
|
#define CONFIG_FEC_MXC_PHYADDR 0
|
|
|
|
|
|
|
|
#define CONFIG_PHY_SMSC
|
|
|
|
|
2013-04-10 17:32:58 +08:00
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
|
|
"script=boot.scr\0" \
|
2014-01-17 05:58:04 +08:00
|
|
|
"image=zImage\0" \
|
2013-04-10 17:32:58 +08:00
|
|
|
"console=ttymxc0\0" \
|
|
|
|
"fdt_high=0xffffffff\0" \
|
|
|
|
"initrd_high=0xffffffff\0" \
|
|
|
|
"fdt_file=imx6sl-evk.dtb\0" \
|
2014-01-22 22:23:32 +08:00
|
|
|
"fdt_addr=0x88000000\0" \
|
2013-04-10 17:32:58 +08:00
|
|
|
"boot_fdt=try\0" \
|
|
|
|
"ip_dyn=yes\0" \
|
2014-11-04 15:26:04 +08:00
|
|
|
"mmcdev=1\0" \
|
2013-06-29 05:52:41 +08:00
|
|
|
"mmcpart=1\0" \
|
2017-10-02 21:11:37 +08:00
|
|
|
"finduuid=part uuid mmc 1:2 uuid\0" \
|
2013-04-10 17:32:58 +08:00
|
|
|
"mmcargs=setenv bootargs console=${console},${baudrate} " \
|
2017-10-02 21:11:37 +08:00
|
|
|
"root=PARTUUID=${uuid} rootwait rw\0" \
|
2013-04-10 17:32:58 +08:00
|
|
|
"loadbootscript=" \
|
|
|
|
"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
|
|
|
|
"bootscript=echo Running bootscript from mmc ...; " \
|
|
|
|
"source\0" \
|
2014-01-17 05:58:04 +08:00
|
|
|
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
|
2013-04-10 17:32:58 +08:00
|
|
|
"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
|
|
|
|
"mmcboot=echo Booting from mmc ...; " \
|
2017-10-02 21:11:37 +08:00
|
|
|
"run finduuid; " \
|
2013-04-10 17:32:58 +08:00
|
|
|
"run mmcargs; " \
|
|
|
|
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
|
|
|
"if run loadfdt; then " \
|
2014-01-17 05:58:04 +08:00
|
|
|
"bootz ${loadaddr} - ${fdt_addr}; " \
|
2013-04-10 17:32:58 +08:00
|
|
|
"else " \
|
|
|
|
"if test ${boot_fdt} = try; then " \
|
2014-01-17 05:58:04 +08:00
|
|
|
"bootz; " \
|
2013-04-10 17:32:58 +08:00
|
|
|
"else " \
|
|
|
|
"echo WARN: Cannot load the DT; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else " \
|
2014-01-17 05:58:04 +08:00
|
|
|
"bootz; " \
|
2013-04-10 17:32:58 +08:00
|
|
|
"fi;\0" \
|
|
|
|
"netargs=setenv bootargs console=${console},${baudrate} " \
|
|
|
|
"root=/dev/nfs " \
|
|
|
|
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
|
|
|
|
"netboot=echo Booting from net ...; " \
|
|
|
|
"run netargs; " \
|
|
|
|
"if test ${ip_dyn} = yes; then " \
|
|
|
|
"setenv get_cmd dhcp; " \
|
|
|
|
"else " \
|
|
|
|
"setenv get_cmd tftp; " \
|
|
|
|
"fi; " \
|
2014-01-17 05:58:04 +08:00
|
|
|
"${get_cmd} ${image}; " \
|
2013-04-10 17:32:58 +08:00
|
|
|
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
|
|
|
"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
|
2014-01-17 05:58:04 +08:00
|
|
|
"bootz ${loadaddr} - ${fdt_addr}; " \
|
2013-04-10 17:32:58 +08:00
|
|
|
"else " \
|
|
|
|
"if test ${boot_fdt} = try; then " \
|
2014-01-17 05:58:04 +08:00
|
|
|
"bootz; " \
|
2013-04-10 17:32:58 +08:00
|
|
|
"else " \
|
|
|
|
"echo WARN: Cannot load the DT; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else " \
|
2014-01-17 05:58:04 +08:00
|
|
|
"bootz; " \
|
2013-04-10 17:32:58 +08:00
|
|
|
"fi;\0"
|
|
|
|
|
|
|
|
#define CONFIG_BOOTCOMMAND \
|
|
|
|
"mmc dev ${mmcdev};" \
|
|
|
|
"mmc dev ${mmcdev}; if mmc rescan; then " \
|
|
|
|
"if run loadbootscript; then " \
|
|
|
|
"run bootscript; " \
|
|
|
|
"else " \
|
2014-01-17 05:58:04 +08:00
|
|
|
"if run loadimage; then " \
|
2013-04-10 17:32:58 +08:00
|
|
|
"run mmcboot; " \
|
|
|
|
"else run netboot; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else run netboot; fi"
|
|
|
|
|
|
|
|
/* Miscellaneous configurable options */
|
|
|
|
#define CONFIG_SYS_MEMTEST_START 0x80000000
|
|
|
|
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_512M)
|
|
|
|
|
|
|
|
/* Physical Memory Map */
|
|
|
|
#define CONFIG_NR_DRAM_BANKS 1
|
|
|
|
#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
|
|
|
|
|
|
|
|
#define CONFIG_SYS_INIT_SP_OFFSET \
|
|
|
|
(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
|
|
|
|
#define CONFIG_SYS_INIT_SP_ADDR \
|
|
|
|
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
|
|
|
|
|
2015-05-23 00:30:45 +08:00
|
|
|
/* Environment organization */
|
2013-04-10 17:32:58 +08:00
|
|
|
#define CONFIG_ENV_SIZE SZ_8K
|
2014-12-30 11:14:51 +08:00
|
|
|
|
2017-03-04 10:45:42 +08:00
|
|
|
#if defined CONFIG_SPI_BOOT
|
2014-12-30 11:14:51 +08:00
|
|
|
#define CONFIG_ENV_OFFSET (768 * 1024)
|
|
|
|
#define CONFIG_ENV_SECT_SIZE (64 * 1024)
|
|
|
|
#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
|
|
|
|
#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
|
|
|
|
#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
|
|
|
|
#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
|
|
|
|
#else
|
2015-01-16 16:47:44 +08:00
|
|
|
#define CONFIG_ENV_OFFSET (8 * SZ_64K)
|
2014-12-30 11:14:51 +08:00
|
|
|
#endif
|
2013-04-10 17:32:58 +08:00
|
|
|
|
2014-04-11 19:39:43 +08:00
|
|
|
#ifdef CONFIG_CMD_SF
|
|
|
|
#define CONFIG_SF_DEFAULT_BUS 0
|
spi: mxc: fix sf probe when using mxc_spi
MXC SPI driver has a feature whereas a GPIO line can be used to force CS high
across multiple transactions. This is set up by embedding the GPIO information
in the CS value:
cs = (cs | gpio << 8)
This merge of cs and gpio data into one value breaks the sf probe command:
if the use of gpio is required, invoking "sf probe <cs>" will not work, because
the CS argument doesn't have the GPIO information in it. Instead, the user must
use "sf probe <cs | gpio << 8>". For example, if bank 2 gpio 30 is used to force
cs high on cs 0, bus 0, then instead of typing "sf probe 0" the user now must
type "sf probe 15872".
This is inconsistent with the description of the sf probe command, and forces
the user to be aware of implementaiton details.
Fix this by introducing a new board function: board_spi_cs_gpio(), which will
accept a naked CS value, and provide the driver with the relevant GPIO, if one
is necessary.
Cc: Eric Nelson <eric.nelson@boundarydevices.com>
Cc: Eric Benard <eric@eukrea.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Marek Vasut <marex@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
2014-08-20 20:08:50 +08:00
|
|
|
#define CONFIG_SF_DEFAULT_CS 0
|
2014-04-11 19:39:43 +08:00
|
|
|
#define CONFIG_SF_DEFAULT_SPEED 20000000
|
|
|
|
#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
|
|
|
|
#endif
|
|
|
|
|
2014-11-10 08:50:41 +08:00
|
|
|
/* USB Configs */
|
|
|
|
#ifdef CONFIG_CMD_USB
|
|
|
|
#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
|
|
|
|
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
|
|
|
|
#define CONFIG_MXC_USB_FLAGS 0
|
|
|
|
#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
|
|
|
|
#endif
|
|
|
|
|
2014-10-30 18:30:54 +08:00
|
|
|
#define CONFIG_SYS_FSL_USDHC_NUM 3
|
|
|
|
#if defined(CONFIG_ENV_IS_IN_MMC)
|
|
|
|
#define CONFIG_SYS_MMC_ENV_DEV 1 /* SDHC2*/
|
|
|
|
#endif
|
|
|
|
|
2015-09-03 02:54:13 +08:00
|
|
|
#define CONFIG_IMX_THERMAL
|
2015-03-10 15:33:25 +08:00
|
|
|
|
2013-04-10 17:32:58 +08:00
|
|
|
#endif /* __CONFIG_H */
|