blob: 3a8dd475b26bb4b07be384dcdb17d4a10b785bff [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Marcin Niestroj55676522016-12-07 16:46:33 +01002/*
3 * Copyright (C) 2015 Freescale Semiconductor, Inc.
4 * Copyright (C) 2016 Grinn
5 *
6 * Configuration settings for the Grinn liteBoard (i.MX6UL).
Marcin Niestroj55676522016-12-07 16:46:33 +01007 */
8#ifndef __LITEBOARD_CONFIG_H
9#define __LITEBOARD_CONFIG_H
10
11#include <asm/arch/imx-regs.h>
12#include <linux/sizes.h>
Simon Glassfb64e362020-05-10 11:40:09 -060013#include <linux/stringify.h>
Marcin Niestroj55676522016-12-07 16:46:33 +010014#include "mx6_common.h"
15
16/* SPL options */
17#include "imx6_spl.h"
18
Marcin Niestroj55676522016-12-07 16:46:33 +010019#define CONFIG_MXC_UART_BASE UART1_BASE
20
21/* MMC Configs */
22#ifdef CONFIG_FSL_USDHC
23#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR
Marcin Niestroj55676522016-12-07 16:46:33 +010024#endif
25
Marcin Niestroj55676522016-12-07 16:46:33 +010026#define CONFIG_EXTRA_ENV_SETTINGS \
27 "script=boot.scr\0" \
28 "image=zImage\0" \
29 "console=ttymxc0\0" \
30 "fdt_high=0xffffffff\0" \
31 "initrd_high=0xffffffff\0" \
32 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
33 "fdt_addr=0x83000000\0" \
34 "boot_fdt=try\0" \
35 "ip_dyn=yes\0" \
36 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
Tom Rinib113bca2021-12-11 14:55:52 -050037 "mmcpart=1\0" \
Marcin Niestroj55676522016-12-07 16:46:33 +010038 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
39 "mmcautodetect=yes\0" \
40 "mmcargs=setenv bootargs console=${console},${baudrate} " \
41 "root=${mmcroot}\0" \
42 "loadbootscript=" \
43 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
44 "bootscript=echo Running bootscript from mmc ...; " \
45 "source\0" \
46 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
47 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
48 "mmcboot=echo Booting from mmc ...; " \
49 "run mmcargs; " \
50 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
51 "if run loadfdt; then " \
52 "bootz ${loadaddr} - ${fdt_addr}; " \
53 "else " \
54 "if test ${boot_fdt} = try; then " \
55 "bootz; " \
56 "else " \
57 "echo WARN: Cannot load the DT; " \
58 "fi; " \
59 "fi; " \
60 "else " \
61 "bootz; " \
62 "fi;\0" \
63 "netargs=setenv bootargs console=${console},${baudrate} " \
64 "root=/dev/nfs " \
65 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
66 "netboot=echo Booting from net ...; " \
67 "run netargs; " \
68 "if test ${ip_dyn} = yes; then " \
69 "setenv get_cmd dhcp; " \
70 "else " \
71 "setenv get_cmd tftp; " \
72 "fi; " \
73 "${get_cmd} ${image}; " \
74 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
75 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
76 "bootz ${loadaddr} - ${fdt_addr}; " \
77 "else " \
78 "if test ${boot_fdt} = try; then " \
79 "bootz; " \
80 "else " \
81 "echo WARN: Cannot load the DT; " \
82 "fi; " \
83 "fi; " \
84 "else " \
85 "bootz; " \
86 "fi;\0"
87
Marcin Niestroj55676522016-12-07 16:46:33 +010088/* Miscellaneous configurable options */
Marcin Niestroj55676522016-12-07 16:46:33 +010089
Marcin Niestroj55676522016-12-07 16:46:33 +010090/* Physical Memory Map */
Marcin Niestroj55676522016-12-07 16:46:33 +010091#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
92
93#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
94#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
95#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
96
97#define CONFIG_SYS_INIT_SP_OFFSET \
98 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
99#define CONFIG_SYS_INIT_SP_ADDR \
100 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
101
102/* FLASH and environment organization */
Marcin Niestroj55676522016-12-07 16:46:33 +0100103#define CONFIG_MMCROOT "/dev/mmcblk0p2"
104
Marcin Niestroj55676522016-12-07 16:46:33 +0100105/* USB Configs */
106#ifdef CONFIG_CMD_USB
Marcin Niestroj55676522016-12-07 16:46:33 +0100107#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
108#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
109#define CONFIG_MXC_USB_FLAGS 0
110#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
111#endif
112
113#ifdef CONFIG_CMD_NET
Marcin Niestroj55676522016-12-07 16:46:33 +0100114#define CONFIG_FEC_ENET_DEV 0
115
116#define IMX_FEC_BASE ENET_BASE_ADDR
117#define CONFIG_FEC_MXC_PHYADDR 0x0
118#define CONFIG_FEC_XCV_TYPE RMII
119#define CONFIG_ETHPRIME "FEC"
Marcin Niestroj55676522016-12-07 16:46:33 +0100120#endif
121
Marcin Niestroj55676522016-12-07 16:46:33 +0100122#endif