blob: 570e2ce687ac8e87f12ef714689b07722562e29e [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Fabio Estevamb6936d72014-06-24 17:41:01 -03002/*
3 * Copyright 2014 Freescale Semiconductor, Inc.
4 *
5 * Configuration settings for the Freescale i.MX6SX Sabresd board.
Fabio Estevamb6936d72014-06-24 17:41:01 -03006 */
7
Fabio Estevamb6936d72014-06-24 17:41:01 -03008#ifndef __CONFIG_H
9#define __CONFIG_H
10
Simon Glassfb64e362020-05-10 11:40:09 -060011#include <linux/stringify.h>
12
Fabio Estevamb6936d72014-06-24 17:41:01 -030013#include "mx6_common.h"
14
Peng Fan618674c2014-12-30 17:24:00 +080015#ifdef CONFIG_SPL
Peng Fan618674c2014-12-30 17:24:00 +080016#include "imx6_spl.h"
17#endif
18
Fabio Estevamb6936d72014-06-24 17:41:01 -030019#define CONFIG_MXC_UART_BASE UART1_BASE
20
Peng Fan601ab712016-01-28 16:55:06 +080021#ifdef CONFIG_IMX_BOOTAUX
Peng Fan601ab712016-01-28 16:55:06 +080022
23#define UPDATE_M4_ENV \
24 "m4image=m4_qspi.bin\0" \
25 "loadm4image=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4image}\0" \
26 "update_m4_from_sd=" \
27 "if sf probe 1:0; then " \
28 "if run loadm4image; then " \
29 "setexpr fw_sz ${filesize} + 0xffff; " \
30 "setexpr fw_sz ${fw_sz} / 0x10000; " \
31 "setexpr fw_sz ${fw_sz} * 0x10000; " \
32 "sf erase 0x0 ${fw_sz}; " \
33 "sf write ${loadaddr} 0x0 ${filesize}; " \
34 "fi; " \
35 "fi\0" \
Tom Rini56945872022-06-25 11:02:47 -040036 "m4boot=sf probe 1:0; bootaux 0x78000000\0"
Peng Fan601ab712016-01-28 16:55:06 +080037#else
38#define UPDATE_M4_ENV ""
39#endif
40
Fabio Estevamb6936d72014-06-24 17:41:01 -030041#define CONFIG_EXTRA_ENV_SETTINGS \
Peng Fan601ab712016-01-28 16:55:06 +080042 UPDATE_M4_ENV \
Fabio Estevamb6936d72014-06-24 17:41:01 -030043 "script=boot.scr\0" \
44 "image=zImage\0" \
45 "console=ttymxc0\0" \
46 "fdt_high=0xffffffff\0" \
47 "initrd_high=0xffffffff\0" \
48 "fdt_file=imx6sx-sdb.dtb\0" \
49 "fdt_addr=0x88000000\0" \
50 "boot_fdt=try\0" \
51 "ip_dyn=yes\0" \
Ye Li59565922016-01-26 22:09:40 +080052 "videomode=video=ctfb:x:800,y:480,depth:24,pclk:29850,le:89,ri:164,up:23,lo:10,hs:10,vs:10,sync:0,vmode:0\0" \
Fabio Estevamc68bb1c2019-12-19 14:59:42 -030053 "mmcdev=3\0" \
Fabio Estevamb6936d72014-06-24 17:41:01 -030054 "mmcpart=1\0" \
Fabio Estevamc68bb1c2019-12-19 14:59:42 -030055 "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
Fabio Estevamb6936d72014-06-24 17:41:01 -030056 "mmcargs=setenv bootargs console=${console},${baudrate} " \
Fabio Estevamad4504e2017-11-22 11:15:28 -020057 "root=PARTUUID=${uuid} rootwait rw\0" \
Fabio Estevamb6936d72014-06-24 17:41:01 -030058 "loadbootscript=" \
59 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
60 "bootscript=echo Running bootscript from mmc ...; " \
61 "source\0" \
62 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
63 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
64 "mmcboot=echo Booting from mmc ...; " \
Fabio Estevamad4504e2017-11-22 11:15:28 -020065 "run finduuid; " \
Fabio Estevamb6936d72014-06-24 17:41:01 -030066 "run mmcargs; " \
67 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
68 "if run loadfdt; then " \
69 "bootz ${loadaddr} - ${fdt_addr}; " \
70 "else " \
71 "if test ${boot_fdt} = try; then " \
72 "bootz; " \
73 "else " \
74 "echo WARN: Cannot load the DT; " \
75 "fi; " \
76 "fi; " \
77 "else " \
78 "bootz; " \
79 "fi;\0" \
80 "netargs=setenv bootargs console=${console},${baudrate} " \
81 "root=/dev/nfs " \
82 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
83 "netboot=echo Booting from net ...; " \
84 "run netargs; " \
85 "if test ${ip_dyn} = yes; then " \
86 "setenv get_cmd dhcp; " \
87 "else " \
88 "setenv get_cmd tftp; " \
89 "fi; " \
90 "${get_cmd} ${image}; " \
91 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
92 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
93 "bootz ${loadaddr} - ${fdt_addr}; " \
94 "else " \
95 "if test ${boot_fdt} = try; then " \
96 "bootz; " \
97 "else " \
98 "echo WARN: Cannot load the DT; " \
99 "fi; " \
100 "fi; " \
101 "else " \
102 "bootz; " \
Fabio Estevam8f60c3f2017-11-27 10:25:10 -0200103 "fi;\0" \
104 "findfdt="\
105 "if test test $board_rev = REVA ; then " \
106 "setenv fdt_file imx6sx-sdb-reva.dtb; fi; " \
Fabio Estevamb6936d72014-06-24 17:41:01 -0300107
Fabio Estevamb6936d72014-06-24 17:41:01 -0300108/* Miscellaneous configurable options */
Fabio Estevamb6936d72014-06-24 17:41:01 -0300109
Fabio Estevamb6936d72014-06-24 17:41:01 -0300110/* Physical Memory Map */
Fabio Estevamb6936d72014-06-24 17:41:01 -0300111#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
Fabio Estevamb6936d72014-06-24 17:41:01 -0300112
113#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
114#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
115#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
116
Fabio Estevamb6936d72014-06-24 17:41:01 -0300117/* MMC Configuration */
Peng Fan2153cd32014-09-15 14:59:16 +0800118#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC4_BASE_ADDR
Fabio Estevamb6936d72014-06-24 17:41:01 -0300119
Fabio Estevam3bc9bc12014-08-15 00:24:29 -0300120/* Network */
Fabio Estevam3bc9bc12014-08-15 00:24:29 -0300121
Fabio Estevam3bc9bc12014-08-15 00:24:29 -0300122#define CONFIG_FEC_MXC_PHYADDR 0x1
123
Peng Fanf82f83f2014-11-10 08:50:40 +0800124#ifdef CONFIG_CMD_USB
Peng Fanf82f83f2014-11-10 08:50:40 +0800125#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
126#define CONFIG_MXC_USB_FLAGS 0
Peng Fanf82f83f2014-11-10 08:50:40 +0800127#endif
128
Fabio Estevamd3e07492014-08-25 14:26:46 -0300129#ifdef CONFIG_CMD_PCI
Fabio Estevam58426d82014-09-30 14:05:39 -0300130#define CONFIG_PCIE_IMX_PERST_GPIO IMX_GPIO_NR(2, 0)
131#define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(2, 1)
Fabio Estevamd3e07492014-08-25 14:26:46 -0300132#endif
133
Ye Li59565922016-01-26 22:09:40 +0800134#define MXS_LCDIF_BASE MX6SX_LCDIF1_BASE_ADDR
Ye Li59565922016-01-26 22:09:40 +0800135
Fabio Estevamb6936d72014-06-24 17:41:01 -0300136#endif /* __CONFIG_H */