Re: [U-Boot] [PATCH] arm: mx5: Fix RTC bus number

2014-07-24 Thread Otavio Salvador
On Thu, Jul 24, 2014 at 11:27 PM, Fabio Estevam feste...@gmail.com wrote:
 On Thu, Jul 24, 2014 at 7:05 PM, Marek Vasut ma...@denx.de wrote:
 A previous update to the I2C stack introduced a typo in the
 configuration option. Fix the typo and therefore allow the
 RTC to work correctly with the 'date' command again.

 Signed-off-by: Marek Vasut ma...@denx.de
 Cc: Stefano Babic sba...@denx.de
 ---
  include/configs/m53evk.h | 2 +-

 It would be clearer if m53evk was mentioned in the Subject.

Agreed, the current commit log is misleading.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] i.MX tree out of sync

2014-07-15 Thread Otavio Salvador
Hello Stefano,

The u-boot-imx tree is out of sync. Could you rebase it (or merge v2014.07)?

Thanks in advance,

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] i.MX6DL/S: add drive-strength back to pads DISP0_DAT2/DAT10

2014-07-09 Thread Otavio Salvador
On Wed, Jul 9, 2014 at 4:27 PM, Eric Nelson
eric.nel...@boundarydevices.com wrote:
 The pad settings for DISP0_DATA02 and DISP0_DAT10 were not
 set in the same way as DISP0_DAT00-23, causing much flicker
 in parallel RGB displays on Dual-Lite and Solo processors.

 These settings now match the i.MX6 Dual and Quad core versions.

 Note that this fixes a regression in commit b47abc3 and that
 this is the second time we've had a regression on these two
 pads (See commit e654ddf).

 Signed-off-by: Eric Nelson eric.nel...@boundarydevices.com

Acked-by: Otavio Salvador ota...@ossystems.com.br

Stephano, can it be included in the upcoming release?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v5 1/4] mx6: Add support for the mx6solox variant

2014-07-07 Thread Otavio Salvador
On Mon, Jul 7, 2014 at 11:18 AM, Fabio Estevam feste...@gmail.com wrote:
 On Thu, Jul 3, 2014 at 3:22 PM, Fabio Estevam feste...@gmail.com wrote:
 On Thu, Jul 3, 2014 at 4:15 AM, Stefano Babic sba...@denx.de wrote:
 I have only taken a short look because the series should flow after
 2014.07. Anyway, I could push them into -next.

 Pushing them into -next would be very helpful, so that we can continue
 on adding new support for mx6solox.

 Would it be possible to review the initial series that adds mx6solox
 support and apply it to -next if you are happy with it?

 Otherwise, I am not able to proceed with further mx6solox U-boot upstream 
 work.

I second this request. I see no reason why patches takes so long to
get applied in master/next when people agree with them.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/4] mx6: Add support for the mx6solox variant

2014-06-23 Thread Otavio Salvador
 VDEC_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x2C000)
 +#define SPBA_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x3C000)
 +#define AIPS3_CONFIG_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x7C000)
 +#define ADC1_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x8)
 +#define ADC2_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x84000)
 +#define WDOG3_BASE_ADDR (AIPS3_ARB_BASE_ADDR + 0x88000)
 +#define ECSPI5_BASE_ADDR(AIPS3_ARB_BASE_ADDR + 0x8C000)
 +#define HS_BASE_ADDR(AIPS3_ARB_BASE_ADDR + 0x9)
 +#define MU_MCU_BASE_ADDR(AIPS3_ARB_BASE_ADDR + 0x94000)
 +#define CANFD_BASE_ADDR (AIPS3_ARB_BASE_ADDR + 0x98000)
 +#define MU_DSP_BASE_ADDR(AIPS3_ARB_BASE_ADDR + 0x9C000)
 +#define UART6_BASE_ADDR (AIPS3_ARB_BASE_ADDR + 0xA)
 +#define PWM5_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xA4000)
 +#define PWM6_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xA8000)
 +#define PWM7_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xAC000)
 +#define PWM8_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xB)
 +#endif
 +
  #define CHIP_REV_1_0 0x10
 +#ifndef CONFIG_MX6SX
  #define IRAM_SIZE0x0004
 +#else
 +#define IRAM_SIZE0x0002
 +#endif
  #define FEC_QUIRK_ENET_MAC

  #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
 @@ -471,6 +568,22 @@ struct fuse_bank0_regs {
 u32 rsvd7[4];
  };

 +#ifdef CONFIG_MX6SX
 +struct fuse_bank4_regs {
 +   u32 sjc_resp_low;
 +   u32 rsvd0[3];
 +   u32 sjc_resp_high;
 +   u32 rsvd1[3];
 +   u32 mac_addr_low;
 +   u32 rsvd2[3];
 +   u32 mac_addr_high;
 +   u32 rsvd3[3];
 +   u32 mac_addr2;
 +   u32 rsvd4[7];
 +   u32 gp1;
 +   u32 rsvd5[7];
 +};
 +#else
  struct fuse_bank4_regs {
 u32 sjc_resp_low;
 u32 rsvd0[3];
 @@ -485,6 +598,7 @@ struct fuse_bank4_regs {
 u32 gp2;
 u32 rsvd5[3];
  };
 +#endif

  struct aipstz_regs {
 u32 mprot0;
 diff --git a/arch/arm/include/asm/arch-mx6/mx6-ddr.h 
 b/arch/arm/include/asm/arch-mx6/mx6-ddr.h
 index d544d2e..5ebabfa 100644
 --- a/arch/arm/include/asm/arch-mx6/mx6-ddr.h
 +++ b/arch/arm/include/asm/arch-mx6/mx6-ddr.h
 @@ -13,7 +13,11 @@
  #if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
  #include mx6dl-ddr.h
  #else
 +#ifdef CONFIG_MX6SX
 +#include mx6sx-ddr.h
 +#else
  #error Please select cpu
 +#endif /* CONFIG_MX6SX */
  #endif /* CONFIG_MX6DL or CONFIG_MX6S */
  #endif /* CONFIG_MX6Q */
  #else
 diff --git a/arch/arm/include/asm/arch-mx6/mx6sx-ddr.h 
 b/arch/arm/include/asm/arch-mx6/mx6sx-ddr.h
 new file mode 100644
 index 000..2cc94aa
 --- /dev/null
 +++ b/arch/arm/include/asm/arch-mx6/mx6sx-ddr.h
 @@ -0,0 +1,45 @@
 +/*
 + * Copyright (C) 2014 Freescale Semiconductor, Inc.
 + *
 + * SPDX-License-Identifier:GPL-2.0+
 + */
 +
 +#ifndef __ASM_ARCH_MX6SX_DDR_H__
 +#define __ASM_ARCH_MX6SX_DDR_H__
 +
 +#ifndef CONFIG_MX6SX
 +#error wrong CPU
 +#endif
 +
 +#define MX6_IOM_DRAM_DQM0  0x020e02ec
 +#define MX6_IOM_DRAM_DQM1  0x020e02f0
 +#define MX6_IOM_DRAM_DQM2  0x020e02f4
 +#define MX6_IOM_DRAM_DQM3  0x020e02f8
 +
 +#define MX6_IOM_DRAM_RAS   0x020e02fc
 +#define MX6_IOM_DRAM_CAS   0x020e0300
 +#define MX6_IOM_DRAM_SDODT00x020e0310
 +#define MX6_IOM_DRAM_SDODT10x020e0314
 +#define MX6_IOM_DRAM_SDBA2 0x020e0320
 +#define MX6_IOM_DRAM_SDCKE00x020e0324
 +#define MX6_IOM_DRAM_SDCKE10x020e0328
 +#define MX6_IOM_DRAM_SDCLK_0   0x020e032c
 +#define MX6_IOM_DRAM_RESET 0x020e0340
 +
 +#define MX6_IOM_DRAM_SDQS0 0x020e0330
 +#define MX6_IOM_DRAM_SDQS1 0x020e0334
 +#define MX6_IOM_DRAM_SDQS2 0x020e0338
 +#define MX6_IOM_DRAM_SDQS3 0x020e033c
 +
 +#define MX6_IOM_GRP_ADDDS  0x020e05f4
 +#define MX6_IOM_DDRMODE_CTL0x020e05f8
 +#define MX6_IOM_GRP_DDRPKE 0x020e05fc
 +#define MX6_IOM_GRP_DDRMODE0x020e0608
 +#define MX6_IOM_GRP_B0DS   0x020e060c
 +#define MX6_IOM_GRP_B1DS   0x020e0610
 +#define MX6_IOM_GRP_CTLDS  0x020e0614
 +#define MX6_IOM_GRP_DDR_TYPE   0x020e0618
 +#define MX6_IOM_GRP_B2DS   0x020e061c
 +#define MX6_IOM_GRP_B3DS   0x020e0620
 +
 +#endif /*__ASM_ARCH_MX6SX_DDR_H__ */
 --
 1.8.3.2

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



-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/6] usb: ehci: mx6: Add support for i.MX6SL

2014-06-17 Thread Otavio Salvador
On Tue, Jun 17, 2014 at 11:56 AM, Stefano Babic sba...@denx.de wrote:
 Hi Otavio,

 On 16/06/2014 02:46, Otavio Salvador wrote:
 The i.MX6SL has a different base address for the controller. This
 patch adapts the driver to support the different base address for this
 case.

 Signed-off-by: Otavio Salvador ota...@ossystems.com.br
 ---

  drivers/usb/host/ehci-mx6.c | 10 --
  1 file changed, 8 insertions(+), 2 deletions(-)

 diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
 index c0a557b..5ba1c5e 100644
 --- a/drivers/usb/host/ehci-mx6.c
 +++ b/drivers/usb/host/ehci-mx6.c
 @@ -53,6 +53,12 @@
  #define UCMD_RUN_STOP   (1  0) /* controller run/stop */
  #define UCMD_RESET   (1  1) /* controller reset */

 +#ifdef CONFIG_MX6SL
 +#define USB_BASE_ADDRUSBO2H_USB_BASE_ADDR
 +#else
 +#define USB_BASE_ADDRUSBOH3_USB_BASE_ADDR
 +#endif
 +

 What about using the is_cpu_type() function, recently added together
 with SPL support ? I think we have reached, thank to Tim's patches, the
 goal to have a single image for different Freescale's mx6 variations. It
 is pity to go back and decide at compile time which SOC is running.

Yes; I will do it for v2.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/6] mmc: fsl_esdhc: Add support to force VSELECT set

2014-06-17 Thread Otavio Salvador
On Tue, Jun 17, 2014 at 12:11 PM, Stefano Babic sba...@denx.de wrote:
 On 16/06/2014 02:46, Otavio Salvador wrote:
 There are board were we cannot do voltage negotiation but want to set
 the VSELECT bit forcely to ensure it to work at 1.8V.

 This commit adds CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT flag for this use.

 Signed-off-by: Otavio Salvador ota...@ossystems.com.br
 ---

  drivers/mmc/fsl_esdhc.c | 4 
  1 file changed, 4 insertions(+)

 diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
 index c75b38f..b3870e2 100644
 --- a/drivers/mmc/fsl_esdhc.c
 +++ b/drivers/mmc/fsl_esdhc.c
 @@ -517,6 +517,10 @@ static int esdhc_init(struct mmc *mmc)
   /* Set timout to the maximum value */
   esdhc_clrsetbits32(regs-sysctl, SYSCTL_TIMEOUT_MASK, 14  16);

 +#ifdef CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT
 + esdhc_setbits32(regs-vendorspec, ESDHC_VENDORSPEC_VSELECT);
 +#endif

 Instead of adding a new compiler switch that should be documented (I
 have already read Marek's comments), what do you think to extend struct
 fsl_esdhc_cfg, putting for exmaple an options field with this kind of
 specialization ?

I will try to cook something in this direction.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/6] mmc: fsl_esdhc: Add support to force VSELECT set

2014-06-16 Thread Otavio Salvador
On Mon, Jun 16, 2014 at 4:03 AM, Igor Grinberg grinb...@compulab.co.il wrote:
 Hi Otavio,

 On 06/16/14 05:24, Otavio Salvador wrote:
 On Sun, Jun 15, 2014 at 11:03 PM, Marek Vasut ma...@denx.de wrote:
 On Monday, June 16, 2014 at 03:39:08 AM, Otavio Salvador wrote:
 On Sun, Jun 15, 2014 at 10:27 PM, Marek Vasut ma...@denx.de wrote:
 On Monday, June 16, 2014 at 03:22:22 AM, Otavio Salvador wrote:

 [...]

 +#ifdef CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT
 + esdhc_setbits32(regs-vendorspec, ESDHC_VENDORSPEC_VSELECT);
 +#endif

 Documentation is missing.

 There is no FSL ESDHC README file so that's why I didn't include it
 anywhere.

 I'm at loss for words here, really...

 I think you know what needs to be done (hint: write the documentation),
 right ?

 I won't write the full documentation for it. I am sorry.

 Undocumented configuration option is not acceptable, period.

 Who accepted the driver in the first version, without Doc?

 I am not in the position to write the full doc.

 I think there is a misunderstanding here...
 I think Marek does not want to say that you need to write the full
 documentation for the driver, but only document the 
 CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT configuration option (what does it
 do when you define it and why should one define it).

Great but where if it does not exist?

should I make a README.fsl-esdhc and include just it?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/6] usb: ehci: mx6: Add support for i.MX6SL

2014-06-16 Thread Otavio Salvador
On Mon, Jun 16, 2014 at 4:05 AM, Igor Grinberg grinb...@compulab.co.il wrote:
 Hi Otavio,

 On 06/16/14 03:46, Otavio Salvador wrote:
 The i.MX6SL has a different base address for the controller. This
 patch adapts the driver to support the different base address for this
 case.

 Signed-off-by: Otavio Salvador ota...@ossystems.com.br
 ---

  drivers/usb/host/ehci-mx6.c | 10 --
  1 file changed, 8 insertions(+), 2 deletions(-)

 diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
 index c0a557b..5ba1c5e 100644
 --- a/drivers/usb/host/ehci-mx6.c
 +++ b/drivers/usb/host/ehci-mx6.c
 @@ -53,6 +53,12 @@
  #define UCMD_RUN_STOP   (1  0) /* controller run/stop */
  #define UCMD_RESET   (1  1) /* controller reset */

 +#ifdef CONFIG_MX6SL
 +#define USB_BASE_ADDRUSBO2H_USB_BASE_ADDR
 +#else
 +#define USB_BASE_ADDRUSBOH3_USB_BASE_ADDR
 +#endif
 +

 Hmmm... Can't this be done dynamically?
 I mean... you can check the SoC type in runtime, right?
 And then substitute the correct address in a variable or so...
 I would really prefer such kind of things done in runtime.

I will check about changing it for v2.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/6] Print ramdisk load address if it is in use

2014-06-16 Thread Otavio Salvador
On Mon, Jun 16, 2014 at 1:38 AM, Wolfgang Denk w...@denx.de wrote:
 Dear Otavio Salvador,

 In message 1402879613-21362-5-git-send-email-ota...@ossystems.com.br you 
 wrote:
 When debugging initramfs failures it is quite useful to known where it
 is being loaded from.

 Agreed.

 +
 + printf(   ramdisk load start = 0x%08lx, ramdisk load end = 
 0x%08lx\n,
 +*initrd_start, *initrd_end);
   } else {
   *initrd_start = 0;
   *initrd_end = 0;
   }
 - debug(   ramdisk load start = 0x%08lx, ramdisk load end = 0x%08lx\n,
 - *initrd_start, *initrd_end);

 As you write yourself, this is a debug feature.  There is no need to
 pollute normal output with such information.  It just makes booting
 slower.  So debug() is appropriate here.

 And I don't see why you would NOT want to have the information in
 the else case.

 I don't think this change is a good idea.  It should not be applied.

Ok, no problem with me.

I will drop it for v2.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/6] mmc: fsl_esdhc: Add support to force VSELECT set

2014-06-15 Thread Otavio Salvador
There are board were we cannot do voltage negotiation but want to set
the VSELECT bit forcely to ensure it to work at 1.8V.

This commit adds CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT flag for this use.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 drivers/mmc/fsl_esdhc.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index c75b38f..b3870e2 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -517,6 +517,10 @@ static int esdhc_init(struct mmc *mmc)
/* Set timout to the maximum value */
esdhc_clrsetbits32(regs-sysctl, SYSCTL_TIMEOUT_MASK, 14  16);
 
+#ifdef CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT
+   esdhc_setbits32(regs-vendorspec, ESDHC_VENDORSPEC_VSELECT);
+#endif
+
return 0;
 }
 
-- 
2.0.0

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


[U-Boot] [PATCH 2/6] imx: mx6sl: Extend USDHC SD2 pins to support 8-wire use

2014-06-15 Thread Otavio Salvador
This adds the DATA[4-7] and RST pin definitions.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 arch/arm/include/asm/arch-mx6/mx6sl_pins.h | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/include/asm/arch-mx6/mx6sl_pins.h 
b/arch/arm/include/asm/arch-mx6/mx6sl_pins.h
index 045ccc4..3ffd176 100644
--- a/arch/arm/include/asm/arch-mx6/mx6sl_pins.h
+++ b/arch/arm/include/asm/arch-mx6/mx6sl_pins.h
@@ -20,6 +20,11 @@ enum {
MX6_PAD_SD2_DAT1__USDHC2_DAT1   = 
IOMUX_PAD(0x0568, 0x0260, 0, 0x, 0, 0),
MX6_PAD_SD2_DAT2__USDHC2_DAT2   = 
IOMUX_PAD(0x056C, 0x0264, 0, 0x, 0, 0),
MX6_PAD_SD2_DAT3__USDHC2_DAT3   = 
IOMUX_PAD(0x0570, 0x0268, 0, 0x, 0, 0),
+   MX6_PAD_SD2_DAT4__USDHC2_DAT4   = 
IOMUX_PAD(0X0574, 0X026C, 0, 0X, 0, 0),
+   MX6_PAD_SD2_DAT5__USDHC2_DAT5   = 
IOMUX_PAD(0X0578, 0X0270, 0, 0X, 0, 0),
+   MX6_PAD_SD2_DAT6__USDHC2_DAT6   = 
IOMUX_PAD(0X057C, 0X0274, 0, 0X, 0, 0),
+   MX6_PAD_SD2_DAT7__USDHC2_DAT7   = 
IOMUX_PAD(0X0580, 0X0278, 0, 0X, 0, 0),
+   MX6_PAD_SD2_RST__USDHC2_RST = 
IOMUX_PAD(0x0584, 0x027C, 0, 0x, 0, 0),
MX6_PAD_UART1_RXD__UART1_RXD= 
IOMUX_PAD(0x05A0, 0x0298, 0, 0x07FC, 0, 0),
MX6_PAD_UART1_TXD__UART1_TXD= 
IOMUX_PAD(0x05A4, 0x029C, 0, 0x, 0, 0),
 
-- 
2.0.0

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


[U-Boot] [PATCH 3/6] mmc: fsl_esdhc: Add CMD11 support to switch to 1.8V

2014-06-15 Thread Otavio Salvador
This adds support to switch to 1.8V in case CMD11 succeeds.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 drivers/mmc/fsl_esdhc.c | 30 +++---
 include/fsl_esdhc.h |  2 ++
 include/mmc.h   |  1 +
 3 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 5541613..c75b38f 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -47,19 +47,21 @@ struct fsl_esdhc {
uintfevt;   /* Force event register */
uintadmaes; /* ADMA error status register */
uintadsaddr;/* ADMA system address register */
-   charreserved2[160]; /* reserved */
+   charreserved2[100]; /* reserved */
+   uintvendorspec; /* Vendor Specific register */
+   charreserved3[59];  /* reserved */
uinthostver;/* Host controller version register */
-   charreserved3[4];   /* reserved */
-   uintdmaerraddr; /* DMA error address register */
charreserved4[4];   /* reserved */
-   uintdmaerrattr; /* DMA error attribute register */
+   uintdmaerraddr; /* DMA error address register */
charreserved5[4];   /* reserved */
+   uintdmaerrattr; /* DMA error attribute register */
+   charreserved6[4];   /* reserved */
uinthostcapblt2;/* Host controller capabilities register 2 */
-   charreserved6[8];   /* reserved */
+   charreserved7[8];   /* reserved */
uinttcr;/* Tuning control register */
-   charreserved7[28];  /* reserved */
+   charreserved8[28];  /* reserved */
uintsddirctl;   /* SD direction control register */
-   charreserved8[712]; /* reserved */
+   charreserved9[712]; /* reserved */
uintscr;/* eSDHC control register */
 };
 
@@ -334,6 +336,15 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, 
struct mmc_data *data)
goto out;
}
 
+   /* Switch voltage to 1.8V if CMD11 succeeded */
+   if (cmd-cmdidx == SD_CMD_SWITCH_UHS18V) {
+   esdhc_setbits32(regs-vendorspec, ESDHC_VENDORSPEC_VSELECT);
+
+   printf(Run CMD11 1.8V switch\n);
+   /* Sleep for 5 ms - max time for card to switch to 1.8V */
+   udelay(5000);
+   }
+
/* Workaround for ESDHC errata ENGcm03648 */
if (!data  (cmd-resp_type  MMC_RSP_BUSY)) {
int timeout = 2500;
@@ -406,6 +417,11 @@ out:
while ((esdhc_read32(regs-sysctl)  SYSCTL_RSTD))
;
}
+
+   /* If this was CMD11, then notify that power cycle is needed */
+   if (cmd-cmdidx == SD_CMD_SWITCH_UHS18V)
+   printf(CMD11 to switch to 1.8V mode failed.
+   Card requires power cycle\n);
}
 
esdhc_write32(regs-irqstat, -1);
diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
index 9814964..8876224 100644
--- a/include/fsl_esdhc.h
+++ b/include/fsl_esdhc.h
@@ -154,6 +154,8 @@
 #define ESDHC_HOSTCAPBLT_DMAS  0x0040
 #define ESDHC_HOSTCAPBLT_HSS   0x0020
 
+#define ESDHC_VENDORSPEC_VSELECT 0x0002 /* Use 1.8V */
+
 struct fsl_esdhc_cfg {
u32 esdhc_base;
u32 sdhc_clk;
diff --git a/include/mmc.h b/include/mmc.h
index a3a100b..1b354ff 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -89,6 +89,7 @@
 #define SD_CMD_SEND_RELATIVE_ADDR  3
 #define SD_CMD_SWITCH_FUNC 6
 #define SD_CMD_SEND_IF_COND8
+#define SD_CMD_SWITCH_UHS18V   11
 
 #define SD_CMD_APP_SET_BUS_WIDTH   6
 #define SD_CMD_ERASE_WR_BLK_START  32
-- 
2.0.0

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


[U-Boot] [PATCH 6/6] warp: Add initial WaRP Board support

2014-06-15 Thread Otavio Salvador
Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 board/warp/Makefile|   8 ++
 board/warp/warp.c  | 111 +++
 boards.cfg |   1 +
 include/configs/warp.h | 198 +
 4 files changed, 318 insertions(+)
 create mode 100644 board/warp/Makefile
 create mode 100644 board/warp/warp.c
 create mode 100644 include/configs/warp.h

diff --git a/board/warp/Makefile b/board/warp/Makefile
new file mode 100644
index 000..c555f87
--- /dev/null
+++ b/board/warp/Makefile
@@ -0,0 +1,8 @@
+# Copyright (C) 2014 O.S. Systems Software LTDA.
+# Copyright (C) 2014 Kynetics LLC.
+# Copyright (C) 2014 Revolution Robotics, Inc.
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y  := warp.o
diff --git a/board/warp/warp.c b/board/warp/warp.c
new file mode 100644
index 000..f08707c
--- /dev/null
+++ b/board/warp/warp.c
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2014 O.S. Systems Software LTDA.
+ * Copyright (C) 2014 Kynetics LLC.
+ * Copyright (C) 2014 Revolution Robotics, Inc.
+ *
+ * Author: Otavio Salvador ota...@ossystems.com.br
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include asm/arch/clock.h
+#include asm/arch/iomux.h
+#include asm/arch/imx-regs.h
+#include asm/arch/mx6-pins.h
+#include asm/arch/sys_proto.h
+#include asm/gpio.h
+#include asm/imx-common/iomux-v3.h
+#include asm/io.h
+#include linux/sizes.h
+#include common.h
+#include fsl_esdhc.h
+#include mmc.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define UART_PAD_CTRL  (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_PUS_22K_UP |   \
+   PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \
+   PAD_CTL_SRE_FAST  | PAD_CTL_HYS |   \
+   PAD_CTL_LVE)
+
+int dram_init(void)
+{
+   gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+
+   return 0;
+}
+
+static void setup_iomux_uart(void)
+{
+   static iomux_v3_cfg_t const uart1_pads[] = {
+   MX6_PAD_UART1_TXD__UART1_TXD | MUX_PAD_CTRL(UART_PAD_CTRL),
+   MX6_PAD_UART1_RXD__UART1_RXD | MUX_PAD_CTRL(UART_PAD_CTRL),
+   };
+
+   imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
+}
+
+static struct fsl_esdhc_cfg usdhc_cfg[1] = {
+   {USDHC2_BASE_ADDR},
+};
+
+int board_mmc_getcd(struct mmc *mmc)
+{
+   return 1;   /* Assume boot SD always present */
+}
+
+int board_mmc_init(bd_t *bis)
+{
+   static iomux_v3_cfg_t const usdhc2_pads[] = {
+   MX6_PAD_SD2_CLK__USDHC2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+   MX6_PAD_SD2_CMD__USDHC2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+   MX6_PAD_SD2_RST__USDHC2_RST | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+   MX6_PAD_SD2_DAT0__USDHC2_DAT0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+   MX6_PAD_SD2_DAT1__USDHC2_DAT1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+   MX6_PAD_SD2_DAT2__USDHC2_DAT2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+   MX6_PAD_SD2_DAT3__USDHC2_DAT3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+   MX6_PAD_SD2_DAT4__USDHC2_DAT4 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+   MX6_PAD_SD2_DAT5__USDHC2_DAT5 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+   MX6_PAD_SD2_DAT6__USDHC2_DAT6 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+   MX6_PAD_SD2_DAT7__USDHC2_DAT7 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
+   };
+
+   imx_iomux_v3_setup_multiple_pads(usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
+
+   usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
+   return fsl_esdhc_initialize(bis, usdhc_cfg[0]);
+}
+
+int board_early_init_f(void)
+{
+   setup_iomux_uart();
+   return 0;
+}
+
+int board_init(void)
+{
+   /* address of boot parameters */
+   gd-bd-bi_boot_params = PHYS_SDRAM + 0x100;
+
+   return 0;
+}
+
+int board_late_init(void)
+{
+#ifdef CONFIG_HW_WATCHDOG
+   hw_watchdog_init();
+#endif
+
+   return 0;
+}
+
+int checkboard(void)
+{
+   puts(Board: WaRP Board\n);
+
+   return 0;
+}
diff --git a/boards.cfg b/boards.cfg
index fd4324d..435edf3 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -311,6 +311,7 @@ Active  arm armv7  mx6 -
   udoo
 Active  arm armv7  mx6 -   wandboard   
wandboard_dl  
wandboard:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,MX6DL,DDR_MB=1024
  Fabio Estevam 
fabio.este...@freescale.com
 Active  arm armv7  mx6 -   wandboard   
wandboard_quad
wandboard:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q2g.cfg,MX6Q,DDR_MB=2048
  Fabio Estevam 
fabio.este...@freescale.com
 Active  arm armv7  mx6 -   wandboard

[U-Boot] [PATCH 5/6] Print ramdisk load address if it is in use

2014-06-15 Thread Otavio Salvador
When debugging initramfs failures it is quite useful to known where it
is being loaded from.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 common/image.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/common/image.c b/common/image.c
index fa4864d..84e115f 100644
--- a/common/image.c
+++ b/common/image.c
@@ -1050,12 +1050,13 @@ int boot_ramdisk_high(struct lmb *lmb, ulong rd_data, 
ulong rd_len,
 #endif
puts(OK\n);
}
+
+   printf(   ramdisk load start = 0x%08lx, ramdisk load end = 
0x%08lx\n,
+  *initrd_start, *initrd_end);
} else {
*initrd_start = 0;
*initrd_end = 0;
}
-   debug(   ramdisk load start = 0x%08lx, ramdisk load end = 0x%08lx\n,
-   *initrd_start, *initrd_end);
 
return 0;
 
-- 
2.0.0

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


[U-Boot] [PATCH 1/6] usb: ehci: mx6: Add support for i.MX6SL

2014-06-15 Thread Otavio Salvador
The i.MX6SL has a different base address for the controller. This
patch adapts the driver to support the different base address for this
case.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 drivers/usb/host/ehci-mx6.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index c0a557b..5ba1c5e 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -53,6 +53,12 @@
 #define UCMD_RUN_STOP   (1  0) /* controller run/stop */
 #define UCMD_RESET (1  1) /* controller reset */
 
+#ifdef CONFIG_MX6SL
+#define USB_BASE_ADDR  USBO2H_USB_BASE_ADDR
+#else
+#define USB_BASE_ADDR  USBOH3_USB_BASE_ADDR
+#endif
+
 static const unsigned phy_bases[] = {
USB_PHY0_BASE_ADDR,
USB_PHY1_BASE_ADDR,
@@ -174,7 +180,7 @@ struct usbnc_regs {
 
 static void usb_oc_config(int index)
 {
-   struct usbnc_regs *usbnc = (struct usbnc_regs *)(USBOH3_USB_BASE_ADDR +
+   struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR +
USB_OTHERREGS_OFFSET);
void __iomem *ctrl = (void __iomem *)(usbnc-ctrl[index]);
u32 val;
@@ -207,7 +213,7 @@ int ehci_hcd_init(int index, enum usb_init_type init,
struct ehci_hccr **hccr, struct ehci_hcor **hcor)
 {
enum usb_init_type type;
-   struct usb_ehci *ehci = (struct usb_ehci *)(USBOH3_USB_BASE_ADDR +
+   struct usb_ehci *ehci = (struct usb_ehci *)(USB_BASE_ADDR +
(0x200 * index));
 
if (index  3)
-- 
2.0.0

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


Re: [U-Boot] [PATCH 1/6] usb: ehci: mx6: Add support for i.MX6SL

2014-06-15 Thread Otavio Salvador
On Sun, Jun 15, 2014 at 9:49 PM, Marek Vasut ma...@denx.de wrote:
 On Monday, June 16, 2014 at 02:46:48 AM, Otavio Salvador wrote:
 The i.MX6SL has a different base address for the controller. This
 patch adapts the driver to support the different base address for this
 case.

 Signed-off-by: Otavio Salvador ota...@ossystems.com.br
...
 Can the CPU type be detected at runtime so we don't need this ugly ifdef ?

The SoloLite is not pin-compatible so it is unable to be used in same binary.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/6] mmc: fsl_esdhc: Add support to force VSELECT set

2014-06-15 Thread Otavio Salvador
On Sun, Jun 15, 2014 at 9:51 PM, Marek Vasut ma...@denx.de wrote:
 On Monday, June 16, 2014 at 02:46:51 AM, Otavio Salvador wrote:
 There are board were

 Please fix your English and send a patch, thanks :)

I fixed the commit log, thanks.

...
 +#ifdef CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT
 + esdhc_setbits32(regs-vendorspec, ESDHC_VENDORSPEC_VSELECT);
 +#endif

 Documentation is missing.

There is no FSL ESDHC README file so that's why I didn't include it anywhere.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/6] mmc: fsl_esdhc: Add support to force VSELECT set

2014-06-15 Thread Otavio Salvador
On Sun, Jun 15, 2014 at 10:27 PM, Marek Vasut ma...@denx.de wrote:
 On Monday, June 16, 2014 at 03:22:22 AM, Otavio Salvador wrote:

 [...]

  +#ifdef CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT
  + esdhc_setbits32(regs-vendorspec, ESDHC_VENDORSPEC_VSELECT);
  +#endif
 
  Documentation is missing.

 There is no FSL ESDHC README file so that's why I didn't include it
 anywhere.

 I'm at loss for words here, really...

 I think you know what needs to be done (hint: write the documentation), right 
 ?

I won't write the full documentation for it. I am sorry.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/6] mmc: fsl_esdhc: Add support to force VSELECT set

2014-06-15 Thread Otavio Salvador
On Sun, Jun 15, 2014 at 11:03 PM, Marek Vasut ma...@denx.de wrote:
 On Monday, June 16, 2014 at 03:39:08 AM, Otavio Salvador wrote:
 On Sun, Jun 15, 2014 at 10:27 PM, Marek Vasut ma...@denx.de wrote:
  On Monday, June 16, 2014 at 03:22:22 AM, Otavio Salvador wrote:
 
  [...]
 
   +#ifdef CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT
   + esdhc_setbits32(regs-vendorspec, ESDHC_VENDORSPEC_VSELECT);
   +#endif
  
   Documentation is missing.
 
  There is no FSL ESDHC README file so that's why I didn't include it
  anywhere.
 
  I'm at loss for words here, really...
 
  I think you know what needs to be done (hint: write the documentation),
  right ?

 I won't write the full documentation for it. I am sorry.

 Undocumented configuration option is not acceptable, period.

Who accepted the driver in the first version, without Doc?

I am not in the position to write the full doc.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 9/9] arm: ls102xa: Add basic support for LS1021AQDS board

2014-05-30 Thread Otavio Salvador
On Fri, May 30, 2014 at 3:28 PM, Fabio Estevam feste...@gmail.com wrote:
 On Fri, May 30, 2014 at 4:23 AM, Alison Wang b18...@freescale.com wrote:

 +#define CONFIG_EXTRA_ENV_SETTINGS  \
 +   ethaddr=00:e0:0c:bc:e5:60\0   \
 +   eth1addr=00:e0:0c:bc:e5:61\0  \
 +   eth2addr=00:e0:0c:bc:e5:62\0  \
 +   eth3addr=00:e0:0c:bc:e5:63\0  \
 +   ipaddr=192.168.1.100\0\

 You should not hardcode any ethaddr/ipaddr.

and forgot to add the board maintainer.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] i.MX tree way behind master

2014-05-14 Thread Otavio Salvador
Hello Stefano,

Is it possible for you to ask for a pull request in i.MX tree and get
it in sync with ARM one?

Regards,

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [ANN] U-Boot v2014.07-rc1 released

2014-05-12 Thread Otavio Salvador
On Mon, May 12, 2014 at 10:12 AM, Tom Rini tr...@ti.com wrote:
 Hey all,

 I've pushed v2017.04-rc1 out to the repository and tarballs should exist
 soon.

Back from the Future ;-)

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mx6sabred: Add PFUZE100 PMIC support

2014-05-05 Thread Otavio Salvador
On Sun, May 4, 2014 at 4:14 PM, Fabio Estevam feste...@gmail.com wrote:
 From: Fabio Estevam fabio.este...@freescale.com

 mx6sabresd boards have a PFUZE100 PMIC connected to I2C2 bus.

 Add support for it.

 Signed-off-by: Fabio Estevam fabio.este...@freescale.com

Are you doing to add the equivalent for the mx6slevk too?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Pull request for u-boot-arm - u-boot?

2014-05-05 Thread Otavio Salvador
On Mon, May 5, 2014 at 2:59 PM, Fabio Estevam feste...@gmail.com wrote:
 On Mon, May 5, 2014 at 1:46 PM, Stephen Warren swar...@wwwdotorg.org wrote:
 Albert,

 I was wondering when the next pull request for u-boot-arm/master -
 u-boot/master was likely to be?

 I asked because some changes to the Tegra USB driver went through the
 u-boot-tegra/master and hence are now in u-boot-arm/master, but not in
 u-boot-usb/master. I have some more USB driver changes which rely on the
 earlier USB patches, and these should really go through
 u-boot-usb/master rather than the Tegra/ARM tree. For this to happen,
 u-boot-usb/master needs to contain the patches currently in
 u-boot-arm/master, and the best way for that to happen is for those
 patches to get into u-boot/master so that u-boot-usb/master can merge them.

 Or, should Marek just merge u-boot-arm/master into his tree directly?

 Or should we have a 'u-boot-next' tree using the same concept as the
 kernel 'linux-next'?

Please, u-boot-next!

It is clear we need this to scale the pull model.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] wandboard: add Future Eletronics 7 WVGA LCD extension board

2014-05-01 Thread Otavio Salvador
On Thu, May 1, 2014 at 5:39 PM, Fabio Estevam feste...@gmail.com wrote:
 [Removing wandboard list, as it bounces when I reply to it]

 On Thu, May 1, 2014 at 5:16 PM, Otavio Salvador ota...@ossystems.com.br 
 wrote:
 mmcargs=setenv bootargs console=${console},${baudrate}  \
 -   root=${mmcroot}\0 \
 +   root=${mmcroot}; run videoargs\0 \
 +   videoargs= \
 +   setenv nextcon 0;  \
 +   if hdmidet; then  \
 +   setenv bootargs ${bootargs}  \
 +   
 video=mxcfb${nextcon}:dev=hdmi,1280x720M@60, \
 +   if=RGB24;  \

 This video line is specific to some FSL kernel version. Mainline
 kernel does not need this, so I prefer not to pass such argument in
 the kernel command line.

This works with Wandboard supported kernel and seems to be very widely
used. I think it won't work in this user case.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] wandboard: add Future Eletronics 7 WVGA LCD extension board

2014-05-01 Thread Otavio Salvador
This adds support for the 7 WVGA produced by Future Eletronics and
make it dynamically detect if it is connected or not based on the
touchscreen controller.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---
Fabio, I haven't change the environment script as I consider important
to have it working with Wandboard kernel. Please take a look and comment
accordingly.

Changes in v2:
- Drop LDB related code (unused)

 board/wandboard/wandboard.c | 165 +---
 include/configs/wandboard.h |  36 +-
 2 files changed, 174 insertions(+), 27 deletions(-)

diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index f1951dc..d88e9b7 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2013 Freescale Semiconductor, Inc.
+ * Copyright (C) 2014 O.S. Systems Software LTDA.
  *
  * Author: Fabio Estevam fabio.este...@freescale.com
  *
@@ -15,18 +16,19 @@
 #include asm/arch/sys_proto.h
 #include asm/gpio.h
 #include asm/imx-common/iomux-v3.h
+#include asm/imx-common/mxc_i2c.h
 #include asm/imx-common/boot_mode.h
+#include asm/imx-common/video.h
 #include asm/io.h
 #include linux/sizes.h
 #include common.h
 #include fsl_esdhc.h
-#include ipu_pixfmt.h
 #include mmc.h
 #include miiphy.h
 #include netdev.h
-#include linux/fb.h
 #include phy.h
 #include input.h
+#include i2c.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -41,6 +43,10 @@ DECLARE_GLOBAL_DATA_PTR;
 #define ENET_PAD_CTRL  (PAD_CTL_PUS_100K_UP |  \
PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS)
 
+#define I2C_PAD_CTRL   (PAD_CTL_PUS_100K_UP |  \
+   PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS |   \
+   PAD_CTL_ODE | PAD_CTL_SRE_FAST)
+
 #define USDHC1_CD_GPIO IMX_GPIO_NR(1, 2)
 #define USDHC3_CD_GPIO IMX_GPIO_NR(3, 9)
 #define ETH_PHY_RESET  IMX_GPIO_NR(3, 29)
@@ -210,41 +216,124 @@ int board_phy_config(struct phy_device *phydev)
 }
 
 #if defined(CONFIG_VIDEO_IPUV3)
-static struct fb_videomode const hdmi = {
-   .name   = HDMI,
-   .refresh= 60,
-   .xres   = 1024,
-   .yres   = 768,
-   .pixclock   = 15385,
-   .left_margin= 220,
-   .right_margin   = 40,
-   .upper_margin   = 21,
-   .lower_margin   = 7,
-   .hsync_len  = 60,
-   .vsync_len  = 10,
-   .sync   = FB_SYNC_EXT,
-   .vmode  = FB_VMODE_NONINTERLACED
+struct i2c_pads_info i2c2_pad_info = {
+   .scl = {
+   .i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gpio_mode = MX6_PAD_KEY_COL3__GPIO4_IO12
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gp = IMX_GPIO_NR(4, 12)
+   },
+   .sda = {
+   .i2c_mode = MX6_PAD_KEY_ROW3__I2C2_SDA
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gpio_mode = MX6_PAD_KEY_ROW3__GPIO4_IO13
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gp = IMX_GPIO_NR(4, 13)
+   }
 };
 
-int board_video_skip(void)
-{
-   int ret;
+static iomux_v3_cfg_t const fwadapt_7wvga_pads[] = {
+   MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,
+   MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02, /* HSync */
+   MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03, /* VSync */
+   MX6_PAD_DI0_PIN4__IPU1_DI0_PIN04
+   | MUX_PAD_CTRL(PAD_CTL_DSE_120ohm), /* Contrast */
+   MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15, /* DISP0_DRDY */
+
+   MX6_PAD_DISP0_DAT0__IPU1_DISP0_DATA00,
+   MX6_PAD_DISP0_DAT1__IPU1_DISP0_DATA01,
+   MX6_PAD_DISP0_DAT2__IPU1_DISP0_DATA02,
+   MX6_PAD_DISP0_DAT3__IPU1_DISP0_DATA03,
+   MX6_PAD_DISP0_DAT4__IPU1_DISP0_DATA04,
+   MX6_PAD_DISP0_DAT5__IPU1_DISP0_DATA05,
+   MX6_PAD_DISP0_DAT6__IPU1_DISP0_DATA06,
+   MX6_PAD_DISP0_DAT7__IPU1_DISP0_DATA07,
+   MX6_PAD_DISP0_DAT8__IPU1_DISP0_DATA08,
+   MX6_PAD_DISP0_DAT9__IPU1_DISP0_DATA09,
+   MX6_PAD_DISP0_DAT10__IPU1_DISP0_DATA10,
+   MX6_PAD_DISP0_DAT11__IPU1_DISP0_DATA11,
+   MX6_PAD_DISP0_DAT12__IPU1_DISP0_DATA12,
+   MX6_PAD_DISP0_DAT13__IPU1_DISP0_DATA13,
+   MX6_PAD_DISP0_DAT14__IPU1_DISP0_DATA14,
+   MX6_PAD_DISP0_DAT15__IPU1_DISP0_DATA15,
+   MX6_PAD_DISP0_DAT16__IPU1_DISP0_DATA16,
+   MX6_PAD_DISP0_DAT17__IPU1_DISP0_DATA17,
+
+   MX6_PAD_SD4_DAT2__GPIO2_IO10
+   | MUX_PAD_CTRL(NO_PAD_CTRL), /* DISP0_BKLEN */
+   MX6_PAD_SD4_DAT3__GPIO2_IO11
+   | MUX_PAD_CTRL(NO_PAD_CTRL), /* DISP0_VDDEN */
+};
 
-   ret = ipuv3_fb_init(hdmi, 0, IPU_PIX_FMT_RGB24);
+static void do_enable_hdmi(struct display_info_t const *dev)
+{
+   imx_enable_hdmi_phy();
+}
 
-   if (ret) {
-   printf(HDMI cannot be configured: %d\n, ret);
-   return ret;
-   }
+static int detect_i2c(struct display_info_t const *dev)
+{
+   return (0

[U-Boot] [PATCH v3 1/2] wandboard: add Future Eletronics 7 WVGA LCD extension board

2014-05-01 Thread Otavio Salvador
This adds support for the 7 WVGA produced by Future Eletronics and
make it dynamically detect if it is connected or not based on the
touchscreen controller.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

Changes in v3:
- Drop LVDS related code (unused)

Changes in v2:
- Drop LDB related code (unused)

 board/wandboard/wandboard.c | 147 
 include/configs/wandboard.h |   7 +++
 2 files changed, 128 insertions(+), 26 deletions(-)

diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index f1951dc..311a442 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2013 Freescale Semiconductor, Inc.
+ * Copyright (C) 2014 O.S. Systems Software LTDA.
  *
  * Author: Fabio Estevam fabio.este...@freescale.com
  *
@@ -15,18 +16,19 @@
 #include asm/arch/sys_proto.h
 #include asm/gpio.h
 #include asm/imx-common/iomux-v3.h
+#include asm/imx-common/mxc_i2c.h
 #include asm/imx-common/boot_mode.h
+#include asm/imx-common/video.h
 #include asm/io.h
 #include linux/sizes.h
 #include common.h
 #include fsl_esdhc.h
-#include ipu_pixfmt.h
 #include mmc.h
 #include miiphy.h
 #include netdev.h
-#include linux/fb.h
 #include phy.h
 #include input.h
+#include i2c.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -41,6 +43,10 @@ DECLARE_GLOBAL_DATA_PTR;
 #define ENET_PAD_CTRL  (PAD_CTL_PUS_100K_UP |  \
PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS)
 
+#define I2C_PAD_CTRL   (PAD_CTL_PUS_100K_UP |  \
+   PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS |   \
+   PAD_CTL_ODE | PAD_CTL_SRE_FAST)
+
 #define USDHC1_CD_GPIO IMX_GPIO_NR(1, 2)
 #define USDHC3_CD_GPIO IMX_GPIO_NR(3, 9)
 #define ETH_PHY_RESET  IMX_GPIO_NR(3, 29)
@@ -210,41 +216,124 @@ int board_phy_config(struct phy_device *phydev)
 }
 
 #if defined(CONFIG_VIDEO_IPUV3)
-static struct fb_videomode const hdmi = {
-   .name   = HDMI,
-   .refresh= 60,
-   .xres   = 1024,
-   .yres   = 768,
-   .pixclock   = 15385,
-   .left_margin= 220,
-   .right_margin   = 40,
-   .upper_margin   = 21,
-   .lower_margin   = 7,
-   .hsync_len  = 60,
-   .vsync_len  = 10,
-   .sync   = FB_SYNC_EXT,
-   .vmode  = FB_VMODE_NONINTERLACED
+struct i2c_pads_info i2c2_pad_info = {
+   .scl = {
+   .i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gpio_mode = MX6_PAD_KEY_COL3__GPIO4_IO12
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gp = IMX_GPIO_NR(4, 12)
+   },
+   .sda = {
+   .i2c_mode = MX6_PAD_KEY_ROW3__I2C2_SDA
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gpio_mode = MX6_PAD_KEY_ROW3__GPIO4_IO13
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gp = IMX_GPIO_NR(4, 13)
+   }
 };
 
-int board_video_skip(void)
-{
-   int ret;
+static iomux_v3_cfg_t const fwadapt_7wvga_pads[] = {
+   MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,
+   MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02, /* HSync */
+   MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03, /* VSync */
+   MX6_PAD_DI0_PIN4__IPU1_DI0_PIN04
+   | MUX_PAD_CTRL(PAD_CTL_DSE_120ohm), /* Contrast */
+   MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15, /* DISP0_DRDY */
+
+   MX6_PAD_DISP0_DAT0__IPU1_DISP0_DATA00,
+   MX6_PAD_DISP0_DAT1__IPU1_DISP0_DATA01,
+   MX6_PAD_DISP0_DAT2__IPU1_DISP0_DATA02,
+   MX6_PAD_DISP0_DAT3__IPU1_DISP0_DATA03,
+   MX6_PAD_DISP0_DAT4__IPU1_DISP0_DATA04,
+   MX6_PAD_DISP0_DAT5__IPU1_DISP0_DATA05,
+   MX6_PAD_DISP0_DAT6__IPU1_DISP0_DATA06,
+   MX6_PAD_DISP0_DAT7__IPU1_DISP0_DATA07,
+   MX6_PAD_DISP0_DAT8__IPU1_DISP0_DATA08,
+   MX6_PAD_DISP0_DAT9__IPU1_DISP0_DATA09,
+   MX6_PAD_DISP0_DAT10__IPU1_DISP0_DATA10,
+   MX6_PAD_DISP0_DAT11__IPU1_DISP0_DATA11,
+   MX6_PAD_DISP0_DAT12__IPU1_DISP0_DATA12,
+   MX6_PAD_DISP0_DAT13__IPU1_DISP0_DATA13,
+   MX6_PAD_DISP0_DAT14__IPU1_DISP0_DATA14,
+   MX6_PAD_DISP0_DAT15__IPU1_DISP0_DATA15,
+   MX6_PAD_DISP0_DAT16__IPU1_DISP0_DATA16,
+   MX6_PAD_DISP0_DAT17__IPU1_DISP0_DATA17,
+
+   MX6_PAD_SD4_DAT2__GPIO2_IO10
+   | MUX_PAD_CTRL(NO_PAD_CTRL), /* DISP0_BKLEN */
+   MX6_PAD_SD4_DAT3__GPIO2_IO11
+   | MUX_PAD_CTRL(NO_PAD_CTRL), /* DISP0_VDDEN */
+};
 
-   ret = ipuv3_fb_init(hdmi, 0, IPU_PIX_FMT_RGB24);
+static void do_enable_hdmi(struct display_info_t const *dev)
+{
+   imx_enable_hdmi_phy();
+}
 
-   if (ret) {
-   printf(HDMI cannot be configured: %d\n, ret);
-   return ret;
-   }
+static int detect_i2c(struct display_info_t const *dev)
+{
+   return (0 == i2c_set_bus_num(dev-bus)) 
+   (0 == i2c_probe(dev-addr));
+}
 
-   imx_enable_hdmi_phy();
+static void

[U-Boot] [PATCH v3 2/2] wandboard: Pass video kernel arguments for HDMI and LCD

2014-05-01 Thread Otavio Salvador
This checks if the 7 WVGA produced by Future Eletronics is detected
and pass the needed kernel arguments for it to work.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

Changes in v3:
- New patch

Changes in v2: None

 include/configs/wandboard.h | 29 -
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index 6defc00..ac78ede 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -121,6 +121,7 @@
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_IPUV3_CLK 26000
+#define CONFIG_CMD_HDMIDETECT
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
 
@@ -159,7 +160,33 @@
fi;   \
fi\0 \
mmcargs=setenv bootargs console=${console},${baudrate}  \
-   root=${mmcroot}\0 \
+   root=${mmcroot}; run videoargs\0 \
+   videoargs= \
+   setenv nextcon 0;  \
+   if hdmidet; then  \
+   setenv bootargs ${bootargs}  \
+   video=mxcfb${nextcon}:dev=hdmi,1280x720M@60, \
+   if=RGB24;  \
+   setenv fbmen fbmem=28M;  \
+   setexpr nextcon ${nextcon} + 1;  \
+   else  \
+   echo - no HDMI monitor; \
+   fi;  \
+   i2c dev 1;  \
+   if i2c probe 0x10; then  \
+   setenv bootargs ${bootargs}  \
+   video=mxcfb${nextcon}:dev=lcd,800x480@60, \
+   if=RGB666;  \
+   if test 0 -eq ${nextcon}; then  \
+   setenv fbmem fbmem=10M;  \
+   else  \
+   setenv fbmem ${fbmem},10M;  \
+   fi;  \
+   setexpr nextcon ${nextcon} + 1;  \
+   else  \
+   echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display'; \
+   fi;  \
+   setenv bootargs ${bootargs} ${fbmem}\0 \
loadbootscript= \
fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
bootscript=echo Running bootscript from mmc ...;  \
-- 
2.0.0.rc0

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


Re: [U-Boot] [PATCH v2] wandboard: add Future Eletronics 7 WVGA LCD extension board

2014-05-01 Thread Otavio Salvador
Hello Fabio,

On Thu, May 1, 2014 at 6:48 PM, Fabio Estevam feste...@gmail.com wrote:
 On Thu, May 1, 2014 at 6:35 PM, Otavio Salvador ota...@ossystems.com.br 
 wrote:

  static void setup_display(void)
  {
 struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
 +   struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
 int reg;

 enable_ipu_clock();
 @@ -254,6 +343,28 @@ static void setup_display(void)
 reg |= (CHSCCDR_CLK_SEL_LDB_DI0
  MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET);
 writel(reg, mxc_ccm-chsccdr);
 +
 +   reg = IOMUXC_GPR2_BGREF_RRMODE_EXTERNAL_RES
 +| IOMUXC_GPR2_DI1_VS_POLARITY_ACTIVE_LOW
 +| IOMUXC_GPR2_DI0_VS_POLARITY_ACTIVE_LOW
 +| IOMUXC_GPR2_BIT_MAPPING_CH1_SPWG
 +| IOMUXC_GPR2_DATA_WIDTH_CH1_18BIT
 +| IOMUXC_GPR2_BIT_MAPPING_CH0_SPWG
 +| IOMUXC_GPR2_DATA_WIDTH_CH0_18BIT
 +| IOMUXC_GPR2_LVDS_CH0_MODE_DISABLED
 +| IOMUXC_GPR2_LVDS_CH1_MODE_ENABLED_DI0;
 +   writel(reg, iomux-gpr[2]);

 This is all LVDS related and the LCD you are adding is not a LVDS.

 +
 +   reg = readl(iomux-gpr[3]);
 +   reg = (reg  ~(IOMUXC_GPR3_LVDS1_MUX_CTL_MASK
 +   | IOMUXC_GPR3_HDMI_MUX_CTL_MASK))
 +   | (IOMUXC_GPR3_MUX_SRC_IPU1_DI0
 +   IOMUXC_GPR3_LVDS1_MUX_CTL_OFFSET);
 +   writel(reg, iomux-gpr[3]);

 Same here.

  #if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
  #define CONFIG_DEFAULT_FDT_FILEimx6dl-wandboard.dtb
 @@ -152,7 +160,33 @@
 fi;   \
 fi\0 \
 mmcargs=setenv bootargs console=${console},${baudrate}  \
 -   root=${mmcroot}\0 \
 +   root=${mmcroot}; run videoargs\0 \
 +   videoargs= \
 +   setenv nextcon 0;  \
 +   if hdmidet; then  \
 +   setenv bootargs ${bootargs}  \
 +   
 video=mxcfb${nextcon}:dev=hdmi,1280x720M@60, \
 +   if=RGB24;  \

 This is unrelated to adding a LVDS display and would be better handled
 on a separate patch.

 +   setenv fbmen fbmem=28M;  \
 +   setexpr nextcon ${nextcon} + 1;  \
 +   else  \
 +   echo - no HDMI monitor; \
 +   fi;  \
 +   i2c dev 1;  \
 +   if i2c probe 0x10; then  \
 +   setenv bootargs ${bootargs}  \
 +   video=mxcfb${nextcon}:dev=lcd,800x480@60, \
 +   if=RGB666;  \
 +   if test 0 -eq ${nextcon}; then  \
 +   setenv fbmem fbmem=10M;  \
 +   else  \
 +   setenv fbmem ${fbmem},10M;  \
 +   fi;  \
 +   setexpr nextcon ${nextcon} + 1;  \
 +   else  \
 +   echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display'; \
 +   fi;  \
 +   setenv bootargs ${bootargs} ${fbmem}\0 \

 Changing the environment variables would be more appropriate on a
 separate patch, but still don't like the idea of hardcoding the video
 argument specific to a FSL kernel version.

I hope to have handled all the comments in v3 :-)

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] wandboard: add Future Eletronics 7 WVGA LCD extension board

2014-05-01 Thread Otavio Salvador
This adds support for the 7 WVGA produced by Future Eletronics and
make it dynamically detect if it is connected or not based on the
touchscreen controller.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 board/wandboard/wandboard.c | 184 +---
 include/configs/wandboard.h |  36 -
 2 files changed, 193 insertions(+), 27 deletions(-)

diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index f1951dc..f781031 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2013 Freescale Semiconductor, Inc.
+ * Copyright (C) 2014 O.S. Systems Software LTDA.
  *
  * Author: Fabio Estevam fabio.este...@freescale.com
  *
@@ -15,18 +16,19 @@
 #include asm/arch/sys_proto.h
 #include asm/gpio.h
 #include asm/imx-common/iomux-v3.h
+#include asm/imx-common/mxc_i2c.h
 #include asm/imx-common/boot_mode.h
+#include asm/imx-common/video.h
 #include asm/io.h
 #include linux/sizes.h
 #include common.h
 #include fsl_esdhc.h
-#include ipu_pixfmt.h
 #include mmc.h
 #include miiphy.h
 #include netdev.h
-#include linux/fb.h
 #include phy.h
 #include input.h
+#include i2c.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -41,6 +43,10 @@ DECLARE_GLOBAL_DATA_PTR;
 #define ENET_PAD_CTRL  (PAD_CTL_PUS_100K_UP |  \
PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS)
 
+#define I2C_PAD_CTRL   (PAD_CTL_PUS_100K_UP |  \
+   PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS |   \
+   PAD_CTL_ODE | PAD_CTL_SRE_FAST)
+
 #define USDHC1_CD_GPIO IMX_GPIO_NR(1, 2)
 #define USDHC3_CD_GPIO IMX_GPIO_NR(3, 9)
 #define ETH_PHY_RESET  IMX_GPIO_NR(3, 29)
@@ -210,50 +216,174 @@ int board_phy_config(struct phy_device *phydev)
 }
 
 #if defined(CONFIG_VIDEO_IPUV3)
-static struct fb_videomode const hdmi = {
-   .name   = HDMI,
-   .refresh= 60,
-   .xres   = 1024,
-   .yres   = 768,
-   .pixclock   = 15385,
-   .left_margin= 220,
-   .right_margin   = 40,
-   .upper_margin   = 21,
-   .lower_margin   = 7,
-   .hsync_len  = 60,
-   .vsync_len  = 10,
-   .sync   = FB_SYNC_EXT,
-   .vmode  = FB_VMODE_NONINTERLACED
+struct i2c_pads_info i2c2_pad_info = {
+   .scl = {
+   .i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gpio_mode = MX6_PAD_KEY_COL3__GPIO4_IO12
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gp = IMX_GPIO_NR(4, 12)
+   },
+   .sda = {
+   .i2c_mode = MX6_PAD_KEY_ROW3__I2C2_SDA
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gpio_mode = MX6_PAD_KEY_ROW3__GPIO4_IO13
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gp = IMX_GPIO_NR(4, 13)
+   }
 };
 
-int board_video_skip(void)
-{
-   int ret;
+static iomux_v3_cfg_t const fwadapt_7wvga_pads[] = {
+   MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,
+   MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02, /* HSync */
+   MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03, /* VSync */
+   MX6_PAD_DI0_PIN4__IPU1_DI0_PIN04
+   | MUX_PAD_CTRL(PAD_CTL_DSE_120ohm), /* Contrast */
+   MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15, /* DISP0_DRDY */
+
+   MX6_PAD_DISP0_DAT0__IPU1_DISP0_DATA00,
+   MX6_PAD_DISP0_DAT1__IPU1_DISP0_DATA01,
+   MX6_PAD_DISP0_DAT2__IPU1_DISP0_DATA02,
+   MX6_PAD_DISP0_DAT3__IPU1_DISP0_DATA03,
+   MX6_PAD_DISP0_DAT4__IPU1_DISP0_DATA04,
+   MX6_PAD_DISP0_DAT5__IPU1_DISP0_DATA05,
+   MX6_PAD_DISP0_DAT6__IPU1_DISP0_DATA06,
+   MX6_PAD_DISP0_DAT7__IPU1_DISP0_DATA07,
+   MX6_PAD_DISP0_DAT8__IPU1_DISP0_DATA08,
+   MX6_PAD_DISP0_DAT9__IPU1_DISP0_DATA09,
+   MX6_PAD_DISP0_DAT10__IPU1_DISP0_DATA10,
+   MX6_PAD_DISP0_DAT11__IPU1_DISP0_DATA11,
+   MX6_PAD_DISP0_DAT12__IPU1_DISP0_DATA12,
+   MX6_PAD_DISP0_DAT13__IPU1_DISP0_DATA13,
+   MX6_PAD_DISP0_DAT14__IPU1_DISP0_DATA14,
+   MX6_PAD_DISP0_DAT15__IPU1_DISP0_DATA15,
+   MX6_PAD_DISP0_DAT16__IPU1_DISP0_DATA16,
+   MX6_PAD_DISP0_DAT17__IPU1_DISP0_DATA17,
+
+   MX6_PAD_SD4_DAT2__GPIO2_IO10
+   | MUX_PAD_CTRL(NO_PAD_CTRL), /* DISP0_BKLEN */
+   MX6_PAD_SD4_DAT3__GPIO2_IO11
+   | MUX_PAD_CTRL(NO_PAD_CTRL), /* DISP0_VDDEN */
+};
 
-   ret = ipuv3_fb_init(hdmi, 0, IPU_PIX_FMT_RGB24);
+static void do_enable_hdmi(struct display_info_t const *dev)
+{
+   imx_enable_hdmi_phy();
+}
 
-   if (ret) {
-   printf(HDMI cannot be configured: %d\n, ret);
-   return ret;
-   }
+static int detect_i2c(struct display_info_t const *dev)
+{
+   return (0 == i2c_set_bus_num(dev-bus)) 
+   (0 == i2c_probe(dev-addr));
+}
 
-   imx_enable_hdmi_phy();
+static void enable_fwadapt_7wvga(struct display_info_t const *dev

Re: [U-Boot] [PATCH v2] iomux-v3: Add support for mx6sl LVE bit

2014-04-29 Thread Otavio Salvador
On Tue, Apr 29, 2014 at 10:15 AM, Fabio Estevam
fabio.este...@freescale.com wrote:
 On mx6sl there is a LVE (Low Voltage Enable) bit in the IOMUXC_SW_PAD_CTL
 register that can enable or disable low voltage on the pad.

 LVE is bit 22 of IOMUXC_SW_PAD_CTL register, but in order to make the
 calculation easier we can define it as a flag in bit 1, since this bit is 
 unused.

 Add support for it.

 Signed-off-by: Fabio Estevam fabio.este...@freescale.com

Tested-by: Otavio Salvador ota...@ossystems.com.br

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 08/12] MX6: add mmdc configuration for MX6Q/MX6DL

2014-04-29 Thread Otavio Salvador
Hello,

On Tue, Apr 29, 2014 at 12:15 PM, Eric Nelson
eric.nel...@boundarydevices.com wrote:
 On 04/28/2014 01:17 PM, Tim Harvey wrote:

 Add functions for configuring MMDC iomux and configuration based on
 board-specific configurations.

 Signed-off-by: Tim Harvey thar...@gateworks.com
 ---
 v2:
 - split out mmdc and iomux structs into separate patch
 ---
   arch/arm/cpu/armv7/mx6/Makefile |   1 +
   arch/arm/cpu/armv7/mx6/ddr.c| 469
 
   2 files changed, 470 insertions(+)
   create mode 100644 arch/arm/cpu/armv7/mx6/ddr.c

 diff --git a/arch/arm/cpu/armv7/mx6/Makefile
 b/arch/arm/cpu/armv7/mx6/Makefile
 index d7285fc..6dc9f8e 100644
 --- a/arch/arm/cpu/armv7/mx6/Makefile
 +++ b/arch/arm/cpu/armv7/mx6/Makefile
 @@ -8,4 +8,5 @@
   #

   obj-y := soc.o clock.o
 +obj-$(CONFIG_SPL_BUILD) += ddr.o
   obj-$(CONFIG_SECURE_BOOT)+= hab.o
 diff --git a/arch/arm/cpu/armv7/mx6/ddr.c b/arch/arm/cpu/armv7/mx6/ddr.c
 new file mode 100644
 index 000..1536418
 --- /dev/null
 +++ b/arch/arm/cpu/armv7/mx6/ddr.c
 @@ -0,0 +1,469 @@
 +/*
 + * Copyright (C) 2014 Gateworks Corporation
 + * Author: Tim Harvey thar...@gateworks.com
 + *
 + * SPDX-License-Identifier: GPL-2.0+
 + */
 +
 +#include common.h
 +#include linux/types.h
 +#include asm/arch/mx6-ddr.h
 +#include asm/arch/sys_proto.h
 +#include asm/io.h
 +#include asm/types.h
 +


 Do you think that someone will want to use SPL on i.MX6 with
 support for only one of the variants?

Sure, Falcon mode comes to my mind...

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] video: mxc_ipuv3_fb: stash frame buffer pointer in global data.

2014-04-29 Thread Otavio Salvador
Hello Eric,

On Tue, Apr 29, 2014 at 6:13 PM, Eric Nelson
eric.nel...@boundarydevices.com wrote:
 This patch updates the i.MX video driver to store the
 frame-buffer address in the fb_base field of the global
 data structure *gd.

 By doing this, you can find the frame buffer address
 using the 'bdinfo' command:

 U-Boot  bdinfo
 arch_number = 0x0EB9
 ...
 FB base = 0x4F35F1C0

 This is very useful when debugging display connections.

 Signed-off-by: Eric Nelson eric.nel...@boundarydevices.com
 ---
  drivers/video/mxc_ipuv3_fb.c | 5 -
  1 file changed, 4 insertions(+), 1 deletion(-)

 diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c
 index 3e21fb2..08a94c2 100644
 --- a/drivers/video/mxc_ipuv3_fb.c
 +++ b/drivers/video/mxc_ipuv3_fb.c
 @@ -10,9 +10,9 @@
   *
   * SPDX-License-Identifier:GPL-2.0+
   */
 -

Don't remove lines.

  #include common.h
  #include asm/errno.h
 +#include asm/global_data.h
  #include linux/string.h
  #include linux/list.h
  #include linux/fb.h
 @@ -24,6 +24,8 @@
  #include mxcfb.h
  #include ipu_regs.h

 +DECLARE_GLOBAL_DATA_PTR;
 +
  static int mxcfb_map_video_memory(struct fb_info *fbi);
  static int mxcfb_unmap_video_memory(struct fb_info *fbi);

 @@ -415,6 +417,7 @@ static int mxcfb_map_video_memory(struct fb_info *fbi)

 fbi-screen_size = fbi-fix.smem_len;

 +   gd-fb_base = fbi-fix.smem_start;

I would add a new line after this. It looks ugly too close of the
comment and memset.

 /* Clear the screen */
 memset((char *)fbi-screen_base, 0, fbi-fix.smem_len);

Apart from that, please add my Acked-by.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] i.MX6SL using 1.8V eMMC

2014-04-29 Thread Otavio Salvador
adding the U-Boot mailing list in the loop. Forgot by mistake.

On Tue, Apr 29, 2014 at 6:17 PM, Otavio Salvador
ota...@ossystems.com.br wrote:
 Hello,

 I've been trying to get a custom board working in 1.8V without dirty
 hacks as writing VSELECT bit in VENDORSPEC byhand after initializing
 it.

 I tried to implement it in the fsl_esdhc driver using:
 http://privatepaste.com/34fba5c2ea

 and also tried to set SYS_SD_VOLTAGE as well. Neither solution worked for me.

 Could you give me any guidance how I should fix it properly?

 --
 Otavio Salvador O.S. Systems
 http://www.ossystems.com.brhttp://code.ossystems.com.br
 Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750



-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] iomux-v3: Add support for mx6sl LVE bit

2014-04-28 Thread Otavio Salvador
On Mon, Apr 28, 2014 at 8:11 PM, Fabio Estevam feste...@gmail.com wrote:
 From: Fabio Estevam fabio.este...@freescale.com

 On mx6sl there is a LVE (Low Voltage Enable) in the IOMUXC_SW_PAD_CTL 
 register.

 LVE is bit 22 of IOMUXC_SW_PAD_CTL register, but in order to make the
 calculation easier we can define it as bit 17 as this bit is unused and fits 
 the
 current MUX_PAD_CTRL_MASK mask.

 Add support for it.

 Signed-off-by: Fabio Estevam fabio.este...@freescale.com
 ---
  arch/arm/imx-common/iomux-v3.c | 8 
  arch/arm/include/asm/imx-common/iomux-v3.h | 2 ++
  2 files changed, 10 insertions(+)

 diff --git a/arch/arm/imx-common/iomux-v3.c b/arch/arm/imx-common/iomux-v3.c
 index b59b802..6e46ea8 100644
 --- a/arch/arm/imx-common/iomux-v3.c
 +++ b/arch/arm/imx-common/iomux-v3.c
 @@ -30,6 +30,14 @@ void imx_iomux_v3_setup_pad(iomux_v3_cfg_t pad)
 (pad  MUX_PAD_CTRL_OFS_MASK)  MUX_PAD_CTRL_OFS_SHIFT;
 u32 pad_ctrl = (pad  MUX_PAD_CTRL_MASK)  MUX_PAD_CTRL_SHIFT;

 +#if defined CONFIG_MX6SL
 +   /* Check whether LVE bit needs to be set */
 +   if (pad_ctrl  PAD_CTL_LVE) {
 +   pad_ctrl = ~PAD_CTL_LVE;
 +   pad_ctrl |= PAD_CTL_LVE_BIT;
 +   }
 +#endif
 +
 if (mux_ctrl_ofs)
 __raw_writel(mux_mode, base + mux_ctrl_ofs);

 diff --git a/arch/arm/include/asm/imx-common/iomux-v3.h 
 b/arch/arm/include/asm/imx-common/iomux-v3.h
 index dec11a1..6d3561f 100644
 --- a/arch/arm/include/asm/imx-common/iomux-v3.h
 +++ b/arch/arm/include/asm/imx-common/iomux-v3.h
 @@ -88,6 +88,8 @@ typedef u64 iomux_v3_cfg_t;
  #ifdef CONFIG_MX6

  #define PAD_CTL_HYS(1  16)
 +#define PAD_CTL_LVE(1  17)
 +#define PAD_CTL_LVE_BIT(1  22)

This conflicts with:

#define NO_PAD_CTRL (1  17)

I have changed the MASK as:

-#define MUX_PAD_CTRL_MASK  ((iomux_v3_cfg_t)0x3  MUX_PAD_CTRL_SHIFT)
+#define MUX_PAD_CTRL_MASK  ((iomux_v3_cfg_t)0x43  MUX_PAD_CTRL_SHIFT)

and seems to work fine. Do you see any issue?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] iomux-v3: Add support for mx6sl LVE bit

2014-04-28 Thread Otavio Salvador
On Mon, Apr 28, 2014 at 9:14 PM, Fabio Estevam feste...@gmail.com wrote:
 On Mon, Apr 28, 2014 at 8:40 PM, Otavio Salvador
 ota...@ossystems.com.br wrote:
  #define PAD_CTL_HYS(1  16)
 +#define PAD_CTL_LVE(1  17)
 +#define PAD_CTL_LVE_BIT(1  22)

 This conflicts with:

 #define NO_PAD_CTRL (1  17)

 Correct, I missed the NO_PAD_CTRL definition.

So use 18?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] usbtty using i.MX6

2014-04-27 Thread Otavio Salvador
On Sun, Apr 27, 2014 at 3:56 PM, Eric Bénard e...@eukrea.com wrote:
 Le Sun, 27 Apr 2014 10:56:48 -0700,
 Eric Nelson eric.nel...@boundarydevices.com a écrit :
 We're using UDC on all of our i.MX6 board. Marek and Troy have had this
 working for a while now.

 I think the two key patches are these:
   https://github.com/boundarydevices/u-boot-imx6/commit/f3d7cff
   https://github.com/boundarydevices/u-boot-imx6/commit/f016f8c

 that's not mainline :-)

Those two are already merged in mainline.

 We've been using it a lot for USB networking, where it provides a
 very nice download mechanism. See this post for details:
   http://boundarydevices.com/u-boot-2014-01/#usbrecover

 I think usbtty is a different thing though (USB serial adapter connected
 to a Host port).

 No, that's a serial port gadget on a USB device controler.

Right and than we can use it to send the console input/output to the
host system.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] usbtty using i.MX6

2014-04-26 Thread Otavio Salvador
Hello,

I'd like to know if someone has succeed in using usbtty with i.MX6. I
am interested in using it for one board but been not succed, it seems:

/home/otavio/hacking/u-boot/drivers/serial/usbtty.c:553: undefined
reference to `udc_init'
drivers/serial/built-in.o: In function `usbtty_init_instances':
/home/otavio/hacking/u-boot/drivers/serial/usbtty.c:686: undefined
reference to `udc_setup_ep'
/home/otavio/hacking/u-boot/drivers/serial/usbtty.c:708: undefined
reference to `urb_link_init'
/home/otavio/hacking/u-boot/drivers/serial/usbtty.c:709: undefined
reference to `urb_link_init'
/home/otavio/hacking/u-boot/drivers/serial/usbtty.c:710: undefined
reference to `urb_link_init
...

Does someone got it working?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 03/11] MX6: provide linker script for SPL

2014-04-18 Thread Otavio Salvador
On Thu, Apr 17, 2014 at 3:27 AM, Tim Harvey thar...@gateworks.com wrote:
 On Mon, Apr 14, 2014 at 5:02 AM, Stefano Babic sba...@denx.de wrote:
 Hi Tim,

 snip
 This file is pretty identical to
 ./arch/arm/cpu/armv7/omap-common/u-boot-spl.lds. I understand that each
 SOC/arch could be a different set up, but I think we should introduce
 this diversity when it is needed, not as default.

 Maybe can we avoid to copy the file ?


 Stefano,

 Yes, I agree - the omap-common file will work for imx6 as well. I will
 use it and remove this patch.

So it'd be better to move to spl-common dir?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] NAND SPL on imx6

2014-04-01 Thread Otavio Salvador
Hello Tim,

On Thu, Mar 27, 2014 at 2:56 PM, Tim Harvey thar...@gateworks.com wrote:
 On Mon, Mar 10, 2014 at 11:40 AM, Stefano Babic sba...@denx.de wrote:
 On 07/03/2014 13:36, Andy Ng wrote:
 Dear colleagues,

 Has anyone tried to build NAND SPL support on imx6. Does it work?


 SPL support is not yet done for i.MXes - definetely, it is one of the
 most important features we want to have in future.


 I'm working on this for the Gateworks Ventana product family. While I
 have our boards currently booting from NAND SPL with various mixes of
 CPU and memory configuration I'm still working on some minor issues
 needed for my patches to be acceptable upstream based on prior
 attempts at IMX SPL and resulting discussions.

 Just to make sure I'm on track here, these are the following patches I
 currently have the series I'm working on:
 1. SPL: NAND: add support for mxs nand
 2. MX6: add boot device structs and functions
 3. MX6: provide basic SPL support (linker script, header with common
 SPL configs)
 4. MX6: add structs and functions for mmdc iomux and dram config
 5. MX6: add some macro foo to allow both MX6Q and MX6DL IOMUX
 6. board support utilizing the above

 Items 4 and 5 above are the ones that I'm still working on and I'm
 hoping to have patches to post within a few days to a week.  Does the
 above make sense to you?

Awesome! I am quite anxious to see this! :-D

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] imx-common: cpu: add fdt_file environment variable

2014-03-31 Thread Otavio Salvador
On Mon, Mar 31, 2014 at 4:22 PM, Marek Vasut ma...@denx.de wrote:
 On Monday, March 31, 2014 at 08:36:55 PM, Troy Kisky wrote:
 On 3/29/2014 4:11 PM, Eric Nelson wrote:
  Hi Troy,
 
  On 03/29/2014 03:34 PM, Troy Kisky wrote:
  This removes one block in the move toward 1 u-boot
  for both a mx6q (quad) and mx6dl (duallite) processor.
 
  Now fdt_file hardcoded value can be removed.
 
  Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com
  ---
 
arch/arm/imx-common/cpu.c | 44
 arch/arm/lib/board.c
 |  7 +++
2 files changed, 51 insertions(+)
 
  diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c
  index a77c4de..5d48011 100644
  --- a/arch/arm/imx-common/cpu.c
  +++ b/arch/arm/imx-common/cpu.c
  @@ -180,3 +180,47 @@ void arch_preboot_os(void)
 
ipuv3_fb_shutdown();
 
}
#endif
 
  +
  +const char *get_dtb_prefix(u32 imxtype)
  +{
  +switch (imxtype) {
  +case MXC_CPU_MX6Q:
  +case MXC_CPU_MX6D:
  +return imx6q;/* Quad/Dual-core version of the mx6 */
  +case MXC_CPU_MX6DL:
  +case MXC_CPU_MX6SOLO:
  +return imx6dl;/* Dual Lite/Solo version of the mx6 */
  +case MXC_CPU_MX6SL:
  +return imx6sl;/* Solo-Lite version of the mx6 */
  +case MXC_CPU_MX51:
  +return imx51;
  +case MXC_CPU_MX53:
  +return imx53;
  +}
  +return ??;
  +}
  +
 
  I really dislike this implementation of naming policy in code.

 It is not truly a policy. It is a convenience which can be ignored
 if so desired. Though I do agree that cpu and board environment variables
 would also be useful. Still, a cpu variable would still require
 some scripting to combine the quad/dual, duallite/solo. So, your
 way is not as convenient for dtb file names.

 You can make the CPU code set the CPU type into some variable. Afterwards, 
 some
 scripts in the HUSH can assemble the DTB name based on those variables. This
 would be much more generic and re-usable than this ...

The problem is this script will be mostly the same for most boards.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] imx-common: cpu: add fdt_file environment variable

2014-03-29 Thread Otavio Salvador
On Sat, Mar 29, 2014 at 7:34 PM, Troy Kisky
troy.ki...@boundarydevices.com wrote:
 This removes one block in the move toward 1 u-boot
 for both a mx6q (quad) and mx6dl (duallite) processor.

 Now fdt_file hardcoded value can be removed.

 Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com

Nice! I do think it is in the right direction. I will give it a try soon...

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-27 Thread Otavio Salvador
Em 27/03/2014 09:44, Fabio Estevam feste...@gmail.com escreveu:

 On Thu, Mar 27, 2014 at 2:36 AM, Wolfgang Denk w...@denx.de wrote:
  Dear Fabio Estevam,
 
  In message 
caomzo5d2n1zvo5ogeam1_ewt-0kkamzgvrfpeekh5zymqkl...@mail.gmail.com you
wrote:
 
  Me too. I also think the ifdefs may easily cause confusion.
 
  So you suggest we remove all conditional code and use duplication
  everywhere?  You must be joking...

 Not everywhere. We are just talking about board files here, which are
 coming obsolete these days with device tree...

And this does work, as can be seen in Barebox which has it working for
quite some time.

You can see equivalent patch in

http://lists.infradead.org/pipermail/barebox/2014-March/018408.html

It seems U-Boot is behind !

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


Re: [U-Boot] [PATCH v2 2/2] MarSBoard: add new board

2014-03-26 Thread Otavio Salvador
On Wed, Mar 26, 2014 at 6:31 PM, Eric Bénard e...@eukrea.com wrote:
 this board is produced by Embest/Element 14 and is based on i.MX6 Dual
 The following features are tested :
 - UART2 (console)
 - eMMC
 - uSDCard
 - Ethernet
 - USB Host (through 2 ports hub)
 - HDMI output
 - I2C 1/2
 - SPI NOR Flash

 Boot on SPI NOR and through USB loader are tested.

 For more informations on this board :
 http://www.embest-tech.com/shop/star/marsboard.html

 As this board shares a lot with RiOTboard, both boards are supported by
 the same code base which is renamed embest/mx6boards

 Signed-off-by: Eric Bénard e...@eukrea.com

I understand both boards share a lot of code but I think the set of
ifdef makes harder for people to understand the board code. Personally
I prefer v1.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mx25pdk: Align the environment with other FSL boards

2014-03-05 Thread Otavio Salvador
On Wed, Mar 5, 2014 at 3:51 PM, Fabio Estevam feste...@gmail.com wrote:
 From: Fabio Estevam fabio.este...@freescale.com

 Allow the boot of a device tree mainline kernel by aligning the environment
 variables with other FSL boards.

 Tested NFS boot of a dt 3.14-rc5 kernel.

 Signed-off-by: Fabio Estevam fabio.este...@freescale.com

Awesome!

Acked-by: Otavio Salvador ota...@ossystems.com.br

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Single u-boot for quad/duallite

2014-03-05 Thread Otavio Salvador
On Wed, Mar 5, 2014 at 4:30 PM, Troy Kisky
troy.ki...@boundarydevices.com wrote:
 Since we are slowly heading toward a single u-boot for quad/duallite,
 can we find a solution to this now.

 mx6sabre_common.h:  fdt_file= CONFIG_DEFAULT_FDT_FILE \0 \
 mx6sabresd.h:#define CONFIG_DEFAULT_FDT_FILEimx6q-sabresd.dtb
 mx6sabresd.h:#define CONFIG_DEFAULT_FDT_FILEimx6dl-sabresd.dtb

 Perhaps common code could create this environment variable by
 concatenating with the board name if not already existing in the
 environment.

 Opinions?

I fully agree. Are you going to look at this?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Dove / Cubox support patch series (was: Re: [PATCH v4 05/10] SPI: Add Dove SPI driver)

2014-03-03 Thread Otavio Salvador
On Mon, Mar 3, 2014 at 7:43 PM, Sascha Silbe t-ub...@infra-silbe.de wrote:
 Jagan Teki jagannadh.t...@gmail.com writes:

 Any update on this.

 The Wandboard Quad is working well for my purposes and much easier to
 work with (schematics and very extensive data sheets available, mainline
 support in both U-Boot and Linux). As a result, I'm focusing my limited
 resources on the Wandboard rather than the Cubox.

Cubox-i has been merged in current mainline; so it may be good a recheck ;-)

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC PATCH 1/3] add file with a default boot environment based heavily on Stephen Warrens recent tegra work.

2014-02-22 Thread Otavio Salvador
Hello Tom,

On Thu, Feb 20, 2014 at 10:46 AM, Tom Rini tr...@ti.com wrote:
 On Thu, Feb 20, 2014 at 09:31:36AM -0300, Otavio Salvador wrote:
 Hello Tom,

 On Wed, Feb 19, 2014 at 4:41 PM, Tom Rini tr...@ti.com wrote:
  On Wed, Feb 19, 2014 at 12:29:19PM -0700, Stephen Warren wrote:
  On 02/19/2014 12:24 PM, Dan Murphy wrote:
  ...
   Do we have a directory where default scripts exist for each board?  Or 
   at least samples for each board?
  
   I could not find them.  If they don't exist then we should probably put 
   them in the board dirs and cp them to the respective out directory
  
   Maybe this would be something that helps defined the known good config 
   that the community can base their changes on.
 
  For Tegra, I have created:
 
  https://github.com/NVIDIA/tegra-uboot-scripts
 
  I imagine those scripts would work on most boards that use the U-Boot
  config in this patch series. I've certainly used almost identical
  scripts on the Raspberry Pi.
 
  I should perhaps put an example extlinux.conf into that repo too.
 
  I imagine (well, it's pretty much the whole point) that distro
  installers (e.g. Anaconda) will soon (or already do) support spitting
  out extlinux.conf that'll work on ARM U-Boot too.
 
  Hey Otavio, is OpenEmbedded doing this yet?  I know there's
  syslinux.conf support in since ages ago...

 As Denys said it is not yet supported but should be easily doable. :-)

 Well, can I suggest / beg that we get started? :)  I'd love to see OE be
 ready when this is out in the next release.

Yes; I will start looking how to integrate it.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC PATCH 1/3] add file with a default boot environment based heavily on Stephen Warrens recent tegra work.

2014-02-20 Thread Otavio Salvador
Hello Tom,

On Wed, Feb 19, 2014 at 4:41 PM, Tom Rini tr...@ti.com wrote:
 On Wed, Feb 19, 2014 at 12:29:19PM -0700, Stephen Warren wrote:
 On 02/19/2014 12:24 PM, Dan Murphy wrote:
 ...
  Do we have a directory where default scripts exist for each board?  Or at 
  least samples for each board?
 
  I could not find them.  If they don't exist then we should probably put 
  them in the board dirs and cp them to the respective out directory
 
  Maybe this would be something that helps defined the known good config 
  that the community can base their changes on.

 For Tegra, I have created:

 https://github.com/NVIDIA/tegra-uboot-scripts

 I imagine those scripts would work on most boards that use the U-Boot
 config in this patch series. I've certainly used almost identical
 scripts on the Raspberry Pi.

 I should perhaps put an example extlinux.conf into that repo too.

 I imagine (well, it's pretty much the whole point) that distro
 installers (e.g. Anaconda) will soon (or already do) support spitting
 out extlinux.conf that'll work on ARM U-Boot too.

 Hey Otavio, is OpenEmbedded doing this yet?  I know there's
 syslinux.conf support in since ages ago...

As Denys said it is not yet supported but should be easily doable. :-)

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC PATCH 3/3] move wandboard over to use the generic distro configuratin and environment

2014-02-19 Thread Otavio Salvador
;  \
 -  else run netboot; fi
 +   for target in ${boot_targets}; do run bootcmd_${target}; done

  /* Miscellaneous configurable options */
 -#define CONFIG_SYS_LONGHELP
 -#define CONFIG_SYS_HUSH_PARSER
 -#define CONFIG_AUTO_COMPLETE
  #define CONFIG_SYS_CBSIZE  256

  /* Print Buffer Size */
 @@ -207,8 +149,6 @@

  #define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR

 -#define CONFIG_CMDLINE_EDITING
 -
  /* Physical Memory Map */
  #define CONFIG_NR_DRAM_BANKS   1
  #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
 @@ -231,9 +171,6 @@
  #define CONFIG_ENV_OFFSET  (6 * 64 * 1024)
  #define CONFIG_SYS_MMC_ENV_DEV 0

 -#define CONFIG_OF_LIBFDT
 -#define CONFIG_CMD_BOOTZ
 -
  #ifndef CONFIG_SYS_DCACHE_OFF
  #define CONFIG_CMD_CACHE
  #endif
 --
 1.8.5.3




-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC] try to merge different i.MX environment

2014-02-14 Thread Otavio Salvador
Hello Stefano,

before anything I'd like to thank you for this as it does need to be
improved and it needs to be shared to avoid same fix to be done
everywhere.

On Fri, Feb 14, 2014 at 1:06 PM, Stefano Babic sba...@denx.de wrote:
 Signed-off-by: Stefano Babic sba...@denx.de
 CC: Fabio Estevam fabio.este...@freescale.com
 CC: Otavio Salvador ota...@ossystems.com.br
 CC: Marek Vasut ma...@denx.de
 CC: Leo Sartre lsar...@adeneo-embedded.com
 CC: Jon Nettleton jon.nettle...@gmail.com
 CC: Eric Nelson eric.nel...@boundarydevices.com
 CC: b18...@freescale.com

 Hi everybody,

 the current built-in environment in most i.MX boards is very similar.
 Even if I always thought that the default environemt is something
 that the user want always customize, I see from all you submitters
 the not hidden desire to have such a common default environment for
 all boards. At least, for i.MX boards.
 Checking in the board configuration files, I see at least the following
 boards that hase quite the same built-in environment:
...

Fully agreed. This is especially important with the common distro
environment in mind.

...
 diff --git a/include/configs/default_env.h b/include/configs/default_env.h
 new file mode 100644
 index 000..b898156
 --- /dev/null
 +++ b/include/configs/default_env.h

I'd prefer this to be named

default_env_imx.h

 @@ -0,0 +1,133 @@
 +
 +#ifndef _DEFAULT_ENV_H
 +#define _DEFAULT_ENV_H
 +
 +#ifdef CONFIG_PREFIX_IMAGE
 +#define CONFIG_BOOT_SUFFIX z
 +#define CONFIG_DEFIMAGEzimage

zImage

 +#else
 +#define CONFIG_BOOT_SUFFIX
 +#define CONFIG_DEFIMAGEuImage
 +#endif
 +
 +#ifndef MMC_SCRIPT_FILESYSTEM
 +#define MMC_SCRIPT_FILESYSTEM fat
 +#endif

We could move to generic filesystem and avoid this.

 +#ifndef CONFIG_DEFAULT_FDT_FILE
 +#define CONFIG_DEFAULT_FDT_FILE
 +#endif
 +
 +#ifndef MMC_WRITE_OFFSET
 +#define MMC_WRITE_OFFSET 0x2
 +#endif
 +
 +#ifdef CONFIG_SUPPORT_EMMC_BOOT
 +#define EMMC_ENV \
 +   update_emmc_firmware= \
 +   if test ${ip_dyn} = yes; then  \
 +   setenv get_cmd dhcp;  \
 +   else  \
 +   setenv get_cmd tftp;  \
 +   fi;  \
 +   if ${get_cmd} ${update_sd_firmware_filename}; then  \
 +   if mmc dev ${emmcdev}   \
 +   mmc open ${emmcdev} 1; then   \

This must to be adapter with Tom's work in emmc; I think this just fails now...

 +   setexpr fw_sz ${filesize} / 0x200;  \
 +   setexpr fw_sz ${fw_sz} + 1;   \
 +   mmc write ${loadaddr}  
 __stringify(MMC_WRITE_OFFSET)  ${fw_sz};  \
 +   mmc close ${emmcdev} 1;  \
 +   fi;   \
 +   fi\0
 +#else
 +#define EMMC_ENV 
 +#endif
 +
 +#define CONFIG_COMMON_SCRIPTS \
 +   bootscript=echo Running bootscript from mmc ...;  \
 +   source\0 \
 +   script=boot.scr\0 \
 +   image= CONFIG_DEFIMAGE \0 \
 +   fdt_file= CONFIG_DEFAULT_FDT_FILE \0 \
 +   fdt_addr=0x1800\0 \

This must to be set by SoC type; so we don't need to re-define it in
every board. This also need to be overridable in case we have a board
with reduced memory.

 +   console= CONFIG_CONSOLE_DEV \0 \
 +   fdt_high=0x\0   \
 +   initrd_high=0x\0 \
 +   ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0 \
 +   mmcdev= __stringify(CONFIG_SYS_MMC_ENV_DEV) \0 \
 +   mmcroot= CONFIG_MMCROOT  rootwait rw\0 \
 +   update_sd_firmware= \
 +   if test ${ip_dyn} = yes; then  \
 +   setenv get_cmd dhcp;  \
 +   else  \
 +   setenv get_cmd tftp;  \
 +   fi;  \
 +   if mmc dev ${mmcdev}; then\
 +   if ${get_cmd} ${update_sd_firmware_filename}; then  
 \
 +   setexpr fw_sz ${filesize} / 0x200;  \
 +   setexpr fw_sz ${fw_sz} + 1;   \
 +   mmc write ${loadaddr}  
 __stringify(MMC_WRITE_OFFSET)  ${fw_sz};  \
 +   fi;   \
 +   fi\0 \
 +   mmcargs=setenv bootargs console=${console},${baudrate}  \
 +   root=${mmcroot}\0 \
 +   loadbootscript= \
 +   __stringify(MMC_SCRIPT_FILESYSTEM)load mmc 
 ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
 +   loadimage= \
 +   __stringify(MMC_SCRIPT_FILESYSTEM)load mmc 
 ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0 \
 +   loadfdt= \
 +   __stringify(MMC_SCRIPT_FILESYSTEM) load mmc 
 ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \
 +   mmcboot=echo Booting from mmc ...;  \
 +   run mmcargs;  \
 +   if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
 +   if run loadfdt; then  \
 +   boot CONFIG_BOOT_SUFFIX  ${loadaddr

Re: [U-Boot] [PATCH imx6dl] Enable SION Bit for GPIO16 when ALT2 mode is selected

2014-02-12 Thread Otavio Salvador
On Wed, Feb 12, 2014 at 9:58 AM, Stefano Babic sba...@denx.de wrote:
 Hi Andy,

 On 12/02/2014 12:53, Andy Ng wrote:
 HI

 I was away the last few days.

 Shall I produce a patch for the u-boot git main line code with that fix?


 Yes, please add your signed-off-by and rebase it on top of u-boot-imx.

The fix I am using here is:

diff --git a/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
b/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
index 55cc9ad..3f41787 100644
--- a/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
+++ b/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
@@ -695,7 +695,7 @@ MX6_PAD_DECL(GPIO_1__GPIO1_IO01,0x05E0,
0x0210, 5, 0x, 0, 0)
 MX6_PAD_DECL(GPIO_1__SD1_CD_B, 0x05E0, 0x0210, 6, 0x, 0, 0)
 MX6_PAD_DECL(GPIO_16__ESAI_TX3_RX2,0x05E4, 0x0214, 0, 0x0850, 1, 0)
 MX6_PAD_DECL(GPIO_16__ENET_1588_EVENT2_IN, 0x05E4, 0x0214, 1, 0x, 0, 0)
-MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,0x05E4, 0x0214, 2, 0x080C, 0, 0)
+MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,0x05E4, 0x0214, 2 |
IOMUX_CONFIG_SION, 0x080C, 0, 0)
 MX6_PAD_DECL(GPIO_16__SD1_LCTL,0x05E4, 0x0214, 3, 0x, 0, 0)
 MX6_PAD_DECL(GPIO_16__SPDIF_IN,0x05E4, 0x0214, 4, 0x08F0, 2, 0)
 MX6_PAD_DECL(GPIO_16__GPIO7_IO11,  0x05E4, 0x0214, 5, 0x, 0, 0)
diff --git a/arch/arm/include/asm/arch-mx6/mx6q_pins.h
b/arch/arm/include/asm/arch-mx6/mx6q_pins.h
index ad31c33..3aae246 100644
--- a/arch/arm/include/asm/arch-mx6/mx6q_pins.h
+++ b/arch/arm/include/asm/arch-mx6/mx6q_pins.h
@@ -703,7 +703,7 @@ MX6_PAD_DECL(GPIO_8__SPDIF_SR_CLK,  0x0614,
0x0244, 6, 0x, 0, 0)
 MX6_PAD_DECL(GPIO_8__USB_OTG_PWR_CTL_WAKE, 0x0614, 0x0244, 7, 0x, 0, 0)
 MX6_PAD_DECL(GPIO_16__ESAI_TX3_RX2,0x0618, 0x0248, 0, 0x0880, 1, 0)
 MX6_PAD_DECL(GPIO_16__ENET_1588_EVENT2_IN, 0x0618, 0x0248, 1, 0x, 0, 0)
-MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,0x0618, 0x0248, 2, 0x083C, 1, 0)
+MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,0x0618, 0x0248, 2 |
IOMUX_CONFIG_SION, 0x083C, 1, 0)
 MX6_PAD_DECL(GPIO_16__SD1_LCTL,0x0618, 0x0248, 3, 0x, 0, 0)
 MX6_PAD_DECL(GPIO_16__SPDIF_IN,0x0618, 0x0248, 4, 0x0914, 3, 0)
 MX6_PAD_DECL(GPIO_16__GPIO7_IO11,  0x0618, 0x0248, 5, 0x, 0, 0)

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH imx6dl] Enable SION Bit for GPIO16 when ALT2 mode is selected

2014-02-12 Thread Otavio Salvador
Hello Andy,

On Wed, Feb 12, 2014 at 10:57 AM, Andy Ng andreas2...@gmail.com wrote:
 From 45da8256deadb5c5cf38311ed5470e4ba5b20570 Mon Sep 17 00:00:00 2001
 From: Andy Ng andreas2...@gmail.com
 Date: Wed, 12 Feb 2014 12:40:47 +
 Subject: [PATCH] SION bit has to be on for the pins that are used as
 ENET_REF_CLK

 Signed-off-by: Andy Ng andreas2...@gmail.com

The commit log is not good. Please check the one I sent in this thread
for reference.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH imx6dl] Enable SION Bit for GPIO16 when ALT2 mode is selected

2014-02-11 Thread Otavio Salvador
Hello,

On Tue, Feb 11, 2014 at 8:13 AM, Stefano Babic sba...@denx.de wrote:
 On 19/01/2014 15:34, Andy Ng wrote:
 The ENET_REF_CLK has to loopback: the patch was produced from u-boot 2013-10

 We agree about your patch, but can you please fix the issues reported by
 Otavio (add your signed-off-by and rebase) and resubmit, please ?

I have reworked Andy's patch and applied to my internal tree. I can
send it if needed.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH imx6dl] Enable SION Bit for GPIO16 when ALT2 mode is selected

2014-02-11 Thread Otavio Salvador
Hello,

On Tue, Feb 11, 2014 at 9:11 AM, Stefano Babic sba...@denx.de wrote:
 Hi Otavio,

 On 11/02/2014 11:55, Otavio Salvador wrote:
 Hello,

 On Tue, Feb 11, 2014 at 8:13 AM, Stefano Babic sba...@denx.de wrote:
 On 19/01/2014 15:34, Andy Ng wrote:
 The ENET_REF_CLK has to loopback: the patch was produced from u-boot 
 2013-10

 We agree about your patch, but can you please fix the issues reported by
 Otavio (add your signed-off-by and rebase) and resubmit, please ?

 I have reworked Andy's patch and applied to my internal tree. I can
 send it if needed.

 Thanks, wait on. I would like to know from Andy if it is ok for him to
 add his Signed-off-by, before applying. If Andy is not available, we
 will rework the patch.

In fact Andy's patch was not complete. So I did it:

--
MX6: Add SION flag to ENET_REF_CLK PAD
The ENET_REF_CLK needs to have the SION flag enabled so it can

   loopback.

This patch has been based upon an Andy Ng andreas2...@gmail.com one.
Signed-off-by: Otavio Salvador ota...@ossystems.com.br
--

So when you want, I can send it.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 8/8] cmd_mmc.c: Drop open/close mmc sub-commands

2014-02-04 Thread Otavio Salvador
On Thu, Jan 30, 2014 at 7:32 PM, Tom Rini tr...@ti.com wrote:
 The open and close mmc sub-commands implement a hard-coded set of values
 specific to the SMDK5250 platform.  Remove these commands as what they
 did can be done instead with a series of mmc dev / bootpart / bootbus
 commands instead now.

Maybe it'd be good to document, in the commitlog the mmc commands equivalent.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 8/8] cmd_mmc.c: Drop open/close mmc sub-commands

2014-02-04 Thread Otavio Salvador
On Tue, Feb 4, 2014 at 12:08 PM, Otavio Salvador
ota...@ossystems.com.br wrote:
 On Thu, Jan 30, 2014 at 7:32 PM, Tom Rini tr...@ti.com wrote:
 The open and close mmc sub-commands implement a hard-coded set of values
 specific to the SMDK5250 platform.  Remove these commands as what they
 did can be done instead with a series of mmc dev / bootpart / bootbus
 commands instead now.

 Maybe it'd be good to document, in the commitlog the mmc commands equivalent.

By the way, mx6sabresd uses this.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v9 0/38] Switch over to real Kbuild

2014-02-04 Thread Otavio Salvador
On Tue, Feb 4, 2014 at 6:24 AM, Masahiro Yamada
yamad...@jp.panasonic.com wrote:

 We switched to Kbuild style makefiles at v2014.01-rc1 release.
 With that modification, we can write makefiles simpler.
 But it is NOT real Kbuild. We need more progress.

 As the next step, this series imports (+ adjusts) build scripts
 from Linux Kernel under scripts/ directory.
 By applying this series, we can get more advantages:
   - short log
   - perfect dependency tracking
   - preparation to the next step, Kconfig
   - other things...


Does this version address Simon's build time increase? Or did it been
identified?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 2/2] mx6: Distinguish mx6dual from mx6quad

2014-01-26 Thread Otavio Salvador
On Sun, Jan 26, 2014 at 8:39 PM, Stefano Babic sba...@denx.de wrote:
 Hi Fabio,


 On 26/01/2014 18:06, Fabio Estevam wrote:

 From: Fabio Estevam fabio.este...@freescale.com

 Currently when we boot a mx6dual U-boot reports that it is a mx6quad.

 Report it as MX6D instead:

 CPU:   Freescale i.MX6D rev1.2 at 792 MHz

 Signed-off-by: Fabio Estevam fabio.este...@freescale.com
 ---
 Changes since v3:
 - Fix From field
 Changes since v2:
 - use a common cpu.h header

   arch/arm/cpu/armv7/mx6/soc.c| 14 +++---
   arch/arm/imx-common/cpu.c   |  2 ++
   arch/arm/include/asm/arch-imx/cpu.h |  1 +
   3 files changed, 14 insertions(+), 3 deletions(-)

 diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
 index 0208cba..9acd8c9 100644
 --- a/arch/arm/cpu/armv7/mx6/soc.c
 +++ b/arch/arm/cpu/armv7/mx6/soc.c
 @@ -41,14 +41,19 @@ u32 get_cpu_rev(void)

 if (type != MXC_CPU_MX6SL) {
 reg = readl(anatop-digprog);
 +   struct scu_regs *scu = (struct scu_regs *)SCU_BASE_ADDR;
 +   u32 cfg = readl(scu-config)  3;
 type = ((reg  16)  0xff);
 if (type == MXC_CPU_MX6DL) {
 -   struct scu_regs *scu = (struct scu_regs
 *)SCU_BASE_ADDR;
 -   u32 cfg = readl(scu-config)  3;
 -
 if (!cfg)
 type = MXC_CPU_MX6SOLO;
 }
 +
 +   if (type == MXC_CPU_MX6Q) {
 +   if (cfg == 1)
 +   type = MXC_CPU_MX6D;
 +   }
 +
 }
 reg = 0xff;/* mx6 silicon revision */
 return (type  12) | (reg + 0x10);
 @@ -62,6 +67,9 @@ u32 __weak get_board_rev(void)
 if (type == MXC_CPU_MX6SOLO)
 cpurev = (MXC_CPU_MX6DL)  12 | (cpurev  0xFFF);

 +   if (type == MXC_CPU_MX6D)
 +   cpurev = (MXC_CPU_MX6Q)  12 | (cpurev  0xFFF);
 +
 return cpurev;
   }
   #endif
 diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c
 index 9231649..a77c4de 100644
 --- a/arch/arm/imx-common/cpu.c
 +++ b/arch/arm/imx-common/cpu.c
 @@ -106,6 +106,8 @@ const char *get_imx_type(u32 imxtype)
 switch (imxtype) {
 case MXC_CPU_MX6Q:
 return 6Q;/* Quad-core version of the mx6 */
 +   case MXC_CPU_MX6D:
 +   return 6D;/* Dual-core version of the mx6 */
 case MXC_CPU_MX6DL:
 return 6DL;   /* Dual Lite version of the mx6 */
 case MXC_CPU_MX6SOLO:
 diff --git a/arch/arm/include/asm/arch-imx/cpu.h
 b/arch/arm/include/asm/arch-imx/cpu.h
 index 8c725e2..a35940e 100644
 --- a/arch/arm/include/asm/arch-imx/cpu.h
 +++ b/arch/arm/include/asm/arch-imx/cpu.h
 @@ -10,3 +10,4 @@
   #define MXC_CPU_MX6DL 0x61
   #define MXC_CPU_MX6SOLO   0x62
   #define MXC_CPU_MX6Q  0x63
 +#define MXC_CPU_MX6D   0x64


 Acked-by: Stefano babic sba...@denx.de

Acked-by: Otavio Salvador ota...@ossystems.com.br

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/2] env_mmc: make board configurable the partition for the environment

2014-01-23 Thread Otavio Salvador
On Thu, Jan 23, 2014 at 10:39 AM, Hector Palacios
hector.palac...@digi.com wrote:
 This complements commit 9404a5fc7cb58 env_mmc: allow environment to be
 in an eMMC partition by allowing boards to accommodate the partition
 to use for the environment in different scenarios (similarly to what is
 done with the mmc dev number). Depending on the detected boot media,
 boards may decide to store the environment in a different partition.

 The __weak function also allows to remove some ifdefs from the code.
 If CONFIG_SYS_MMC_ENV_PART is not defined, partition 0 is assumed
 (default value for U-Boot when a partition is not provided).

 Signed-off-by: Hector Palacios hector.palac...@digi.com
 Reviewed-by: Stephen Warren swar...@nvidia.com

Acked-by: Otavio Salvador ota...@ossystems.com.br


-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/2] config_fallbacks: default CONFIG_SYS_MMC_ENV_DEV to 0

2014-01-23 Thread Otavio Salvador
On Thu, Jan 23, 2014 at 10:39 AM, Hector Palacios
hector.palac...@digi.com wrote:
 Since function mmc_get_env_devno is __weak and can be overridden by
 board code, boards do not need to mandatory define
 CONFIG_SYS_MMC_ENV_DEV.
 If the constant is not defined, define it to 0 by default.

 Signed-off-by: Hector Palacios hector.palac...@digi.com
 Reviewed-by: Stephen Warren swar...@nvidia.com


Acked-by: Otavio Salvador ota...@ossystems.com.br

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mx6sl: Adjust fdt_addr to avoid address overlapping

2014-01-22 Thread Otavio Salvador
On Wed, Jan 22, 2014 at 12:23 PM, Fabio Estevam feste...@gmail.com wrote:
 From: Fabio Estevam fabio.este...@freescale.com

 Similarly as it was done on commit 6584a1b526 (ARM: mx6: Change the FDT 
 loading
 address to avoid overlaping), we need to adjust the fdt_addr in order to be
 able to boot FSL 3.10 kernel.

 Signed-off-by: Fabio Estevam fabio.este...@freescale.com

Good catch, I missed this one :)

Acked-by: Otavio Salvador ota...@ossystems.com.br

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Revert fdt_support: 64bit initrd start address support

2014-01-20 Thread Otavio Salvador
This reverts commit f77a606a0602be5d1fe23e8dcdfa5defde51dfd7 as it
breaks 32bit initrd use as it uses #address-cells as '2'.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---
 common/fdt_support.c | 66 +---
 1 file changed, 32 insertions(+), 34 deletions(-)

diff --git a/common/fdt_support.c b/common/fdt_support.c
index b9dce99..4e32b02 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -21,34 +21,6 @@
  */
 DECLARE_GLOBAL_DATA_PTR;
 
-/*
- * Get cells len in bytes
- * if #-cells property is 2 then len is 8
- * otherwise len is 4
- */
-static int get_cells_len(void *blob, char *nr_cells_name)
-{
-   const fdt32_t *cell;
-
-   cell = fdt_getprop(blob, 0, nr_cells_name, NULL);
-   if (cell  fdt32_to_cpu(*cell) == 2)
-   return 8;
-
-   return 4;
-}
-
-/*
- * Write a 4 or 8 byte big endian cell
- */
-static void write_cell(u8 *addr, u64 val, int size)
-{
-   int shift = (size - 1) * 8;
-   while (size--  0) {
-   *addr++ = (val  shift)  0xff;
-   shift -= 8;
-   }
-}
-
 /**
  * fdt_getprop_u32_default - Find a node and return it's property or a default
  *
@@ -159,9 +131,9 @@ static int fdt_fixup_stdout(void *fdt, int chosenoff)
 
 int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end, int force)
 {
-   int   nodeoffset, addr_cell_len;
+   int   nodeoffset;
int   err, j, total;
-   fdt64_t  tmp;
+   fdt32_t  tmp;
const char *path;
uint64_t addr, size;
 
@@ -198,11 +170,9 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong 
initrd_end, int force)
return err;
}
 
-   addr_cell_len = get_cells_len(fdt, #address-cells);
-
path = fdt_getprop(fdt, nodeoffset, linux,initrd-start, NULL);
if ((path == NULL) || force) {
-   write_cell((u8 *)tmp, initrd_start, addr_cell_len);
+   tmp = cpu_to_fdt32(initrd_start);
err = fdt_setprop(fdt, nodeoffset,
linux,initrd-start, tmp, sizeof(tmp));
if (err  0) {
@@ -211,7 +181,7 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong 
initrd_end, int force)
fdt_strerror(err));
return err;
}
-   write_cell((u8 *)tmp, initrd_end, addr_cell_len);
+   tmp = cpu_to_fdt32(initrd_end);
err = fdt_setprop(fdt, nodeoffset,
linux,initrd-end, tmp, sizeof(tmp));
if (err  0) {
@@ -373,6 +343,34 @@ void do_fixup_by_compat_u32(void *fdt, const char *compat,
do_fixup_by_compat(fdt, compat, prop, tmp, 4, create);
 }
 
+/*
+ * Get cells len in bytes
+ * if #-cells property is 2 then len is 8
+ * otherwise len is 4
+ */
+static int get_cells_len(void *blob, char *nr_cells_name)
+{
+   const fdt32_t *cell;
+
+   cell = fdt_getprop(blob, 0, nr_cells_name, NULL);
+   if (cell  fdt32_to_cpu(*cell) == 2)
+   return 8;
+
+   return 4;
+}
+
+/*
+ * Write a 4 or 8 byte big endian cell
+ */
+static void write_cell(u8 *addr, u64 val, int size)
+{
+   int shift = (size - 1) * 8;
+   while (size--  0) {
+   *addr++ = (val  shift)  0xff;
+   shift -= 8;
+   }
+}
+
 #ifdef CONFIG_NR_DRAM_BANKS
 #define MEMORY_BANKS_MAX CONFIG_NR_DRAM_BANKS
 #else
-- 
1.8.5.2

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


Re: [U-Boot] [PATCH imx6dl] Enable SION Bit for GPIO16 when ALT2 mode is selected

2014-01-19 Thread Otavio Salvador
On Sun, Jan 19, 2014 at 12:34 PM, Andy Ng andreas2...@gmail.com wrote:
 The ENET_REF_CLK has to loopback: the patch was produced from u-boot 2013-10

Please:

 - Add Signed-off-by
 - Rebase it to imx/master as this does not apply in current source code.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH imx6dl] Enable SION Bit for GPIO16 when ALT2 mode is selected

2014-01-19 Thread Otavio Salvador
Andy,

On Sun, Jan 19, 2014 at 2:58 PM, Otavio Salvador
ota...@ossystems.com.br wrote:
 On Sun, Jan 19, 2014 at 12:34 PM, Andy Ng andreas2...@gmail.com wrote:
 The ENET_REF_CLK has to loopback: the patch was produced from u-boot 2013-10

 Please:

  - Add Signed-off-by
  - Rebase it to imx/master as this does not apply in current source code.

 --
 Otavio Salvador O.S. Systems
 http://www.ossystems.com.brhttp://code.ossystems.com.br
 Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750

This fixed one customer board I have as well.

I tested it using today's master tip.

Please change Q variant as well, rebased patch bellow:

diff --git a/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
b/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
index 55cc9ad..3f41787 100644
--- a/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
+++ b/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
@@ -695,7 +695,7 @@ MX6_PAD_DECL(GPIO_1__GPIO1_IO01,0x05E0,
0x0210, 5, 0x, 0, 0)
 MX6_PAD_DECL(GPIO_1__SD1_CD_B, 0x05E0, 0x0210, 6, 0x, 0, 0)
 MX6_PAD_DECL(GPIO_16__ESAI_TX3_RX2,0x05E4, 0x0214, 0, 0x0850, 1, 0)
 MX6_PAD_DECL(GPIO_16__ENET_1588_EVENT2_IN, 0x05E4, 0x0214, 1, 0x, 0, 0)
-MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,0x05E4, 0x0214, 2, 0x080C, 0, 0)
+MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,0x05E4, 0x0214, 2 |
IOMUX_CONFIG_SION, 0x080C, 0, 0)
 MX6_PAD_DECL(GPIO_16__SD1_LCTL,0x05E4, 0x0214, 3, 0x, 0, 0)
 MX6_PAD_DECL(GPIO_16__SPDIF_IN,0x05E4, 0x0214, 4, 0x08F0, 2, 0)
 MX6_PAD_DECL(GPIO_16__GPIO7_IO11,  0x05E4, 0x0214, 5, 0x, 0, 0)
diff --git a/arch/arm/include/asm/arch-mx6/mx6q_pins.h
b/arch/arm/include/asm/arch-mx6/mx6q_pins.h
index ad31c33..3aae246 100644
--- a/arch/arm/include/asm/arch-mx6/mx6q_pins.h
+++ b/arch/arm/include/asm/arch-mx6/mx6q_pins.h
@@ -703,7 +703,7 @@ MX6_PAD_DECL(GPIO_8__SPDIF_SR_CLK,  0x0614,
0x0244, 6, 0x, 0, 0)
 MX6_PAD_DECL(GPIO_8__USB_OTG_PWR_CTL_WAKE, 0x0614, 0x0244, 7, 0x, 0, 0)
 MX6_PAD_DECL(GPIO_16__ESAI_TX3_RX2,0x0618, 0x0248, 0, 0x0880, 1, 0)
 MX6_PAD_DECL(GPIO_16__ENET_1588_EVENT2_IN, 0x0618, 0x0248, 1, 0x, 0, 0)
-MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,0x0618, 0x0248, 2, 0x083C, 1, 0)
+MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,0x0618, 0x0248, 2 |
IOMUX_CONFIG_SION, 0x083C, 1, 0)
 MX6_PAD_DECL(GPIO_16__SD1_LCTL,0x0618, 0x0248, 3, 0x, 0, 0)
 MX6_PAD_DECL(GPIO_16__SPDIF_IN,0x0618, 0x0248, 4, 0x0914, 3, 0)
 MX6_PAD_DECL(GPIO_16__GPIO7_IO11,  0x0618, 0x0248, 5, 0x, 0, 0)


-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH imx6dl] Enable SION Bit for GPIO16 when ALT2 mode is selected

2014-01-19 Thread Otavio Salvador
On Sun, Jan 19, 2014 at 3:48 PM, Fabio Estevam feste...@gmail.com wrote:
 Hi Otavio/Andy,

 On Sun, Jan 19, 2014 at 3:07 PM, Otavio Salvador
 ota...@ossystems.com.br wrote:

 --- a/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
 +++ b/arch/arm/include/asm/arch-mx6/mx6dl_pins.h
 @@ -695,7 +695,7 @@ MX6_PAD_DECL(GPIO_1__GPIO1_IO01,0x05E0,
 0x0210, 5, 0x, 0, 0)
  MX6_PAD_DECL(GPIO_1__SD1_CD_B, 0x05E0, 0x0210, 6, 0x, 0, 0)
  MX6_PAD_DECL(GPIO_16__ESAI_TX3_RX2,0x05E4, 0x0214, 0, 0x0850, 1, 0)
  MX6_PAD_DECL(GPIO_16__ENET_1588_EVENT2_IN, 0x05E4, 0x0214, 1, 0x, 
 0, 0)
 -MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,0x05E4, 0x0214, 2, 0x080C, 0, 0)
 +MX6_PAD_DECL(GPIO_16__ENET_REF_CLK,0x05E4, 0x0214, 2 |

 What about adding the SION bit in the board file only?

 Then we would have the same behaviour as in the kernel.

 Please check the hummingboard dts file:
 https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi?id=refs/tags/next-20140117

Personally I think when using the ALT 2 people are expecting it works
out of box so I think this should be in the PAD declaration.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH imx6dl] Enable SION Bit for GPIO16 when ALT2 mode is selected

2014-01-19 Thread Otavio Salvador
On Sun, Jan 19, 2014 at 4:03 PM, Fabio Estevam feste...@gmail.com wrote:
 On Sun, Jan 19, 2014 at 3:55 PM, Otavio Salvador
 ota...@ossystems.com.br wrote:

 Personally I think when using the ALT 2 people are expecting it works
 out of box so I think this should be in the PAD declaration.

 This pin works out of the box in hummingboard, for example.

 IOMUX_CONFIG_SION is not used anywhere in the
 mx6q_pins.h/mx6dl_pins.h, so why GPIO_16__ENET_
 REF_CLK should be an exception?

Are you sure?

% git grep -c IOMUX_CONFIG_SION arch/arm/include/asm/arch-mx6/
arch/arm/include/asm/arch-mx6/mx6dl_pins.h:31
arch/arm/include/asm/arch-mx6/mx6q_pins.h:1

The q_pins is outdate it seems.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/2] env_mmc: make board configurable the partition for the environment

2014-01-17 Thread Otavio Salvador
Hello Hector,

On Fri, Jan 17, 2014 at 7:14 AM, Hector Palacios
hector.palac...@digi.comwrote:

 This complements commit 9404a5fc7cb58 env_mmc: allow environment to be
 in an eMMC partition by allowing boards to accommodate the partition
 to use for the environment in different scenarios (similarly to what is
 done with the mmc dev number). Depending on the detected boot media,
 boards may decide to store the environment in a different partition.

 The __weak function also allows to remove some ifdefs from the code.
 If CONFIG_SYS_MMC_ENV_PART is not defined, partition 0 is assumed
 (default value for U-Boot when a partition is not provided).

 Signed-off-by: Hector Palacios hector.palac...@digi.com
 ---

 Notes:
 Changes since v1:
 - Use default define if not set

  common/env_mmc.c | 28 
  1 file changed, 16 insertions(+), 12 deletions(-)

 diff --git a/common/env_mmc.c b/common/env_mmc.c
 index 78c2bc7a1f08..570caf63aeae 100644
 --- a/common/env_mmc.c
 +++ b/common/env_mmc.c
 @@ -64,6 +64,14 @@ __weak int mmc_get_env_addr(struct mmc *mmc, int copy,
 u32 *env_addr)
  __weak int mmc_get_env_devno(void)
  {
 return CONFIG_SYS_MMC_ENV_DEV;
 +
 +#if !defined(CONFIG_SYS_MMC_ENV_PART)
 +#define CONFIG_SYS_MMC_ENV_PART 0
 +#endif


This should be in include/config_fallbacks.h

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/2] env_mmc: default to 0 if CONFIG_SYS_MMC_ENV_DEV not defined

2014-01-17 Thread Otavio Salvador
Hello Hector,

On Fri, Jan 17, 2014 at 7:14 AM, Hector Palacios
hector.palac...@digi.comwrote:

 Since function mmc_get_env_devno is __weak and can be overridden by
 board code, boards do not need to mandatory define
 CONFIG_SYS_MMC_ENV_DEV.
 If the constant is not defined, define it to 0 by default.

 Signed-off-by: Hector Palacios hector.palac...@digi.com
 ---

 Notes:
 Changes since v1:
 - Use default define if not set

  common/env_mmc.c | 5 +
  1 file changed, 5 insertions(+)

 diff --git a/common/env_mmc.c b/common/env_mmc.c
 index 570caf63aeae..c9df4c49e2b8 100644
 --- a/common/env_mmc.c
 +++ b/common/env_mmc.c
 @@ -61,9 +61,14 @@ __weak int mmc_get_env_addr(struct mmc *mmc, int copy,
 u32 *env_addr)
 return 0;
  }

 +#if !defined(CONFIG_SYS_MMC_ENV_DEV)
 +#define CONFIG_SYS_MMC_ENV_DEV 0
 +#endif
 +


Please move this to include/config_fallbacks.h


  __weak int mmc_get_env_devno(void)
  {
 return CONFIG_SYS_MMC_ENV_DEV;
 +}

  #if !defined(CONFIG_SYS_MMC_ENV_PART)
  #define CONFIG_SYS_MMC_ENV_PART 0




-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mx6: Revert mx6: soc: Disable VDDPU regulator

2014-01-16 Thread Otavio Salvador
Hello Fabio and Stefano,

On Thu, Jan 16, 2014 at 11:21 AM, Fabio Estevam feste...@gmail.com wrote:

 On Thu, Jan 16, 2014 at 11:06 AM, Stefano Babic sba...@denx.de wrote:

  Anyway, is it the fix known ? Should it be done in U-Boot or FSL-3.10
  kernel ?

 I have just started debugging, so I am not sure at this point.

 Internal FSL U-boot also disables VDDPU, but it does not cause the
 hang when GPU driver is loaded.


As I said the SabreSD case seems to be solvable adding support for the
PMIC. I did it for our customer board and it works however it does not
solve the case where the board does not have a PMIC. One of our customer is
in that case and for now I don't know a solution for it.

The PMIC way that has been done in FSL fork is quite ugly as it does not
use the PMIC API but can be used as a base for it.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mx6: Revert mx6: soc: Disable VDDPU regulator

2014-01-16 Thread Otavio Salvador
On Thu, Jan 16, 2014 at 1:42 PM, Fabio Estevam feste...@gmail.com wrote:

 On Thu, Jan 16, 2014 at 1:33 PM, Otavio Salvador
 ota...@ossystems.com.br wrote:

  As I said the SabreSD case seems to be solvable adding support for the
 PMIC.

 Have you really tried it? I tried adding PMIC support on sabresd and
 it did overcome the GPU hang.

  I did it for our customer board and it works however it does not solve
 the

 It worked for you probably because you used the ldo bypass mode.


Yes; I did the bypass mode.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mx6: Revert mx6: soc: Disable VDDPU regulator

2014-01-16 Thread Otavio Salvador
On Thu, Jan 16, 2014 at 2:01 PM, Fabio Estevam feste...@gmail.com wrote:

 On Thu, Jan 16, 2014 at 1:50 PM, Otavio Salvador
 ota...@ossystems.com.br wrote:

  It worked for you probably because you used the ldo bypass mode.
 
 
  Yes; I did the bypass mode.

 We currently don't do LDO bypass mode in mainline U-boot. We do it in
 FSL U-boot.

 With LDO bypass, lower VDDARM and VDDSOC voltages can be supplied as
 per the mx6 datasheet.

 I just measured with the scope and the VDDARM/SOC voltages supplied by
 the 3.10 FSL kernel are below the minimum for the LDO enabled case. So
 setting LDO bypass in U-boot 'fixes' the issue.

 We can implement LDO bypass after 2014.01 is out, but for this release
 let's just revert the VDDPU disable patch.

 Do you agree?


Yes I do.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mx6: Distinguish mx6dual from mx6quad

2014-01-16 Thread Otavio Salvador
Hello Fabio,

On Tue, Jan 14, 2014 at 9:55 AM, Fabio Estevam feste...@gmail.com wrote:

 From: Fabio Estevam fabio.este...@freescale.com

 Currently when we boot a mx6dual U-boot reports that it is a mx6quad.

 Report it as MX6D instead:

 CPU:   Freescale i.MX6D rev1.2 at 792 MHz

 Signed-off-by: Fabio Estevam fabio.este...@freescale.com
 Tested-by: Otavio Salvador ota...@ossystems.com.br


I have spot a build error using this patch and the fix is below:

diff --git a/arch/arm/include/asm/arch-mx5/sys_proto.h
b/arch/arm/include/asm/arch-mx5/sys_proto.h
index 9949ad1..7dacc4c 100644
--- a/arch/arm/include/asm/arch-mx5/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx5/sys_proto.h
@@ -14,6 +14,7 @@
 #define MXC_CPU_MX6DL  0x61
 #define MXC_CPU_MX6SOLO0x62
 #define MXC_CPU_MX6Q   0x63
+#define MXC_CPU_MX6D   0x64

 #define is_soc_rev(rev)((get_cpu_rev()  0xFF) - rev)
 u32 get_cpu_rev(void);

To reproduce the error, please use:

./MAKEALL -- mx51evk

Regards,

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 04/11] mx28evk: Set default environment to use zImage

2014-01-16 Thread Otavio Salvador
Change the default environment to use zImage instead of uImage, this
requires changes to the default environment to load a file named
zImage instead of uImage, and to use the 'bootz' command instead of
'bootm' when booting the kernel.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 include/configs/mx28evk.h | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 4fd67eb..9b9124a 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -198,7 +198,7 @@
else  \
setenv get_cmd tftp;  \
fi;  \
-   ${get_cmd} ${uimage};  \
+   ${get_cmd} ${image};  \
nand write ${loadaddr} kernel ${filesize}\0 \
update_nand_fdt=  /* Update fdt */ \
mtdparts default;  \
@@ -230,10 +230,10 @@
nand read ${loadaddr} kernel 0x0040;  \
if test ${boot_fdt} = yes; then  \
nand read ${fdt_addr} fdt 0x0008;  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = no; then  \
-   bootm;  \
+   bootz;  \
else  \
echo \ERROR: Set boot_fdt to yes or no.\;  \
fi;  \
@@ -248,7 +248,7 @@
fi ;  \
fi\0 \
script=boot.scr\0 \
-   uimage=uImage\0 \
+   image=zImage\0 \
console_fsl=ttyAM0\0 \
console_mainline=ttyAMA0\0 \
fdt_file=imx28-evk.dtb\0 \
@@ -264,22 +264,22 @@
fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
bootscript=echo Running bootscript from mmc ...;  \
source\0 \
-   loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \
+   loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0 \
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \
mmcboot=echo Booting from mmc ...;  \
run mmcargs;  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if run loadfdt; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0 \
netargs=setenv bootargs console=${console_mainline},${baudrate}  \
root=/dev/nfs  \
@@ -291,19 +291,19 @@
else  \
setenv get_cmd tftp;  \
fi;  \
-   ${get_cmd} ${uimage};  \
+   ${get_cmd} ${image};  \
if test ${boot_fdt} = yes; then  \
if ${get_cmd} ${fdt_addr} ${fdt_file}; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi; \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0
 
 #define CONFIG_BOOTCOMMAND \
@@ -311,7 +311,7 @@
if run loadbootscript; then  \
run bootscript;  \
else  \
-   if run loaduimage; then  \
+   if run loadimage; then  \
run mmcboot;  \
else run netboot;  \
fi;  \
-- 
1.8.5.2

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


[U-Boot] [PATCH 0/11] Change some boards to use zImage in default environment

2014-01-16 Thread Otavio Salvador

Hello,

This patchset does as stated in the subject. It has been build tested
as can be seen below:

Configuring for vf610twr - Board: vf610twr, Options: 
IMX_CONFIG=board/freescale/vf610twr/imximage.cfg
   textdata bss dec hex filename
 2033678666  212712  424745   67b29 ./u-boot
Configuring for udoo_quad - Board: udoo, Options: 
IMX_CONFIG=board/udoo/udoo.cfg,MX6Q,DDR_MB=1024
   textdata bss dec hex filename
 2174687882  218844  444194   6c722 ./u-boot
Configuring for mx6slevk - Board: mx6slevk, Options: 
IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL
   textdata bss dec hex filename
 1989647702  218568  425234   67d12 ./u-boot
Configuring for mx6qsabresd - Board: mx6sabresd, Options: 
IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg,MX6Q
   textdata bss dec hex filename
 252239   58938  219028  530205   8171d ./u-boot
Configuring for mx6qsabreauto - Board: mx6qsabreauto, Options: 
IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,MX6Q
   textdata bss dec hex filename
 2614339510  297784  568727   8ad97 ./u-boot
Configuring for mx6qarm2 - Board: mx6qarm2, Options: 
IMX_CONFIG=board/freescale/mx6qarm2/imximage.cfg
   textdata bss dec hex filename
 1920007414  218552  417966   660ae ./u-boot
Configuring for mx53loco - Board: mx53loco, Options: 
IMX_CONFIG=board/freescale/mx53loco/imximage.cfg
   textdata bss dec hex filename
 281391   19282  307156  607829   94655 ./u-boot
Configuring for mx51evk - Board: mx51evk, Options: 
IMX_CONFIG=board/freescale/mx51evk/imximage.cfg
   textdata bss dec hex filename
 268149   19126  301104  588379   8fa5b ./u-boot
Configuring for mx28evk - Board: mx28evk, Options: ENV_IS_IN_MMC
   textdata bss dec hex filename
 431361   33206  326384  790951   c11a7 ./u-boot
   6315 760   070751ba3 ./spl/u-boot-spl
Configuring for mx23evk board...
   textdata bss dec hex filename
 209197   18636  304284  532117   81e95 ./u-boot
   6307 164   064711947 ./spl/u-boot-spl
Configuring for hummingboard_solo - Board: hummingboard, Options: 
IMX_CONFIG=board/solidrun/hummingboard/solo.cfg,MX6S,DDR_MB=512
   textdata bss dec hex filename
 2096147878  236376  453868   6ecec ./u-boot
Configuring for cgtqmx6qeval - Board: cgtqmx6eval, Options: 
IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg,MX6Q
   textdata bss dec hex filename
 1863427506  218632  412480   64b40 ./u-boot

- SUMMARY 
Boards compiled: 12
--

Regards,


Otavio Salvador (11):
  cgtqmx6eval: Set default environment to use zImage
  hummingboard: Set default environment to use zImage
  mx23evk: Set default environment to use zImage
  mx28evk: Set default environment to use zImage
  mx51evk: Set default environment to use zImage
  mx53loco: Set default environment to use zImage
  mx6qarm2: Set default environment to use zImage
  mx6sabre_common: Set default environment to use zImage
  mx6slevk: Set default environment to use zImage
  udoo: Set default environment to use zImage
  vf610twr: Set default environment to use zImage

 include/configs/cgtqmx6eval.h | 14 +++---
 include/configs/hummingboard.h| 20 ++--
 include/configs/mx23evk.h | 12 ++--
 include/configs/mx28evk.h | 26 +-
 include/configs/mx51evk.h | 20 ++--
 include/configs/mx53loco.h| 20 ++--
 include/configs/mx6qarm2.h| 10 +-
 include/configs/mx6sabre_common.h | 20 ++--
 include/configs/mx6slevk.h| 20 ++--
 include/configs/udoo.h| 20 ++--
 include/configs/vf610twr.h| 20 ++--
 11 files changed, 101 insertions(+), 101 deletions(-)

-- 
1.8.5.2

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


[U-Boot] [PATCH 09/11] mx6slevk: Set default environment to use zImage

2014-01-16 Thread Otavio Salvador
Change the default environment to use zImage instead of uImage, this
requires changes to the default environment to load a file named
zImage instead of uImage, and to use the 'bootz' command instead of
'bootm' when booting the kernel.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 include/configs/mx6slevk.h | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/configs/mx6slevk.h b/include/configs/mx6slevk.h
index b29f78c..5d88dc4 100644
--- a/include/configs/mx6slevk.h
+++ b/include/configs/mx6slevk.h
@@ -76,7 +76,7 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
script=boot.scr\0 \
-   uimage=uImage\0 \
+   image=zImage\0 \
console=ttymxc0\0 \
fdt_high=0x\0 \
initrd_high=0x\0 \
@@ -93,22 +93,22 @@
fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
bootscript=echo Running bootscript from mmc ...;  \
source\0 \
-   loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \
+   loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0 \
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \
mmcboot=echo Booting from mmc ...;  \
run mmcargs;  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if run loadfdt; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0 \
netargs=setenv bootargs console=${console},${baudrate}  \
root=/dev/nfs  \
@@ -120,19 +120,19 @@
else  \
setenv get_cmd tftp;  \
fi;  \
-   ${get_cmd} ${uimage};  \
+   ${get_cmd} ${image};  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if ${get_cmd} ${fdt_addr} ${fdt_file}; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0
 
 #define CONFIG_BOOTCOMMAND \
@@ -141,7 +141,7 @@
   if run loadbootscript; then  \
   run bootscript;  \
   else  \
-  if run loaduimage; then  \
+  if run loadimage; then  \
   run mmcboot;  \
   else run netboot;  \
   fi;  \
-- 
1.8.5.2

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


[U-Boot] [PATCH 03/11] mx23evk: Set default environment to use zImage

2014-01-16 Thread Otavio Salvador
Change the default environment to use zImage instead of uImage, this
requires changes to the default environment to load a file named
zImage instead of uImage, and to use the 'bootz' command instead of
'bootm' when booting the kernel.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 include/configs/mx23evk.h | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/configs/mx23evk.h b/include/configs/mx23evk.h
index 1b40a36..b496892 100644
--- a/include/configs/mx23evk.h
+++ b/include/configs/mx23evk.h
@@ -84,7 +84,7 @@
fi ;  \
fi\0 \
script=boot.scr\0 \
-   uimage=uImage\0 \
+   image=zImage\0 \
console=ttyAMA0\0 \
fdt_file=imx23-evk.dtb\0 \
fdt_addr=0x4100\0 \
@@ -98,22 +98,22 @@
fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
bootscript=echo Running bootscript from mmc ...;  \
source\0 \
-   loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \
+   loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0 \
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \
mmcboot=echo Booting from mmc ...;  \
run mmcargs;  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if run loadfdt; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0
 
 #define CONFIG_BOOTCOMMAND \
@@ -121,7 +121,7 @@
if run loadbootscript; then  \
run bootscript;  \
else  \
-   if run loaduimage; then  \
+   if run loadimage; then  \
run mmcboot;  \
else  \
echo ERR: Fail to boot from MMC;  \
-- 
1.8.5.2

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


[U-Boot] [PATCH 10/11] udoo: Set default environment to use zImage

2014-01-16 Thread Otavio Salvador
Change the default environment to use zImage instead of uImage, this
requires changes to the default environment to load a file named
zImage instead of uImage, and to use the 'bootz' command instead of
'bootm' when booting the kernel.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 include/configs/udoo.h | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/configs/udoo.h b/include/configs/udoo.h
index 614e1fe..7f09489 100644
--- a/include/configs/udoo.h
+++ b/include/configs/udoo.h
@@ -100,7 +100,7 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
script=boot.scr\0 \
-   uimage=uImage\0 \
+   image=zImage\0 \
console=ttymxc1\0 \
splashpos=m,m\0 \
fdt_high=0x\0 \
@@ -132,22 +132,22 @@
fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
bootscript=echo Running bootscript from mmc ...;  \
source\0 \
-   loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \
+   loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0 \
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \
mmcboot=echo Booting from mmc ...;  \
run mmcargs;  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if run loadfdt; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0 \
netargs=setenv bootargs console=${console},${baudrate}  \
root=/dev/nfs  \
@@ -159,19 +159,19 @@
else  \
setenv get_cmd tftp;  \
fi;  \
-   ${get_cmd} ${uimage};  \
+   ${get_cmd} ${image};  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if ${get_cmd} ${fdt_addr} ${fdt_file}; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0
 
 #define CONFIG_BOOTCOMMAND \
@@ -179,7 +179,7 @@
   if run loadbootscript; then  \
   run bootscript;  \
   else  \
-  if run loaduimage; then  \
+  if run loadimage; then  \
   run mmcboot;  \
   else run netboot;  \
   fi;  \
-- 
1.8.5.2

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


[U-Boot] [PATCH 02/11] hummingboard: Set default environment to use zImage

2014-01-16 Thread Otavio Salvador
Change the default environment to use zImage instead of uImage, this
requires changes to the default environment to load a file named
zImage instead of uImage, and to use the 'bootz' command instead of
'bootm' when booting the kernel.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 include/configs/hummingboard.h | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/configs/hummingboard.h b/include/configs/hummingboard.h
index 4055af5..ac65620 100644
--- a/include/configs/hummingboard.h
+++ b/include/configs/hummingboard.h
@@ -92,7 +92,7 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
script=boot.scr\0 \
-   uimage=uImage\0 \
+   image=zImage\0 \
console=ttymxc0\0 \
splashpos=m,m\0 \
fdt_high=0x\0 \
@@ -124,22 +124,22 @@
fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
bootscript=echo Running bootscript from mmc ...;  \
source\0 \
-   loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \
+   loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0 \
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \
mmcboot=echo Booting from mmc ...;  \
run mmcargs;  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if run loadfdt; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0 \
netargs=setenv bootargs console=${console},${baudrate}  \
root=/dev/nfs  \
@@ -151,19 +151,19 @@
else  \
setenv get_cmd tftp;  \
fi;  \
-   ${get_cmd} ${uimage};  \
+   ${get_cmd} ${image};  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if ${get_cmd} ${fdt_addr} ${fdt_file}; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0
 
 #define CONFIG_BOOTCOMMAND \
@@ -171,7 +171,7 @@
   if run loadbootscript; then  \
   run bootscript;  \
   else  \
-  if run loaduimage; then  \
+  if run loadimage; then  \
   run mmcboot;  \
   else run netboot;  \
   fi;  \
-- 
1.8.5.2

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


[U-Boot] [PATCH 08/11] mx6sabre_common: Set default environment to use zImage

2014-01-16 Thread Otavio Salvador
Change the default environment to use zImage instead of uImage, this
requires changes to the default environment to load a file named
zImage instead of uImage, and to use the 'bootz' command instead of
'bootm' when booting the kernel.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 include/configs/mx6sabre_common.h | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/configs/mx6sabre_common.h 
b/include/configs/mx6sabre_common.h
index 5ee7fa5..4efcebf 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -119,7 +119,7 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
script=boot.scr\0 \
-   uimage=uImage\0 \
+   image=zImage\0 \
fdt_file= CONFIG_DEFAULT_FDT_FILE \0 \
fdt_addr=0x1800\0 \
boot_fdt=try\0 \
@@ -150,22 +150,22 @@
fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
bootscript=echo Running bootscript from mmc ...;  \
source\0 \
-   loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \
+   loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0 \
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \
mmcboot=echo Booting from mmc ...;  \
run mmcargs;  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if run loadfdt; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0 \
netargs=setenv bootargs console=${console},${baudrate}  \
root=/dev/nfs  \
@@ -177,19 +177,19 @@
else  \
setenv get_cmd tftp;  \
fi;  \
-   ${get_cmd} ${uimage};  \
+   ${get_cmd} ${image};  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if ${get_cmd} ${fdt_addr} ${fdt_file}; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0
 
 #define CONFIG_BOOTCOMMAND \
@@ -198,7 +198,7 @@
if run loadbootscript; then  \
run bootscript;  \
else  \
-   if run loaduimage; then  \
+   if run loadimage; then  \
run mmcboot;  \
else run netboot;  \
fi;  \
-- 
1.8.5.2

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


[U-Boot] [PATCH 01/11] cgtqmx6eval: Set default environment to use zImage

2014-01-16 Thread Otavio Salvador
Change the default environment to use zImage instead of uImage, this
requires changes to the default environment to load a file named
zImage instead of uImage, and to use the 'bootz' command instead of
'bootm' when booting the kernel.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 include/configs/cgtqmx6eval.h | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h
index 29a023c..b189bf1 100644
--- a/include/configs/cgtqmx6eval.h
+++ b/include/configs/cgtqmx6eval.h
@@ -75,7 +75,7 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
script=boot.scr\0 \
-   uimage=uImage\0 \
+   image=zImage\0 \
fdt_file= CONFIG_DEFAULT_FDT_FILE \0 \
boot_dir=/boot\0 \
console=ttymxc1\0 \
@@ -92,24 +92,24 @@
ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
bootscript=echo Running bootscript from mmc ...;  \
source\0 \
-   loaduimage=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr}  \
-   ${boot_dir}/${uimage}\0 \
+   loadimage=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr}  \
+   ${boot_dir}/${image}\0 \
loadfdt=ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr}  \
${boot_dir}/${fdt_file}\0 \
mmcboot=echo Booting from mmc ...;  \
run mmcargs;  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if run loadfdt; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0
 
 #define CONFIG_BOOTCOMMAND \
@@ -118,7 +118,7 @@
   if run loadbootscript; then  \
   run bootscript;  \
   else  \
-  if run loaduimage; then  \
+  if run loadimage; then  \
   run mmcboot;  \
   else \
   echo ERR: Fail to boot from mmc;  \
-- 
1.8.5.2

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


[U-Boot] [PATCH 06/11] mx53loco: Set default environment to use zImage

2014-01-16 Thread Otavio Salvador
Change the default environment to use zImage instead of uImage, this
requires changes to the default environment to load a file named
zImage instead of uImage, and to use the 'bootz' command instead of
'bootm' when booting the kernel.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 include/configs/mx53loco.h | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index ae43ea3..77f8567 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -103,7 +103,7 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
script=boot.scr\0 \
-   uimage=uImage\0 \
+   image=zImage\0 \
fdt_file=imx53-qsb.dtb\0 \
fdt_addr=0x7100\0 \
boot_fdt=try\0 \
@@ -116,22 +116,22 @@
fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
bootscript=echo Running bootscript from mmc ...;  \
source\0 \
-   loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \
+   loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0 \
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \
mmcboot=echo Booting from mmc ...;  \
run mmcargs;  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if run loadfdt; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0 \
netargs=setenv bootargs console=ttymxc0,${baudrate}  \
root=/dev/nfs  \
@@ -143,20 +143,20 @@
else  \
setenv get_cmd tftp;  \
fi;  \
-   ${get_cmd} ${uimage};  \
+   ${get_cmd} ${image};  \
if test ${boot_fdt} = yes ||  test ${boot_fdt} = try; then  \
if ${get_cmd} ${fdt_addr} ${fdt_file}; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo ERROR: Cannot load the DT;  \
exit;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0
 
 #define CONFIG_BOOTCOMMAND \
@@ -164,7 +164,7 @@
if run loadbootscript; then  \
run bootscript;  \
else  \
-   if run loaduimage; then  \
+   if run loadimage; then  \
run mmcboot;  \
else run netboot;  \
fi;  \
-- 
1.8.5.2

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


[U-Boot] [PATCH 11/11] vf610twr: Set default environment to use zImage

2014-01-16 Thread Otavio Salvador
Change the default environment to use zImage instead of uImage, this
requires changes to the default environment to load a file named
zImage instead of uImage, and to use the 'bootz' command instead of
'bootm' when booting the kernel.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 include/configs/vf610twr.h | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h
index 8d0a00d..500fd2f 100644
--- a/include/configs/vf610twr.h
+++ b/include/configs/vf610twr.h
@@ -81,7 +81,7 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
script=boot.scr\0 \
-   uimage=uImage\0 \
+   image=zImage\0 \
console=ttyLP1\0 \
fdt_high=0x\0 \
initrd_high=0x\0 \
@@ -112,22 +112,22 @@
fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
bootscript=echo Running bootscript from mmc ...;  \
source\0 \
-   loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \
+   loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0 \
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \
mmcboot=echo Booting from mmc ...;  \
run mmcargs;  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if run loadfdt; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0 \
netargs=setenv bootargs console=${console},${baudrate}  \
root=/dev/nfs  \
@@ -139,19 +139,19 @@
else  \
setenv get_cmd tftp;  \
fi;  \
-   ${get_cmd} ${uimage};  \
+   ${get_cmd} ${image};  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if ${get_cmd} ${fdt_addr} ${fdt_file}; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0
 
 #define CONFIG_BOOTCOMMAND \
@@ -159,7 +159,7 @@
   if run loadbootscript; then  \
   run bootscript;  \
   else  \
-  if run loaduimage; then  \
+  if run loadimage; then  \
   run mmcboot;  \
   else run netboot;  \
   fi;  \
-- 
1.8.5.2

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


[U-Boot] [PATCH 05/11] mx51evk: Set default environment to use zImage

2014-01-16 Thread Otavio Salvador
Change the default environment to use zImage instead of uImage, this
requires changes to the default environment to load a file named
zImage instead of uImage, and to use the 'bootz' command instead of
'bootm' when booting the kernel.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 include/configs/mx51evk.h | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
index 1cff171..b389475 100644
--- a/include/configs/mx51evk.h
+++ b/include/configs/mx51evk.h
@@ -143,7 +143,7 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
script=boot.scr\0 \
-   uimage=uImage\0 \
+   image=zImage\0 \
fdt_file=imx51-babbage.dtb\0 \
fdt_addr=0x9100\0 \
boot_fdt=try\0 \
@@ -157,22 +157,22 @@
fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
bootscript=echo Running bootscript from mmc ...;  \
source\0 \
-   loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \
+   loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0 \
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \
mmcboot=echo Booting from mmc ...;  \
run mmcargs;  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if run loadfdt; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0 \
netargs=setenv bootargs console=ttymxc0,${baudrate}  \
root=/dev/nfs  \
@@ -184,20 +184,20 @@
else  \
setenv get_cmd tftp;  \
fi;  \
-   ${get_cmd} ${uimage};  \
+   ${get_cmd} ${image};  \
if test ${boot_fdt} = yes ||  test ${boot_fdt} = try; then  \
if ${get_cmd} ${fdt_addr} ${fdt_file}; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo ERROR: Cannot load the DT;  \
exit;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0
 
 #define CONFIG_BOOTCOMMAND \
@@ -205,7 +205,7 @@
if run loadbootscript; then  \
run bootscript;  \
else  \
-   if run loaduimage; then  \
+   if run loadimage; then  \
run mmcboot;  \
else run netboot;  \
fi;  \
-- 
1.8.5.2

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


[U-Boot] [PATCH 07/11] mx6qarm2: Set default environment to use zImage

2014-01-16 Thread Otavio Salvador
Change the default environment to use zImage instead of uImage, this
requires changes to the default environment to load a file named
zImage instead of uImage, and to use the 'bootz' command instead of
'bootm' when booting the kernel.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---

 include/configs/mx6qarm2.h | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/configs/mx6qarm2.h b/include/configs/mx6qarm2.h
index f0a82d1..fd651cf 100644
--- a/include/configs/mx6qarm2.h
+++ b/include/configs/mx6qarm2.h
@@ -72,7 +72,7 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
script=boot.scr\0 \
-   uimage=uImage\0 \
+   image=zImage\0 \
console=ttymxc3\0 \
fdt_high=0x\0 \
initrd_high=0x\0 \
@@ -85,16 +85,16 @@
fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
bootscript=echo Running bootscript from mmc ...;  \
source\0 \
-   loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \
+   loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0 \
mmcboot=echo Booting from mmc ...;  \
run mmcargs;  \
-   bootm\0 \
+   bootz\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 \
+   dhcp ${image}; bootz\0 \
 
 #define CONFIG_BOOTCOMMAND \
mmc dev ${mmcdev}; \
@@ -102,7 +102,7 @@
if run loadbootscript; then  \
run bootscript;  \
else  \
-   if run loaduimage; then  \
+   if run loadimage; then  \
run mmcboot;  \
else run netboot;  \
fi;  \
-- 
1.8.5.2

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


Re: [U-Boot] [PATCH 1/2] env_mmc: make board configurable the partition for the environment

2014-01-15 Thread Otavio Salvador
Hello Hector,

On Wed, Jan 15, 2014 at 8:53 AM, Hector Palacios
hector.palac...@digi.comwrote:

 This complements commit 9404a5fc7cb58 env_mmc: allow environment to be
 in an eMMC partition by allowing boards to accommodate the partition
 to use for the environment in different scenarios (similarly to what is
 done with the mmc dev number). Depending on the detected boot media,
 boards may decide to store the environment in a different partition.

 The __weak function also allows to remove some ifdefs from the code.
 If CONFIG_SYS_MMC_ENV_PART is not defined, partition 0 is assumed
 (default value for U-Boot when a partition is not provided).

 Signed-off-by: Hector Palacios hector.palac...@digi.com
 CC: Stephen Warren swar...@nvidia.com
 CC: Andy Fleming aflem...@freescale.com
 ---
  common/env_mmc.c | 27 +++
  1 file changed, 15 insertions(+), 12 deletions(-)

 diff --git a/common/env_mmc.c b/common/env_mmc.c
 index 78c2bc7a1f08..d569b070e005 100644
 --- a/common/env_mmc.c
 +++ b/common/env_mmc.c
 @@ -64,6 +64,13 @@ __weak int mmc_get_env_addr(struct mmc *mmc, int copy,
 u32 *env_addr)
  __weak int mmc_get_env_devno(void)
  {
 return CONFIG_SYS_MMC_ENV_DEV;
 +
 +__weak int mmc_get_env_partno(void)
 +{
 +#ifdef CONFIG_SYS_MMC_ENV_PART
 +   return CONFIG_SYS_MMC_ENV_PART;
 +#endif
 +   return 0;


Maybe:

#ifndef CONFIG_SYS_MMC_ENV_PART
#define CONFIG_SYS_MMC_ENV_PART 0
#endif

__weak int mmc_get_env_partno(void)
{
return CONFIG_SYS_MMC_ENV_PART;
}

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] env_mmc: default to 0 if CONFIG_SYS_MMC_ENV_DEV not defined

2014-01-15 Thread Otavio Salvador
On Wed, Jan 15, 2014 at 8:53 AM, Hector Palacios
hector.palac...@digi.comwrote:

 Since function mmc_get_env_devno is __weak and can be overridden by
 board code, boards do not necessarily need to define
 CONFIG_SYS_MMC_ENV_DEV. If the constant is not defined, return 0 by
 default.

 Signed-off-by: Hector Palacios hector.palac...@digi.com


Maybe use same default define, if not set?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 6/6] mx6: soc: Disable VDDPU regulator

2014-01-15 Thread Otavio Salvador
Hello,

On Thu, Jan 9, 2014 at 7:31 PM, Stefano Babic sba...@denx.de wrote:

 On 09/01/2014 20:11, Otavio Salvador wrote:

 On Thu, Jan 9, 2014 at 5:06 PM, Fabio Estevam feste...@gmail.com
 mailto:feste...@gmail.com wrote:

 On Thu, Jan 9, 2014 at 3:50 PM, Otavio Salvador
 ota...@ossystems.com.br mailto:ota...@ossystems.com.br wrote:

   It seems this patch makes 3.10.17-1.0.0-beta freeze in a customer
 board;
   reverting this makes this to work again. It freezes when loading
 Vivante
   module.

 VDDPU is needed for using the GPU, so the kernel should turn on the
 VDDPU regulator.

 Looks like you are getting a kernel bug.

 It might be but shouldn't we delay this patch for now?


 Now or later it does not change. The correct behavior is done with the
 patch, and the kernel must turn power on. If it does not, the patch is
 needed for the kernel, not here.


I've been debugging to make 3.10 to work with this patch, but without
success...

I think this patch should be reverted and be added back to 2014.04 release
so we have more time to debug this.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 6/6] mx6: soc: Disable VDDPU regulator

2014-01-09 Thread Otavio Salvador
Hello,

On Thu, Dec 26, 2013 at 2:51 PM, Fabio Estevam feste...@gmail.com wrote:

 From: Fabio Estevam fabio.este...@freescale.com

 As U-boot does not use GPU/VPU peripherals, shutdown the VDDPU regulator
 in order to save power.

 Signed-off-by: Anson Huang b20...@freescale.com
 Signed-off-by: Jason Liu r64...@freescale.com
 Signed-off-by: Fabio Estevam fabio.este...@freescale.com


It seems this patch makes 3.10.17-1.0.0-beta freeze in a customer board;
reverting this makes this to work again. It freezes when loading Vivante
module.

Can someone reproduce this freeze?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 6/6] mx6: soc: Disable VDDPU regulator

2014-01-09 Thread Otavio Salvador
On Thu, Jan 9, 2014 at 5:06 PM, Fabio Estevam feste...@gmail.com wrote:

 On Thu, Jan 9, 2014 at 3:50 PM, Otavio Salvador ota...@ossystems.com.br
 wrote:

  It seems this patch makes 3.10.17-1.0.0-beta freeze in a customer board;
  reverting this makes this to work again. It freezes when loading Vivante
  module.

 VDDPU is needed for using the GPU, so the kernel should turn on the
 VDDPU regulator.

 Looks like you are getting a kernel bug.


It might be but shouldn't we delay this patch for now?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 6/6] mx6: soc: Disable VDDPU regulator

2014-01-09 Thread Otavio Salvador
On Thu, Jan 9, 2014 at 5:30 PM, Fabio Estevam feste...@gmail.com wrote:

 On Thu, Jan 9, 2014 at 5:13 PM, Fabio Estevam feste...@gmail.com wrote:
  On Thu, Jan 9, 2014 at 5:11 PM, Otavio Salvador ota...@ossystems.com.br
 wrote:
 
  It might be but shouldn't we delay this patch for now?
 
  I don't think so.
 
  Please post your dts file. Most likely you are using
 
  pu-supply = pu_dummy;
 
  where you should be using the internal vddpu instead.
 
  Also, please post your kernel log and make sure vddpu is being turned on.

 Please try this on your dts file:
 pu-supply = reg_pu;


Mine dts has:


gpu {
pu-supply = reg_pu;
};

The bootlog is at:

http://privatepaste.com/download/104a504b26

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/3] boards.cfg: Place - in the 8th field if it is the same as 7th

2014-01-08 Thread Otavio Salvador
Hello Masahiro,


On Tue, Jan 7, 2014 at 11:38 PM, Masahiro Yamada
yamad...@jp.panasonic.comwrote:

 The 8th field of boards.cfg takes the form:
  board config name[:comma separated config options]

 We should describe explicitely the 8th field only when it is necessary
 to do so.
 Specify - in the 8th field if it is the same as 7th field.

 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com


For mx23evk:

Acked-by: Otavio Salvador ota...@ossystems.com.br

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 3/3] wandboard: Set default environment to use zImage

2014-01-06 Thread Otavio Salvador
Hello Wolfgang,

On Fri, Jan 3, 2014 at 8:43 PM, Wolfgang Denk w...@denx.de wrote:
 Dear Otavio Salvador,

 In message 1388771903-8730-3-git-send-email-ota...@ossystems.com.br you 
 wrote:

 ...  There is no
 reason to continue using uImage for default environment.

 Sorry, but this There is no reason to continue using uImage is a
 phrase which challenges my protest.

 Actually switching from uImage to zImage is a serious deterioration.
 uImages have a number of properties that are extremely useful, and
 especially in embedded environments; none of these are available for
 zImages.  The only problem is that uImage support has never been
 correctly implemented in the ARM Linux kernel, and that fixes have
 never been accepted (for various [non-technical] reasons).

 Switching to zImage means to take the path of least resistance, and
 chose the worst of the possible solutions, technically.

 It would make much more sense to push forward and use FIT images,
 instead.

I understand FIT has many benefits against zImage but Wandboard
default should be as easy and trivial for use as possible; I can
rework the commit log one more time. See if below version is better:

   wandboard: Set default environment to use zImage

Change the default environment to use zImage instead of uImage, this
requires changes to the default environment to load a file named
zImage instead of uImage, and to use the 'bootz' command instead of
'bootm' when booting the kernel.

The zImage works for FSL Linux's kernel fork versions 3.0.35, 3.10.9,
and 3.10.17; this also works fine for mainline kernels.

Please reply and I send a new revision of the patch.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v5 3/3] wandboard: Set default environment to use zImage

2014-01-06 Thread Otavio Salvador
From: John Weber rjohnwe...@gmail.com

Change the default environment to use zImage instead of uImage, this
requires changes to the default environment to load a file named
zImage instead of uImage, and to use the 'bootz' command instead of
'bootm' when booting the kernel.

The zImage works for FSL Linux's kernel fork versions 3.0.35, 3.10.9,
and 3.10.17; this also works fine for mainline kernels.

Signed-off-by: John Weber rjohnwe...@gmail.com
Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---
Changes in v5:
- Rework commit log (wd)

Changes in v4: None
Changes in v3: None
Changes in v2:
- Rework commit log (wd)

 include/configs/wandboard.h | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index 5134b2e..3424124 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -115,7 +115,7 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
script=boot.scr\0 \
-   uimage=uImage\0 \
+   image=zImage\0 \
console=ttymxc0\0 \
splashpos=m,m\0 \
fdt_high=0x\0 \
@@ -173,22 +173,22 @@
fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0 \
bootscript=echo Running bootscript from mmc ...;  \
source\0 \
-   loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0 \
+   loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0 \
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0 \
mmcboot=echo Booting from mmc ...;  \
run mmcargs;  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if run loadfdt; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0 \
netargs=setenv bootargs console=${console},${baudrate}  \
root=/dev/nfs  \
@@ -200,19 +200,19 @@
else  \
setenv get_cmd tftp;  \
fi;  \
-   ${get_cmd} ${uimage};  \
+   ${get_cmd} ${image};  \
if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
if ${get_cmd} ${fdt_addr} ${fdt_file}; then  \
-   bootm ${loadaddr} - ${fdt_addr};  \
+   bootz ${loadaddr} - ${fdt_addr};  \
else  \
if test ${boot_fdt} = try; then  \
-   bootm;  \
+   bootz;  \
else  \
echo WARN: Cannot load the DT;  \
fi;  \
fi;  \
else  \
-   bootm;  \
+   bootz;  \
fi;\0
 
 #define CONFIG_BOOTCOMMAND \
@@ -220,7 +220,7 @@
   if run loadbootscript; then  \
   run bootscript;  \
   else  \
-  if run loaduimage; then  \
+  if run loadimage; then  \
   run mmcboot;  \
   else run netboot;  \
   fi;  \
-- 
1.8.5.2

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


[U-Boot] [PATCH v5 1/3] mx6sabresd: Add eMMC specific environment to allow U-Boot update

2014-01-06 Thread Otavio Salvador
A new 'update_emmc_firmware' target is added to allow for easy U-Boot
update in the eMMC as it has secury boot partition and this needs
specific handling on how to program the specific partition.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---
Changes in v5: None
Changes in v4:
- Fix compilation error (Stefano)

Changes in v3: None
Changes in v2: None

 include/configs/mx6sabre_common.h | 23 +++
 include/configs/mx6sabresd.h  |  2 ++
 2 files changed, 25 insertions(+)

diff --git a/include/configs/mx6sabre_common.h 
b/include/configs/mx6sabre_common.h
index 21c848f..5ee7fa5 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -95,6 +95,28 @@
 #define CONFIG_LOADADDR0x1200
 #define CONFIG_SYS_TEXT_BASE   0x1780
 
+#ifdef CONFIG_SUPPORT_EMMC_BOOT
+#define EMMC_ENV \
+   emmcdev=2\0 \
+   update_emmc_firmware= \
+   if test ${ip_dyn} = yes; then  \
+   setenv get_cmd dhcp;  \
+   else  \
+   setenv get_cmd tftp;  \
+   fi;  \
+   if ${get_cmd} ${update_sd_firmware_filename}; then  \
+   if mmc dev ${emmcdev}   \
+   mmc open ${emmcdev} 1; then   \
+   setexpr fw_sz ${filesize} / 0x200;  \
+   setexpr fw_sz ${fw_sz} + 1;   \
+   mmc write ${loadaddr} 0x2 ${fw_sz};  \
+   mmc close ${emmcdev} 1;  \
+   fi;   \
+   fi\0
+#else
+#define EMMC_ENV 
+#endif
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
script=boot.scr\0 \
uimage=uImage\0 \
@@ -121,6 +143,7 @@
mmc write ${loadaddr} 0x2 ${fw_sz};  \
fi;   \
fi\0 \
+   EMMC_ENV  \
mmcargs=setenv bootargs console=${console},${baudrate}  \
root=${mmcroot}\0 \
loadbootscript= \
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index 3229bc7..4919f53 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -23,6 +23,8 @@
 #endif
 #define PHYS_SDRAM_SIZE(1u * 1024 * 1024 * 1024)
 
+#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
+
 #include mx6sabre_common.h
 
 #define CONFIG_SYS_FSL_USDHC_NUM   3
-- 
1.8.5.2

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


[U-Boot] [PATCH v5 2/3] wandboard: add Future Eletronics 7 WVGA LCD extension board

2014-01-06 Thread Otavio Salvador
This adds support for the 7 WVGA produced by Future Eletronics and
make it dynamically detect if it is connected or not based on the
touchscreen controller.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---
Changes in v5: None
Changes in v4: None
Changes in v3:
- rebased on imx/master

Changes in v2: None

 board/wandboard/wandboard.c | 240 +++-
 include/configs/wandboard.h |  35 ++-
 2 files changed, 251 insertions(+), 24 deletions(-)

diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index 0043bc6..7debf30 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -15,6 +15,7 @@
 #include asm/arch/sys_proto.h
 #include asm/gpio.h
 #include asm/imx-common/iomux-v3.h
+#include asm/imx-common/mxc_i2c.h
 #include asm/imx-common/boot_mode.h
 #include asm/io.h
 #include asm/sizes.h
@@ -25,6 +26,7 @@
 #include miiphy.h
 #include netdev.h
 #include linux/fb.h
+#include i2c.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -39,6 +41,10 @@ DECLARE_GLOBAL_DATA_PTR;
 #define ENET_PAD_CTRL  (PAD_CTL_PUS_100K_UP |  \
PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS)
 
+#define I2C_PAD_CTRL   (PAD_CTL_PUS_100K_UP |  \
+   PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS |   \
+   PAD_CTL_ODE | PAD_CTL_SRE_FAST)
+
 #define USDHC1_CD_GPIO IMX_GPIO_NR(1, 2)
 #define USDHC3_CD_GPIO IMX_GPIO_NR(3, 9)
 #define ETH_PHY_RESET  IMX_GPIO_NR(3, 29)
@@ -208,50 +214,236 @@ int board_phy_config(struct phy_device *phydev)
 }
 
 #if defined(CONFIG_VIDEO_IPUV3)
-static struct fb_videomode const hdmi = {
-   .name   = HDMI,
-   .refresh= 60,
-   .xres   = 1024,
-   .yres   = 768,
-   .pixclock   = 15385,
-   .left_margin= 220,
-   .right_margin   = 40,
-   .upper_margin   = 21,
-   .lower_margin   = 7,
-   .hsync_len  = 60,
-   .vsync_len  = 10,
-   .sync   = FB_SYNC_EXT,
-   .vmode  = FB_VMODE_NONINTERLACED
+struct i2c_pads_info i2c_pad_info = {
+   .scl = {
+   .i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gpio_mode = MX6_PAD_KEY_COL3__GPIO4_IO12
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gp = IMX_GPIO_NR(4, 12)
+   },
+   .sda = {
+   .i2c_mode = MX6_PAD_KEY_ROW3__I2C2_SDA
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gpio_mode = MX6_PAD_KEY_ROW3__GPIO4_IO13
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gp = IMX_GPIO_NR(4, 13)
+   }
 };
 
-int board_video_skip(void)
-{
-   int ret;
+static iomux_v3_cfg_t const fwadapt_7wvga_pads[] = {
+   MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,
+   MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02, /* HSync */
+   MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03, /* VSync */
+   MX6_PAD_DI0_PIN4__IPU1_DI0_PIN04
+   | MUX_PAD_CTRL(PAD_CTL_DSE_120ohm), /* Contrast */
+   MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15, /* DISP0_DRDY */
+
+   MX6_PAD_DISP0_DAT0__IPU1_DISP0_DATA00,
+   MX6_PAD_DISP0_DAT1__IPU1_DISP0_DATA01,
+   MX6_PAD_DISP0_DAT2__IPU1_DISP0_DATA02,
+   MX6_PAD_DISP0_DAT3__IPU1_DISP0_DATA03,
+   MX6_PAD_DISP0_DAT4__IPU1_DISP0_DATA04,
+   MX6_PAD_DISP0_DAT5__IPU1_DISP0_DATA05,
+   MX6_PAD_DISP0_DAT6__IPU1_DISP0_DATA06,
+   MX6_PAD_DISP0_DAT7__IPU1_DISP0_DATA07,
+   MX6_PAD_DISP0_DAT8__IPU1_DISP0_DATA08,
+   MX6_PAD_DISP0_DAT9__IPU1_DISP0_DATA09,
+   MX6_PAD_DISP0_DAT10__IPU1_DISP0_DATA10,
+   MX6_PAD_DISP0_DAT11__IPU1_DISP0_DATA11,
+   MX6_PAD_DISP0_DAT12__IPU1_DISP0_DATA12,
+   MX6_PAD_DISP0_DAT13__IPU1_DISP0_DATA13,
+   MX6_PAD_DISP0_DAT14__IPU1_DISP0_DATA14,
+   MX6_PAD_DISP0_DAT15__IPU1_DISP0_DATA15,
+   MX6_PAD_DISP0_DAT16__IPU1_DISP0_DATA16,
+   MX6_PAD_DISP0_DAT17__IPU1_DISP0_DATA17,
+
+   MX6_PAD_SD4_DAT2__GPIO2_IO10
+   | MUX_PAD_CTRL(NO_PAD_CTRL), /* DISP0_BKLEN */
+   MX6_PAD_SD4_DAT3__GPIO2_IO11
+   | MUX_PAD_CTRL(NO_PAD_CTRL), /* DISP0_VDDEN */
+};
 
-   ret = ipuv3_fb_init(hdmi, 0, IPU_PIX_FMT_RGB24);
+struct display_info_t {
+   int bus;
+   int addr;
+   int pixfmt;
+   int (*detect)(struct display_info_t const *dev);
+   void(*enable)(struct display_info_t const *dev);
+   struct  fb_videomode mode;
+};
 
-   if (ret) {
-   printf(HDMI cannot be configured: %d\n, ret);
-   return ret;
-   }
+static int detect_hdmi(struct display_info_t const *dev)
+{
+   struct hdmi_regs *hdmi  = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
+   return readb(hdmi-phy_stat0)  HDMI_DVI_STAT;
+}
 
+static void do_enable_hdmi(struct display_info_t const *dev)
+{
imx_enable_hdmi_phy();
+}
 
-   return ret;
+static int detect_i2c(struct display_info_t const *dev

Re: [U-Boot] Are mmc open/close subcommands needed?

2014-01-03 Thread Otavio Salvador
On Thu, Jan 2, 2014 at 9:36 PM, Marek Vasut ma...@denx.de wrote:
 On Thursday, January 02, 2014 at 05:53:00 PM, Hector Palacios wrote:
 Hi,

 I saw commit 2a91c9134675140853577b565210458b5774e6cf that introduces mmc
 subcommands 'open' and 'close' to access eMMC boot partitions and was
 wondering if they are really needed. Can't the same be achieved with
 already existing 'mmc dev [dev] [part]' command?

 mmc open dev boot_partition
   is the same as
 mmc dev dev part
   where part is the boot partition

 mmc close dev boot_partition
   is the same as
 mmc dev dev 0
   as a 0 will switch to partition 0 (user data).

 Best regards,
 --
 Hector Palacios

 +CC Panto

No; this is for different use.

The open and close are to open the Boot partitions part of eMMC 4; by
default those eMMC will be using the user partitions, not the boot
area.

The nice, and confusing thing, is that those boot partitions also
start in address 0 as a 'virtual disk'.


-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/8] wandboard: add Future Eletronics 7 WVGA LCD extension board

2014-01-03 Thread Otavio Salvador
Hello Stefano,

On Thu, Dec 19, 2013 at 8:36 AM, Stefano Babic sba...@denx.de wrote:
 one minor point.

 On 16/12/2013 23:43, Otavio Salvador wrote:

 +int board_video_skip(void)
 +{
 + int i;
 + int ret;
 + int detected = 0;
 + char const *panel = getenv(panel);
 + if (!panel) {
 + for (i = 0; i  ARRAY_SIZE(displays); i++) {
 + struct display_info_t const *dev = displays+i;
 + if (dev-detect  dev-detect(dev)) {
 + panel = dev-mode.name;
 + detected = 1;
 + break;
 + }
 + }
 + if (!panel) {
 + panel = displays[0].mode.name;
 + printf(No panel detected: default to %s\n, panel);
 + i = 0;
 + }
 + } else {
 + for (i = 0; i  ARRAY_SIZE(displays); i++) {
 + if (!strcmp(panel, displays[i].mode.name))
 + break;
 + }
 + }
 + if (i  ARRAY_SIZE(displays)) {
 + ret = ipuv3_fb_init(displays[i].mode, 0,
 + displays[i].pixfmt);
 +
 + if (!ret) {
 + displays[i].enable(displays+i);
 + printf(Display: %s (%ux%u) %s\n,
 +displays[i].mode.name,
 +displays[i].mode.xres,
 +displays[i].mode.yres,
 +(detected ? [auto] : ));
 + } else
 + printf(LCD %s cannot be configured: %d\n,
 +displays[i].mode.name, ret);
 + } else {
 + printf(unsupported panel %s\n, panel);
 + return -EINVAL;
 + }
 +
 + return 0;
  }


 This is identical to the nitrogen one, and quite identical to the same
 function in sabresd. Or better, function in sabresd is older and has not
 received the fixes as nitrogen (line with dev-detect).

 IMHO the function is generic to be factorized. The display_info_t
 structure lets us to specialize the behavior for each board, and the
 generic part can be put in a common part.
...

 This function is also quite identical to all boards.You add here only
 the disable of the LCD backlight. I can recognize some parts, that are
 surely common to all implementations (enabling clocks). Even if the
 setup of gpr[2]/[3] is identical, I can imagine that it could be board
 specific. Anyway, any chance to factorize the code ?

I agree with both remarks but I think we're late in the release cycle
for this kind of refactoring; I prefer to merge this patch as is for
now and send a patch, on top of this one, to rework this.

Can we go further this way? I am awaiting for this patch to be
merged/reviewed for quite a while already.

 diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
 index e9c7e64..85f3c16 100644
 --- a/include/configs/wandboard.h
 +++ b/include/configs/wandboard.h
 @@ -55,6 +55,12 @@
  #define CONFIG_LOADADDR  0x1200
  #define CONFIG_SYS_TEXT_BASE 0x1780

 +/* I2C Configs */
 +#define CONFIG_CMD_I2C
 +#define CONFIG_SYS_I2C
 +#define CONFIG_SYS_I2C_MXC
 +#define CONFIG_SYS_I2C_SPEED 10
 +
  /* MMC Configuration */
  #define CONFIG_FSL_ESDHC
  #define CONFIG_FSL_USDHC
 @@ -97,6 +103,7 @@
  #define CONFIG_VIDEO_LOGO
  #define CONFIG_VIDEO_BMP_LOGO
  #define CONFIG_IPUV3_CLK 26000
 +#define CONFIG_CMD_HDMIDETECT
  #define CONFIG_IMX_HDMI

  #if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
 @@ -134,7 +141,33 @@
   fi;   \
   fi\0 \
   mmcargs=setenv bootargs console=${console},${baudrate}  \
 - root=${mmcroot}\0 \
 + root=${mmcroot}; run videoargs\0 \
 + videoargs= \
 + setenv nextcon 0;  \
 + if hdmidet; then  \
 + setenv bootargs ${bootargs}  \
 + video=mxcfb${nextcon}:dev=hdmi,1280x720M@60, 
 \
 + if=RGB24;  \
 + setenv fbmen fbmem=28M;  \
 + setexpr nextcon ${nextcon} + 1;  \
 + else  \
 + echo - no HDMI monitor; \
 + fi;  \
 + i2c dev 0;  \
 + if i2c probe 0x10; then  \
 + setenv bootargs ${bootargs}  \
 + video=mxcfb${nextcon}:dev=lcd,800x480@60, \
 + if=RGB666;  \

 Why do we need this ? The kernel should get the setup for display from
 DTS (display-timings node). Do you need to short-circuit DTS setup ?

Current kernel still does not use DTS (it is based on 3.0.35 FSL fork).

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile

[U-Boot] [PATCH v4 2/3] wandboard: add Future Eletronics 7 WVGA LCD extension board

2014-01-03 Thread Otavio Salvador
This adds support for the 7 WVGA produced by Future Eletronics and
make it dynamically detect if it is connected or not based on the
touchscreen controller.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---
Changes in v4: None
Changes in v3:
- rebased on imx/master

Changes in v2: None

 board/wandboard/wandboard.c | 240 +++-
 include/configs/wandboard.h |  35 ++-
 2 files changed, 251 insertions(+), 24 deletions(-)

diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index 0043bc6..7debf30 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -15,6 +15,7 @@
 #include asm/arch/sys_proto.h
 #include asm/gpio.h
 #include asm/imx-common/iomux-v3.h
+#include asm/imx-common/mxc_i2c.h
 #include asm/imx-common/boot_mode.h
 #include asm/io.h
 #include asm/sizes.h
@@ -25,6 +26,7 @@
 #include miiphy.h
 #include netdev.h
 #include linux/fb.h
+#include i2c.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -39,6 +41,10 @@ DECLARE_GLOBAL_DATA_PTR;
 #define ENET_PAD_CTRL  (PAD_CTL_PUS_100K_UP |  \
PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS)
 
+#define I2C_PAD_CTRL   (PAD_CTL_PUS_100K_UP |  \
+   PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS |   \
+   PAD_CTL_ODE | PAD_CTL_SRE_FAST)
+
 #define USDHC1_CD_GPIO IMX_GPIO_NR(1, 2)
 #define USDHC3_CD_GPIO IMX_GPIO_NR(3, 9)
 #define ETH_PHY_RESET  IMX_GPIO_NR(3, 29)
@@ -208,50 +214,236 @@ int board_phy_config(struct phy_device *phydev)
 }
 
 #if defined(CONFIG_VIDEO_IPUV3)
-static struct fb_videomode const hdmi = {
-   .name   = HDMI,
-   .refresh= 60,
-   .xres   = 1024,
-   .yres   = 768,
-   .pixclock   = 15385,
-   .left_margin= 220,
-   .right_margin   = 40,
-   .upper_margin   = 21,
-   .lower_margin   = 7,
-   .hsync_len  = 60,
-   .vsync_len  = 10,
-   .sync   = FB_SYNC_EXT,
-   .vmode  = FB_VMODE_NONINTERLACED
+struct i2c_pads_info i2c_pad_info = {
+   .scl = {
+   .i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gpio_mode = MX6_PAD_KEY_COL3__GPIO4_IO12
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gp = IMX_GPIO_NR(4, 12)
+   },
+   .sda = {
+   .i2c_mode = MX6_PAD_KEY_ROW3__I2C2_SDA
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gpio_mode = MX6_PAD_KEY_ROW3__GPIO4_IO13
+   | MUX_PAD_CTRL(I2C_PAD_CTRL),
+   .gp = IMX_GPIO_NR(4, 13)
+   }
 };
 
-int board_video_skip(void)
-{
-   int ret;
+static iomux_v3_cfg_t const fwadapt_7wvga_pads[] = {
+   MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,
+   MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02, /* HSync */
+   MX6_PAD_DI0_PIN3__IPU1_DI0_PIN03, /* VSync */
+   MX6_PAD_DI0_PIN4__IPU1_DI0_PIN04
+   | MUX_PAD_CTRL(PAD_CTL_DSE_120ohm), /* Contrast */
+   MX6_PAD_DI0_PIN15__IPU1_DI0_PIN15, /* DISP0_DRDY */
+
+   MX6_PAD_DISP0_DAT0__IPU1_DISP0_DATA00,
+   MX6_PAD_DISP0_DAT1__IPU1_DISP0_DATA01,
+   MX6_PAD_DISP0_DAT2__IPU1_DISP0_DATA02,
+   MX6_PAD_DISP0_DAT3__IPU1_DISP0_DATA03,
+   MX6_PAD_DISP0_DAT4__IPU1_DISP0_DATA04,
+   MX6_PAD_DISP0_DAT5__IPU1_DISP0_DATA05,
+   MX6_PAD_DISP0_DAT6__IPU1_DISP0_DATA06,
+   MX6_PAD_DISP0_DAT7__IPU1_DISP0_DATA07,
+   MX6_PAD_DISP0_DAT8__IPU1_DISP0_DATA08,
+   MX6_PAD_DISP0_DAT9__IPU1_DISP0_DATA09,
+   MX6_PAD_DISP0_DAT10__IPU1_DISP0_DATA10,
+   MX6_PAD_DISP0_DAT11__IPU1_DISP0_DATA11,
+   MX6_PAD_DISP0_DAT12__IPU1_DISP0_DATA12,
+   MX6_PAD_DISP0_DAT13__IPU1_DISP0_DATA13,
+   MX6_PAD_DISP0_DAT14__IPU1_DISP0_DATA14,
+   MX6_PAD_DISP0_DAT15__IPU1_DISP0_DATA15,
+   MX6_PAD_DISP0_DAT16__IPU1_DISP0_DATA16,
+   MX6_PAD_DISP0_DAT17__IPU1_DISP0_DATA17,
+
+   MX6_PAD_SD4_DAT2__GPIO2_IO10
+   | MUX_PAD_CTRL(NO_PAD_CTRL), /* DISP0_BKLEN */
+   MX6_PAD_SD4_DAT3__GPIO2_IO11
+   | MUX_PAD_CTRL(NO_PAD_CTRL), /* DISP0_VDDEN */
+};
 
-   ret = ipuv3_fb_init(hdmi, 0, IPU_PIX_FMT_RGB24);
+struct display_info_t {
+   int bus;
+   int addr;
+   int pixfmt;
+   int (*detect)(struct display_info_t const *dev);
+   void(*enable)(struct display_info_t const *dev);
+   struct  fb_videomode mode;
+};
 
-   if (ret) {
-   printf(HDMI cannot be configured: %d\n, ret);
-   return ret;
-   }
+static int detect_hdmi(struct display_info_t const *dev)
+{
+   struct hdmi_regs *hdmi  = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
+   return readb(hdmi-phy_stat0)  HDMI_DVI_STAT;
+}
 
+static void do_enable_hdmi(struct display_info_t const *dev)
+{
imx_enable_hdmi_phy();
+}
 
-   return ret;
+static int detect_i2c(struct display_info_t const *dev)
+{
+   return

<    2   3   4   5   6   7   8   9   10   11   >