Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015 Freescale Semiconductor, Inc. |
| 4 | * Copyright (C) 2016 Grinn |
| 5 | * |
| 6 | * Configuration settings for the Grinn liteBoard (i.MX6UL). |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 7 | */ |
| 8 | #ifndef __LITEBOARD_CONFIG_H |
| 9 | #define __LITEBOARD_CONFIG_H |
| 10 | |
| 11 | #include <asm/arch/imx-regs.h> |
| 12 | #include <linux/sizes.h> |
Simon Glass | 1af3c7f | 2020-05-10 11:40:09 -0600 | [diff] [blame] | 13 | #include <linux/stringify.h> |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 14 | #include "mx6_common.h" |
| 15 | |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 16 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 17 | |
| 18 | /* MMC Configs */ |
| 19 | #ifdef CONFIG_FSL_USDHC |
Tom Rini | 6cc0454 | 2022-10-28 20:27:13 -0400 | [diff] [blame] | 20 | #define CFG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 21 | #endif |
| 22 | |
Tom Rini | 0613c36 | 2022-12-04 10:03:50 -0500 | [diff] [blame^] | 23 | #define CFG_EXTRA_ENV_SETTINGS \ |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 24 | "script=boot.scr\0" \ |
| 25 | "image=zImage\0" \ |
| 26 | "console=ttymxc0\0" \ |
| 27 | "fdt_high=0xffffffff\0" \ |
| 28 | "initrd_high=0xffffffff\0" \ |
| 29 | "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ |
| 30 | "fdt_addr=0x83000000\0" \ |
| 31 | "boot_fdt=try\0" \ |
| 32 | "ip_dyn=yes\0" \ |
| 33 | "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ |
Tom Rini | de35b8f | 2021-12-11 14:55:52 -0500 | [diff] [blame] | 34 | "mmcpart=1\0" \ |
Peng Fan | adfaa42 | 2022-04-15 12:23:41 +0800 | [diff] [blame] | 35 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 36 | "mmcautodetect=yes\0" \ |
| 37 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
| 38 | "root=${mmcroot}\0" \ |
| 39 | "loadbootscript=" \ |
| 40 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 41 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 42 | "source\0" \ |
| 43 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
| 44 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 45 | "mmcboot=echo Booting from mmc ...; " \ |
| 46 | "run mmcargs; " \ |
| 47 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 48 | "if run loadfdt; then " \ |
| 49 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 50 | "else " \ |
| 51 | "if test ${boot_fdt} = try; then " \ |
| 52 | "bootz; " \ |
| 53 | "else " \ |
| 54 | "echo WARN: Cannot load the DT; " \ |
| 55 | "fi; " \ |
| 56 | "fi; " \ |
| 57 | "else " \ |
| 58 | "bootz; " \ |
| 59 | "fi;\0" \ |
| 60 | "netargs=setenv bootargs console=${console},${baudrate} " \ |
| 61 | "root=/dev/nfs " \ |
| 62 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 63 | "netboot=echo Booting from net ...; " \ |
| 64 | "run netargs; " \ |
| 65 | "if test ${ip_dyn} = yes; then " \ |
| 66 | "setenv get_cmd dhcp; " \ |
| 67 | "else " \ |
| 68 | "setenv get_cmd tftp; " \ |
| 69 | "fi; " \ |
| 70 | "${get_cmd} ${image}; " \ |
| 71 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 72 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
| 73 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
| 74 | "else " \ |
| 75 | "if test ${boot_fdt} = try; then " \ |
| 76 | "bootz; " \ |
| 77 | "else " \ |
| 78 | "echo WARN: Cannot load the DT; " \ |
| 79 | "fi; " \ |
| 80 | "fi; " \ |
| 81 | "else " \ |
| 82 | "bootz; " \ |
| 83 | "fi;\0" |
| 84 | |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 85 | /* Miscellaneous configurable options */ |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 86 | |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 87 | /* Physical Memory Map */ |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 88 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 89 | |
Tom Rini | aa6e94d | 2022-11-16 13:10:37 -0500 | [diff] [blame] | 90 | #define CFG_SYS_SDRAM_BASE PHYS_SDRAM |
Tom Rini | 65cc0e2 | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 91 | #define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 92 | #define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 93 | |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 94 | /* FLASH and environment organization */ |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 95 | |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 96 | /* USB Configs */ |
| 97 | #ifdef CONFIG_CMD_USB |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 98 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 99 | #define CONFIG_MXC_USB_FLAGS 0 |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 100 | #endif |
| 101 | |
| 102 | #ifdef CONFIG_CMD_NET |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 103 | #define CONFIG_FEC_ENET_DEV 0 |
| 104 | |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 105 | #define CONFIG_FEC_MXC_PHYADDR 0x0 |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 106 | #endif |
| 107 | |
Marcin Niestroj | c9e40e6 | 2016-12-07 16:46:33 +0100 | [diff] [blame] | 108 | #endif |