blob: 4e23f1a2dc5dac1c44ce541644aba19048cc1436 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Adam Fordf479cec2017-04-07 10:25:34 -05002/*
3 * Copyright (C) 2017 Logic PD, Inc.
4 *
5 * Configuration settings for the LogicPD i.MX6 SOM.
Adam Fordf479cec2017-04-07 10:25:34 -05006 */
7
8#ifndef __IMX6LOGIC_CONFIG_H
9#define __IMX6LOGIC_CONFIG_H
10
11#define CONFIG_MXC_UART_BASE UART1_BASE
12#define CONSOLE_DEV "ttymxc0"
13
Adam Fordf479cec2017-04-07 10:25:34 -050014#include "mx6_common.h"
15
Adam Fordf479cec2017-04-07 10:25:34 -050016/* MMC Configs */
Tom Rini6cc04542022-10-28 20:27:13 -040017#define CFG_SYS_FSL_ESDHC_ADDR 0
18#define CFG_SYS_FSL_USDHC_NUM 2
Adam Fordb7de88c2019-03-03 16:22:45 -060019
Adam Fordf479cec2017-04-07 10:25:34 -050020
21/* Ethernet Configs */
Adam Fordf479cec2017-04-07 10:25:34 -050022#define CONFIG_FEC_MXC_PHYADDR 0
Adam Fordf479cec2017-04-07 10:25:34 -050023
Adam Fordf479cec2017-04-07 10:25:34 -050024#define CONFIG_EXTRA_ENV_SETTINGS \
25 "script=boot.scr\0" \
26 "image=zImage\0" \
27 "bootm_size=0x10000000\0" \
Adam Ford74d8f9d2020-08-20 08:56:49 -050028 "fdt_addr_r=0x14000000\0" \
29 "ramdisk_addr_r=0x14080000\0" \
Tom Rini72d81362021-08-23 10:25:30 -040030 "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Adam Fordf479cec2017-04-07 10:25:34 -050031 "ramdisk_file=rootfs.cpio.uboot\0" \
32 "boot_fdt=try\0" \
33 "ip_dyn=yes\0" \
34 "console=" CONSOLE_DEV "\0" \
35 "mmcdev=1\0" \
36 "mmcpart=1\0" \
Adam Fordb7de88c2019-03-03 16:22:45 -060037 "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
Adam Fordf479cec2017-04-07 10:25:34 -050038 "nandroot=ubi0:rootfs rootfstype=ubifs\0" \
39 "mmcargs=setenv bootargs console=${console},${baudrate}" \
Adam Fordfd1a2d72019-04-11 13:46:09 -050040 " root=PARTUUID=${uuid} rootwait rw ${mtdparts} ${optargs}\0" \
Adam Fordf479cec2017-04-07 10:25:34 -050041 "nandargs=setenv bootargs console=${console},${baudrate}" \
Adam Fordfd1a2d72019-04-11 13:46:09 -050042 " ubi.mtd=fs root=${nandroot} ${mtdparts} ${optargs}\0" \
Adam Fordf479cec2017-04-07 10:25:34 -050043 "ramargs=setenv bootargs console=${console},${baudrate}" \
Adam Fordfd1a2d72019-04-11 13:46:09 -050044 " root=/dev/ram rw ${mtdparts} ${optargs}\0" \
Adam Fordf479cec2017-04-07 10:25:34 -050045 "loadbootscript=" \
46 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
47 "bootscript=echo Running bootscript from mmc ...;" \
48 " source\0" \
49 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image};" \
50 " setenv kernelsize ${filesize}\0" \
Adam Fordf97f1672018-07-20 08:25:53 -050051 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdt_file}\0" \
52 "loadramdisk=fatload mmc ${mmcdev}:${mmcpart} ${ramdisk_addr_r}" \
Adam Fordf479cec2017-04-07 10:25:34 -050053 " ${ramdisk_file}; setenv ramdisksize ${filesize}\0" \
Adam Fordb7de88c2019-03-03 16:22:45 -060054 "mmcboot=echo Booting from mmc...; run finduuid; run mmcargs;" \
55 "run loadimage; run loadfdt; bootz ${loadaddr} - ${fdt_addr_r}\0" \
Adam Fordf479cec2017-04-07 10:25:34 -050056 "mmcramboot=run ramargs; run loadimage;" \
57 " run loadfdt; run loadramdisk;" \
Adam Fordf97f1672018-07-20 08:25:53 -050058 " bootz ${loadaddr} ${ramdisk_addr_r} ${fdt_addr_r}\0" \
Adam Fordf479cec2017-04-07 10:25:34 -050059 "nandboot=echo Booting from nand ...; " \
60 " run nandargs;" \
61 " nand read ${loadaddr} kernel ${kernelsize};" \
Adam Ford12d64092019-02-16 14:09:45 -060062 " nand read ${fdt_addr_r} dtb;" \
63 " bootz ${loadaddr} - ${fdt_addr_r}\0" \
Adam Fordf479cec2017-04-07 10:25:34 -050064 "nandramboot=echo Booting RAMdisk from nand ...; " \
Adam Fordf97f1672018-07-20 08:25:53 -050065 " nand read ${ramdisk_addr_r} fs ${ramdisksize};" \
Adam Fordf479cec2017-04-07 10:25:34 -050066 " nand read ${loadaddr} kernel ${kernelsize};" \
Adam Fordf97f1672018-07-20 08:25:53 -050067 " nand read ${fdt_addr_r} dtb;" \
Adam Fordf479cec2017-04-07 10:25:34 -050068 " run ramargs;" \
Adam Fordf97f1672018-07-20 08:25:53 -050069 " bootz ${loadaddr} ${ramdisk_addr_r} ${fdt_addr_r}\0" \
Adam Fordf479cec2017-04-07 10:25:34 -050070 "netargs=setenv bootargs console=${console},${baudrate} " \
71 "root=/dev/nfs" \
72 " ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
73 "netboot=echo Booting from net ...; " \
74 "run netargs; " \
75 "if test ${ip_dyn} = yes; then " \
76 "setenv get_cmd dhcp; " \
77 "else " \
78 "setenv get_cmd tftp; " \
79 "fi; " \
80 "${get_cmd} ${image}; " \
81 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
Adam Ford12d64092019-02-16 14:09:45 -060082 "if ${get_cmd} ${fdt_addr_r} ${fdt_file}; then " \
83 "bootz ${loadaddr} - ${fdt_addr_r}; " \
Adam Fordf479cec2017-04-07 10:25:34 -050084 "else " \
85 "if test ${boot_fdt} = try; then " \
86 "bootz; " \
87 "else " \
88 "echo WARN: Cannot load the DT; " \
89 "fi; " \
90 "fi; " \
91 "else " \
92 "bootz; " \
93 "fi;\0" \
94 "autoboot=mmc dev ${mmcdev};" \
95 "if mmc rescan; then " \
96 "if run loadbootscript; then " \
97 "run bootscript; " \
98 "else " \
99 "if run loadimage; then " \
100 "run mmcboot; " \
101 "else run netboot; " \
102 "fi; " \
103 "fi; " \
104 "else run netboot; fi"
Adam Fordf479cec2017-04-07 10:25:34 -0500105
Adam Fordf479cec2017-04-07 10:25:34 -0500106/* Physical Memory Map */
Adam Fordf479cec2017-04-07 10:25:34 -0500107#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
Tom Riniaa6e94d2022-11-16 13:10:37 -0500108#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
Tom Rini65cc0e22022-11-16 13:10:41 -0500109#define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
110#define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
Adam Fordf479cec2017-04-07 10:25:34 -0500111
Adam Fordf479cec2017-04-07 10:25:34 -0500112/* Environment organization */
Adam Fordf479cec2017-04-07 10:25:34 -0500113
114/* NAND stuff */
Tom Rini4e590942022-11-12 17:36:51 -0500115#define CFG_SYS_NAND_BASE 0x40000000
116#define CFG_SYS_NAND_U_BOOT_START CONFIG_TEXT_BASE
Adam Ford64f83402019-01-12 17:24:52 -0600117
Adam Fordbbbb50f2018-07-05 20:58:24 -0500118/* USB Configs */
119#ifdef CONFIG_CMD_USB
Adam Fordbbbb50f2018-07-05 20:58:24 -0500120#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
121#define CONFIG_MXC_USB_FLAGS 0
Adam Fordbbbb50f2018-07-05 20:58:24 -0500122#endif
123
124/* Falcon Mode */
Adam Fordbbbb50f2018-07-05 20:58:24 -0500125
126/* Falcon Mode - MMC support: args@1MB kernel@2MB */
Adam Fordbbbb50f2018-07-05 20:58:24 -0500127
Adam Fordf479cec2017-04-07 10:25:34 -0500128#endif /* __IMX6LOGIC_CONFIG_H */