blob: 14095b99f0344d728fa77d0a737012953ac00847 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Jason Liuf5b81c82011-05-13 01:58:55 +00002/*
3 * Copyright (C) 2011 Freescale Semiconductor, Inc.
4 * Jason Liu <r64343@freescale.com>
5 *
6 * Configuration settings for Freescale MX53 low cost board.
Jason Liuf5b81c82011-05-13 01:58:55 +00007 */
8
9#ifndef __CONFIG_H
10#define __CONFIG_H
11
Jason Liuf5b81c82011-05-13 01:58:55 +000012#include <asm/arch/imx-regs.h>
13
Tom Rinia17aa192022-12-04 10:04:55 -050014#define CFG_MXC_UART_BASE UART1_BASE
Jason Liuf5b81c82011-05-13 01:58:55 +000015
16/* MMC Configs */
Tom Rini376b88a2022-10-28 20:27:13 -040017#define CFG_SYS_FSL_ESDHC_ADDR 0
Jason Liuf5b81c82011-05-13 01:58:55 +000018
Wolfgang Grandeggerfde87332011-11-11 14:03:37 +010019/* USB Configs */
Tom Rinib9796e82022-12-04 10:04:56 -050020#define CFG_MXC_USB_FLAGS 0
Wolfgang Grandeggerfde87332011-11-11 14:03:37 +010021
Fabio Estevam2fc58322012-04-30 08:12:04 +000022/* PMIC Controller */
Tom Rini6a5dccc2022-11-16 13:10:41 -050023#define CFG_SYS_DIALOG_PMIC_I2C_ADDR 0x48
Tom Rini376b88a2022-10-28 20:27:13 -040024#define CFG_SYS_FSL_PMIC_I2C_ADDR 0x8
Fabio Estevam2fc58322012-04-30 08:12:04 +000025
Jason Liuf5b81c82011-05-13 01:58:55 +000026/* Command definition */
Jason Liuf5b81c82011-05-13 01:58:55 +000027
Tom Rinic9edebe2022-12-04 10:03:50 -050028#define CFG_EXTRA_ENV_SETTINGS \
Jason Liuf5b81c82011-05-13 01:58:55 +000029 "script=boot.scr\0" \
Otavio Salvadorf3efd652014-01-16 19:58:01 -020030 "image=zImage\0" \
Otavio Salvador66f2a6e2013-01-10 09:45:07 +000031 "fdt_addr=0x71000000\0" \
32 "boot_fdt=try\0" \
33 "ip_dyn=yes\0" \
Jason Liuf5b81c82011-05-13 01:58:55 +000034 "mmcdev=0\0" \
Otavio Salvador8f0dde72013-06-28 18:52:39 -030035 "mmcpart=1\0" \
36 "mmcroot=/dev/mmcblk0p2 rw rootwait\0" \
Otavio Salvador66f2a6e2013-01-10 09:45:07 +000037 "mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot}\0" \
Jason Liuf5b81c82011-05-13 01:58:55 +000038 "loadbootscript=" \
Guillaume GARDET78a92542015-06-16 11:48:48 +020039 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
Jason Liuf5b81c82011-05-13 01:58:55 +000040 "bootscript=echo Running bootscript from mmc ...; " \
41 "source\0" \
Guillaume GARDET78a92542015-06-16 11:48:48 +020042 "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
43 "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
Jason Liuf5b81c82011-05-13 01:58:55 +000044 "mmcboot=echo Booting from mmc ...; " \
45 "run mmcargs; " \
Otavio Salvador66f2a6e2013-01-10 09:45:07 +000046 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
47 "if run loadfdt; then " \
Otavio Salvadorf3efd652014-01-16 19:58:01 -020048 "bootz ${loadaddr} - ${fdt_addr}; " \
Otavio Salvador66f2a6e2013-01-10 09:45:07 +000049 "else " \
50 "if test ${boot_fdt} = try; then " \
Otavio Salvadorf3efd652014-01-16 19:58:01 -020051 "bootz; " \
Otavio Salvador66f2a6e2013-01-10 09:45:07 +000052 "else " \
53 "echo WARN: Cannot load the DT; " \
54 "fi; " \
55 "fi; " \
56 "else " \
Otavio Salvadorf3efd652014-01-16 19:58:01 -020057 "bootz; " \
Otavio Salvador66f2a6e2013-01-10 09:45:07 +000058 "fi;\0" \
Jason Liuf5b81c82011-05-13 01:58:55 +000059 "netargs=setenv bootargs console=ttymxc0,${baudrate} " \
60 "root=/dev/nfs " \
61 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
62 "netboot=echo Booting from net ...; " \
63 "run netargs; " \
Otavio Salvador66f2a6e2013-01-10 09:45:07 +000064 "if test ${ip_dyn} = yes; then " \
65 "setenv get_cmd dhcp; " \
66 "else " \
67 "setenv get_cmd tftp; " \
68 "fi; " \
Otavio Salvadorf3efd652014-01-16 19:58:01 -020069 "${get_cmd} ${image}; " \
Otavio Salvador66f2a6e2013-01-10 09:45:07 +000070 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
71 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
Otavio Salvadorf3efd652014-01-16 19:58:01 -020072 "bootz ${loadaddr} - ${fdt_addr}; " \
Otavio Salvador66f2a6e2013-01-10 09:45:07 +000073 "else " \
74 "if test ${boot_fdt} = try; then " \
Otavio Salvadorf3efd652014-01-16 19:58:01 -020075 "bootz; " \
Otavio Salvador66f2a6e2013-01-10 09:45:07 +000076 "else " \
77 "echo ERROR: Cannot load the DT; " \
78 "exit; " \
79 "fi; " \
80 "fi; " \
81 "else " \
Otavio Salvadorf3efd652014-01-16 19:58:01 -020082 "bootz; " \
Otavio Salvador66f2a6e2013-01-10 09:45:07 +000083 "fi;\0"
Jason Liuf5b81c82011-05-13 01:58:55 +000084
Jason Liuf5b81c82011-05-13 01:58:55 +000085/* Miscellaneous configurable options */
Jason Liuf5b81c82011-05-13 01:58:55 +000086
Jason Liuf5b81c82011-05-13 01:58:55 +000087/* Physical Memory Map */
Marek Vasutf501a542014-03-28 08:30:59 +010088#define PHYS_SDRAM_1 CSD0_BASE_ADDR
89#define PHYS_SDRAM_1_SIZE (gd->bd->bi_dram[0].size)
90#define PHYS_SDRAM_2 CSD1_BASE_ADDR
91#define PHYS_SDRAM_2_SIZE (gd->bd->bi_dram[1].size)
92#define PHYS_SDRAM_SIZE (gd->ram_size)
Jason Liuf5b81c82011-05-13 01:58:55 +000093
Tom Rinibb4dd962022-11-16 13:10:37 -050094#define CFG_SYS_SDRAM_BASE (PHYS_SDRAM_1)
Tom Rini6a5dccc2022-11-16 13:10:41 -050095#define CFG_SYS_INIT_RAM_ADDR (IRAM_BASE_ADDR)
96#define CFG_SYS_INIT_RAM_SIZE (IRAM_SIZE)
Jason Liuf5b81c82011-05-13 01:58:55 +000097
Fabio Estevam20c49da2012-05-10 15:07:35 +000098/* Framebuffer and LCD */
Fabio Estevam20c49da2012-05-10 15:07:35 +000099
Jason Liuf5b81c82011-05-13 01:58:55 +0000100#endif /* __CONFIG_H */