public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mx6qsabresd: Add basic support
Date: Thu, 12 Apr 2012 12:52:01 +0200	[thread overview]
Message-ID: <4F86B3D1.3000501@denx.de> (raw)
In-Reply-To: <1334158122-15219-1-git-send-email-festevam@gmail.com>

On 11/04/2012 17:28, Fabio Estevam wrote:
> Add basic support for mx6qsabresd board.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Hi Fabio,


> ---
>  MAINTAINERS                               |    1 +
>  board/freescale/mx6qsabresd/Makefile      |   37 ++++++
>  board/freescale/mx6qsabresd/imximage.cfg  |  170 +++++++++++++++++++++++++++
>  board/freescale/mx6qsabresd/mx6qsabresd.c |  111 ++++++++++++++++++
>  boards.cfg                                |    1 +
>  include/configs/mx6qsabresd.h             |  178 +++++++++++++++++++++++++++++
>  6 files changed, 498 insertions(+), 0 deletions(-)
>  create mode 100644 board/freescale/mx6qsabresd/Makefile
>  create mode 100644 board/freescale/mx6qsabresd/imximage.cfg
>  create mode 100644 board/freescale/mx6qsabresd/mx6qsabresd.c
>  create mode 100644 include/configs/mx6qsabresd.h
> 

A general question: in your patch it seems to me that only SD is
currently supported on this board. Which is the difference between this
board and the mx6qsabrelite we have already mainlined ?


> +#########################################################################
> diff --git a/board/freescale/mx6qsabresd/imximage.cfg b/board/freescale/mx6qsabresd/imximage.cfg
> new file mode 100644
> index 0000000..c389427
> --- /dev/null
> +++ b/board/freescale/mx6qsabresd/imximage.cfg
> @@ -0,0 +1,170 @@
> +# Copyright (C) 2011 Freescale Semiconductor, Inc.
> +# Jason Liu <r64343@freescale.com>
> +#
> +# See file CREDITS for list of people who contributed to this
> +# project.
> +#
> +# This program is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as
> +# published by the Free Software Foundation; either version 2 of
> +# the License or (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not write to the Free Software
> +# Foundation Inc. 51 Franklin Street Fifth Floor Boston,
> +# MA 02110-1301 USA
> +#
> +# Refer docs/README.imxmage for more details about how-to configure
> +# and create imximage boot image
> +#
> +# The syntax is taken as close as possible with the kwbimage
> +
> +# image version
> +
> +IMAGE_VERSION 2
> +
> +# Boot Device : one of
> +# spi, sd (the board has no nand neither onenand)
> +
> +BOOT_FROM      sd
> +
> +# Device Configuration Data (DCD)
> +#
> +# Each entry must have the format:
> +# Addr-type           Address        Value
> +#
> +# where:
> +#      Addr-type register length (1,2 or 4 bytes)
> +#      Address   absolute address of the register
> +#      value     value to be stored in the register
> +DATA 4 0x020e05a8 0x00000030
> +DATA 4 0x020e05b0 0x00000030
> +DATA 4 0x020e0524 0x00000030
> +DATA 4 0x020e051c 0x00000030
> +
> +DATA 4 0x020e0518 0x00000030
> +DATA 4 0x020e050c 0x00000030
> +DATA 4 0x020e05b8 0x00000030
> +DATA 4 0x020e05c0 0x00000030
> +
> +DATA 4 0x020e05ac 0x00020030
> +DATA 4 0x020e05b4 0x00020030
> +DATA 4 0x020e0528 0x00020030
> +DATA 4 0x020e0520 0x00020030
> +
> +DATA 4 0x020e0514 0x00020030
> +DATA 4 0x020e0510 0x00020030
> +DATA 4 0x020e05bc 0x00020030
> +DATA 4 0x020e05c4 0x00020030
> +
> +DATA 4 0x020e056c 0x00020030
> +DATA 4 0x020e0578 0x00020030
> +DATA 4 0x020e0588 0x00020030
> +DATA 4 0x020e0594 0x00020030
> +
> +DATA 4 0x020e057c 0x00020030
> +DATA 4 0x020e0590 0x00003000
> +DATA 4 0x020e0598 0x00003000
> +DATA 4 0x020e058c 0x00000000
> +
> +DATA 4 0x020e059c 0x00003030
> +DATA 4 0x020e05a0 0x00003030
> +DATA 4 0x020e0784 0x00000030
> +DATA 4 0x020e0788 0x00000030
> +
> +DATA 4 0x020e0794 0x00000030
> +DATA 4 0x020e079c 0x00000030
> +DATA 4 0x020e07a0 0x00000030
> +DATA 4 0x020e07a4 0x00000030
> +
> +DATA 4 0x020e07a8 0x00000030
> +DATA 4 0x020e0748 0x00000030
> +DATA 4 0x020e074c 0x00000030
> +DATA 4 0x020e0750 0x00020000
> +
> +DATA 4 0x020e0758 0x00000000
> +DATA 4 0x020e0774 0x00020000
> +DATA 4 0x020e078c 0x00000030
> +DATA 4 0x020e0798 0x000C0000
> +
> +DATA 4 0x021b081c 0x33333333
> +DATA 4 0x021b0820 0x33333333
> +DATA 4 0x021b0824 0x33333333
> +DATA 4 0x021b0828 0x33333333
> +
> +DATA 4 0x021b481c 0x33333333
> +DATA 4 0x021b4820 0x33333333
> +DATA 4 0x021b4824 0x33333333
> +DATA 4 0x021b4828 0x33333333
> +
> +DATA 4 0x021b0018 0x00081740
> +
> +DATA 4 0x021b001c 0x00008000
> +DATA 4 0x021b000c 0x555A7975
> +DATA 4 0x021b0010 0xFF538E64
> +DATA 4 0x021b0014 0x01FF00DB
> +DATA 4 0x021b002c 0x000026D2
> +
> +DATA 4 0x021b0030 0x005B0E21
> +DATA 4 0x021b0008 0x09444040
> +DATA 4 0x021b0004 0x00025576
> +DATA 4 0x021b0040 0x00000027
> +DATA 4 0x021b0000 0x831A0000
> +
> +DATA 4 0x021b001c 0x04088032
> +DATA 4 0x021b001c 0x0408803A
> +DATA 4 0x021b001c 0x00008033
> +DATA 4 0x021b001c 0x0000803B
> +DATA 4 0x021b001c 0x00428031
> +DATA 4 0x021b001c 0x00428039
> +DATA 4 0x021b001c 0x09408030
> +DATA 4 0x021b001c 0x09408038
> +
> +DATA 4 0x021b001c 0x04008040
> +DATA 4 0x021b001c 0x04008048
> +DATA 4 0x021b0800 0xA1380003
> +DATA 4 0x021b4800 0xA1380003
> +DATA 4 0x021b0020 0x00005800
> +DATA 4 0x021b0818 0x00022227
> +DATA 4 0x021b4818 0x00022227
> +
> +DATA 4 0x021b083c 0x434B0350
> +DATA 4 0x021b0840 0x034C0359
> +DATA 4 0x021b483c 0x434B0350
> +DATA 4 0x021b4840 0x03650348
> +DATA 4 0x021b0848 0x4436383B
> +DATA 4 0x021b4848 0x39393341
> +DATA 4 0x021b0850 0x35373933
> +DATA 4 0x021b4850 0x48254A36
> +
> +DATA 4 0x021b080c 0x001F001F
> +DATA 4 0x021b0810 0x001F001F
> +
> +DATA 4 0x021b480c 0x00440044
> +DATA 4 0x021b4810 0x00440044
> +
> +DATA 4 0x021b08b8 0x00000800
> +DATA 4 0x021b48b8 0x00000800
> +
> +DATA 4 0x021b001c 0x00000000
> +DATA 4 0x021b0404 0x00011006
> +
> +# set the default clock gate to save power
> +DATA 4 0x020c4068 0x00C03F3F
> +DATA 4 0x020c406c 0x0030FC03
> +DATA 4 0x020c4070 0x0FFFC000
> +DATA 4 0x020c4074 0x3FF00000
> +DATA 4 0x020c4078 0x00FFF300
> +DATA 4 0x020c407c 0x0F0000C3
> +DATA 4 0x020c4080 0x000003FF
> +
> +# enable AXI cache for VDOA/VPU/IPU
> +DATA 4 0x020e0010 0xF00000FF
> +# set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7
> +DATA 4 0x020e0018 0x007F007F
> +DATA 4 0x020e001c 0x007F007F

This file is identical to imximage.cfg for the mx6qsabrelite board. I
can imagine this is derived board. Why cannot we implement it as a
variant of the original one ? We have several example in u-boot, for
example the efika (MX51), or the TAM3517 (ok, I admit I know this very
well because I did it...), or imx27-lite /magnesium, or....

> diff --git a/board/freescale/mx6qsabresd/mx6qsabresd.c b/board/freescale/mx6qsabresd/mx6qsabresd.c
> new file mode 100644
> index 0000000..7df2823
> --- /dev/null
> +++ b/board/freescale/mx6qsabresd/mx6qsabresd.c
> @@ -0,0 +1,111 @@
> +/*
> + * Copyright (C) 2012 Freescale Semiconductor, Inc.
> + *
> + * Author: Fabio Estevam <fabio.estevam@freescale.com>
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */
> +
> +#include <common.h>
> +#include <asm/io.h>
> +#include <asm/arch/imx-regs.h>
> +#include <asm/arch/mx6x_pins.h>
> +#include <asm/arch/iomux-v3.h>
> +#include <asm/errno.h>
> +#include <asm/gpio.h>
> +#include <mmc.h>
> +#include <fsl_esdhc.h>
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +#define UART_PAD_CTRL  (PAD_CTL_PKE | PAD_CTL_PUE |            \
> +	PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED |               \
> +	PAD_CTL_DSE_40ohm   | PAD_CTL_SRE_FAST  | PAD_CTL_HYS)
> +
> +#define USDHC_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE |            \
> +	PAD_CTL_PUS_47K_UP  | PAD_CTL_SPEED_LOW |               \
> +	PAD_CTL_DSE_80ohm   | PAD_CTL_SRE_FAST  | PAD_CTL_HYS)


This is also identical to the sabrelite. It seems to me we can manage it
only disabling some feature and introducing a way (CONFIG_) to
distinguish the two boards, but without adding a new one.

> +#ifdef CONFIG_FSL_ESDHC

...for this board if we undefine CONFIG_FSL_ESDHC there is no peripheral
at all.

> +#define CONFIG_EXTRA_ENV_SETTINGS \
> +	"script=boot.scr\0" \
> +	"uimage=uImage\0" \
> +	"console=ttymxc0\0" \
> +	"fdt_high=0xffffffff\0"	  \
> +	"initrd_high=0xffffffff\0" \
> +	"mmcdev=0\0" \
> +	"mmcpart=2\0" \
> +	"mmcroot=/dev/mmcblk0p3 rootwait rw\0" \
> +	"mmcargs=setenv bootargs console=${console},${baudrate} " \
> +		"root=${mmcroot}\0" \
> +	"loadbootscript=" \
> +		"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
> +	"bootscript=echo Running bootscript from mmc ...; " \
> +		"source\0" \
> +	"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
> +		"mmcboot=echo Booting from mmc ...; " \
> +		"run mmcargs; " \
> +		"bootm\0" \
> +	"netargs=setenv bootargs console=${console},${baudrate} " \
> +		"root=/dev/nfs " \
> +		"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
> +	"netboot=echo Booting from net ...; " \
> +		"run netargs; " \
> +		"dhcp ${uimage}; bootm\0" \

There is a "netboot", but no NET available. Not a real problem, but it
tells me that the board is strictly related to the sabrelite and instead
of having a separate implementation we can merge both.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

  parent reply	other threads:[~2012-04-12 10:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 15:28 [U-Boot] [PATCH] mx6qsabresd: Add basic support Fabio Estevam
2012-04-11 19:49 ` Wolfgang Denk
2012-04-11 20:15   ` Fabio Estevam
2012-04-11 21:36     ` Wolfgang Denk
2012-04-13 15:56       ` Fabio Estevam
2012-04-13 16:14         ` Dirk Behme
2012-04-13 22:36           ` Fabio Estevam
2012-04-13 23:04             ` Fabio Estevam
2012-04-14  5:36               ` Dirk Behme
2012-04-14 14:41               ` stefano babic
2012-04-14 15:24                 ` Fabio Estevam
2012-04-14 15:28                   ` Fabio Estevam
2012-04-14 16:00                     ` stefano babic
2012-04-14 20:15                       ` Wolfgang Denk
2012-04-15  8:56                         ` stefano babic
2012-04-14 20:14                   ` Wolfgang Denk
2012-04-14 20:13                 ` Wolfgang Denk
2012-04-15  9:02                   ` stefano babic
2012-07-11  6:23                     ` Dirk Behme
2012-07-11  8:08                       ` Fabio Estevam
2012-04-12  8:23   ` Marek Vasut
2012-04-12 10:52 ` Stefano Babic [this message]
2012-09-11  3:56   ` Fabio Estevam
2012-09-11  4:27     ` stefano babic
2012-09-11  5:39     ` Dirk Behme
2012-09-11 14:43     ` Eric Nelson
2012-09-11 15:07       ` Otavio Salvador
2012-09-11 22:10       ` stefano babic

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=4F86B3D1.3000501@denx.de \
    --to=sbabic@denx.de \
    --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