Tom Rini | 855ff8e | 2018-05-18 17:54:39 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Jagan Teki | 1494cc8 | 2018-05-07 11:21:34 +0530 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2018 Simone CIANNI <simone.cianni@bticino.it> |
| 4 | * Copyright (C) 2018 Raffaele RECALCATI <raffaele.recalcati@bticino.it> |
| 5 | * Copyright (C) 2018 Jagan Teki <jagan@amarulasolutions.com> |
| 6 | * |
| 7 | * Configuration settings for the BTicion i.MX6DL Mamoj board. |
Jagan Teki | 1494cc8 | 2018-05-07 11:21:34 +0530 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef __IMX6DL_MAMOJ_CONFIG_H |
| 11 | #define __IMX6DL_MAMOJ_CONFIG_H |
| 12 | |
| 13 | #include <linux/sizes.h> |
| 14 | #include "mx6_common.h" |
| 15 | |
| 16 | /* Size of malloc() pool */ |
Jagan Teki | 129ceda | 2018-05-07 11:21:38 +0530 | [diff] [blame] | 17 | #define CONFIG_SYS_MALLOC_LEN (35 * SZ_1M) |
Jagan Teki | 1494cc8 | 2018-05-07 11:21:34 +0530 | [diff] [blame] | 18 | |
| 19 | /* Total Size of Environment Sector */ |
| 20 | #define CONFIG_ENV_SIZE SZ_128K |
| 21 | |
| 22 | /* Allow to overwrite serial and ethaddr */ |
| 23 | #define CONFIG_ENV_OVERWRITE |
| 24 | |
| 25 | /* Environment */ |
| 26 | #ifndef CONFIG_ENV_IS_NOWHERE |
| 27 | /* Environment in MMC */ |
| 28 | # if defined(CONFIG_ENV_IS_IN_MMC) |
| 29 | # define CONFIG_ENV_OFFSET 0x100000 |
| 30 | # endif |
| 31 | #endif |
| 32 | |
| 33 | #ifndef CONFIG_SPL_BUILD |
| 34 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 35 | "scriptaddr=0x14000000\0" \ |
| 36 | "fdt_addr_r=0x13000000\0" \ |
| 37 | "kernel_addr_r=0x10008000\0" \ |
| 38 | "fdt_high=0xffffffff\0" \ |
Jagan Teki | 129ceda | 2018-05-07 11:21:38 +0530 | [diff] [blame] | 39 | "dfu_alt_info_spl=spl raw 0x2 0x400\0" \ |
| 40 | "dfu_alt_info_uboot=u-boot raw 0x8a 0x11400\0" \ |
Jagan Teki | 1494cc8 | 2018-05-07 11:21:34 +0530 | [diff] [blame] | 41 | BOOTENV |
| 42 | |
| 43 | #define BOOT_TARGET_DEVICES(func) \ |
| 44 | func(MMC, mmc, 2) |
| 45 | |
| 46 | #include <config_distro_bootcmd.h> |
| 47 | #endif |
| 48 | |
| 49 | /* UART */ |
| 50 | #define CONFIG_MXC_UART_BASE UART3_BASE |
| 51 | |
| 52 | /* MMC */ |
| 53 | #define CONFIG_SYS_MMC_ENV_DEV 2 |
Jagan Teki | 1494cc8 | 2018-05-07 11:21:34 +0530 | [diff] [blame] | 54 | |
| 55 | /* Ethernet */ |
| 56 | #define CONFIG_FEC_MXC_PHYADDR 1 |
Jagan Teki | 1494cc8 | 2018-05-07 11:21:34 +0530 | [diff] [blame] | 57 | |
| 58 | /* USB */ |
| 59 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
| 60 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 61 | #define CONFIG_MXC_USB_FLAGS 0 |
| 62 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 |
| 63 | |
Jagan Teki | 9e759ce | 2018-05-07 11:21:39 +0530 | [diff] [blame] | 64 | /* Falcon */ |
| 65 | #define CONFIG_SPL_FS_LOAD_ARGS_NAME "args" |
| 66 | #define CONFIG_SPL_FS_LOAD_KERNEL_NAME "uImage" |
| 67 | #define CONFIG_CMD_SPL |
| 68 | #define CONFIG_SYS_SPL_ARGS_ADDR 0x13000000 |
| 69 | #define CONFIG_CMD_SPL_WRITE_SIZE (128 * SZ_1K) |
| 70 | |
| 71 | /* MMC support: args@1MB kernel@2MB */ |
| 72 | #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x800 /* 1MB */ |
| 73 | #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS (CONFIG_CMD_SPL_WRITE_SIZE / 512) |
| 74 | #define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0x1000 /* 2MB */ |
| 75 | |
Jagan Teki | 1494cc8 | 2018-05-07 11:21:34 +0530 | [diff] [blame] | 76 | /* Miscellaneous configurable options */ |
| 77 | #define CONFIG_SYS_MEMTEST_START 0x80000000 |
| 78 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x8000000) |
| 79 | |
| 80 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 81 | #define CONFIG_SYS_HZ 1000 |
| 82 | |
| 83 | /* Physical Memory Map */ |
Jagan Teki | 1494cc8 | 2018-05-07 11:21:34 +0530 | [diff] [blame] | 84 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 85 | |
| 86 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 87 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 88 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 89 | |
| 90 | #define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \ |
| 91 | GENERATED_GBL_DATA_SIZE) |
| 92 | #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ |
| 93 | CONFIG_SYS_INIT_SP_OFFSET) |
| 94 | |
| 95 | /* SPL */ |
| 96 | #include "imx6_spl.h" |
| 97 | |
| 98 | #endif /* __IMX6DL_MAMOJ_CONFIG_H */ |