blob: 23ac103f13066e82ad1160aef4b1e56fe6f5abd0 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Vanessa Maegima27142c32017-05-08 13:17:28 -03002/*
3 * Copyright (C) 2017 NXP Semiconductors
4 *
5 * Configuration settings for the i.MX7D Pico board.
Vanessa Maegima27142c32017-05-08 13:17:28 -03006 */
7
8#ifndef __PICO_IMX7D_CONFIG_H
9#define __PICO_IMX7D_CONFIG_H
10
11#include "mx7_common.h"
12
13#define PHYS_SDRAM_SIZE SZ_1G
14
15/* Size of malloc() pool */
16#define CONFIG_SYS_MALLOC_LEN (32 * SZ_1M)
17
18#define CONFIG_MXC_UART_BASE UART5_IPS_BASE_ADDR
19
20/* Network */
21#define CONFIG_FEC_MXC
22#define CONFIG_MII
23#define CONFIG_FEC_XCV_TYPE RGMII
24#define CONFIG_ETHPRIME "FEC"
25#define CONFIG_FEC_MXC_PHYADDR 1
26
Vanessa Maegima27142c32017-05-08 13:17:28 -030027#define CONFIG_PHY_ATHEROS
28
29/* ENET1 */
30#define IMX_FEC_BASE ENET_IPS_BASE_ADDR
31
32/* MMC Config */
33#define CONFIG_SYS_FSL_ESDHC_ADDR 0
34
Otavio Salvador304058c2018-06-29 15:19:09 -030035#define CONFIG_DFU_ENV_SETTINGS \
36 "dfu_alt_info=u-boot raw 0x2 0x400 mmcpart 1;" \
37 "/boot/zImage ext4 0 1;" \
38 "/boot/imx7d-pico-pi.dtb ext4 0 1;" \
39 "rootfs part 0 1\0" \
40
Vanessa Maegima27142c32017-05-08 13:17:28 -030041#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
42#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
43
44#define CONFIG_EXTRA_ENV_SETTINGS \
45 "script=boot.scr\0" \
46 "image=zImage\0" \
47 "console=ttymxc4\0" \
48 "fdt_high=0xffffffff\0" \
49 "initrd_high=0xffffffff\0" \
Fabio Estevam821f6a62018-06-29 15:19:06 -030050 "fdtfile=imx7d-pico-pi.dtb\0" \
Vanessa Maegima27142c32017-05-08 13:17:28 -030051 "fdt_addr=0x83000000\0" \
Fabio Estevam821f6a62018-06-29 15:19:06 -030052 "fdt_addr_r=0x83000000\0" \
53 "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
54 "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
55 "ramdisk_addr_r=0x83000000\0" \
56 "ramdiskaddr=0x83000000\0" \
57 "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
Otavio Salvador304058c2018-06-29 15:19:09 -030058 CONFIG_DFU_ENV_SETTINGS \
Otavio Salvador3dc4bc52018-06-29 15:19:07 -030059 "finduuid=part uuid mmc 0:1 uuid\0" \
Otavio Salvador85910c72018-06-29 15:19:08 -030060 "partitions=" \
61 "uuid_disk=${uuid_gpt_disk};" \
62 "name=rootfs,size=0,uuid=${uuid_gpt_rootfs}\0" \
63 "setup_emmc=mmc dev 0; gpt write mmc 0 $partitions; reset;\0" \
Fabio Estevam821f6a62018-06-29 15:19:06 -030064 BOOTENV
65
66#define BOOT_TARGET_DEVICES(func) \
67 func(MMC, mmc, 0) \
68 func(DHCP, dhcp, na)
Vanessa Maegima27142c32017-05-08 13:17:28 -030069
Fabio Estevam821f6a62018-06-29 15:19:06 -030070#include <config_distro_bootcmd.h>
Vanessa Maegima27142c32017-05-08 13:17:28 -030071
72#define CONFIG_SYS_MEMTEST_START 0x80000000
73#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x20000000)
74
75#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
76#define CONFIG_SYS_HZ 1000
77
78/* Physical Memory Map */
79#define CONFIG_NR_DRAM_BANKS 1
80#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
81
82#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
83#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
84#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
85
86#define CONFIG_SYS_INIT_SP_OFFSET \
87 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
88#define CONFIG_SYS_INIT_SP_ADDR \
89 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
90
91/* I2C configs */
92#define CONFIG_SYS_I2C
93#define CONFIG_SYS_I2C_MXC
94#define CONFIG_SYS_I2C_MXC_I2C1
95#define CONFIG_SYS_I2C_MXC_I2C2
96#define CONFIG_SYS_I2C_MXC_I2C3
97#define CONFIG_SYS_I2C_MXC_I2C4
98#define CONFIG_SYS_I2C_SPEED 100000
99
100/* PMIC */
101#define CONFIG_POWER
102#define CONFIG_POWER_I2C
103#define CONFIG_POWER_PFUZE3000
104#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08
105
106/* FLASH and environment organization */
107#define CONFIG_ENV_SIZE SZ_8K
Vanessa Maegima27142c32017-05-08 13:17:28 -0300108
109#define CONFIG_ENV_OFFSET (8 * SZ_64K)
110#define CONFIG_SYS_FSL_USDHC_NUM 2
111
112#define CONFIG_SYS_MMC_ENV_DEV 0
113#define CONFIG_SYS_MMC_ENV_PART 0
114
115/* USB Configs */
116#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
117#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
118#define CONFIG_MXC_USB_FLAGS 0
119#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
120
121#define CONFIG_IMX_THERMAL
122
Vanessa Maegima27142c32017-05-08 13:17:28 -0300123#endif