blob: 5811059c8e2bef1abb312c1570673e52b9bac1bb [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
Tom Rinia17aa192022-12-04 10:04:55 -050016#define CFG_MXC_UART_BASE UART1_BASE
Marcin Niestroj55676522016-12-07 16:46:33 +010017
18/* MMC Configs */
19#ifdef CONFIG_FSL_USDHC
Tom Rini376b88a2022-10-28 20:27:13 -040020#define CFG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR
Marcin Niestroj55676522016-12-07 16:46:33 +010021#endif
22
Tom Rinic9edebe2022-12-04 10:03:50 -050023#define CFG_EXTRA_ENV_SETTINGS \
Marcin Niestroj55676522016-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 Rinib113bca2021-12-11 14:55:52 -050034 "mmcpart=1\0" \
Peng Fanbb4bb582022-04-15 12:23:41 +080035 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
Marcin Niestroj55676522016-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 Niestroj55676522016-12-07 16:46:33 +010085/* Miscellaneous configurable options */
Marcin Niestroj55676522016-12-07 16:46:33 +010086
Marcin Niestroj55676522016-12-07 16:46:33 +010087/* Physical Memory Map */
Marcin Niestroj55676522016-12-07 16:46:33 +010088#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
89
Tom Rinibb4dd962022-11-16 13:10:37 -050090#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
Tom Rini6a5dccc2022-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 Niestroj55676522016-12-07 16:46:33 +010093
Marcin Niestroj55676522016-12-07 16:46:33 +010094/* FLASH and environment organization */
Marcin Niestroj55676522016-12-07 16:46:33 +010095
Marcin Niestroj55676522016-12-07 16:46:33 +010096/* USB Configs */
97#ifdef CONFIG_CMD_USB
Tom Rinib9796e82022-12-04 10:04:56 -050098#define CFG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
99#define CFG_MXC_USB_FLAGS 0
Marcin Niestroj55676522016-12-07 16:46:33 +0100100#endif
101
102#ifdef CONFIG_CMD_NET
Tom Rinib70d5d42022-12-04 10:03:52 -0500103#define CFG_FEC_ENET_DEV 0
Marcin Niestroj55676522016-12-07 16:46:33 +0100104
Tom Rini4e3c8a62022-12-04 10:03:53 -0500105#define CFG_FEC_MXC_PHYADDR 0x0
Marcin Niestroj55676522016-12-07 16:46:33 +0100106#endif
107
Marcin Niestroj55676522016-12-07 16:46:33 +0100108#endif