2013-04-10 09:32:58 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2013 Freescale Semiconductor, Inc.
|
|
|
|
*
|
|
|
|
* Configuration settings for the Freescale i.MX6SL EVK board.
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2013-04-10 09:32:58 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CONFIG_H
|
|
|
|
#define __CONFIG_H
|
|
|
|
|
2014-01-09 10:57:12 +00:00
|
|
|
#include "mx6_common.h"
|
2013-04-10 09:32:58 +00:00
|
|
|
|
2015-08-17 08:11:05 +00:00
|
|
|
#ifdef CONFIG_SPL
|
|
|
|
#define CONFIG_SPL_LIBCOMMON_SUPPORT
|
|
|
|
#define CONFIG_SPL_MMC_SUPPORT
|
|
|
|
#include "imx6_spl.h"
|
|
|
|
#endif
|
|
|
|
|
2013-04-10 09:32:58 +00:00
|
|
|
#define MACH_TYPE_MX6SLEVK 4307
|
|
|
|
#define CONFIG_MACH_TYPE MACH_TYPE_MX6SLEVK
|
|
|
|
|
|
|
|
/* Size of malloc() pool */
|
|
|
|
#define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M)
|
|
|
|
|
|
|
|
#define CONFIG_BOARD_EARLY_INIT_F
|
|
|
|
|
|
|
|
#define CONFIG_MXC_UART
|
|
|
|
#define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR
|
|
|
|
|
|
|
|
/* MMC Configs */
|
2014-09-15 06:59:18 +00:00
|
|
|
#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
|
2013-04-10 09:32:58 +00:00
|
|
|
|
2015-02-12 01:36:28 +00:00
|
|
|
/* I2C Configs */
|
|
|
|
#define CONFIG_CMD_I2C
|
|
|
|
#define CONFIG_SYS_I2C
|
|
|
|
#define CONFIG_SYS_I2C_MXC
|
2015-03-20 17:20:40 +00:00
|
|
|
#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
|
2015-02-12 01:36:28 +00:00
|
|
|
#define CONFIG_SYS_I2C_SPEED 100000
|
|
|
|
|
|
|
|
/* PMIC */
|
|
|
|
#define CONFIG_POWER
|
|
|
|
#define CONFIG_POWER_I2C
|
|
|
|
#define CONFIG_POWER_PFUZE100
|
|
|
|
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
|
|
|
|
|
2013-09-13 03:36:28 +00:00
|
|
|
#define CONFIG_CMD_PING
|
|
|
|
#define CONFIG_CMD_DHCP
|
|
|
|
#define CONFIG_CMD_MII
|
|
|
|
#define CONFIG_FEC_MXC
|
|
|
|
#define CONFIG_MII
|
|
|
|
#define IMX_FEC_BASE ENET_BASE_ADDR
|
|
|
|
#define CONFIG_FEC_XCV_TYPE RMII
|
|
|
|
#define CONFIG_ETHPRIME "FEC"
|
|
|
|
#define CONFIG_FEC_MXC_PHYADDR 0
|
|
|
|
|
|
|
|
#define CONFIG_PHYLIB
|
|
|
|
#define CONFIG_PHY_SMSC
|
|
|
|
|
2013-04-10 09:32:58 +00:00
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
|
|
"script=boot.scr\0" \
|
2014-01-16 21:58:04 +00:00
|
|
|
"image=zImage\0" \
|
2013-04-10 09:32:58 +00:00
|
|
|
"console=ttymxc0\0" \
|
|
|
|
"fdt_high=0xffffffff\0" \
|
|
|
|
"initrd_high=0xffffffff\0" \
|
|
|
|
"fdt_file=imx6sl-evk.dtb\0" \
|
2014-01-22 14:23:32 +00:00
|
|
|
"fdt_addr=0x88000000\0" \
|
2013-04-10 09:32:58 +00:00
|
|
|
"boot_fdt=try\0" \
|
|
|
|
"ip_dyn=yes\0" \
|
2014-11-04 07:26:04 +00:00
|
|
|
"mmcdev=1\0" \
|
2013-06-28 21:52:41 +00:00
|
|
|
"mmcpart=1\0" \
|
|
|
|
"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
|
2013-04-10 09:32:58 +00:00
|
|
|
"mmcargs=setenv bootargs console=${console},${baudrate} " \
|
|
|
|
"root=${mmcroot}\0" \
|
|
|
|
"loadbootscript=" \
|
|
|
|
"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
|
|
|
|
"bootscript=echo Running bootscript from mmc ...; " \
|
|
|
|
"source\0" \
|
2014-01-16 21:58:04 +00:00
|
|
|
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
|
2013-04-10 09:32:58 +00:00
|
|
|
"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
|
|
|
|
"mmcboot=echo Booting from mmc ...; " \
|
|
|
|
"run mmcargs; " \
|
|
|
|
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
|
|
|
"if run loadfdt; then " \
|
2014-01-16 21:58:04 +00:00
|
|
|
"bootz ${loadaddr} - ${fdt_addr}; " \
|
2013-04-10 09:32:58 +00:00
|
|
|
"else " \
|
|
|
|
"if test ${boot_fdt} = try; then " \
|
2014-01-16 21:58:04 +00:00
|
|
|
"bootz; " \
|
2013-04-10 09:32:58 +00:00
|
|
|
"else " \
|
|
|
|
"echo WARN: Cannot load the DT; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else " \
|
2014-01-16 21:58:04 +00:00
|
|
|
"bootz; " \
|
2013-04-10 09:32:58 +00: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-16 21:58:04 +00:00
|
|
|
"${get_cmd} ${image}; " \
|
2013-04-10 09:32:58 +00:00
|
|
|
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
|
|
|
"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
|
2014-01-16 21:58:04 +00:00
|
|
|
"bootz ${loadaddr} - ${fdt_addr}; " \
|
2013-04-10 09:32:58 +00:00
|
|
|
"else " \
|
|
|
|
"if test ${boot_fdt} = try; then " \
|
2014-01-16 21:58:04 +00:00
|
|
|
"bootz; " \
|
2013-04-10 09:32:58 +00:00
|
|
|
"else " \
|
|
|
|
"echo WARN: Cannot load the DT; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else " \
|
2014-01-16 21:58:04 +00:00
|
|
|
"bootz; " \
|
2013-04-10 09:32:58 +00: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-16 21:58:04 +00:00
|
|
|
"if run loadimage; then " \
|
2013-04-10 09:32:58 +00: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)
|
|
|
|
|
|
|
|
#define CONFIG_STACKSIZE SZ_128K
|
|
|
|
|
|
|
|
/* Physical Memory Map */
|
|
|
|
#define CONFIG_NR_DRAM_BANKS 1
|
|
|
|
#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
|
|
|
|
#define PHYS_SDRAM_SIZE SZ_1G
|
|
|
|
|
|
|
|
#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-22 16:30:45 +00:00
|
|
|
/* Environment organization */
|
2013-04-10 09:32:58 +00:00
|
|
|
#define CONFIG_ENV_SIZE SZ_8K
|
2014-12-30 03:14:51 +00:00
|
|
|
|
|
|
|
#if defined CONFIG_SYS_BOOT_SPINOR
|
|
|
|
#define CONFIG_ENV_IS_IN_SPI_FLASH
|
|
|
|
#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 08:47:44 +00:00
|
|
|
#define CONFIG_ENV_OFFSET (8 * SZ_64K)
|
2013-04-10 09:32:58 +00:00
|
|
|
#define CONFIG_ENV_IS_IN_MMC
|
2014-12-30 03:14:51 +00:00
|
|
|
#endif
|
2013-04-10 09:32:58 +00:00
|
|
|
|
2014-04-11 11:39:43 +00:00
|
|
|
#define CONFIG_CMD_SF
|
|
|
|
#ifdef CONFIG_CMD_SF
|
|
|
|
#define CONFIG_SPI_FLASH_STMICRO
|
|
|
|
#define CONFIG_MXC_SPI
|
|
|
|
#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 12:08:50 +00:00
|
|
|
#define CONFIG_SF_DEFAULT_CS 0
|
2014-04-11 11:39:43 +00:00
|
|
|
#define CONFIG_SF_DEFAULT_SPEED 20000000
|
|
|
|
#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
|
|
|
|
#endif
|
|
|
|
|
2014-11-10 00:50:41 +00:00
|
|
|
/* USB Configs */
|
|
|
|
#define CONFIG_CMD_USB
|
|
|
|
#ifdef CONFIG_CMD_USB
|
|
|
|
#define CONFIG_USB_EHCI
|
|
|
|
#define CONFIG_USB_EHCI_MX6
|
|
|
|
#define CONFIG_USB_STORAGE
|
|
|
|
#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
|
|
|
|
#define CONFIG_USB_HOST_ETHER
|
|
|
|
#define CONFIG_USB_ETHER_ASIX
|
|
|
|
#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 10:30:54 +00: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-02 18:54:13 +00:00
|
|
|
#define CONFIG_IMX_THERMAL
|
2015-03-10 07:33:25 +00:00
|
|
|
|
2013-04-10 09:32:58 +00:00
|
|
|
#endif /* __CONFIG_H */
|