2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2015-02-17 12:42:46 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 O.S. Systems Software LTDA.
|
|
|
|
* Copyright (C) 2014 Kynetics LLC.
|
|
|
|
* Copyright (C) 2014 Revolution Robotics, Inc.
|
|
|
|
*
|
|
|
|
* Author: Otavio Salvador <otavio@ossystems.com.br>
|
|
|
|
*
|
|
|
|
* Configuration settings for the WaRP Board
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CONFIG_H
|
|
|
|
#define __CONFIG_H
|
|
|
|
|
|
|
|
#include "mx6_common.h"
|
|
|
|
|
|
|
|
/* Size of malloc() pool */
|
2015-03-02 13:17:17 +00:00
|
|
|
#define CONFIG_SYS_MALLOC_LEN (35 * SZ_1M) /* Increase due to DFU */
|
2015-02-17 12:42:46 +00:00
|
|
|
|
|
|
|
#define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR
|
|
|
|
|
|
|
|
/* MMC Configs */
|
2015-05-27 04:11:45 +00:00
|
|
|
#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
|
2015-03-12 01:52:15 +00:00
|
|
|
#define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
|
2015-02-17 12:42:46 +00:00
|
|
|
|
|
|
|
/* Watchdog */
|
|
|
|
|
|
|
|
/* 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
|
|
|
|
|
|
|
|
#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)
|
|
|
|
|
|
|
|
#define CONFIG_SYS_MMC_ENV_DEV 0
|
|
|
|
|
|
|
|
/* VDD voltage 1.65 - 1.95 */
|
|
|
|
#define CONFIG_SYS_SD_VOLTAGE 0x00000080
|
|
|
|
|
2015-02-28 18:16:42 +00: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 1 /* Only OTG2 port enabled */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define CONFIG_USBD_HS
|
|
|
|
|
2015-05-27 04:11:44 +00:00
|
|
|
#define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_16M
|
2015-03-02 13:17:17 +00:00
|
|
|
#define DFU_DEFAULT_POLL_TIMEOUT 300
|
|
|
|
|
2015-07-21 22:48:41 +00:00
|
|
|
/* I2C Configs */
|
|
|
|
#define CONFIG_SYS_I2C
|
|
|
|
#define CONFIG_SYS_I2C_MXC
|
2015-09-21 20:43:38 +00:00
|
|
|
#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
|
|
|
|
#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
|
2015-07-21 22:48:41 +00:00
|
|
|
#define CONFIG_SYS_I2C_SPEED 100000
|
|
|
|
|
|
|
|
/* PMIC */
|
|
|
|
#define CONFIG_POWER
|
|
|
|
#define CONFIG_POWER_I2C
|
|
|
|
#define CONFIG_POWER_MAX77696
|
2015-05-27 04:11:47 +00:00
|
|
|
|
2015-02-17 12:42:46 +00:00
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
|
|
"script=boot.scr\0" \
|
|
|
|
"image=zImage\0" \
|
|
|
|
"console=ttymxc0\0" \
|
|
|
|
"fdt_high=0xffffffff\0" \
|
|
|
|
"initrd_high=0xffffffff\0" \
|
|
|
|
"fdt_file=imx6sl-warp.dtb\0" \
|
|
|
|
"fdt_addr=0x88000000\0" \
|
|
|
|
"initrd_addr=0x83800000\0" \
|
|
|
|
"boot_fdt=try\0" \
|
|
|
|
"ip_dyn=yes\0" \
|
|
|
|
"mmcdev=0\0" \
|
|
|
|
"mmcpart=1\0" \
|
2017-07-11 17:24:29 +00:00
|
|
|
"finduuid=part uuid mmc 0:2 uuid\0" \
|
2015-03-02 13:17:17 +00:00
|
|
|
"dfu_alt_info=boot raw 0x2 0x400 mmcpart 1\0" \
|
2015-02-17 12:42:46 +00:00
|
|
|
"mmcargs=setenv bootargs console=${console},${baudrate} " \
|
2017-07-11 17:24:29 +00:00
|
|
|
"root=PARTUUID=${uuid} rootwait rw\0" \
|
2015-02-17 12:42:46 +00:00
|
|
|
"loadbootscript=" \
|
|
|
|
"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
|
|
|
|
"bootscript=echo Running bootscript from mmc ...; " \
|
|
|
|
"source\0" \
|
|
|
|
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
|
|
|
|
"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
|
|
|
|
"mmcboot=echo Booting from mmc ...; " \
|
2017-07-11 17:24:29 +00:00
|
|
|
"run finduuid; " \
|
2015-02-17 12:42:46 +00:00
|
|
|
"run mmcargs; " \
|
|
|
|
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
|
|
|
"if run loadfdt; then " \
|
|
|
|
"bootz ${loadaddr} - ${fdt_addr}; " \
|
|
|
|
"else " \
|
|
|
|
"if test ${boot_fdt} = try; then " \
|
|
|
|
"bootz; " \
|
|
|
|
"else " \
|
|
|
|
"echo WARN: Cannot load the DT; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else " \
|
|
|
|
"bootz; " \
|
|
|
|
"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; " \
|
|
|
|
"${get_cmd} ${image}; " \
|
|
|
|
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
|
|
|
"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
|
|
|
|
"bootz ${loadaddr} - ${fdt_addr}; " \
|
|
|
|
"else " \
|
|
|
|
"if test ${boot_fdt} = try; then " \
|
|
|
|
"bootz; " \
|
|
|
|
"else " \
|
|
|
|
"echo WARN: Cannot load the DT; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else " \
|
|
|
|
"bootz; " \
|
|
|
|
"fi;\0"
|
|
|
|
|
|
|
|
#define CONFIG_BOOTCOMMAND \
|
|
|
|
"mmc dev ${mmcdev};" \
|
|
|
|
"mmc dev ${mmcdev}; if mmc rescan; then " \
|
|
|
|
"if run loadbootscript; then " \
|
|
|
|
"run bootscript; " \
|
|
|
|
"else " \
|
|
|
|
"if run loadimage; then " \
|
|
|
|
"run mmcboot; " \
|
|
|
|
"else run netboot; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else run netboot; fi"
|
|
|
|
|
|
|
|
#endif /* __CONFIG_H */
|