blob: e1f7b7003194c38188676bc7f2b14cfb614f4935 [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
Fabio Estevam8a271ce2019-06-10 22:24:12 -030013#define CONFIG_MXC_UART_BASE UART1_BASE
14
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
18/* USB Configs */
19#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
20#define CONFIG_MXC_USB_FLAGS 0
21
Fabio Estevam8a271ce2019-06-10 22:24:12 -030022#define DFU_DEFAULT_POLL_TIMEOUT 300
23
Tom Rini3aef00d2022-12-04 10:03:38 -050024#define CFG_DFU_ENV_SETTINGS \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030025 "dfu_alt_info=" \
26 "spl raw 0x2 0x400;" \
27 "u-boot raw 0x8a 0x1000;" \
28 "/boot/zImage ext4 0 1;" \
29 "rootfs part 0 1\0" \
30
31#define BOOTMENU_ENV \
32 "bootmenu_0=Boot using PICO-Hobbit baseboard=" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030033 "setenv baseboard hobbit; saveenv; run base_boot\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030034 "bootmenu_1=Boot using PICO-Pi baseboard=" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030035 "setenv baseboard pi; saveenv; run base_boot\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030036 "bootmenu_2=Boot using PICO-Dwarf baseboard=" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030037 "setenv baseboard dwarf; saveenv; run base_boot\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030038 "bootmenu_3=Boot using PICO-Nymph baseboard=" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030039 "setenv baseboard nymph; saveenv; run base_boot\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030040
Tom Rinic9edebe2022-12-04 10:03:50 -050041#define CFG_EXTRA_ENV_SETTINGS \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030042 "console=ttymxc0\0" \
43 "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
44 BOOTMENU_ENV \
45 "fdt_high=0xffffffff\0" \
46 "initrd_high=0xffffffff\0" \
47 "fdt_addr_r=0x18000000\0" \
48 "fdt_addr=0x18000000\0" \
49 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
Tom Rini3aef00d2022-12-04 10:03:38 -050050 CFG_DFU_ENV_SETTINGS \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030051 "finduuid=part uuid mmc 0:1 uuid\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030052 "findfdt="\
53 "if test $baseboard = hobbit && test $board_rev = MX6Q ; then " \
54 "setenv fdtfile imx6q-pico-hobbit.dtb; fi; " \
55 "if test $baseboard = pi && test $board_rev = MX6Q ; then " \
56 "setenv fdtfile imx6q-pico-pi.dtb; fi; " \
57 "if test $baseboard = dwarf && test $board_rev = MX6Q ; then " \
58 "setenv fdtfile imx6q-pico-dwarf.dtb; fi; " \
59 "if test $baseboard = nymph && test $board_rev = MX6Q ; then " \
60 "setenv fdtfile imx6q-pico-nymph.dtb; fi; " \
61 "if test $baseboard = hobbit && test $board_rev = MX6DL ; then " \
62 "setenv fdtfile imx6dl-pico-hobbit.dtb; fi; " \
63 "if test $baseboard = pi && test $board_rev = MX6DL ; then " \
64 "setenv fdtfile imx6dl-pico-pi.dtb; fi; " \
65 "if test $baseboard = dwarf && test $board_rev = MX6DL ; then " \
66 "setenv fdtfile imx6dl-pico-dwarf.dtb; fi; " \
67 "if test $baseboard = nymph && test $board_rev = MX6DL ; then " \
68 "setenv fdtfile imx6dl-pico-nymph.dtb; fi; " \
69 "if test $fdtfile = ask; then " \
70 "echo WARNING: Could not determine dtb to use; fi; \0" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030071 "default_boot=" \
72 "if test $baseboard = ask ; then " \
73 "bootmenu -1; " \
74 "else " \
75 "run base_boot;" \
76 "fi; \0" \
77 "base_boot=run findfdt; run finduuid; run distro_bootcmd\0" \
Tom Rini9004ee02021-08-23 10:25:30 -040078 "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
79 "pxefile_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030080 "ramdisk_addr_r=0x13000000\0" \
81 "ramdiskaddr=0x13000000\0" \
Tom Rini9004ee02021-08-23 10:25:30 -040082 "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030083 BOOTENV
84
85#define BOOT_TARGET_DEVICES(func) \
86 func(MMC, mmc, 0) \
87 func(USB, usb, 0)
88
89#include <config_distro_bootcmd.h>
90
91/* Physical Memory Map */
92#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
93
Tom Rinibb4dd962022-11-16 13:10:37 -050094#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
Tom Rini6a5dccc2022-11-16 13:10:41 -050095#define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
96#define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
Fabio Estevam8a271ce2019-06-10 22:24:12 -030097
Fabio Estevam8a271ce2019-06-10 22:24:12 -030098/* Environment organization */
Fabio Estevam8a271ce2019-06-10 22:24:12 -030099
Fabio Estevam3887fd52019-09-16 14:15:00 -0300100/* Ethernet Configuration */
Tom Rini4e3c8a62022-12-04 10:03:53 -0500101#define CFG_FEC_MXC_PHYADDR 1
Fabio Estevam3887fd52019-09-16 14:15:00 -0300102
Fabio Estevam8a271ce2019-06-10 22:24:12 -0300103#endif /* __CONFIG_H * */