blob: 0c0f85097b232c3d79710ac866c4ddb6b750df83 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Andrej Rosanofddfa9c2015-04-08 18:56:30 +02002/*
3 * USB armory MkI board configuration settings
4 * http://inversepath.com/usbarmory
5 *
6 * Copyright (C) 2015, Inverse Path
7 * Andrej Rosano <andrej@inversepath.com>
Andrej Rosanofddfa9c2015-04-08 18:56:30 +02008 */
9
10#ifndef __CONFIG_H
11#define __CONFIG_H
12
Gong Qianyu52de2e52015-10-26 19:47:42 +080013#define CONFIG_SYS_FSL_CLK
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020014
15#include <asm/arch/imx-regs.h>
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020016
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020017/* U-Boot environment */
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020018#define CONFIG_SYS_MMC_ENV_DEV 0
19
20/* U-Boot general configurations */
21#define CONFIG_SYS_CBSIZE 512
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020022
23/* UART */
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020024#define CONFIG_MXC_UART_BASE UART1_BASE
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020025
26/* SD/MMC */
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020027#define CONFIG_SYS_FSL_ESDHC_ADDR 0
28#define CONFIG_SYS_FSL_ESDHC_NUM 1
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020029
30/* USB */
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020031#define CONFIG_MXC_USB_PORT 1
32#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
33#define CONFIG_MXC_USB_FLAGS 0
34
35/* I2C */
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020036#define CONFIG_SYS_I2C
37#define CONFIG_SYS_I2C_MXC
Albert ARIBAUD \\(3ADEV\\)eb943872015-09-21 22:43:38 +020038#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
39#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020040
41/* Fuse */
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020042#define CONFIG_FSL_IIM
43
Andrej Rosanof079e0d2016-06-20 17:21:48 +020044/* U-Boot memory offsets */
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020045#define CONFIG_LOADADDR 0x72000000
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020046#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Andrej Rosanof079e0d2016-06-20 17:21:48 +020047
48/* Linux boot */
Mario Six790d8442018-03-28 14:38:20 +020049#define CONFIG_HOSTNAME "usbarmory"
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020050#define CONFIG_BOOTCOMMAND \
51 "run distro_bootcmd; " \
52 "setenv bootargs console=${console} ${bootargs_default}; " \
Andrej Rosanof079e0d2016-06-20 17:21:48 +020053 "ext2load mmc 0:1 ${kernel_addr_r} /boot/zImage; " \
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020054 "ext2load mmc 0:1 ${fdt_addr_r} /boot/${fdtfile}; " \
Andrej Rosanof079e0d2016-06-20 17:21:48 +020055 "bootz ${kernel_addr_r} - ${fdt_addr_r}"
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020056
57#define BOOT_TARGET_DEVICES(func) func(MMC, mmc, 0)
58
59#include <config_distro_bootcmd.h>
60
61#define MEM_LAYOUT_ENV_SETTINGS \
62 "kernel_addr_r=0x70800000\0" \
63 "fdt_addr_r=0x71000000\0" \
64 "scriptaddr=0x70800000\0" \
65 "pxefile_addr_r=0x70800000\0" \
66 "ramdisk_addr_r=0x73000000\0"
67
68#define CONFIG_EXTRA_ENV_SETTINGS \
69 MEM_LAYOUT_ENV_SETTINGS \
70 "bootargs_default=root=/dev/mmcblk0p1 rootwait rw\0" \
71 "fdtfile=imx53-usbarmory.dtb\0" \
72 "console=ttymxc0,115200\0" \
73 BOOTENV
74
Andrej Rosanobab77d02016-06-20 17:21:49 +020075#ifndef CONFIG_CMDLINE
Andrej Rosanobab77d02016-06-20 17:21:49 +020076#define USBARMORY_FIT_PATH "/boot/usbarmory.itb"
77#define USBARMORY_FIT_ADDR "0x70800000"
78#endif
79
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020080/* Physical Memory Map */
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020081#define PHYS_SDRAM CSD0_BASE_ADDR
82#define PHYS_SDRAM_SIZE (gd->ram_size)
83
84#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
85#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
86#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
87
88#define CONFIG_SYS_INIT_SP_OFFSET \
89 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
90#define CONFIG_SYS_INIT_SP_ADDR \
91 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
92
Andrej Rosanofddfa9c2015-04-08 18:56:30 +020093#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
94
95#endif /* __CONFIG_H */