public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] imx: Add titanium board support (i.MX6 based)
Date: Tue, 16 Apr 2013 14:05:09 +0200	[thread overview]
Message-ID: <516D3E75.7010207@denx.de> (raw)
In-Reply-To: <516D02E1.9090707@denx.de>

Hi Stefano,

thanks for your review. I'll adress your comments in v4.

Thanks,
Stefan

On 16.04.2013 09:50, Stefano Babic wrote:
> On 16/04/2013 09:19, Stefan Roese wrote:
>> Titanium is a i.MX6 based board from ProjectionDesign / Barco. This
>> patch adds support for this board with the newly introduced NAND
>> support for i.MX6.
>>
> 
> Hi Stefan.
> 
>> diff --git a/board/freescale/titanium/imximage.cfg b/board/freescale/titanium/imximage.cfg
>> new file mode 100644
>> index 0000000..5661d58
>> --- /dev/null
>> +++ b/board/freescale/titanium/imximage.cfg
>> @@ -0,0 +1,173 @@
>> +/*
>> + * Projectiondesign AS
>> + * Derived from ./board/freescale/mx6qsabrelite/imximage.cfg
>> + *
>> + * 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.
>> + *
>> + * 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
>> + * sd, nand
>> + */
>> +BOOT_FROM      nand
>> +
>> +/*
>> + * 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
>> +
> 
> I know that this comes from Sabre, and this was done in this way.
> Anyway, with the addition of the Boundary's board, this file is
> preprocessed by the precompiler, allowing us to use macros and making
> this configuration file something better as a blob of hexadecimal values.
> 
> Any chances to replace here the register addresses with their defined
> macro (see for example board/boundary/nitrogen6x/800mhz_2x128mx16.cfg) ?
> 
> 
>> +
>> +static void setup_iomux_uart(void)
>> +{
>> +	imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
>> +	imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads));
>> +	imx_iomux_v3_setup_multiple_pads(uart4_pads, ARRAY_SIZE(uart4_pads));
>> +}
>> +
>> +#ifdef CONFIG_USB_EHCI_MX6
>> +int board_ehci_hcd_init(int port)
>> +{
>> +	return 0;
> 
> It seems to me we have a problem (not here), but in general i.MX code.
> If the board maintainer must implement an empty function, this function
> should be declared __weak where it is called.
> 
>> +int board_mmc_init(bd_t *bis)
>> +{
>> +	/*
>> +	 * Only one USDHC controller on titianium
>> +	 */
>> +	imx_iomux_v3_setup_multiple_pads(usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
>> +	usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
>> +
>> +	return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
>> +}
>> +#endif
>> +
>> +int board_phy_config(struct phy_device *phydev)
>> +{
>> +	/* min rx data delay */
>> +	ksz9021_phy_extended_write(phydev,
>> +				   MII_KSZ9021_EXT_RGMII_RX_DATA_SKEW, 0x0);
>> +	/* min tx data delay */
>> +	ksz9021_phy_extended_write(phydev,
>> +				   MII_KSZ9021_EXT_RGMII_TX_DATA_SKEW, 0x0);
>> +	/* max rx/tx clock delay, min rx/tx control */
>> +	ksz9021_phy_extended_write(phydev,
>> +				   MII_KSZ9021_EXT_RGMII_CLOCK_SKEW, 0xf0f0);
>> +	if (phydev->drv->config)
>> +		phydev->drv->config(phydev);
>> +
>> +	return 0;
>> +}
>> +
>> +int board_eth_init(bd_t *bis)
>> +{
>> +	int ret;
>> +
>> +	setup_iomux_enet();
>> +
>> +	ret = cpu_eth_init(bis);
>> +	if (ret)
>> +		printf("FEC MXC: %s:failed\n", __func__);
>> +
>> +	return 0;
>> +}
>> +
>> +int board_early_init_f(void)
>> +{
>> +	setup_iomux_uart();
>> +
>> +	return 0;
>> +}
>> +
>> +/*
>> + * Do not overwrite the console
>> + * Use always serial for U-Boot console
>> + */
>> +int overwrite_console(void)
>> +{
>> +	return 1;
>> +}
> 
> Needed ? I have not seen CONFIG_VIDEO. Do you support a splashscreen ?
> 
> 
>> +#define CONFIG_BOOTCOMMAND		"run bootnfs"
> 
> Is it ok as default value ?
> 
> 
> Best regards,
> Stefano
> 
> 


-- 
Viele Gr??e,
Stefan Roese

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

  reply	other threads:[~2013-04-16 12:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10  7:17 [U-Boot] [PATCH] imx: Add titanium board support (i.MX6 based) Stefan Roese
2013-04-10  7:52 ` Heiko Schocher
2013-04-10 12:05 ` Wolfgang Denk
2013-04-10 12:13 ` Wolfgang Denk
2013-04-11  8:00   ` Stefan Roese
2013-04-11  3:36 ` Fabio Estevam
2013-04-11  5:41   ` Wolfgang Denk
2013-04-11  9:04 ` [U-Boot] [PATCH v2] " Stefan Roese
2013-04-16  7:19   ` [U-Boot] [PATCH v3] " Stefan Roese
2013-04-16  7:50     ` Stefano Babic
2013-04-16 12:05       ` Stefan Roese [this message]
2013-04-16 12:55   ` [U-Boot] [PATCH v4] " Stefan Roese
2013-04-17  8:22     ` Stefano Babic
2013-04-17  8:27   ` [U-Boot] [PATCH 4 (resend)] " Stefan Roese
2013-04-17 10:15     ` Wolfgang Denk
2013-04-17 10:27       ` Stefan Roese
2013-04-17 10:32   ` [U-Boot] [PATCH v5] " Stefan Roese
2013-04-11 15:48 ` [U-Boot] [PATCH] " Fabio Estevam
2013-04-11 16:39   ` Stefan Roese
2013-04-11 16:54     ` Fabio Estevam
2013-04-22  8:07 ` Stefano Babic
2013-04-22  8:12   ` Stefan Roese
2013-04-22  8:33     ` 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=516D3E75.7010207@denx.de \
    --to=sr@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