1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * K+P iMX6Q KP_IMX6Q_TPC board configuration
8 #ifndef __KP_IMX6Q_TPC_IMX6_CONFIG_H_
9 #define __KP_IMX6Q_TPC_IMX6_CONFIG_H_
11 #include <asm/arch/imx-regs.h>
13 #include "mx6_common.h"
16 #include "imx6_spl.h" /* common IMX6 SPL configuration */
18 /* Miscellaneous configurable options */
19 #define CONFIG_CMDLINE_TAG
20 #define CONFIG_SETUP_MEMORY_TAGS
21 #define CONFIG_INITRD_TAG
22 #define CONFIG_REVISION_TAG
25 #define CONFIG_ARP_TIMEOUT 200UL
29 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
30 #define CONFIG_USB_HOST_ETHER
31 #define CONFIG_USB_ETHER_ASIX
32 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
33 #define CONFIG_MXC_USB_FLAGS 0
34 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 /* Enabled USB controller number */
37 #ifndef CONFIG_SPL_BUILD
38 #define CONFIG_EXTRA_ENV_SETTINGS \
39 "console=ttymxc0,115200\0" \
40 "fdt_addr=0x18000000\0" \
41 "fdt_high=0xffffffff\0" \
42 "initrd_high=0xffffffff\0" \
43 "kernel_addr_r=0x10008000\0" \
44 "fdt_addr_r=0x13000000\0" \
45 "ramdisk_addr_r=0x18000000\0" \
46 "scriptaddr=0x14000000\0" \
47 "kernel_file=fitImage\0"\
48 "rdinit=/sbin/init\0" \
49 "addinitrd=setenv bootargs ${bootargs} rdinit=${rdinit} ${debug} \0" \
50 "fit_config=mx6q_tpc70_conf\0" \
51 "uboot_file=u-boot.img\0" \
53 "wic_file=kp-image-kpimx6qtpc.wic\0" \
55 "updargs=setenv bootargs console=${console} ${smp} ${displayargs}\0" \
56 "initrd_ram_dev=/dev/ram\0" \
57 "addswupdate=setenv bootargs ${bootargs} root=${initrd_ram_dev} rw\0" \
58 "loadusb=usb start; " \
59 "fatload usb 0 ${loadaddr} ${upd_image}\0" \
61 "if tftp ${loadaddr} ${uboot_file}; then " \
62 "setexpr blkc ${filesize} / 0x200;" \
63 "setexpr blkc ${blkc} + 1;" \
64 "mmc write ${loadaddr} 0x8A ${blkc};" \
67 "if tftp ${loadaddr} ${SPL_file}; then " \
68 "setexpr blkc ${filesize} / 0x200;" \
69 "setexpr blkc ${blkc} + 1;" \
70 "mmc write ${loadaddr} 0x2 ${blkc};" \
72 "upd_SPL_mmc=mmc dev 1; mmc partconf 1 0 1 1; run upd_SPL_sd\0" \
73 "upd_uboot_mmc=mmc dev 1; mmc partconf 1 0 1 1; run upd_uboot_sd\0" \
74 "up_mmc=run upd_SPL_mmc; run upd_uboot_mmc\0" \
75 "up_sd=run upd_SPL_sd; run upd_uboot_sd\0" \
77 "if tftp ${loadaddr} ${wic_file}; then " \
78 "setexpr blkc ${filesize} / 0x200;" \
79 "setexpr blkc ${blkc} + 1;" \
80 "mmc write ${loadaddr} 0x0 ${blkc};" \
82 "usbupd=echo Booting update from usb ...; " \
88 "bootm ${loadaddr}#${fit_config}\0" \
91 #define CONFIG_BOOTCOMMAND "run usbupd; run distro_bootcmd"
93 #define BOOT_TARGET_DEVICES(func) \
99 #include <config_distro_bootcmd.h>
102 /* Physical Memory Map */
103 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
105 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
106 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
107 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
109 #define CONFIG_SYS_INIT_SP_OFFSET \
110 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
112 #define CONFIG_SYS_INIT_SP_ADDR \
113 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
117 #endif /* __KP_IMX6Q_TPC_IMX6_CONFIG_H_ */