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