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