blob: 500dd8c069aea41ed1ff7cfb62c2e24f9602d583 [file] [log] [blame]
Fabio Estevam8a271ce2019-06-10 22:24:12 -03001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (C) 2013 Freescale Semiconductor, Inc.
4 *
5 * Configuration settings for the pico-imx6 board.
6 */
7
8#ifndef __CONFIG_H
9#define __CONFIG_H
10
11#include "mx6_common.h"
12
Tom Rinia17aa192022-12-04 10:04:55 -050013#define CFG_MXC_UART_BASE UART1_BASE
Fabio Estevam8a271ce2019-06-10 22:24:12 -030014
Fabio Estevam8a271ce2019-06-10 22:24:12 -030015/* MMC Configuration */
Tom Rini376b88a2022-10-28 20:27:13 -040016#define CFG_SYS_FSL_ESDHC_ADDR USDHC3_BASE_ADDR
Fabio Estevam8a271ce2019-06-10 22:24:12 -030017
Fabio Estevam8a271ce2019-06-10 22:24:12 -030018#define DFU_DEFAULT_POLL_TIMEOUT 300
19
Tom Rini3aef00d2022-12-04 10:03:38 -050020#define CFG_DFU_ENV_SETTINGS \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030021 "dfu_alt_info=" \
22 "spl raw 0x2 0x400;" \
23 "u-boot raw 0x8a 0x1000;" \
24 "/boot/zImage ext4 0 1;" \
25 "rootfs part 0 1\0" \
26
27#define BOOTMENU_ENV \
28 "bootmenu_0=Boot using PICO-Hobbit baseboard=" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030029 "setenv baseboard hobbit; saveenv; run base_boot\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030030 "bootmenu_1=Boot using PICO-Pi baseboard=" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030031 "setenv baseboard pi; saveenv; run base_boot\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030032 "bootmenu_2=Boot using PICO-Dwarf baseboard=" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030033 "setenv baseboard dwarf; saveenv; run base_boot\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030034 "bootmenu_3=Boot using PICO-Nymph baseboard=" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030035 "setenv baseboard nymph; saveenv; run base_boot\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030036
Tom Rinic9edebe2022-12-04 10:03:50 -050037#define CFG_EXTRA_ENV_SETTINGS \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030038 "console=ttymxc0\0" \
39 "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
40 BOOTMENU_ENV \
41 "fdt_high=0xffffffff\0" \
42 "initrd_high=0xffffffff\0" \
43 "fdt_addr_r=0x18000000\0" \
44 "fdt_addr=0x18000000\0" \
45 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
Tom Rini3aef00d2022-12-04 10:03:38 -050046 CFG_DFU_ENV_SETTINGS \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030047 "finduuid=part uuid mmc 0:1 uuid\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030048 "findfdt="\
49 "if test $baseboard = hobbit && test $board_rev = MX6Q ; then " \
50 "setenv fdtfile imx6q-pico-hobbit.dtb; fi; " \
51 "if test $baseboard = pi && test $board_rev = MX6Q ; then " \
52 "setenv fdtfile imx6q-pico-pi.dtb; fi; " \
53 "if test $baseboard = dwarf && test $board_rev = MX6Q ; then " \
54 "setenv fdtfile imx6q-pico-dwarf.dtb; fi; " \
55 "if test $baseboard = nymph && test $board_rev = MX6Q ; then " \
56 "setenv fdtfile imx6q-pico-nymph.dtb; fi; " \
57 "if test $baseboard = hobbit && test $board_rev = MX6DL ; then " \
58 "setenv fdtfile imx6dl-pico-hobbit.dtb; fi; " \
59 "if test $baseboard = pi && test $board_rev = MX6DL ; then " \
60 "setenv fdtfile imx6dl-pico-pi.dtb; fi; " \
61 "if test $baseboard = dwarf && test $board_rev = MX6DL ; then " \
62 "setenv fdtfile imx6dl-pico-dwarf.dtb; fi; " \
63 "if test $baseboard = nymph && test $board_rev = MX6DL ; then " \
64 "setenv fdtfile imx6dl-pico-nymph.dtb; fi; " \
65 "if test $fdtfile = ask; then " \
66 "echo WARNING: Could not determine dtb to use; fi; \0" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030067 "default_boot=" \
68 "if test $baseboard = ask ; then " \
69 "bootmenu -1; " \
70 "else " \
71 "run base_boot;" \
72 "fi; \0" \
73 "base_boot=run findfdt; run finduuid; run distro_bootcmd\0" \
Tom Rini9004ee02021-08-23 10:25:30 -040074 "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
75 "pxefile_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030076 "ramdisk_addr_r=0x13000000\0" \
77 "ramdiskaddr=0x13000000\0" \
Tom Rini9004ee02021-08-23 10:25:30 -040078 "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030079 BOOTENV
80
81#define BOOT_TARGET_DEVICES(func) \
82 func(MMC, mmc, 0) \
83 func(USB, usb, 0)
84
85#include <config_distro_bootcmd.h>
86
87/* Physical Memory Map */
88#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
Fabio Estevam8a271ce2019-06-10 22:24:12 -030093
Fabio Estevam8a271ce2019-06-10 22:24:12 -030094/* Environment organization */
Fabio Estevam8a271ce2019-06-10 22:24:12 -030095
Fabio Estevam3887fd52019-09-16 14:15:00 -030096/* Ethernet Configuration */
Tom Rini4e3c8a62022-12-04 10:03:53 -050097#define CFG_FEC_MXC_PHYADDR 1
Fabio Estevam3887fd52019-09-16 14:15:00 -030098
Fabio Estevam8a271ce2019-06-10 22:24:12 -030099#endif /* __CONFIG_H * */