[U-Boot] [PATCH v3] imx: Add titanium board support (i.MX6 based)

Stefan Roese sr at denx.de
Tue Apr 16 14:05:09 CEST 2013


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 at 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


More information about the U-Boot mailing list