blob: 6759f24c08348427709c3de00e41b274f100c072 [file] [log] [blame]
Arkadiusz Karas5b6f8f32020-01-02 19:31:21 +01001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (C) 2017-2019 A. Karas, SomLabs
4 * Copyright (C) 2015-2016 Freescale Semiconductor, Inc.
5 *
6 * Configuration settings for the SoMlabs VisionSOM 6ULL board.
7 */
8#ifndef __SOMLABS_VISIONSOM_6ULL_H
9#define __SOMLABS_VISIONSOM_6ULL_H
10
11#include <asm/arch/imx-regs.h>
12#include <linux/sizes.h>
13#include "mx6_common.h"
14#include <asm/mach-imx/gpio.h>
15
16/* SPL options */
17#include "imx6_spl.h"
18
19/* Size of malloc() pool */
20#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M)
21
22#define CONFIG_MXC_UART
23#define CONFIG_MXC_UART_BASE UART1_BASE
24
25/* MMC Configs */
26#ifdef CONFIG_FSL_USDHC
27#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
28
29#define CONFIG_SYS_FSL_USDHC_NUM 1
30#endif /* CONFIG_FSL_USDHC */
31
32#define CONFIG_CMD_READ
33
34#define CONFIG_EXTRA_ENV_SETTINGS \
35 "bootm_size=0x10000000\0" \
36 "console=ttymxc0\0" \
37 "initrd_addr=0x86800000\0" \
38 "fdt_addr=0x83000000\0" \
39 "script=boot.scr\0" \
40 "image=zImage\0" \
41 "splashimage=0x80000000\0" \
42 "splashfile=/boot/splash.bmp\0" \
43 "mmcdev=1\0" \
44 "mmcpart=1\0" \
45 "mmcroot=/dev/mmcblk1p1 rootwait rw\0" \
46 "setrootmmc=setenv rootspec root=${mmcroot}\0" \
47 "setbootscriptmmc=setenv loadbootscript " \
48 "load mmc ${mmcdev}:${mmcpart} " \
49 "${loadaddr} /boot/${script};\0" \
50 "setloadmmc=setenv loadimage load mmc ${mmcdev}:${mmcpart} " \
51 "${loadaddr} /boot/${image}; " \
52 "setenv loadfdt load mmc ${mmcdev}:${mmcpart} " \
53 "${fdt_addr} /boot/${fdt_file};\0" \
54 "setbootargs=setenv bootargs console=${console},${baudrate} " \
55 "${rootspec}\0" \
56 "execbootscript=echo Running bootscript...; source\0" \
57 "setfdtfile=setenv fdt_file somlabs-visionsom-6ull.dtb\0" \
58 "checkbootdev=run setbootscriptmmc; " \
59 "run setrootmmc; " \
60 "run setloadmmc; " \
61
62#define CONFIG_BOOTCOMMAND \
63 "run setfdtfile; " \
64 "run checkbootdev; " \
65 "run loadfdt;" \
66 "if run loadbootscript; then " \
67 "run bootscript; " \
68 "else " \
69 "if run loadimage; then " \
70 "run setbootargs; " \
71 "bootz ${loadaddr} - ${fdt_addr}; " \
72 "fi; " \
73 "fi"
74
75/* Miscellaneous configurable options */
76#define CONFIG_SYS_MEMTEST_START 0x80000000
77#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x8000000)
78
79#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
80#define CONFIG_SYS_HZ 1000
81
82/* Physical Memory Map */
83#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
84
85#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
86#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
87#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
88
89#define CONFIG_SYS_INIT_SP_OFFSET \
90 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
91#define CONFIG_SYS_INIT_SP_ADDR \
92 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
93
94/* environment organization */
95#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */
96#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
97
98/* USB Configs */
99#ifdef CONFIG_CMD_USB
100#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
101#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
102#define CONFIG_MXC_USB_FLAGS 0
103#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
104#endif
105
106#ifdef CONFIG_CMD_NET
107#define CONFIG_FEC_MXC
108#define IMX_FEC_BASE ENET_BASE_ADDR
109#define CONFIG_FEC_MXC_PHYADDR 0x1
110#define CONFIG_FEC_XCV_TYPE RMII
111#define CONFIG_ETHPRIME "eth0"
112#endif
113
114#define CONFIG_IMX_THERMAL
115
116#endif