blob: 7052d8049e4b5e64229323f9f6d64fd37ab05b1d [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Stefano Babicfb8cac92018-01-03 16:11:56 +01002/*
3 * Copyright (C) Stefano Babic <sbabic@denx.de>
Stefano Babicfb8cac92018-01-03 16:11:56 +01004 */
5
6
7#ifndef __SKSIMX6_CONFIG_H
8#define __SKSIMX6_CONFIG_H
9
Stefano Babicfb8cac92018-01-03 16:11:56 +010010#include "mx6_common.h"
11#include "imx6_spl.h"
12
Stefano Babicfb8cac92018-01-03 16:11:56 +010013/* Serial */
Stefano Babicfb8cac92018-01-03 16:11:56 +010014#define CONFIG_MXC_UART_BASE UART1_BASE
15
16/* Size of malloc() pool */
17#define CONFIG_SYS_MALLOC_LEN (8 * SZ_1M)
18
19/* Ethernet */
20#define IMX_FEC_BASE ENET_BASE_ADDR
21#define CONFIG_FEC_XCV_TYPE RGMII
22#define CONFIG_ETHPRIME "FEC"
23#define CONFIG_FEC_MXC_PHYADDR 0x01
24
Stefano Babicfb8cac92018-01-03 16:11:56 +010025#define CONFIG_PHY_MICREL_KSZ9021
26
27/* I2C Configs */
28#define CONFIG_SYS_I2C
29#define CONFIG_SYS_I2C_MXC
30#define CONFIG_SYS_I2C_MXC_I2C2
31#define CONFIG_SYS_I2C_SPEED 100000
32
33/* Filesystem support */
34
35/* Physical Memory Map */
Stefano Babicfb8cac92018-01-03 16:11:56 +010036#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
37
38#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
39#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
40#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
41
42#define CONFIG_SYS_INIT_SP_OFFSET \
43 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
44#define CONFIG_SYS_INIT_SP_ADDR \
45 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
46
47/* MMC Configs */
48#define CONFIG_SYS_FSL_ESDHC_ADDR 0
49#define CONFIG_SYS_FSL_USDHC_NUM 1
50
51/* Environment organization */
Stefano Babicfb8cac92018-01-03 16:11:56 +010052
53/* Default environment */
54#define CONFIG_EXTRA_ENV_SETTINGS \
55 "addcons=setenv bootargs ${bootargs} " \
56 "console=${console},${baudrate}\0" \
57 "addip=setenv bootargs ${bootargs} " \
58 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
59 "${netmask}:${hostname}:${netdev}:off\0" \
60 "addmisc=setenv bootargs ${bootargs} ${miscargs}\0" \
61 "bootcmd=run mmcboot\0" \
62 "bootfile=uImage\0" \
63 "bootimage=uImage\0" \
64 "console=ttymxc0\0" \
65 "fdt_addr_r=0x18000000\0" \
66 "fdt_file=imx6dl-sks-cts.dtb\0" \
67 "fdt_high=0xffffffff\0" \
68 "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
69 "miscargs=quiet\0" \
70 "mmcargs=setenv bootargs root=${mmcroot} rw rootwait\0" \
71 "mmcboot=if run mmcload;then " \
72 "run mmcargs addcons addmisc;" \
73 "bootm;fi\0" \
74 "mmcload=mmc rescan;" \
75 "load mmc 0:${mmcpart} ${kernel_addr_r} boot/fitImage\0"\
76 "mmcpart=1\0" \
77 "mmcroot=/dev/mmcblk0p1\0" \
78 "net_nfs=tftp ${kernel_addr_r} ${board_name}/${bootfile};" \
79 "tftp ${fdt_addr_r} ${board_name}/${fdt_file};" \
80 "run nfsargs addip addcons addmisc;" \
81 "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \
82 "nfsargs=setenv bootargs root=/dev/nfs " \
83 "nfsroot=${serverip}:${nfsroot},v3 panic=1\0"
84
85#endif