Frieder Schrempf | c6d170b | 2021-09-29 16:42:41 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (C) 2018 Kontron Electronics GmbH |
| 4 | * |
| 5 | * Configuration settings for the Kontron i.MX6UL boards/SoMs. |
| 6 | */ |
| 7 | #ifndef __KONTRON_MX6UL_CONFIG_H |
| 8 | #define __KONTRON_MX6UL_CONFIG_H |
| 9 | |
| 10 | #include <asm/arch/imx-regs.h> |
| 11 | #include <linux/sizes.h> |
| 12 | |
| 13 | #include "mx6_common.h" |
| 14 | #ifdef CONFIG_SPL_BUILD |
| 15 | #include "imx6_spl.h" |
| 16 | #endif |
| 17 | |
| 18 | /* RAM */ |
| 19 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 20 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 21 | |
| 22 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 23 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 24 | |
Frieder Schrempf | c6d170b | 2021-09-29 16:42:41 +0200 | [diff] [blame] | 25 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 26 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 27 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 28 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 29 | |
| 30 | #define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_TEXT_BASE |
| 31 | |
| 32 | /* Board and environment settings */ |
| 33 | #define CONFIG_MXC_UART_BASE UART4_BASE |
| 34 | #define CONFIG_HOSTNAME "kontron-mx6ul" |
| 35 | #define CONFIG_ETHPRIME "eth0" |
| 36 | |
| 37 | #ifdef CONFIG_USB_EHCI_HCD |
| 38 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
| 39 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 40 | #define CONFIG_MXC_USB_FLAGS 0 |
| 41 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
| 42 | #endif |
| 43 | |
| 44 | /* Boot order for distro boot */ |
| 45 | #ifndef CONFIG_SPL_BUILD |
| 46 | #define BOOT_TARGET_DEVICES(func) \ |
| 47 | func(MMC, mmc, 1) \ |
| 48 | func(MMC, mmc, 0) \ |
| 49 | func(UBIFS, ubifs, 0) \ |
| 50 | func(USB, usb, 0) \ |
| 51 | func(PXE, pxe, na) \ |
| 52 | func(DHCP, dhcp, na) |
| 53 | #include <config_distro_bootcmd.h> |
| 54 | #else |
| 55 | #define BOOTENV |
| 56 | #endif |
| 57 | |
| 58 | /* MMC Configs */ |
| 59 | #ifdef CONFIG_FSL_USDHC |
| 60 | #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR |
| 61 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
| 62 | #define CONFIG_SYS_MMC_IMG_LOAD_PART 1 |
| 63 | #endif |
| 64 | |
| 65 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 66 | "kernel_addr_r=0x82000000\0" \ |
| 67 | "ramdisk_addr_r=0x88080000\0" \ |
| 68 | "pxefile_addr_r=0x80100000\0" \ |
| 69 | "scriptaddr=0x80100000\0" \ |
| 70 | "bootdelay=3\0" \ |
| 71 | "ethact=" CONFIG_ETHPRIME "\0" \ |
| 72 | "hostname=" CONFIG_HOSTNAME "\0" \ |
| 73 | BOOTENV |
| 74 | |
| 75 | #endif /* __KONTRON_MX6UL_CONFIG_H */ |