Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2013-2016 Freescale Semiconductor, Inc. |
| 4 | * |
| 5 | * Configuration settings for the Freescale i.MX6SL EVK board. |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef __CONFIG_H |
| 9 | #define __CONFIG_H |
| 10 | |
| 11 | #include "mx6_common.h" |
| 12 | |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 13 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 14 | |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 15 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 16 | "epdc_waveform=epdc_splash.bin\0" \ |
| 17 | "script=boot.scr\0" \ |
| 18 | "image=zImage\0" \ |
| 19 | "console=ttymxc0\0" \ |
| 20 | "fdt_high=0xffffffff\0" \ |
| 21 | "initrd_high=0xffffffff\0" \ |
| 22 | "fdt_file=imx6sll-evk.dtb\0" \ |
| 23 | "fdt_addr=0x83000000\0" \ |
| 24 | "boot_fdt=try\0" \ |
| 25 | "ip_dyn=yes\0" \ |
| 26 | "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ |
| 27 | "mmcpart=1\0" \ |
Peng Fan | bb4bb58 | 2022-04-15 12:23:41 +0800 | [diff] [blame] | 28 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 29 | "mmcautodetect=yes\0" \ |
| 30 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 31 | "root=${mmcroot}\0" \ |
| 32 | "loadbootscript=" \ |
| 33 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 34 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 35 | "source\0" \ |
| 36 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
| 37 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 38 | "mmcboot=echo Booting from mmc ...; " \ |
| 39 | "run mmcargs; " \ |
| 40 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 41 | "if run loadfdt; then " \ |
| 42 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 43 | "else " \ |
| 44 | "if test ${boot_fdt} = try; then " \ |
| 45 | "bootz; " \ |
| 46 | "else " \ |
| 47 | "echo WARN: Cannot load the DT; " \ |
| 48 | "fi; " \ |
| 49 | "fi; " \ |
| 50 | "else " \ |
| 51 | "bootz; " \ |
| 52 | "fi;\0" \ |
| 53 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 54 | "root=/dev/nfs " \ |
| 55 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 56 | "netboot=echo Booting from net ...; " \ |
| 57 | "usb start; " \ |
| 58 | "run netargs; " \ |
| 59 | "if test ${ip_dyn} = yes; then " \ |
| 60 | "setenv get_cmd dhcp; " \ |
| 61 | "else " \ |
| 62 | "setenv get_cmd tftp; " \ |
| 63 | "fi; " \ |
| 64 | "${get_cmd} ${image}; " \ |
| 65 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 66 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
| 67 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 68 | "else " \ |
| 69 | "if test ${boot_fdt} = try; then " \ |
| 70 | "bootz; " \ |
| 71 | "else " \ |
| 72 | "echo WARN: Cannot load the DT; " \ |
| 73 | "fi; " \ |
| 74 | "fi; " \ |
| 75 | "else " \ |
| 76 | "bootz; " \ |
| 77 | "fi;\0" |
| 78 | |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 79 | /* Miscellaneous configurable options */ |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 80 | |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 81 | /* Physical Memory Map */ |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 82 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 83 | #define PHYS_SDRAM_SIZE SZ_2G |
| 84 | |
| 85 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 86 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 87 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 88 | |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 89 | /* Environment organization */ |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 90 | |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 91 | /* MMC Configs */ |
| 92 | #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR |
| 93 | #define CONFIG_SYS_FSL_USDHC_NUM 3 |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 94 | |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 95 | #define CONFIG_IOMUX_LPSR |
| 96 | |
Peng Fan | d85131e | 2016-12-22 17:06:44 +0800 | [diff] [blame] | 97 | /* USB Configs */ |
| 98 | #ifdef CONFIG_CMD_USB |
Peng Fan | d85131e | 2016-12-22 17:06:44 +0800 | [diff] [blame] | 99 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 100 | #endif |
| 101 | |
Simon Glass | fb64e36 | 2020-05-10 11:40:09 -0600 | [diff] [blame] | 102 | #include <linux/stringify.h> |
Peng Fan | 186585c | 2016-12-11 19:24:37 +0800 | [diff] [blame] | 103 | #endif /* __CONFIG_H */ |