2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2017-04-07 15:25:34 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2017 Logic PD, Inc.
|
|
|
|
*
|
|
|
|
* Configuration settings for the LogicPD i.MX6 SOM.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __IMX6LOGIC_CONFIG_H
|
|
|
|
#define __IMX6LOGIC_CONFIG_H
|
|
|
|
|
|
|
|
#define CONFIG_MXC_UART_BASE UART1_BASE
|
|
|
|
#define CONSOLE_DEV "ttymxc0"
|
|
|
|
|
2018-07-06 01:58:24 +00:00
|
|
|
#ifdef CONFIG_SPL
|
|
|
|
#include "imx6_spl.h"
|
|
|
|
#endif
|
|
|
|
|
2017-04-07 15:25:34 +00:00
|
|
|
#include "mx6_common.h"
|
|
|
|
|
|
|
|
/* MMC Configs */
|
|
|
|
#define CONFIG_SYS_FSL_ESDHC_ADDR 0
|
|
|
|
#define CONFIG_SYS_FSL_USDHC_NUM 2
|
2019-03-03 22:22:45 +00:00
|
|
|
|
2017-04-07 15:25:34 +00:00
|
|
|
|
|
|
|
/* Ethernet Configs */
|
|
|
|
#define CONFIG_FEC_MXC_PHYADDR 0
|
|
|
|
|
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
|
|
"script=boot.scr\0" \
|
|
|
|
"image=zImage\0" \
|
|
|
|
"bootm_size=0x10000000\0" \
|
2020-08-20 13:56:49 +00:00
|
|
|
"fdt_addr_r=0x14000000\0" \
|
|
|
|
"ramdisk_addr_r=0x14080000\0" \
|
2021-08-23 14:25:30 +00:00
|
|
|
"kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
|
2017-04-07 15:25:34 +00:00
|
|
|
"ramdisk_file=rootfs.cpio.uboot\0" \
|
|
|
|
"boot_fdt=try\0" \
|
|
|
|
"ip_dyn=yes\0" \
|
|
|
|
"console=" CONSOLE_DEV "\0" \
|
|
|
|
"mmcdev=1\0" \
|
|
|
|
"mmcpart=1\0" \
|
2019-03-03 22:22:45 +00:00
|
|
|
"finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
|
2017-04-07 15:25:34 +00:00
|
|
|
"nandroot=ubi0:rootfs rootfstype=ubifs\0" \
|
|
|
|
"mmcargs=setenv bootargs console=${console},${baudrate}" \
|
2019-04-11 18:46:09 +00:00
|
|
|
" root=PARTUUID=${uuid} rootwait rw ${mtdparts} ${optargs}\0" \
|
2017-04-07 15:25:34 +00:00
|
|
|
"nandargs=setenv bootargs console=${console},${baudrate}" \
|
2019-04-11 18:46:09 +00:00
|
|
|
" ubi.mtd=fs root=${nandroot} ${mtdparts} ${optargs}\0" \
|
2017-04-07 15:25:34 +00:00
|
|
|
"ramargs=setenv bootargs console=${console},${baudrate}" \
|
2019-04-11 18:46:09 +00:00
|
|
|
" root=/dev/ram rw ${mtdparts} ${optargs}\0" \
|
2017-04-07 15:25:34 +00:00
|
|
|
"loadbootscript=" \
|
|
|
|
"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
|
|
|
|
"bootscript=echo Running bootscript from mmc ...;" \
|
|
|
|
" source\0" \
|
|
|
|
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image};" \
|
|
|
|
" setenv kernelsize ${filesize}\0" \
|
2018-07-20 13:25:53 +00:00
|
|
|
"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdt_file}\0" \
|
|
|
|
"loadramdisk=fatload mmc ${mmcdev}:${mmcpart} ${ramdisk_addr_r}" \
|
2017-04-07 15:25:34 +00:00
|
|
|
" ${ramdisk_file}; setenv ramdisksize ${filesize}\0" \
|
2019-03-03 22:22:45 +00:00
|
|
|
"mmcboot=echo Booting from mmc...; run finduuid; run mmcargs;" \
|
|
|
|
"run loadimage; run loadfdt; bootz ${loadaddr} - ${fdt_addr_r}\0" \
|
2017-04-07 15:25:34 +00:00
|
|
|
"mmcramboot=run ramargs; run loadimage;" \
|
|
|
|
" run loadfdt; run loadramdisk;" \
|
2018-07-20 13:25:53 +00:00
|
|
|
" bootz ${loadaddr} ${ramdisk_addr_r} ${fdt_addr_r}\0" \
|
2017-04-07 15:25:34 +00:00
|
|
|
"nandboot=echo Booting from nand ...; " \
|
|
|
|
" run nandargs;" \
|
|
|
|
" nand read ${loadaddr} kernel ${kernelsize};" \
|
2019-02-16 20:09:45 +00:00
|
|
|
" nand read ${fdt_addr_r} dtb;" \
|
|
|
|
" bootz ${loadaddr} - ${fdt_addr_r}\0" \
|
2017-04-07 15:25:34 +00:00
|
|
|
"nandramboot=echo Booting RAMdisk from nand ...; " \
|
2018-07-20 13:25:53 +00:00
|
|
|
" nand read ${ramdisk_addr_r} fs ${ramdisksize};" \
|
2017-04-07 15:25:34 +00:00
|
|
|
" nand read ${loadaddr} kernel ${kernelsize};" \
|
2018-07-20 13:25:53 +00:00
|
|
|
" nand read ${fdt_addr_r} dtb;" \
|
2017-04-07 15:25:34 +00:00
|
|
|
" run ramargs;" \
|
2018-07-20 13:25:53 +00:00
|
|
|
" bootz ${loadaddr} ${ramdisk_addr_r} ${fdt_addr_r}\0" \
|
2017-04-07 15:25:34 +00:00
|
|
|
"netargs=setenv bootargs console=${console},${baudrate} " \
|
|
|
|
"root=/dev/nfs" \
|
|
|
|
" ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
|
|
|
|
"netboot=echo Booting from net ...; " \
|
|
|
|
"run netargs; " \
|
|
|
|
"if test ${ip_dyn} = yes; then " \
|
|
|
|
"setenv get_cmd dhcp; " \
|
|
|
|
"else " \
|
|
|
|
"setenv get_cmd tftp; " \
|
|
|
|
"fi; " \
|
|
|
|
"${get_cmd} ${image}; " \
|
|
|
|
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
2019-02-16 20:09:45 +00:00
|
|
|
"if ${get_cmd} ${fdt_addr_r} ${fdt_file}; then " \
|
|
|
|
"bootz ${loadaddr} - ${fdt_addr_r}; " \
|
2017-04-07 15:25:34 +00:00
|
|
|
"else " \
|
|
|
|
"if test ${boot_fdt} = try; then " \
|
|
|
|
"bootz; " \
|
|
|
|
"else " \
|
|
|
|
"echo WARN: Cannot load the DT; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else " \
|
|
|
|
"bootz; " \
|
|
|
|
"fi;\0" \
|
|
|
|
"autoboot=mmc dev ${mmcdev};" \
|
|
|
|
"if mmc rescan; then " \
|
|
|
|
"if run loadbootscript; then " \
|
|
|
|
"run bootscript; " \
|
|
|
|
"else " \
|
|
|
|
"if run loadimage; then " \
|
|
|
|
"run mmcboot; " \
|
|
|
|
"else run netboot; " \
|
|
|
|
"fi; " \
|
|
|
|
"fi; " \
|
|
|
|
"else run netboot; fi"
|
|
|
|
|
|
|
|
/* Physical Memory Map */
|
|
|
|
#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
|
|
|
|
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
|
|
|
|
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
|
|
|
|
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
|
|
|
|
|
|
|
|
/* Environment organization */
|
|
|
|
|
|
|
|
/* NAND stuff */
|
|
|
|
#define CONFIG_SYS_MAX_NAND_DEVICE 1
|
|
|
|
#define CONFIG_SYS_NAND_BASE 0x40000000
|
|
|
|
#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
|
2019-01-12 23:24:52 +00:00
|
|
|
|
2018-07-06 01:58:24 +00:00
|
|
|
/* USB Configs */
|
|
|
|
#ifdef CONFIG_CMD_USB
|
|
|
|
#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
|
|
|
|
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
|
|
|
|
#define CONFIG_MXC_USB_FLAGS 0
|
|
|
|
#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Enabled USB controller number */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Falcon Mode */
|
|
|
|
|
|
|
|
/* Falcon Mode - MMC support: args@1MB kernel@2MB */
|
|
|
|
|
2017-04-07 15:25:34 +00:00
|
|
|
#endif /* __IMX6LOGIC_CONFIG_H */
|