From: Nikita Kiryanov <nikita@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 12/18] arm: mx6: add support for Compulab cm-fx6 CoM
Date: Mon, 04 Aug 2014 17:24:40 +0300 [thread overview]
Message-ID: <53DF97A8.9060600@compulab.co.il> (raw)
In-Reply-To: <CAJ+vNU0C986VAFaM8odBgYLdOwfibfqzXYur9_a3sLihC8kEsA@mail.gmail.com>
On 04/08/14 09:02, Tim Harvey wrote:
> On Sun, Aug 3, 2014 at 12:34 AM, Nikita Kiryanov <nikita@compulab.co.il> wrote:
>> Add initial support for Compulab CM-FX6 CoM.
>> Support includes MMC, SPI flash, and SPL with dynamic DRAM detection.
>>
> <snip>
>> diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
>> new file mode 100644
>> index 0000000..285af33
>> --- /dev/null
>> +++ b/include/configs/cm_fx6.h
>> @@ -0,0 +1,227 @@
>> +/*
>> + * Config file for Compulab CM-FX6 board
>> + *
>> + * Copyright (C) 2014, Compulab Ltd - http://compulab.co.il/
>> + *
>> + * Author: Nikita Kiryanov <nikita@compulab.co.il>
>> + *
>> + * SPDX-License-Identifier: GPL-2.0+
>> + */
>> +
>> +#ifndef __CONFIG_CM_FX6_H
>> +#define __CONFIG_CM_FX6_H
>> +
>> +#include <asm/arch/imx-regs.h>
>> +#include <config_distro_defaults.h>
>> +
>> +#define CONFIG_SYS_L2CACHE_OFF
>> +#include "mx6_common.h"
>> +
>> +/* Machine config */
>> +#define CONFIG_MX6
>> +#define CONFIG_MX6QDL
>> +#define CONFIG_CM_FX6
>> +#define CONFIG_SYS_LITTLE_ENDIAN
>> +#define CONFIG_MACH_TYPE 4273
>> +#define CONFIG_SYS_HZ 1000
>> +
>> +/* Display information on boot */
>> +#define CONFIG_DISPLAY_CPUINFO
>> +#define CONFIG_DISPLAY_BOARDINFO
>> +#define CONFIG_TIMESTAMP
>> +
>> +/* CMD */
>> +#include <config_cmd_default.h>
>> +#define CONFIG_CMD_GREPENV
>> +#undef CONFIG_CMD_FLASH
>> +#undef CONFIG_CMD_LOADB
>> +#undef CONFIG_CMD_LOADS
>> +#undef CONFIG_CMD_XIMG
>> +#undef CONFIG_CMD_FPGA
>> +#undef CONFIG_CMD_IMLS
>> +#undef CONFIG_CMD_NET
>> +#undef CONFIG_CMD_NFS
>> +
>> +/* MMC */
>> +#define CONFIG_MMC
>> +#define CONFIG_CMD_MMC
>> +#define CONFIG_GENERIC_MMC
>> +#define CONFIG_FSL_ESDHC
>> +#define CONFIG_FSL_USDHC
>> +#define CONFIG_SYS_FSL_USDHC_NUM 3
>> +#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
>> +
>> +/* RAM */
>> +#define PHYS_SDRAM_1 MMDC0_ARB_BASE_ADDR
>> +#define PHYS_SDRAM_2 MMDC1_ARB_BASE_ADDR
>> +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
>> +#define CONFIG_NR_DRAM_BANKS 2
>> +#define CONFIG_SYS_MEMTEST_START 0x10000000
>> +#define CONFIG_SYS_MEMTEST_END 0x10010000
>> +#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
>> +#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
>> +#define CONFIG_SYS_INIT_SP_OFFSET \
>> + (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
>> +#define CONFIG_SYS_INIT_SP_ADDR \
>> + (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
>> +
>> +/* Serial console */
>> +#define CONFIG_MXC_UART
>> +#define CONFIG_MXC_UART_BASE UART4_BASE
>> +#define CONFIG_BAUDRATE 115200
>> +#define CONFIG_SYS_BAUDRATE_TABLE {9600, 19200, 38400, 57600, 115200}
>> +
>> +/* Shell */
>> +#define CONFIG_SYS_PROMPT "CM-FX6 # "
>> +#define CONFIG_SYS_CBSIZE 1024
>> +#define CONFIG_SYS_MAXARGS 16
>> +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
>> +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
>> + sizeof(CONFIG_SYS_PROMPT) + 16)
>> +#define CONFIG_SYS_MONITOR_LEN (CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS / 2 * 1024)
>> +
>> +/* SPI flash */
>> +#define CONFIG_SYS_NO_FLASH
>> +#define CONFIG_CMD_SF
>> +#define CONFIG_SF_DEFAULT_BUS 0
>> +#define CONFIG_SF_DEFAULT_CS 0
>> +#define CONFIG_SF_DEFAULT_SPEED 25000000
>> +#define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
>> +
>> +/* Environment */
>> +#define CONFIG_ENV_OVERWRITE
>> +#define CONFIG_ENV_IS_IN_SPI_FLASH
>> +#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
>> +#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
>> +#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
>> +#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
>> +#define CONFIG_ENV_SECT_SIZE (64 * 1024)
>> +#define CONFIG_ENV_SIZE (8 * 1024)
>> +#define CONFIG_ENV_OFFSET (768 * 1024)
>> +
>> +#define CONFIG_EXTRA_ENV_SETTINGS \
>> + "kernel=uImage-cm-fx6\0" \
>> + "autoload=no\0" \
>> + "loadaddr=0x10800000\0" \
>> + "fdtaddr=0x11000000\0" \
>> + "console=ttymxc3,115200\0" \
>> + "ethprime=FEC0\0" \
>> + "bootscr=boot.scr\0" \
>> + "bootm_low=18000000\0" \
>> + "video_hdmi=mxcfb0:dev=hdmi,1920x1080M-32 at 50,if=RGB32\0" \
>> + "video_dvi=mxcfb0:dev=dvi,1280x800M-32 at 50,if=RGB32\0" \
>> + "fdtfile=cm-fx6.dtb\0" \
>> + "doboot=bootm ${loadaddr}\0" \
>> + "loadfdt=false\0" \
>> + "setboottypez=setenv kernel zImage-cm-fx6;" \
>> + "setenv doboot bootz ${loadaddr} - ${fdtaddr};" \
>> + "setenv loadfdt true;\0" \
>> + "setboottypem=setenv kernel uImage-cm-fx6;" \
>> + "setenv doboot bootm ${loadaddr};" \
>> + "setenv loadfdt false;\0"\
>> + "run_eboot=echo Starting EBOOT ...; "\
>> + "mmc dev ${mmcdev} && " \
>> + "mmc rescan && mmc read 10042000 a 400 && go 10042000\0" \
>> + "mmcdev=2\0" \
>> + "mmcroot=/dev/mmcblk0p2 rw rootwait\0" \
>> + "loadmmcbootscript=fatload mmc ${mmcdev} ${loadaddr} ${bootscr}\0" \
>> + "mmcbootscript=echo Running bootscript from mmc ...; "\
>> + "source ${loadaddr}\0" \
>> + "mmcargs=setenv bootargs console=${console} " \
>> + "root=${mmcroot} " \
>> + "${video}\0" \
>> + "mmcloadkernel=fatload mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
>> + "mmcloadfdt=fatload mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
>> + "mmcboot=echo Booting from mmc ...; " \
>> + "run mmcargs; " \
>> + "run doboot\0" \
>> + "nandroot=/dev/mtdblock4 rw\0" \
>> + "nandrootfstype=ubifs\0" \
>> + "nandargs=setenv bootargs console=${console} " \
>> + "root=${nandroot} " \
>> + "rootfstype=${nandrootfstype} " \
>> + "${video}\0" \
>> + "nandloadfdt=nand read ${fdtaddr} 780000 80000;\0" \
>> + "nandboot=echo Booting from nand ...; " \
>> + "run nandargs; " \
>> + "nand read ${loadaddr} 0 780000; " \
>> + "if ${loadfdt}; then " \
>> + "run nandloadfdt;" \
>> + "fi; " \
>> + "run doboot\0" \
>> + "boot=mmc dev ${mmcdev}; " \
>> + "if mmc rescan; then " \
>> + "if run loadmmcbootscript; then " \
>> + "run mmcbootscript;" \
>> + "else " \
>> + "if run mmcloadkernel; then " \
>> + "if ${loadfdt}; then " \
>> + "run mmcloadfdt;" \
>> + "fi;" \
>> + "run mmcboot;" \
>> + "fi;" \
>> + "fi;" \
>> + "fi;"
>> +
>> +#define CONFIG_BOOTCOMMAND \
>> + "run setboottypem; run boot"
>> +
>> +/* SPI */
>> +#define CONFIG_SPI
>> +#define CONFIG_MXC_SPI
>> +#define CONFIG_SPI_FLASH
>> +#define CONFIG_SPI_FLASH_ATMEL
>> +#define CONFIG_SPI_FLASH_EON
>> +#define CONFIG_SPI_FLASH_GIGADEVICE
>> +#define CONFIG_SPI_FLASH_MACRONIX
>> +#define CONFIG_SPI_FLASH_SPANSION
>> +#define CONFIG_SPI_FLASH_STMICRO
>> +#define CONFIG_SPI_FLASH_SST
>> +#define CONFIG_SPI_FLASH_WINBOND
>> +
>> +/* GPIO */
>> +#define CONFIG_MXC_GPIO
>> +
>> +/* Boot */
>> +#define CONFIG_ZERO_BOOTDELAY_CHECK
>> +#define CONFIG_LOADADDR 0x10800000
>> +#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
>> +#define CONFIG_SYS_TEXT_BASE 0x10800000
>> +#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
>> +#define CONFIG_SYS_BOOTMAPSZ (8 << 20)
>> +#define CONFIG_SETUP_MEMORY_TAGS
>> +#define CONFIG_INITRD_TAG
>> +
>> +/* misc */
>> +#define CONFIG_SYS_GENERIC_BOARD
>> +#define CONFIG_STACKSIZE (128 * 1024)
>> +#define CONFIG_SYS_MALLOC_LEN (2 * 1024 * 1024)
>> +#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 800 /* 400 KB */
>> +
>> +/* SPL */
>> +#define CONFIG_SPL
>> +#define CONFIG_SPL_FRAMEWORK
>> +#define CONFIG_SPL_BOARD_INIT
>> +#define CONFIG_SPL_STACK 0x0091FFB8
>> +#define CONFIG_SPL_TEXT_BASE 0x00908000
>> +#define CONFIG_SPL_BSS_START_ADDR 0x18200000
>> +#define CONFIG_SPL_BSS_MAX_SIZE 0x00100000
>> +#define CONFIG_SYS_SPL_MALLOC_START 0x18300000
>> +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x03200000
>> +#define CONFIG_SPL_MAX_SIZE (62 * 1024)
>> +#define CONFIG_SPL_LIBDISK_SUPPORT
>> +#define CONFIG_SPL_LIBGENERIC_SUPPORT
>> +#define CONFIG_SPL_LIBCOMMON_SUPPORT
>> +#define CONFIG_SPL_GPIO_SUPPORT
>> +#define CONFIG_SPL_SERIAL_SUPPORT
>> +#define CONFIG_SPL_MMC_SUPPORT
>> +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x80 /* offset 64 kb */
>> +#define CONFIG_SPL_SPI_SUPPORT
>> +#define CONFIG_SPL_SPI_FLASH_SUPPORT
>> +#define CONFIG_SPL_SPI_BUS CONFIG_SF_DEFAULT_BUS
>> +#define CONFIG_SPL_SPI_CS CONFIG_SF_DEFAULT_CS
>> +#define CONFIG_SPL_SPI_MODE CONFIG_SF_DEFAULT_MODE
>> +#define CONFIG_SYS_SPI_U_BOOT_OFFS (64 * 1024)
>> +#define CONFIG_SPL_SPI_LOAD
>
> Nikita,
>
> Are the values in include/configs/imx6_spl.h too inflexible to use? If
> so, I can submit a patch in the future to remove that file and pull
> them all in my board config files as I'm the only user of it.
This is actually something I forgot to make use of when I was rebasing
the code over mainline. I'll try to use it in a v2.
>
> Regards,
>
> Tim
>
next prev parent reply other threads:[~2014-08-04 14:24 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-03 7:34 [U-Boot] [PATCH 00/18] Introduce cm-fx6 board Nikita Kiryanov
2014-08-03 7:34 ` [U-Boot] [PATCH 01/18] spl: improve spi configuration Nikita Kiryanov
2014-08-03 13:44 ` Marek Vasut
2014-08-05 13:28 ` Nikita Kiryanov
2014-08-05 14:11 ` Marek Vasut
2014-08-06 10:53 ` Nikita Kiryanov
2014-08-06 11:32 ` Marek Vasut
2014-08-03 7:34 ` [U-Boot] [PATCH 02/18] mx6: add clock enabling functions Nikita Kiryanov
2014-08-03 7:34 ` [U-Boot] [PATCH 03/18] sf: fix sf probe Nikita Kiryanov
2014-08-03 13:46 ` Marek Vasut
2014-08-04 12:48 ` Nikita Kiryanov
2014-08-04 13:10 ` Marek Vasut
2014-08-04 13:45 ` Nikita Kiryanov
2014-08-04 13:51 ` Marek Vasut
2014-08-04 14:11 ` Nikita Kiryanov
2014-08-04 14:20 ` Marek Vasut
2014-08-04 14:02 ` Tom Rini
2014-08-04 14:09 ` Marek Vasut
2014-08-04 14:19 ` Nikita Kiryanov
2014-08-04 14:58 ` Tom Rini
2014-08-03 7:34 ` [U-Boot] [PATCH 04/18] mtd: spi: add support for M25PE16 and M25PX16 Nikita Kiryanov
2014-08-03 13:47 ` Marek Vasut
2014-08-03 7:34 ` [U-Boot] [PATCH 05/18] compulab: eeprom: add support for defining eeprom i2c bus Nikita Kiryanov
2014-08-03 13:48 ` Marek Vasut
2014-08-04 12:49 ` Nikita Kiryanov
2014-08-03 7:34 ` [U-Boot] [PATCH 06/18] sata: dwc_ahsata: implement sata_port_status Nikita Kiryanov
2014-08-03 13:49 ` Marek Vasut
2014-08-04 12:49 ` Nikita Kiryanov
2014-08-04 13:10 ` Marek Vasut
2014-08-03 7:34 ` [U-Boot] [PATCH 07/18] i2c: imx: add macros to setup pads for multiple SoC types Nikita Kiryanov
2014-08-04 4:28 ` Tim Harvey
2014-08-03 7:34 ` [U-Boot] [PATCH 08/18] arm: mx6: ddr: cleanup Nikita Kiryanov
2014-08-04 5:26 ` Tim Harvey
2014-08-03 7:34 ` [U-Boot] [PATCH 09/18] arm: mx6: ddr: do not write into reserved bit Nikita Kiryanov
2014-08-04 5:43 ` Tim Harvey
2014-08-04 12:49 ` Nikita Kiryanov
2014-08-06 8:18 ` Tim Harvey
2014-08-06 8:31 ` Stefano Babic
2014-08-03 7:34 ` [U-Boot] [PATCH 10/18] arm: mx6: ddr: configure MMDC for slow_pd Nikita Kiryanov
2014-08-04 5:42 ` Tim Harvey
2014-08-04 12:49 ` Nikita Kiryanov
2014-08-03 7:34 ` [U-Boot] [PATCH 11/18] arm: mx6: ddr: fix cs0_end calculation Nikita Kiryanov
2014-08-03 7:34 ` [U-Boot] [PATCH 12/18] arm: mx6: add support for Compulab cm-fx6 CoM Nikita Kiryanov
2014-08-03 14:09 ` Marek Vasut
2014-08-04 14:41 ` Nikita Kiryanov
2014-08-04 15:12 ` Marek Vasut
2014-08-05 7:36 ` Nikita Kiryanov
2014-08-05 7:58 ` Marek Vasut
2014-08-04 4:45 ` Tim Harvey
2014-08-04 13:36 ` Nikita Kiryanov
2014-08-06 17:29 ` Nikita Kiryanov
2014-08-08 7:19 ` Tim Harvey
2014-08-10 16:20 ` Nikita Kiryanov
2014-08-04 6:02 ` Tim Harvey
2014-08-04 14:24 ` Nikita Kiryanov [this message]
2014-08-07 11:27 ` Nikita Kiryanov
2014-08-03 7:34 ` [U-Boot] [PATCH 13/18] arm: mx6: cm_fx6: add nand support Nikita Kiryanov
2014-08-03 7:34 ` [U-Boot] [PATCH 14/18] arm: mx6: cm_fx6: add ethernet support Nikita Kiryanov
2014-08-03 7:34 ` [U-Boot] [PATCH 15/18] arm: mx6: cm_fx6: add usb support Nikita Kiryanov
2014-08-03 7:34 ` [U-Boot] [PATCH 16/18] arm: mx6: cm_fx6: add i2c support Nikita Kiryanov
2014-08-03 7:34 ` [U-Boot] [PATCH 17/18] arm: mx6: cm_fx6: use eeprom Nikita Kiryanov
2014-08-03 7:34 ` [U-Boot] [PATCH 18/18] arm: mx6: cm_fx6: add sata support Nikita Kiryanov
2014-08-03 14:10 ` Marek Vasut
2014-08-04 7:23 ` Igor Grinberg
2014-08-04 8:27 ` Marek Vasut
2014-08-04 10:47 ` Igor Grinberg
2014-08-04 10:53 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53DF97A8.9060600@compulab.co.il \
--to=nikita@compulab.co.il \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox