blob: 4162a71ca6610d521306cb082fa5e8f67028172f [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Stefano Babic99d51c52017-07-26 18:23:05 +02002/*
3 * Copyright (C) Stefano Babic <sbabic@denx.de>
Stefano Babic99d51c52017-07-26 18:23:05 +02004 */
5
6
7#ifndef __PCM058_CONFIG_H
8#define __PCM058_CONFIG_H
9
Stefano Babic99d51c52017-07-26 18:23:05 +020010#ifdef CONFIG_SPL
Stefano Babic99d51c52017-07-26 18:23:05 +020011#include "imx6_spl.h"
12#endif
13
14#include "mx6_common.h"
15
16/* Thermal */
17#define CONFIG_IMX_THERMAL
18
19/* Serial */
20#define CONFIG_MXC_UART
21#define CONFIG_MXC_UART_BASE UART4_BASE
22#define CONSOLE_DEV "ttymxc3"
23
24/* Early setup */
Stefano Babic99d51c52017-07-26 18:23:05 +020025
26
27/* Size of malloc() pool */
28#define CONFIG_SYS_MALLOC_LEN (8 * SZ_1M)
29
30/* Ethernet */
Stefano Babic99d51c52017-07-26 18:23:05 +020031#define IMX_FEC_BASE ENET_BASE_ADDR
32#define CONFIG_FEC_XCV_TYPE RGMII
33#define CONFIG_ETHPRIME "FEC"
34#define CONFIG_FEC_MXC_PHYADDR 3
35
Stefano Babic99d51c52017-07-26 18:23:05 +020036/* SPI Flash */
Stefano Babic99d51c52017-07-26 18:23:05 +020037
38/* I2C Configs */
39#define CONFIG_SYS_I2C
40#define CONFIG_SYS_I2C_MXC
41#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 0 */
42#define CONFIG_SYS_I2C_SPEED 100000
43
Stefano Babic99d51c52017-07-26 18:23:05 +020044/* Enable NAND support */
Stefano Babic99d51c52017-07-26 18:23:05 +020045#define CONFIG_SYS_MAX_NAND_DEVICE 1
46#define CONFIG_SYS_NAND_BASE 0x40000000
47#define CONFIG_SYS_NAND_5_ADDR_CYCLE
48#define CONFIG_SYS_NAND_ONFI_DETECTION
Stefano Babic99d51c52017-07-26 18:23:05 +020049
50/* DMA stuff, needed for GPMI/MXS NAND support */
Stefano Babic99d51c52017-07-26 18:23:05 +020051
52/* Filesystem support */
Stefano Babic99d51c52017-07-26 18:23:05 +020053
54/* Various command support */
55
56/* Physical Memory Map */
Stefano Babic99d51c52017-07-26 18:23:05 +020057#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
58
59#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
60#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
61#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
62
63#define CONFIG_SYS_INIT_SP_OFFSET \
64 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
65#define CONFIG_SYS_INIT_SP_ADDR \
66 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
67
68/* MMC Configs */
69#define CONFIG_SYS_FSL_ESDHC_ADDR 0
70#define CONFIG_SYS_FSL_USDHC_NUM 2
71
72/* Environment organization */
Stefano Babic99d51c52017-07-26 18:23:05 +020073
74/* Default environment */
75#define CONFIG_EXTRA_ENV_SETTINGS \
76 "addcons=setenv bootargs ${bootargs} " \
77 "console=${console},${baudrate}\0" \
78 "addip=setenv bootargs ${bootargs} " \
79 "ip=${ipaddr}:${serverip}:${gatewayip}:" \
80 "${netmask}:${hostname}:${netdev}:off\0" \
81 "addmisc=setenv bootargs ${bootargs} ${miscargs}\0" \
82 "addmtd=run mtdnand;run mtdspi;" \
83 "setenv bootargs ${bootargs} ${mtdparts}\0" \
84 "mtdnand=setenv mtdparts mtdparts=gpmi-nand:" \
85 "40m(Kernels),400m(root),-(nand)\0" \
86 "mtdspi=setenv mtdparts ${mtdparts}" \
87 "';spi2.0:1024k(bootloader)," \
88 "64k(env1),64k(env2),-(rescue)'\0" \
89 "bootcmd=if test -n ${rescue};" \
90 "then run swupdate;fi;run nandboot;run swupdate\0" \
91 "bootfile=uImage\0" \
92 "bootimage=uImage\0" \
93 "console=ttymxc3\0" \
94 "fdt_addr_r=0x18000000\0" \
95 "fdt_file=pfla02.dtb\0" \
96 "fdt_high=0xffffffff\0" \
97 "initrd_high=0xffffffff\0" \
98 "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
99 "miscargs=panic=1 quiet\0" \
100 "mmcargs=setenv bootargs root=${mmcroot} rw rootwait\0" \
101 "mmcboot=if run mmcload;then " \
102 "run mmcargs addcons addmisc;" \
103 "bootm;fi\0" \
104 "mmcload=mmc rescan;" \
105 "load mmc 0:${mmcpart} ${kernel_addr_r} boot/fitImage\0"\
106 "mmcpart=1\0" \
107 "mmcroot=/dev/mmcblk0p1\0" \
108 "ubiroot=1\0" \
109 "nandargs=setenv bootargs ubi.mtd=1 " \
110 "root=ubi0:rootfs${ubiroot} rootfstype=ubifs\0" \
111 "nandboot=run mtdnand;ubi part nand0,0;" \
112 "ubi readvol ${kernel_addr_r} kernel${ubiroot};" \
113 "run nandargs addip addcons addmtd addmisc;" \
114 "bootm ${kernel_addr_r}\0" \
115 "net_nfs=tftp ${kernel_addr_r} ${board_name}/${bootfile};" \
116 "tftp ${fdt_addr_r} ${board_name}/${fdt_file};" \
117 "run nfsargs addip addcons addmtd addmisc;" \
118 "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \
119 "net_nfs_fit=tftp ${kernel_addr_r} ${board_name}/${fitfile};" \
120 "run nfsargs addip addcons addmtd addmisc;" \
121 "bootm ${kernel_addr_r}\0" \
122 "nfsargs=setenv bootargs root=/dev/nfs" \
123 " nfsroot=${serverip}:${nfsroot},v3 panic=1\0" \
124 "swupdate=setenv bootargs root=/dev/ram;" \
125 "run addip addcons addmtd addmisc;" \
126 "sf probe;" \
127 "sf read ${kernel_addr_r} 120000 600000;" \
128 "sf read 14000000 730000 800000;" \
129 "bootm ${kernel_addr_r} 14000000\0"
130
131#endif