Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 1 | /* 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 Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 13 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 14 | |
Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 15 | /* MMC Configuration */ |
Tom Rini | 376b88a | 2022-10-28 20:27:13 -0400 | [diff] [blame] | 16 | #define CFG_SYS_FSL_ESDHC_ADDR USDHC3_BASE_ADDR |
Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 17 | |
| 18 | /* USB Configs */ |
| 19 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 20 | #define CONFIG_MXC_USB_FLAGS 0 |
| 21 | |
Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 22 | #define DFU_DEFAULT_POLL_TIMEOUT 300 |
| 23 | |
| 24 | #define CONFIG_DFU_ENV_SETTINGS \ |
| 25 | "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 Salvador | f83d886 | 2019-06-19 15:03:44 -0300 | [diff] [blame] | 33 | "setenv baseboard hobbit; saveenv; run base_boot\0" \ |
Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 34 | "bootmenu_1=Boot using PICO-Pi baseboard=" \ |
Otavio Salvador | f83d886 | 2019-06-19 15:03:44 -0300 | [diff] [blame] | 35 | "setenv baseboard pi; saveenv; run base_boot\0" \ |
Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 36 | "bootmenu_2=Boot using PICO-Dwarf baseboard=" \ |
Otavio Salvador | f83d886 | 2019-06-19 15:03:44 -0300 | [diff] [blame] | 37 | "setenv baseboard dwarf; saveenv; run base_boot\0" \ |
Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 38 | "bootmenu_3=Boot using PICO-Nymph baseboard=" \ |
Otavio Salvador | f83d886 | 2019-06-19 15:03:44 -0300 | [diff] [blame] | 39 | "setenv baseboard nymph; saveenv; run base_boot\0" \ |
Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 40 | |
| 41 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 42 | "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" \ |
| 50 | CONFIG_DFU_ENV_SETTINGS \ |
| 51 | "finduuid=part uuid mmc 0:1 uuid\0" \ |
Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 52 | "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 Salvador | f83d886 | 2019-06-19 15:03:44 -0300 | [diff] [blame] | 71 | "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 Rini | 9004ee0 | 2021-08-23 10:25:30 -0400 | [diff] [blame] | 78 | "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
| 79 | "pxefile_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 80 | "ramdisk_addr_r=0x13000000\0" \ |
| 81 | "ramdiskaddr=0x13000000\0" \ |
Tom Rini | 9004ee0 | 2021-08-23 10:25:30 -0400 | [diff] [blame] | 82 | "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 83 | 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 Rini | bb4dd96 | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 94 | #define CFG_SYS_SDRAM_BASE PHYS_SDRAM |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 95 | #define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 96 | #define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE |
Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 97 | |
Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 98 | /* Environment organization */ |
Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 99 | |
Fabio Estevam | 3887fd5 | 2019-09-16 14:15:00 -0300 | [diff] [blame] | 100 | /* Ethernet Configuration */ |
Fabio Estevam | 3887fd5 | 2019-09-16 14:15:00 -0300 | [diff] [blame] | 101 | #define CONFIG_FEC_MXC_PHYADDR 1 |
Fabio Estevam | 3887fd5 | 2019-09-16 14:15:00 -0300 | [diff] [blame] | 102 | |
Fabio Estevam | 8a271ce | 2019-06-10 22:24:12 -0300 | [diff] [blame] | 103 | #endif /* __CONFIG_H * */ |