blob: 938ab5ade9a7ad4fa2abdb3822b2fee2bc683b17 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Marcin Niestrojc9e40e62016-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 Niestrojc9e40e62016-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 Glass1af3c7f2020-05-10 11:40:09 -060013#include <linux/stringify.h>
Marcin Niestrojc9e40e62016-12-07 16:46:33 +010014#include "mx6_common.h"
15
Marcin Niestrojc9e40e62016-12-07 16:46:33 +010016#define CONFIG_MXC_UART_BASE UART1_BASE
17
18/* MMC Configs */
19#ifdef CONFIG_FSL_USDHC
Tom Rini6cc04542022-10-28 20:27:13 -040020#define CFG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR
Marcin Niestrojc9e40e62016-12-07 16:46:33 +010021#endif
22
Tom Rini0613c362022-12-04 10:03:50 -050023#define CFG_EXTRA_ENV_SETTINGS \
Marcin Niestrojc9e40e62016-12-07 16:46:33 +010024 "script=boot.scr\0" \
25 "image=zImage\0" \
26 "console=ttymxc0\0" \
27 "fdt_high=0xffffffff\0" \
28 "initrd_high=0xffffffff\0" \
29 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
30 "fdt_addr=0x83000000\0" \
31 "boot_fdt=try\0" \
32 "ip_dyn=yes\0" \
33 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
Tom Rinide35b8f2021-12-11 14:55:52 -050034 "mmcpart=1\0" \
Peng Fanadfaa422022-04-15 12:23:41 +080035 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
Marcin Niestrojc9e40e62016-12-07 16:46:33 +010036 "mmcautodetect=yes\0" \
37 "mmcargs=setenv bootargs console=${console},${baudrate} " \
38 "root=${mmcroot}\0" \
39 "loadbootscript=" \
40 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
41 "bootscript=echo Running bootscript from mmc ...; " \
42 "source\0" \
43 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
44 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
45 "mmcboot=echo Booting from mmc ...; " \
46 "run mmcargs; " \
47 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
48 "if run loadfdt; then " \
49 "bootz ${loadaddr} - ${fdt_addr}; " \
50 "else " \
51 "if test ${boot_fdt} = try; then " \
52 "bootz; " \
53 "else " \
54 "echo WARN: Cannot load the DT; " \
55 "fi; " \
56 "fi; " \
57 "else " \
58 "bootz; " \
59 "fi;\0" \
60 "netargs=setenv bootargs console=${console},${baudrate} " \
61 "root=/dev/nfs " \
62 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
63 "netboot=echo Booting from net ...; " \
64 "run netargs; " \
65 "if test ${ip_dyn} = yes; then " \
66 "setenv get_cmd dhcp; " \
67 "else " \
68 "setenv get_cmd tftp; " \
69 "fi; " \
70 "${get_cmd} ${image}; " \
71 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
72 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
73 "bootz ${loadaddr} - ${fdt_addr}; " \
74 "else " \
75 "if test ${boot_fdt} = try; then " \
76 "bootz; " \
77 "else " \
78 "echo WARN: Cannot load the DT; " \
79 "fi; " \
80 "fi; " \
81 "else " \
82 "bootz; " \
83 "fi;\0"
84
Marcin Niestrojc9e40e62016-12-07 16:46:33 +010085/* Miscellaneous configurable options */
Marcin Niestrojc9e40e62016-12-07 16:46:33 +010086
Marcin Niestrojc9e40e62016-12-07 16:46:33 +010087/* Physical Memory Map */
Marcin Niestrojc9e40e62016-12-07 16:46:33 +010088#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
89
Tom Riniaa6e94d2022-11-16 13:10:37 -050090#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
Tom Rini65cc0e22022-11-16 13:10:41 -050091#define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
92#define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
Marcin Niestrojc9e40e62016-12-07 16:46:33 +010093
Marcin Niestrojc9e40e62016-12-07 16:46:33 +010094/* FLASH and environment organization */
Marcin Niestrojc9e40e62016-12-07 16:46:33 +010095
Marcin Niestrojc9e40e62016-12-07 16:46:33 +010096/* USB Configs */
97#ifdef CONFIG_CMD_USB
Marcin Niestrojc9e40e62016-12-07 16:46:33 +010098#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
99#define CONFIG_MXC_USB_FLAGS 0
Marcin Niestrojc9e40e62016-12-07 16:46:33 +0100100#endif
101
102#ifdef CONFIG_CMD_NET
Marcin Niestrojc9e40e62016-12-07 16:46:33 +0100103#define CONFIG_FEC_ENET_DEV 0
104
Marcin Niestrojc9e40e62016-12-07 16:46:33 +0100105#define CONFIG_FEC_MXC_PHYADDR 0x0
Marcin Niestrojc9e40e62016-12-07 16:46:33 +0100106#endif
107
Marcin Niestrojc9e40e62016-12-07 16:46:33 +0100108#endif