Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Stefano Babic | 1330579 | 2018-01-03 16:11:56 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) Stefano Babic <sbabic@denx.de> |
Stefano Babic | 1330579 | 2018-01-03 16:11:56 +0100 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | |
| 7 | #ifndef __SKSIMX6_CONFIG_H |
| 8 | #define __SKSIMX6_CONFIG_H |
| 9 | |
Stefano Babic | 1330579 | 2018-01-03 16:11:56 +0100 | [diff] [blame] | 10 | #include "mx6_common.h" |
| 11 | #include "imx6_spl.h" |
| 12 | |
| 13 | /* Thermal */ |
| 14 | #define CONFIG_IMX_THERMAL |
| 15 | |
| 16 | /* Serial */ |
Stefano Babic | 1330579 | 2018-01-03 16:11:56 +0100 | [diff] [blame] | 17 | #define CONFIG_MXC_UART_BASE UART1_BASE |
| 18 | |
| 19 | /* Size of malloc() pool */ |
| 20 | #define CONFIG_SYS_MALLOC_LEN (8 * SZ_1M) |
| 21 | |
| 22 | /* Ethernet */ |
| 23 | #define IMX_FEC_BASE ENET_BASE_ADDR |
| 24 | #define CONFIG_FEC_XCV_TYPE RGMII |
| 25 | #define CONFIG_ETHPRIME "FEC" |
| 26 | #define CONFIG_FEC_MXC_PHYADDR 0x01 |
| 27 | |
Stefano Babic | 1330579 | 2018-01-03 16:11:56 +0100 | [diff] [blame] | 28 | #define CONFIG_PHY_MICREL_KSZ9021 |
| 29 | |
| 30 | /* I2C Configs */ |
| 31 | #define CONFIG_SYS_I2C |
| 32 | #define CONFIG_SYS_I2C_MXC |
| 33 | #define CONFIG_SYS_I2C_MXC_I2C2 |
| 34 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 35 | |
| 36 | /* Filesystem support */ |
| 37 | |
| 38 | /* Physical Memory Map */ |
Stefano Babic | 1330579 | 2018-01-03 16:11:56 +0100 | [diff] [blame] | 39 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |
| 40 | |
| 41 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM |
| 42 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR |
| 43 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE |
| 44 | |
| 45 | #define CONFIG_SYS_INIT_SP_OFFSET \ |
| 46 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
| 47 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 48 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) |
| 49 | |
| 50 | /* MMC Configs */ |
| 51 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
| 52 | #define CONFIG_SYS_FSL_USDHC_NUM 1 |
| 53 | |
| 54 | /* Environment organization */ |
Stefano Babic | 1330579 | 2018-01-03 16:11:56 +0100 | [diff] [blame] | 55 | |
| 56 | /* Default environment */ |
| 57 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 58 | "addcons=setenv bootargs ${bootargs} " \ |
| 59 | "console=${console},${baudrate}\0" \ |
| 60 | "addip=setenv bootargs ${bootargs} " \ |
| 61 | "ip=${ipaddr}:${serverip}:${gatewayip}:" \ |
| 62 | "${netmask}:${hostname}:${netdev}:off\0" \ |
| 63 | "addmisc=setenv bootargs ${bootargs} ${miscargs}\0" \ |
| 64 | "bootcmd=run mmcboot\0" \ |
| 65 | "bootfile=uImage\0" \ |
| 66 | "bootimage=uImage\0" \ |
| 67 | "console=ttymxc0\0" \ |
| 68 | "fdt_addr_r=0x18000000\0" \ |
| 69 | "fdt_file=imx6dl-sks-cts.dtb\0" \ |
| 70 | "fdt_high=0xffffffff\0" \ |
| 71 | "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ |
| 72 | "miscargs=quiet\0" \ |
| 73 | "mmcargs=setenv bootargs root=${mmcroot} rw rootwait\0" \ |
| 74 | "mmcboot=if run mmcload;then " \ |
| 75 | "run mmcargs addcons addmisc;" \ |
| 76 | "bootm;fi\0" \ |
| 77 | "mmcload=mmc rescan;" \ |
| 78 | "load mmc 0:${mmcpart} ${kernel_addr_r} boot/fitImage\0"\ |
| 79 | "mmcpart=1\0" \ |
| 80 | "mmcroot=/dev/mmcblk0p1\0" \ |
| 81 | "net_nfs=tftp ${kernel_addr_r} ${board_name}/${bootfile};" \ |
| 82 | "tftp ${fdt_addr_r} ${board_name}/${fdt_file};" \ |
| 83 | "run nfsargs addip addcons addmisc;" \ |
| 84 | "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ |
| 85 | "nfsargs=setenv bootargs root=/dev/nfs " \ |
| 86 | "nfsroot=${serverip}:${nfsroot},v3 panic=1\0" |
| 87 | |
| 88 | #endif |