[U-Boot] [PATCH v2] net: phy: micrel: add an option to disable gigabit for the KSZ9031

2017-08-01 Thread Sebastien Bourdelin
The environment variable "disable_giga" can now be used to disable
1000baseTx on the Micrel's KSZ9031.

Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>

---
Changes v1 -> v2:
  - move variables declaration in concern block and remove useless
  initialisation (suggested by Joe Hershberger <joe.hershber...@ni.com>
  - v1 acked by Joe Hershberger <joe.hershber...@ni.com>
---
 drivers/net/phy/micrel.c | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 0e4a4ebcc6..ed26294846 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -497,6 +497,33 @@ static int ksz9031_config(struct phy_device *phydev)
ret = ksz9031_center_flp_timing(phydev);
if (ret)
return ret;
+
+   /* add an option to disable the gigabit feature of this PHY */
+   if (getenv("disable_giga")) {
+   unsigned features;
+   unsigned bmcr;
+
+   /* disable speed 1000 in features supported by the PHY */
+   features = phydev->drv->features;
+   features &= ~(SUPPORTED_1000baseT_Half |
+   SUPPORTED_1000baseT_Full);
+   phydev->advertising = phydev->supported = features;
+
+   /* disable speed 1000 in Basic Control Register */
+   bmcr = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR);
+   bmcr &= ~(1 << 6);
+   phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, bmcr);
+
+   /* disable speed 1000 in 1000Base-T Control Register */
+   phy_write(phydev, MDIO_DEVAD_NONE, MII_CTRL1000, 0);
+
+   /* start autoneg */
+   genphy_config_aneg(phydev);
+   genphy_restart_aneg(phydev);
+
+   return 0;
+   }
+
return genphy_config(phydev);
 }
 
-- 
2.13.3

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] net: phy: micrel: add an option to disable gigabit for the KSZ9031

2017-07-28 Thread Sebastien Bourdelin
The environment variable "disable_giga" can now be used to disable
1000baseTx on the Micrel's KSZ9031.

Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
---
 drivers/net/phy/micrel.c | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 0e4a4ebcc6..eeeba3c232 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -491,12 +491,39 @@ static int ksz9031_phy_extwrite(struct phy_device 
*phydev, int addr,
 static int ksz9031_config(struct phy_device *phydev)
 {
int ret;
+   unsigned features;
+   unsigned bmcr = 0;
+
ret = ksz9031_of_config(phydev);
if (ret)
return ret;
ret = ksz9031_center_flp_timing(phydev);
if (ret)
return ret;
+
+   /* add an option to disable the gigabit feature of this PHY */
+   if (getenv("disable_giga")) {
+   /* disable speed 1000 in features supported by the PHY */
+   features = phydev->drv->features;
+   features &= ~(SUPPORTED_1000baseT_Half |
+   SUPPORTED_1000baseT_Full);
+   phydev->advertising = phydev->supported = features;
+
+   /* disable speed 1000 in Basic Control Register */
+   bmcr = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR);
+   bmcr &= ~(1 << 6);
+   phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, bmcr);
+
+   /* disable speed 1000 in 1000Base-T Control Register */
+   phy_write(phydev, MDIO_DEVAD_NONE, MII_CTRL1000, 0);
+
+   /* start autoneg */
+   genphy_config_aneg(phydev);
+   genphy_restart_aneg(phydev);
+
+   return 0;
+   }
+
return genphy_config(phydev);
 }
 
-- 
2.13.3

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] ts4600: Disable CONFIG_DISPLAY_CPUINFO

2016-11-30 Thread Sebastien Bourdelin

On 11/30/2016 02:16 PM, Tom Rini wrote:
> Without this change we see:
> ../arch/arm/cpu/arm926ejs/mxs/mxs.c: In function ‘print_cpuinfo’:
> ../arch/arm/cpu/arm926ejs/mxs/mxs.c:181:23: warning: unused variable ‘data’ 
> [-Wunused-variable]
> ../arch/arm/cpu/arm926ejs/mxs/mxs.c:180:6: warning: variable ‘cpurev’ set but 
> not used [-Wunused-but-set-variable]
> 
> So the easy solution is to disable CONFIG_DISPLAY_CPUINFO
> 
> Cc: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
> Signed-off-by: Tom Rini <tr...@konsulko.com>
> ---
>  configs/ts4600_defconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configs/ts4600_defconfig b/configs/ts4600_defconfig
> index c052dedf1368..1d3acd3c7126 100644
> --- a/configs/ts4600_defconfig
> +++ b/configs/ts4600_defconfig
> @@ -5,6 +5,7 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
>  CONFIG_FIT=y
>  CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_MMC"
>  CONFIG_SYS_CONSOLE_IS_IN_ENV=y
> +# CONFIG_DISPLAY_CPUINFO is not set
>  CONFIG_SPL=y
>  CONFIG_HUSH_PARSER=y
>  CONFIG_CMD_BOOTZ=y
> 

Reviewed-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 1/1] ARM: ts4600: add basic board support

2016-11-08 Thread Sebastien Bourdelin
This commit adds basic support including:
MMC, Serial console

Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>

---
Changes v3 -> v4:
- add missing Changes in git message

Changes v2 -> v3:
- adjust DRAM timing settings (based on recommandation by Mark
Featherston and Kris Bahnsen)
- rename ts4600.dtb to imx28-ts4600.dtb for future inclusion in
Linux

Changes v1 -> v2:
- remove useless define
- remove eMMC muxing and init which doesn't exist on the TS4600 board
- disable SSP1 and SSP2 clocks settings which are not currently used

Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
---
 arch/arm/Kconfig |   6 ++
 board/technologic/ts4600/Kconfig |  15 
 board/technologic/ts4600/MAINTAINERS |   6 ++
 board/technologic/ts4600/Makefile|  11 +++
 board/technologic/ts4600/iomux.c | 149 +++
 board/technologic/ts4600/ts4600.c|  89 +
 configs/ts4600_defconfig |  18 +
 include/configs/ts4600.h |  70 
 8 files changed, 364 insertions(+)
 create mode 100644 board/technologic/ts4600/Kconfig
 create mode 100644 board/technologic/ts4600/MAINTAINERS
 create mode 100644 board/technologic/ts4600/Makefile
 create mode 100644 board/technologic/ts4600/iomux.c
 create mode 100644 board/technologic/ts4600/ts4600.c
 create mode 100644 configs/ts4600_defconfig
 create mode 100644 include/configs/ts4600.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d7a9b11..142c445 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -579,6 +579,11 @@ config ARCH_SUNXI
select USB_KEYBOARD
select USE_TINY_PRINTF
 
+config TARGET_TS4600
+   bool "Support TS4600"
+   select CPU_ARM926EJS
+   select SUPPORT_SPL
+
 config TARGET_TS4800
bool "Support TS4800"
select CPU_V7
@@ -1015,6 +1020,7 @@ source "board/ti/ti816x/Kconfig"
 source "board/timll/devkit3250/Kconfig"
 source "board/toradex/colibri_pxa270/Kconfig"
 source "board/toradex/colibri_vf/Kconfig"
+source "board/technologic/ts4600/Kconfig"
 source "board/technologic/ts4800/Kconfig"
 source "board/vscom/baltos/Kconfig"
 source "board/woodburn/Kconfig"
diff --git a/board/technologic/ts4600/Kconfig b/board/technologic/ts4600/Kconfig
new file mode 100644
index 000..d0dc2e1
--- /dev/null
+++ b/board/technologic/ts4600/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_TS4600
+
+config SYS_BOARD
+   default "ts4600"
+
+config SYS_VENDOR
+   default "technologic"
+
+config SYS_SOC
+   default "mxs"
+
+config SYS_CONFIG_NAME
+   default "ts4600"
+
+endif
diff --git a/board/technologic/ts4600/MAINTAINERS 
b/board/technologic/ts4600/MAINTAINERS
new file mode 100644
index 000..6f683b5
--- /dev/null
+++ b/board/technologic/ts4600/MAINTAINERS
@@ -0,0 +1,6 @@
+TS4600 BOARD
+M: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
+S: Maintained
+F: board/technologic/ts4600/
+F: include/configs/ts4600.h
+F: configs/ts4600_defconfig
diff --git a/board/technologic/ts4600/Makefile 
b/board/technologic/ts4600/Makefile
new file mode 100644
index 000..faa2970
--- /dev/null
+++ b/board/technologic/ts4600/Makefile
@@ -0,0 +1,11 @@
+#
+# (C) Copyright 2016 Savoir-faire Linux
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+ifndef CONFIG_SPL_BUILD
+obj-y  := ts4600.o
+else
+obj-y  := iomux.o
+endif
diff --git a/board/technologic/ts4600/iomux.c b/board/technologic/ts4600/iomux.c
new file mode 100644
index 000..1398bbe
--- /dev/null
+++ b/board/technologic/ts4600/iomux.c
@@ -0,0 +1,149 @@
+/*
+ * (C) Copyright 2016 Savoir-faire Linux Inc.
+ *
+ * Author: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
+ *
+ * Based on work from TS7680 code by:
+ *   Kris Bahnsen <k...@embeddedarm.com>
+ *   Mark Featherston <m...@embeddedarm.com>
+ *   https://github.com/embeddedarm/u-boot/tree/master/board/technologic/ts7680
+ *
+ * Derived from MX28EVK code by
+ *   Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#defineMUX_CONFIG_SSP0 (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
+#defineMUX_CONFIG_EMI  (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL)
+
+const iomux_cfg_t iomux_setup[] = {
+   /* DUART */
+   MX28_PAD_PWM0__DUART_RX,
+   MX28_PAD_PWM1__DUART_TX,
+
+   /* MMC0 */
+   MX28_PAD_SSP0_DATA0__SSP0_D0 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_DATA1__SSP0_D1 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_DATA2__SSP0_D2 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_DATA3__SSP0_D3 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_CMD__SSP0_CMD | MUX_CONFIG_SSP0,
+   MX28_PAD_SS

[U-Boot] [PATCH v3 1/1] ARM: ts4600: add basic board support

2016-11-08 Thread Sebastien Bourdelin
This commit adds basic support including:
MMC, Serial console

Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
---
 arch/arm/Kconfig |   6 ++
 board/technologic/ts4600/Kconfig |  15 
 board/technologic/ts4600/MAINTAINERS |   6 ++
 board/technologic/ts4600/Makefile|  11 +++
 board/technologic/ts4600/iomux.c | 149 +++
 board/technologic/ts4600/ts4600.c|  89 +
 configs/ts4600_defconfig |  18 +
 include/configs/ts4600.h |  70 
 8 files changed, 364 insertions(+)
 create mode 100644 board/technologic/ts4600/Kconfig
 create mode 100644 board/technologic/ts4600/MAINTAINERS
 create mode 100644 board/technologic/ts4600/Makefile
 create mode 100644 board/technologic/ts4600/iomux.c
 create mode 100644 board/technologic/ts4600/ts4600.c
 create mode 100644 configs/ts4600_defconfig
 create mode 100644 include/configs/ts4600.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d7a9b11..142c445 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -579,6 +579,11 @@ config ARCH_SUNXI
select USB_KEYBOARD
select USE_TINY_PRINTF
 
+config TARGET_TS4600
+   bool "Support TS4600"
+   select CPU_ARM926EJS
+   select SUPPORT_SPL
+
 config TARGET_TS4800
bool "Support TS4800"
select CPU_V7
@@ -1015,6 +1020,7 @@ source "board/ti/ti816x/Kconfig"
 source "board/timll/devkit3250/Kconfig"
 source "board/toradex/colibri_pxa270/Kconfig"
 source "board/toradex/colibri_vf/Kconfig"
+source "board/technologic/ts4600/Kconfig"
 source "board/technologic/ts4800/Kconfig"
 source "board/vscom/baltos/Kconfig"
 source "board/woodburn/Kconfig"
diff --git a/board/technologic/ts4600/Kconfig b/board/technologic/ts4600/Kconfig
new file mode 100644
index 000..d0dc2e1
--- /dev/null
+++ b/board/technologic/ts4600/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_TS4600
+
+config SYS_BOARD
+   default "ts4600"
+
+config SYS_VENDOR
+   default "technologic"
+
+config SYS_SOC
+   default "mxs"
+
+config SYS_CONFIG_NAME
+   default "ts4600"
+
+endif
diff --git a/board/technologic/ts4600/MAINTAINERS 
b/board/technologic/ts4600/MAINTAINERS
new file mode 100644
index 000..6f683b5
--- /dev/null
+++ b/board/technologic/ts4600/MAINTAINERS
@@ -0,0 +1,6 @@
+TS4600 BOARD
+M: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
+S: Maintained
+F: board/technologic/ts4600/
+F: include/configs/ts4600.h
+F: configs/ts4600_defconfig
diff --git a/board/technologic/ts4600/Makefile 
b/board/technologic/ts4600/Makefile
new file mode 100644
index 000..faa2970
--- /dev/null
+++ b/board/technologic/ts4600/Makefile
@@ -0,0 +1,11 @@
+#
+# (C) Copyright 2016 Savoir-faire Linux
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+ifndef CONFIG_SPL_BUILD
+obj-y  := ts4600.o
+else
+obj-y  := iomux.o
+endif
diff --git a/board/technologic/ts4600/iomux.c b/board/technologic/ts4600/iomux.c
new file mode 100644
index 000..1398bbe
--- /dev/null
+++ b/board/technologic/ts4600/iomux.c
@@ -0,0 +1,149 @@
+/*
+ * (C) Copyright 2016 Savoir-faire Linux Inc.
+ *
+ * Author: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
+ *
+ * Based on work from TS7680 code by:
+ *   Kris Bahnsen <k...@embeddedarm.com>
+ *   Mark Featherston <m...@embeddedarm.com>
+ *   https://github.com/embeddedarm/u-boot/tree/master/board/technologic/ts7680
+ *
+ * Derived from MX28EVK code by
+ *   Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#defineMUX_CONFIG_SSP0 (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
+#defineMUX_CONFIG_EMI  (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL)
+
+const iomux_cfg_t iomux_setup[] = {
+   /* DUART */
+   MX28_PAD_PWM0__DUART_RX,
+   MX28_PAD_PWM1__DUART_TX,
+
+   /* MMC0 */
+   MX28_PAD_SSP0_DATA0__SSP0_D0 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_DATA1__SSP0_D1 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_DATA2__SSP0_D2 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_DATA3__SSP0_D3 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_CMD__SSP0_CMD | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_SCK__SSP0_SCK |
+   (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
+
+   /* MMC0 slot power enable */
+   MX28_PAD_PWM3__GPIO_3_28 |
+   (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+
+   /* EMI */
+   MX28_PAD_EMI_D00__EMI_DATA0 | MUX_CONFIG_EMI,
+   MX28_PAD_EMI_D01__EMI_DATA1 | MUX_CONFIG_EMI,
+   MX28_PAD_EMI_D02__EMI_DATA2 | MUX_CONFIG_EMI,
+   MX28_PAD_EMI_D03__EMI_DATA3 | MUX_CONFIG_EMI,
+   MX28_PAD_EMI_D04__EMI_DATA4 | MUX_CONFIG_EMI,
+   MX28_PAD_EMI_D05__EMI_DATA5 | MUX_CO

Re: [U-Boot] [PATCH v2 1/1] ARM: ts4600: add basic board support

2016-11-07 Thread Sebastien Bourdelin
Hi,

I found an problem with this patch on the last rev B of the TS4600
due to a DRAM timing issue.

Please do not consider this patch until i post an other one.

Sorry for the noise,

Regards.


On 11/07/2016 02:30 PM, Sebastien Bourdelin wrote:
> This commit adds basic support including:
> MMC, Serial console
> 
> Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
> 
> ---
> Changes v1 -> v2:
>   - remove useless define
>   - remove eMMC muxing and init which doesn't exist on the TS4600 board
>   - disable SSP1 and SSP2 clocks settings which are not currently used
> 
> Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
> ---
>  arch/arm/Kconfig |   6 ++
>  board/technologic/ts4600/Kconfig |  15 +
>  board/technologic/ts4600/MAINTAINERS |   6 ++
>  board/technologic/ts4600/Makefile|  11 
>  board/technologic/ts4600/iomux.c | 119 
> +++
>  board/technologic/ts4600/ts4600.c|  89 ++
>  configs/ts4600_defconfig |  18 ++
>  include/configs/ts4600.h |  70 +
>  8 files changed, 334 insertions(+)
>  create mode 100644 board/technologic/ts4600/Kconfig
>  create mode 100644 board/technologic/ts4600/MAINTAINERS
>  create mode 100644 board/technologic/ts4600/Makefile
>  create mode 100644 board/technologic/ts4600/iomux.c
>  create mode 100644 board/technologic/ts4600/ts4600.c
>  create mode 100644 configs/ts4600_defconfig
>  create mode 100644 include/configs/ts4600.h
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index d7a9b11..142c445 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -579,6 +579,11 @@ config ARCH_SUNXI
>   select USB_KEYBOARD
>   select USE_TINY_PRINTF
>  
> +config TARGET_TS4600
> + bool "Support TS4600"
> + select CPU_ARM926EJS
> + select SUPPORT_SPL
> +
>  config TARGET_TS4800
>   bool "Support TS4800"
>   select CPU_V7
> @@ -1015,6 +1020,7 @@ source "board/ti/ti816x/Kconfig"
>  source "board/timll/devkit3250/Kconfig"
>  source "board/toradex/colibri_pxa270/Kconfig"
>  source "board/toradex/colibri_vf/Kconfig"
> +source "board/technologic/ts4600/Kconfig"
>  source "board/technologic/ts4800/Kconfig"
>  source "board/vscom/baltos/Kconfig"
>  source "board/woodburn/Kconfig"
> diff --git a/board/technologic/ts4600/Kconfig 
> b/board/technologic/ts4600/Kconfig
> new file mode 100644
> index 000..d0dc2e1
> --- /dev/null
> +++ b/board/technologic/ts4600/Kconfig
> @@ -0,0 +1,15 @@
> +if TARGET_TS4600
> +
> +config SYS_BOARD
> + default "ts4600"
> +
> +config SYS_VENDOR
> + default "technologic"
> +
> +config SYS_SOC
> + default "mxs"
> +
> +config SYS_CONFIG_NAME
> + default "ts4600"
> +
> +endif
> diff --git a/board/technologic/ts4600/MAINTAINERS 
> b/board/technologic/ts4600/MAINTAINERS
> new file mode 100644
> index 000..6f683b5
> --- /dev/null
> +++ b/board/technologic/ts4600/MAINTAINERS
> @@ -0,0 +1,6 @@
> +TS4600 BOARD
> +M:   Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
> +S:   Maintained
> +F:   board/technologic/ts4600/
> +F:   include/configs/ts4600.h
> +F:   configs/ts4600_defconfig
> diff --git a/board/technologic/ts4600/Makefile 
> b/board/technologic/ts4600/Makefile
> new file mode 100644
> index 000..faa2970
> --- /dev/null
> +++ b/board/technologic/ts4600/Makefile
> @@ -0,0 +1,11 @@
> +#
> +# (C) Copyright 2016 Savoir-faire Linux
> +#
> +# SPDX-License-Identifier:   GPL-2.0+
> +#
> +
> +ifndef   CONFIG_SPL_BUILD
> +obj-y:= ts4600.o
> +else
> +obj-y:= iomux.o
> +endif
> diff --git a/board/technologic/ts4600/iomux.c 
> b/board/technologic/ts4600/iomux.c
> new file mode 100644
> index 000..11d1723
> --- /dev/null
> +++ b/board/technologic/ts4600/iomux.c
> @@ -0,0 +1,119 @@
> +/*
> + * (C) Copyright 2016 Savoir-faire Linux Inc.
> + *
> + * Author: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
> + *
> + * Based on work from TS7680 code by:
> + *   Kris Bahnsen <k...@embeddedarm.com>
> + *   Mark Featherston <m...@embeddedarm.com>
> + *   
> https://github.com/embeddedarm/u-boot/tree/master/board/technologic/ts7680
> + *
> + * Derived from MX28EVK code by
> + *   Freescale Semiconductor, Inc.
> + *
> + * SPDX-License-Identifier:  GPL-2.0+
> + */
> +
> +#include 
> +#include 
>

[U-Boot] [PATCH v2 1/1] ARM: ts4600: add basic board support

2016-11-07 Thread Sebastien Bourdelin
This commit adds basic support including:
MMC, Serial console

Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>

---
Changes v1 -> v2:
  - remove useless define
  - remove eMMC muxing and init which doesn't exist on the TS4600 board
  - disable SSP1 and SSP2 clocks settings which are not currently used

Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
---
 arch/arm/Kconfig |   6 ++
 board/technologic/ts4600/Kconfig |  15 +
 board/technologic/ts4600/MAINTAINERS |   6 ++
 board/technologic/ts4600/Makefile|  11 
 board/technologic/ts4600/iomux.c | 119 +++
 board/technologic/ts4600/ts4600.c|  89 ++
 configs/ts4600_defconfig |  18 ++
 include/configs/ts4600.h |  70 +
 8 files changed, 334 insertions(+)
 create mode 100644 board/technologic/ts4600/Kconfig
 create mode 100644 board/technologic/ts4600/MAINTAINERS
 create mode 100644 board/technologic/ts4600/Makefile
 create mode 100644 board/technologic/ts4600/iomux.c
 create mode 100644 board/technologic/ts4600/ts4600.c
 create mode 100644 configs/ts4600_defconfig
 create mode 100644 include/configs/ts4600.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d7a9b11..142c445 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -579,6 +579,11 @@ config ARCH_SUNXI
select USB_KEYBOARD
select USE_TINY_PRINTF
 
+config TARGET_TS4600
+   bool "Support TS4600"
+   select CPU_ARM926EJS
+   select SUPPORT_SPL
+
 config TARGET_TS4800
bool "Support TS4800"
select CPU_V7
@@ -1015,6 +1020,7 @@ source "board/ti/ti816x/Kconfig"
 source "board/timll/devkit3250/Kconfig"
 source "board/toradex/colibri_pxa270/Kconfig"
 source "board/toradex/colibri_vf/Kconfig"
+source "board/technologic/ts4600/Kconfig"
 source "board/technologic/ts4800/Kconfig"
 source "board/vscom/baltos/Kconfig"
 source "board/woodburn/Kconfig"
diff --git a/board/technologic/ts4600/Kconfig b/board/technologic/ts4600/Kconfig
new file mode 100644
index 000..d0dc2e1
--- /dev/null
+++ b/board/technologic/ts4600/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_TS4600
+
+config SYS_BOARD
+   default "ts4600"
+
+config SYS_VENDOR
+   default "technologic"
+
+config SYS_SOC
+   default "mxs"
+
+config SYS_CONFIG_NAME
+   default "ts4600"
+
+endif
diff --git a/board/technologic/ts4600/MAINTAINERS 
b/board/technologic/ts4600/MAINTAINERS
new file mode 100644
index 000..6f683b5
--- /dev/null
+++ b/board/technologic/ts4600/MAINTAINERS
@@ -0,0 +1,6 @@
+TS4600 BOARD
+M: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
+S: Maintained
+F: board/technologic/ts4600/
+F: include/configs/ts4600.h
+F: configs/ts4600_defconfig
diff --git a/board/technologic/ts4600/Makefile 
b/board/technologic/ts4600/Makefile
new file mode 100644
index 000..faa2970
--- /dev/null
+++ b/board/technologic/ts4600/Makefile
@@ -0,0 +1,11 @@
+#
+# (C) Copyright 2016 Savoir-faire Linux
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+ifndef CONFIG_SPL_BUILD
+obj-y  := ts4600.o
+else
+obj-y  := iomux.o
+endif
diff --git a/board/technologic/ts4600/iomux.c b/board/technologic/ts4600/iomux.c
new file mode 100644
index 0000000..11d1723
--- /dev/null
+++ b/board/technologic/ts4600/iomux.c
@@ -0,0 +1,119 @@
+/*
+ * (C) Copyright 2016 Savoir-faire Linux Inc.
+ *
+ * Author: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
+ *
+ * Based on work from TS7680 code by:
+ *   Kris Bahnsen <k...@embeddedarm.com>
+ *   Mark Featherston <m...@embeddedarm.com>
+ *   https://github.com/embeddedarm/u-boot/tree/master/board/technologic/ts7680
+ *
+ * Derived from MX28EVK code by
+ *   Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#defineMUX_CONFIG_SSP0 (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
+#defineMUX_CONFIG_EMI  (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL)
+
+const iomux_cfg_t iomux_setup[] = {
+   /* DUART */
+   MX28_PAD_PWM0__DUART_RX,
+   MX28_PAD_PWM1__DUART_TX,
+
+   /* MMC0 */
+   MX28_PAD_SSP0_DATA0__SSP0_D0 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_DATA1__SSP0_D1 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_DATA2__SSP0_D2 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_DATA3__SSP0_D3 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_CMD__SSP0_CMD | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_SCK__SSP0_SCK |
+   (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
+
+   /* MMC0 slot power enable */
+   MX28_PAD_PWM3__GPIO_3_28 |
+   (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+
+   /* EMI */
+   MX28_PAD_EMI_D00__EMI_DATA0

Re: [U-Boot] [PATCH 1/1] ARM: ts4600: add basic board support

2016-11-07 Thread Sebastien Bourdelin
Hi Fabio

On 11/07/2016 11:49 AM, Fabio Estevam wrote:
> Hi Sebastien,
> 
> On Mon, Nov 7, 2016 at 2:24 PM, Sebastien Bourdelin
> <sebastien.bourde...@savoirfairelinux.com> wrote:
> 
>> Yes currently i'm using the mainstream Linux kernel using the mx28evk
>> defconfig and its Device Tree.
>> Obviously not all peripherals are working.
> 
> Ok, got it. So that means that having a dedicated ts4600.dts file in
> mainline kernel would be helpful.
> 
>> For my understanding, are we talking about adding the dts in U-Boot or
>> in Linux?
> 
> I am talking about adding ts4600.dts file to mainline kernel.
> 
Perfect, thanks for the clarification.
I will work on it.

> Regards,
> 
> Fabio Estevam
>

Best Regards,

Sebastien Bourdelin
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] ARM: ts4600: add basic board support

2016-11-07 Thread Sebastien Bourdelin
Hi Fabio.

On 11/07/2016 10:43 AM, Fabio Estevam wrote:
> Hi Sebastien,
> 
> On Mon, Nov 7, 2016 at 1:36 PM, Sebastien Bourdelin
> <sebastien.bourde...@savoirfairelinux.com> wrote:
>>
>> It's in my todo list yes, but nothing really planned currently, do you
>> think i should keep the mx28evk dtb instead?
> 
> I am not familar with this board. Do you mean that you use
> imx28-evk.dtb to boot it?
> 
Yes currently i'm using the mainstream Linux kernel using the mx28evk
defconfig and its Device Tree.
Obviously not all peripherals are working.

> IMHO it would be nice to have a dedicated ts4600.dts to avoid confusion.
> 
For my understanding, are we talking about adding the dts in U-Boot or
in Linux?

> Regards,
> 
> Fabio Estevam
>

Best Regards,

Sebastien Bourdelin
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] ARM: ts4600: add basic board support

2016-11-07 Thread Sebastien Bourdelin
Hi Fabio.

On 11/06/2016 02:16 PM, Fabio Estevam wrote:
> Hi Sebastien,
> 
> On Thu, Nov 3, 2016 at 5:20 PM, Sebastien Bourdelin
> <sebastien.bourde...@savoirfairelinux.com> wrote:
> 
>> +/* Extra Environment */
>> +#define CONFIG_EXTRA_ENV_SETTINGS \
>> +   "fdt_addr=0x4100\0" \
>> +   "loadkernel=load mmc ${mmcdev}:${mmcpart} ${loadaddr} zImage\0" \
>> +   "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ts4600.dtb\0" \
> 
> Not related to this patch: do you plan to submit ts4600.dts for
> mainline inclusion as well?
> 
It's in my todo list yes, but nothing really planned currently, do you
think i should keep the mx28evk dtb instead?

> Regards,
> 
> Fabio Estevam
>

Regards,

Sebastien Bourdelin
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/1] ARM: ts4600: add basic board support

2016-11-03 Thread Sebastien Bourdelin
This commit adds basic support including:
MMC, Serial console

Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
---
 arch/arm/Kconfig |   6 ++
 board/technologic/ts4600/Kconfig |  15 
 board/technologic/ts4600/MAINTAINERS |   6 ++
 board/technologic/ts4600/Makefile|  11 +++
 board/technologic/ts4600/iomux.c | 131 +++
 board/technologic/ts4600/ts4600.c|  99 ++
 configs/ts4600_defconfig |  18 +
 include/configs/ts4600.h |  70 +++
 8 files changed, 356 insertions(+)
 create mode 100644 board/technologic/ts4600/Kconfig
 create mode 100644 board/technologic/ts4600/MAINTAINERS
 create mode 100644 board/technologic/ts4600/Makefile
 create mode 100644 board/technologic/ts4600/iomux.c
 create mode 100644 board/technologic/ts4600/ts4600.c
 create mode 100644 configs/ts4600_defconfig
 create mode 100644 include/configs/ts4600.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d7a9b11..142c445 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -579,6 +579,11 @@ config ARCH_SUNXI
select USB_KEYBOARD
select USE_TINY_PRINTF
 
+config TARGET_TS4600
+   bool "Support TS4600"
+   select CPU_ARM926EJS
+   select SUPPORT_SPL
+
 config TARGET_TS4800
bool "Support TS4800"
select CPU_V7
@@ -1015,6 +1020,7 @@ source "board/ti/ti816x/Kconfig"
 source "board/timll/devkit3250/Kconfig"
 source "board/toradex/colibri_pxa270/Kconfig"
 source "board/toradex/colibri_vf/Kconfig"
+source "board/technologic/ts4600/Kconfig"
 source "board/technologic/ts4800/Kconfig"
 source "board/vscom/baltos/Kconfig"
 source "board/woodburn/Kconfig"
diff --git a/board/technologic/ts4600/Kconfig b/board/technologic/ts4600/Kconfig
new file mode 100644
index 000..d0dc2e1
--- /dev/null
+++ b/board/technologic/ts4600/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_TS4600
+
+config SYS_BOARD
+   default "ts4600"
+
+config SYS_VENDOR
+   default "technologic"
+
+config SYS_SOC
+   default "mxs"
+
+config SYS_CONFIG_NAME
+   default "ts4600"
+
+endif
diff --git a/board/technologic/ts4600/MAINTAINERS 
b/board/technologic/ts4600/MAINTAINERS
new file mode 100644
index 000..6f683b5
--- /dev/null
+++ b/board/technologic/ts4600/MAINTAINERS
@@ -0,0 +1,6 @@
+TS4600 BOARD
+M: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
+S: Maintained
+F: board/technologic/ts4600/
+F: include/configs/ts4600.h
+F: configs/ts4600_defconfig
diff --git a/board/technologic/ts4600/Makefile 
b/board/technologic/ts4600/Makefile
new file mode 100644
index 000..faa2970
--- /dev/null
+++ b/board/technologic/ts4600/Makefile
@@ -0,0 +1,11 @@
+#
+# (C) Copyright 2016 Savoir-faire Linux
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+ifndef CONFIG_SPL_BUILD
+obj-y  := ts4600.o
+else
+obj-y  := iomux.o
+endif
diff --git a/board/technologic/ts4600/iomux.c b/board/technologic/ts4600/iomux.c
new file mode 100644
index 000..de49fc2
--- /dev/null
+++ b/board/technologic/ts4600/iomux.c
@@ -0,0 +1,131 @@
+/*
+ * (C) Copyright 2016 Savoir-faire Linux Inc.
+ *
+ * Author: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
+ *
+ * Based on work from TS7680 code by:
+ *   Kris Bahnsen <k...@embeddedarm.com>
+ *   Mark Featherston <m...@embeddedarm.com>
+ *   https://github.com/embeddedarm/u-boot/tree/master/board/technologic/ts7680
+ *
+ * Derived from MX28EVK code by
+ *   Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#defineMUX_CONFIG_SSP0 (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
+#defineMUX_CONFIG_GPMI (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
+#defineMUX_CONFIG_ENET (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
+#defineMUX_CONFIG_EMI  (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL)
+#defineMUX_CONFIG_LCD  (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
+
+const iomux_cfg_t iomux_setup[] = {
+   /* DUART */
+   MX28_PAD_PWM0__DUART_RX,
+   MX28_PAD_PWM1__DUART_TX,
+
+   /* MMC0 */
+   MX28_PAD_SSP0_DATA0__SSP0_D0 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_DATA1__SSP0_D1 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_DATA2__SSP0_D2 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_DATA3__SSP0_D3 | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_CMD__SSP0_CMD | MUX_CONFIG_SSP0,
+   MX28_PAD_SSP0_SCK__SSP0_SCK |
+   (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
+
+   /* MMC0 slot power enable */
+   MX28_PAD_PWM3__GPIO_3_28 |
+   (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+
+   /* MMC1 eMMC */
+   MX28_PAD_GPMI_WRN__SSP1_SCK |
+   (MXS_PAD_12MA | MXS_P

Re: [U-Boot] [PATCH] ts4800: add CONFIG_SYS_FSL_ERRATUM_ESDHC_A001

2016-05-25 Thread Sebastien Bourdelin
Hi Fabio,

On 05/20/2016 05:40 PM, Fabio Estevam wrote:
> Hi Sebastien,
>
> On Fri, May 20, 2016 at 5:13 PM, Sebastien Bourdelin
> <sebastien.bourde...@savoirfairelinux.com> wrote:
>
>> This issue happen with the SD card, i currently didn't found the time to
>> try with eMMC.
> Ok, we also boot from SD card on the mx51evk and never observed this
> issue there.
>
> What is the MX51 silicon version you have on your board?
It's an MX51 rev 3.0,
if you need more information, feel free to ask.

Regards,
Sebastien.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ts4800: add CONFIG_SYS_FSL_ERRATUM_ESDHC_A001

2016-05-20 Thread Sebastien Bourdelin
Hi Fabio,

On 05/10/2016 04:43 PM, Fabio Estevam wrote:
> Hi Sebastien,
>
> On Thu, Apr 21, 2016 at 2:37 PM, Sebastien Bourdelin
> <sebastien.bourde...@savoirfairelinux.com> wrote:
>> This commit fixes the MMC data transactions timeout problem on the
>> TS4800.
>>
>> The changes introduced in the commit e978a31 on the timeout calculation
>> for the MMC data transactions has revealed there is something wrong with
>> the timeout setting of the eSDHC controller used in the IMX51.
>>
>> The IMX51 seems to be concerned by this erratum and without this change
>> the MMC driver is unable to do any transactions.
>>
>> Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
> Does this issue only happen with eMMC and not with SD card? mx51evk
> boots fine without this config option.
This issue happen with the SD card, i currently didn't found the time to
try with eMMC.

Best Regards,
Sebastien.
> As this change affects only ts4800.h I think it is safer to apply for
> this release:
>
> Reviewed-by: Fabio Estevam <fabio.este...@nxp.com>

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] cosmetic: mx6slevk: Minor coding-style fix

2016-05-20 Thread Sebastien Bourdelin
Fix the brace indentation in board_mmc_init().

Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
---
 board/freescale/mx6slevk/mx6slevk.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/board/freescale/mx6slevk/mx6slevk.c 
b/board/freescale/mx6slevk/mx6slevk.c
index f1915a8..256d602 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -230,14 +230,14 @@ int board_mmc_init(bd_t *bis)
printf("Warning: you configured more USDHC controllers"
"(%d) than supported by the board\n", i + 1);
return -EINVAL;
-   }
-
-   ret = fsl_esdhc_initialize(bis, _cfg[i]);
-   if (ret) {
-   printf("Warning: failed to initialize "
-   "mmc dev %d\n", i);
-   return ret;
-   }
+   }
+
+   ret = fsl_esdhc_initialize(bis, _cfg[i]);
+   if (ret) {
+   printf("Warning: failed to initialize "
+   "mmc dev %d\n", i);
+   return ret;
+   }
}
 
return 0;
-- 
2.8.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ts4800: add CONFIG_SYS_FSL_ERRATUM_ESDHC_A001

2016-05-10 Thread Sebastien Bourdelin
Hi,

On 04/21/2016 05:39 PM, Sebastien Bourdelin wrote:
> Hi,
> I add Fabio Estevam in the loop as suggested by Marek Vasut on IRC.
>
> On 04/21/2016 01:37 PM, Sebastien Bourdelin wrote:
>> This commit fixes the MMC data transactions timeout problem on the
>> TS4800.
>>
>> The changes introduced in the commit e978a31 on the timeout calculation
>> for the MMC data transactions has revealed there is something wrong with
>> the timeout setting of the eSDHC controller used in the IMX51.
>>
>> The IMX51 seems to be concerned by this erratum and without this change
>> the MMC driver is unable to do any transactions.
>>
>> Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
>> ---
>>  include/configs/ts4800.h | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/include/configs/ts4800.h b/include/configs/ts4800.h
>> index fcc9d80..5e5e4d3 100644
>> --- a/include/configs/ts4800.h
>> +++ b/include/configs/ts4800.h
>> @@ -63,6 +63,8 @@
>>  #define CONFIG_FSL_ESDHC
>>  #define CONFIG_SYS_FSL_ESDHC_ADDR   MMC_SDHC1_BASE_ADDR
>>  
>> +#define CONFIG_SYS_FSL_ERRATUM_ESDHC_A001
>> +
>>  #define CONFIG_MMC
>>  
>>  #define CONFIG_CMD_MMC
> The problem we found is related to the DTOCV field in the system control
> register of the IMX51's eSDHC controller.  If we set the value 4, 8 or
> 12 in this DTOCV field the MMC driver is unable to do any data
> transactions, we have a timeout (i.e: the DTOE field in the Interrupt
> status register of the eSDHC controller is set to 1).
> It works with other values, at least i tried with 5, 9, 11, 13 without
> having any timeout.
>
> Our guess and because we didn't find any errata related to this issue
> for the IMX51 is that this device is impacted by the same problem then
> devices MPC83XX and MPC85XX (see the ESDHC-A001 errata in the datasheet:
> http://pdf.datasheetarchive.com/indexerfiles/Datasheets-SW1/DSASW0012367.pdf)
>
> Perhaps someone from Freescale can give us more informations.
>
> Regards,
> Sebastien.

Did someone from Freescale had the time to take a look at this patch and can
give us more information?
We still need it to boot the TS4800.

Regards,
Sebastien.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ts4800: add CONFIG_SYS_FSL_ERRATUM_ESDHC_A001

2016-04-21 Thread Sebastien Bourdelin
Hi,
I add Fabio Estevam in the loop as suggested by Marek Vasut on IRC.

On 04/21/2016 01:37 PM, Sebastien Bourdelin wrote:
> This commit fixes the MMC data transactions timeout problem on the
> TS4800.
>
> The changes introduced in the commit e978a31 on the timeout calculation
> for the MMC data transactions has revealed there is something wrong with
> the timeout setting of the eSDHC controller used in the IMX51.
>
> The IMX51 seems to be concerned by this erratum and without this change
> the MMC driver is unable to do any transactions.
>
> Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
> ---
>  include/configs/ts4800.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/include/configs/ts4800.h b/include/configs/ts4800.h
> index fcc9d80..5e5e4d3 100644
> --- a/include/configs/ts4800.h
> +++ b/include/configs/ts4800.h
> @@ -63,6 +63,8 @@
>  #define CONFIG_FSL_ESDHC
>  #define CONFIG_SYS_FSL_ESDHC_ADDRMMC_SDHC1_BASE_ADDR
>  
> +#define CONFIG_SYS_FSL_ERRATUM_ESDHC_A001
> +
>  #define CONFIG_MMC
>  
>  #define CONFIG_CMD_MMC

The problem we found is related to the DTOCV field in the system control
register of the IMX51's eSDHC controller.  If we set the value 4, 8 or
12 in this DTOCV field the MMC driver is unable to do any data
transactions, we have a timeout (i.e: the DTOE field in the Interrupt
status register of the eSDHC controller is set to 1).
It works with other values, at least i tried with 5, 9, 11, 13 without
having any timeout.

Our guess and because we didn't find any errata related to this issue
for the IMX51 is that this device is impacted by the same problem then
devices MPC83XX and MPC85XX (see the ESDHC-A001 errata in the datasheet:
http://pdf.datasheetarchive.com/indexerfiles/Datasheets-SW1/DSASW0012367.pdf)

Perhaps someone from Freescale can give us more informations.

Regards,
Sebastien.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ts4800: add CONFIG_SYS_FSL_ERRATUM_ESDHC_A001

2016-04-21 Thread Sebastien Bourdelin
This commit fixes the MMC data transactions timeout problem on the
TS4800.

The changes introduced in the commit e978a31 on the timeout calculation
for the MMC data transactions has revealed there is something wrong with
the timeout setting of the eSDHC controller used in the IMX51.

The IMX51 seems to be concerned by this erratum and without this change
the MMC driver is unable to do any transactions.

Signed-off-by: Sebastien Bourdelin <sebastien.bourde...@savoirfairelinux.com>
---
 include/configs/ts4800.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/configs/ts4800.h b/include/configs/ts4800.h
index fcc9d80..5e5e4d3 100644
--- a/include/configs/ts4800.h
+++ b/include/configs/ts4800.h
@@ -63,6 +63,8 @@
 #define CONFIG_FSL_ESDHC
 #define CONFIG_SYS_FSL_ESDHC_ADDR  MMC_SDHC1_BASE_ADDR
 
+#define CONFIG_SYS_FSL_ERRATUM_ESDHC_A001
+
 #define CONFIG_MMC
 
 #define CONFIG_CMD_MMC
-- 
2.8.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot