Parthiban Nallathambi | d2d1191 | 2019-04-10 16:35:32 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Board configuration file for Phytec phyBOARD-i.MX6ULL-Segin SBC |
| 4 | * Copyright (C) 2019 Parthiban Nallathambi <parthitce@gmail.com> |
| 5 | * |
| 6 | * Based on include/configs/xpress.h: |
| 7 | * Copyright (C) 2015-2016 Stefan Roese <sr@denx.de> |
| 8 | */ |
| 9 | #ifndef __PCL063_ULL_H |
| 10 | #define __PCL063_ULL_H |
| 11 | |
| 12 | #include <linux/sizes.h> |
| 13 | #include "mx6_common.h" |
| 14 | |
| 15 | /* SPL options */ |
| 16 | #include "imx6_spl.h" |
| 17 | |
| 18 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
| 19 | |
| 20 | /* Size of malloc() pool */ |
| 21 | #define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M) |
| 22 | |
| 23 | /* Environment settings */ |
| 24 | #define CONFIG_ENV_SIZE (0x4000) |
| 25 | #define CONFIG_ENV_OFFSET (0x80000) |
| 26 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT |
| 27 | #define CONFIG_ENV_OFFSET_REDUND \ |
| 28 | (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) |
| 29 | |
| 30 | /* Environment in SD */ |
| 31 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
| 32 | #define CONFIG_SYS_MMC_ENV_PART 0 |
| 33 | #define MMC_ROOTFS_DEV 0 |
| 34 | #define MMC_ROOTFS_PART 2 |
| 35 | |
| 36 | /* Console configs */ |
| 37 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 38 | |
| 39 | /* MMC Configs */ |
| 40 | #define CONFIG_FSL_USDHC |
| 41 | |
| 42 | #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR |
| 43 | #define CONFIG_SUPPORT_EMMC_BOOT |
| 44 | |
| 45 | /* I2C configs */ |
| 46 | #ifdef CONFIG_CMD_I2C |
| 47 | #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ |
| 48 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 49 | #endif |
| 50 | |
| 51 | /* Miscellaneous configurable options */ |
| 52 | #define CONFIG_SYS_MEMTEST_START 0x80000000 |
| 53 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x10000000) |
| 54 | |
| 55 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 56 | #define CONFIG_SYS_HZ 1000 |
| 57 | |
| 58 | /* Physical Memory Map */ |
| 59 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 60 | #define PHYS_SDRAM_SIZE SZ_256M |
| 61 | |
| 62 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 63 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 64 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 65 | |
| 66 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 67 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 68 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 69 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 70 | |
| 71 | /* NAND */ |
| 72 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
| 73 | #define CONFIG_SYS_NAND_BASE 0x40000000 |
| 74 | |
| 75 | /* USB Configs */ |
| 76 | #define CONFIG_EHCI_HCD_INIT_AFTER_RESET |
| 77 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) |
| 78 | #define CONFIG_MXC_USB_FLAGS 0 |
| 79 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 |
| 80 | |
| 81 | #define CONFIG_IMX_THERMAL |
| 82 | |
| 83 | #define ENV_MMC \ |
| 84 | "mmcdev=" __stringify(MMC_ROOTFS_DEV) "\0" \ |
| 85 | "mmcpart=" __stringify(MMC_ROOTFS_PART) "\0" \ |
| 86 | "fitpart=1\0" \ |
| 87 | "bootdelay=3\0" \ |
| 88 | "silent=1\0" \ |
| 89 | "optargs=rw rootwait\0" \ |
| 90 | "mmcautodetect=yes\0" \ |
| 91 | "mmcrootfstype=ext4\0" \ |
| 92 | "mmcfit_name=fitImage\0" \ |
| 93 | "mmcloadfit=fatload mmc ${mmcdev}:${fitpart} ${fit_addr} " \ |
| 94 | "${mmcfit_name}\0" \ |
| 95 | "mmcargs=setenv bootargs " \ |
| 96 | "root=/dev/mmcblk${mmcdev}p${mmcpart} ${optargs} " \ |
| 97 | "console=${console} rootfstype=${mmcrootfstype}\0" \ |
| 98 | "mmc_mmc_fit=run mmcloadfit;run mmcargs addcon; bootm ${fit_addr}\0" \ |
| 99 | |
| 100 | /* Default environment */ |
| 101 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 102 | "fdt_high=0xffffffff\0" \ |
| 103 | "console=ttymxc0,115200n8\0" \ |
| 104 | "addcon=setenv bootargs ${bootargs} console=${console},${baudrate}\0" \ |
| 105 | "fit_addr=0x82000000\0" \ |
| 106 | ENV_MMC |
| 107 | |
| 108 | #define CONFIG_BOOTCOMMAND "run mmc_mmc_fit" |
| 109 | |
| 110 | #define BOOT_TARGET_DEVICES(func) \ |
| 111 | func(MMC, mmc, 0) \ |
| 112 | func(MMC, mmc, 1) \ |
| 113 | func(DHCP, dhcp, na) |
| 114 | |
| 115 | #include <config_distro_bootcmd.h> |
| 116 | |
| 117 | #endif /* __PCL063_ULL_H */ |