blob: 687133b9bddaff1c647797cea4f9d6977f67918b [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
13#include "imx6_spl.h"
14
Fabio Estevam431adf72019-09-17 22:04:57 -030015#ifdef CONFIG_SPL_OS_BOOT
16/* Falcon Mode */
Fabio Estevam431adf72019-09-17 22:04:57 -030017
18/* Falcon Mode - MMC support: args@1MB kernel@2MB */
Fabio Estevam431adf72019-09-17 22:04:57 -030019#endif
20
Fabio Estevam8a271ce2019-06-10 22:24:12 -030021#define CONFIG_MXC_UART_BASE UART1_BASE
22
Fabio Estevam8a271ce2019-06-10 22:24:12 -030023/* MMC Configuration */
Tom Rini376b88a2022-10-28 20:27:13 -040024#define CFG_SYS_FSL_ESDHC_ADDR USDHC3_BASE_ADDR
Fabio Estevam8a271ce2019-06-10 22:24:12 -030025
26/* USB Configs */
27#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
28#define CONFIG_MXC_USB_FLAGS 0
29
Fabio Estevam8a271ce2019-06-10 22:24:12 -030030#define DFU_DEFAULT_POLL_TIMEOUT 300
31
32#define CONFIG_DFU_ENV_SETTINGS \
33 "dfu_alt_info=" \
34 "spl raw 0x2 0x400;" \
35 "u-boot raw 0x8a 0x1000;" \
36 "/boot/zImage ext4 0 1;" \
37 "rootfs part 0 1\0" \
38
39#define BOOTMENU_ENV \
40 "bootmenu_0=Boot using PICO-Hobbit baseboard=" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030041 "setenv baseboard hobbit; saveenv; run base_boot\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030042 "bootmenu_1=Boot using PICO-Pi baseboard=" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030043 "setenv baseboard pi; saveenv; run base_boot\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030044 "bootmenu_2=Boot using PICO-Dwarf baseboard=" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030045 "setenv baseboard dwarf; saveenv; run base_boot\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030046 "bootmenu_3=Boot using PICO-Nymph baseboard=" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030047 "setenv baseboard nymph; saveenv; run base_boot\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030048
49#define CONFIG_EXTRA_ENV_SETTINGS \
50 "console=ttymxc0\0" \
51 "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
52 BOOTMENU_ENV \
53 "fdt_high=0xffffffff\0" \
54 "initrd_high=0xffffffff\0" \
55 "fdt_addr_r=0x18000000\0" \
56 "fdt_addr=0x18000000\0" \
57 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
58 CONFIG_DFU_ENV_SETTINGS \
59 "finduuid=part uuid mmc 0:1 uuid\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030060 "findfdt="\
61 "if test $baseboard = hobbit && test $board_rev = MX6Q ; then " \
62 "setenv fdtfile imx6q-pico-hobbit.dtb; fi; " \
63 "if test $baseboard = pi && test $board_rev = MX6Q ; then " \
64 "setenv fdtfile imx6q-pico-pi.dtb; fi; " \
65 "if test $baseboard = dwarf && test $board_rev = MX6Q ; then " \
66 "setenv fdtfile imx6q-pico-dwarf.dtb; fi; " \
67 "if test $baseboard = nymph && test $board_rev = MX6Q ; then " \
68 "setenv fdtfile imx6q-pico-nymph.dtb; fi; " \
69 "if test $baseboard = hobbit && test $board_rev = MX6DL ; then " \
70 "setenv fdtfile imx6dl-pico-hobbit.dtb; fi; " \
71 "if test $baseboard = pi && test $board_rev = MX6DL ; then " \
72 "setenv fdtfile imx6dl-pico-pi.dtb; fi; " \
73 "if test $baseboard = dwarf && test $board_rev = MX6DL ; then " \
74 "setenv fdtfile imx6dl-pico-dwarf.dtb; fi; " \
75 "if test $baseboard = nymph && test $board_rev = MX6DL ; then " \
76 "setenv fdtfile imx6dl-pico-nymph.dtb; fi; " \
77 "if test $fdtfile = ask; then " \
78 "echo WARNING: Could not determine dtb to use; fi; \0" \
Otavio Salvadorf83d8862019-06-19 15:03:44 -030079 "default_boot=" \
80 "if test $baseboard = ask ; then " \
81 "bootmenu -1; " \
82 "else " \
83 "run base_boot;" \
84 "fi; \0" \
85 "base_boot=run findfdt; run finduuid; run distro_bootcmd\0" \
Tom Rini9004ee02021-08-23 10:25:30 -040086 "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
87 "pxefile_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030088 "ramdisk_addr_r=0x13000000\0" \
89 "ramdiskaddr=0x13000000\0" \
Tom Rini9004ee02021-08-23 10:25:30 -040090 "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Fabio Estevam8a271ce2019-06-10 22:24:12 -030091 BOOTENV
92
93#define BOOT_TARGET_DEVICES(func) \
94 func(MMC, mmc, 0) \
95 func(USB, usb, 0)
96
97#include <config_distro_bootcmd.h>
98
99/* Physical Memory Map */
100#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
101
102#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
103#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
104#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
105
Fabio Estevam8a271ce2019-06-10 22:24:12 -0300106/* Environment organization */
Fabio Estevam8a271ce2019-06-10 22:24:12 -0300107
Fabio Estevam3887fd52019-09-16 14:15:00 -0300108/* Ethernet Configuration */
Fabio Estevam3887fd52019-09-16 14:15:00 -0300109#define CONFIG_FEC_MXC_PHYADDR 1
Fabio Estevam3887fd52019-09-16 14:15:00 -0300110
Fabio Estevam3cc1be92019-09-17 14:17:07 -0300111/* Framebuffer */
Fabio Estevam3cc1be92019-09-17 14:17:07 -0300112#define CONFIG_IMX_HDMI
113#define CONFIG_IMX_VIDEO_SKIP
114
Fabio Estevam8a271ce2019-06-10 22:24:12 -0300115#endif /* __CONFIG_H * */