Re: [U-Boot] 2017.05-RC3 hanging on DM3730

2017-05-04 Thread Heiko Schocher

Hello Adam,

Am 04.05.2017 um 23:06 schrieb Adam Ford:

Tom,

I re-synced my U-boot trunk today and did a clean build and found that
SPL isn't able to load U-Boot.

U-Boot SPL 2017.05-rc3 (May 04 2017 - 15:48:21)


I haven't had a chance yet to bisect the issue.  Do you know when you
plan to do the 2017.05 release?  I'd like to try and locate the issue
before the final release.


May you want to try tbot [1]? It has a testcase with which you can
git bisect automagically [2]

Ok, tbot setup is not done in a second... but may you find some time
to look into it...

bye,
Heiko
[1] https://github.com/hsdenx/tbot
http://www.tbot.tools/main.html
[2] https://github.com/hsdenx/tbot/blob/master/src/tc/tc_board_git_bisect.py
[3] log for an automated git bisect on tqm5200 board with BDI attached

http://xeidos.ddns.net/buildbot/builders/tqm5200s/builds/3/steps/shell/logs/tbotlog
--
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v4] spl: add support to booting with ATF

2017-05-04 Thread Kever Yang
ATF(ARM Trusted Firmware) is used by ARM arch64 SoCs, find more infomation
about ATF at: https://github.com/ARM-software/arm-trusted-firmware

SPL is considered as BL2 in ATF terminology, it needs to load other parts
of ATF binary like BL31, BL32, SCP-BL30, and BL33(U-Boot). And needs to
prepare the parameter for BL31 which including entry and image information
for all other images. Then the SPL handle PC to BL31 with the parameter,
the BL31 will do the rest of work and at last get into U-Boot(BL33).

This patch needs work with patches from Andre for SPL support multi
binary in FIT.

The entry point of bl31 and bl33 are still using hard code because we
still can not get them from the FIT image information.

Signed-off-by: Kever Yang 
---

Changes in v4:
- fix description in Kconfig
- add debug log before get into ATF BL31
- remove '_t' postfix for structure define

Changes in v3:
- remove no neccessary Macro definition in header file.
- rename some Macro with 'ATF_' prefix.

Changes in v2:
- Kconfig comment update with Simon's suggestion
- including file ordering,
- update function comment format,
- use 'if' instead of '#ifdef' for bl31_entry
- add ATF Kconfig option depend on ARM64

Changes in v1:
- license update
- split out as separate patch

 common/spl/Kconfig   |  14 
 common/spl/Makefile  |   1 +
 common/spl/spl.c |   5 ++
 common/spl/spl_atf.c |  97 +++
 include/atf_common.h | 183 +++
 include/spl.h|   1 +
 6 files changed, 301 insertions(+)
 create mode 100644 common/spl/spl_atf.c
 create mode 100644 include/atf_common.h

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index ea6fbb6..90c3c38 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -688,6 +688,20 @@ config SPL_YMODEM_SUPPORT
  means of transmitting U-Boot over a serial line for using in SPL,
  with a checksum to ensure correctness.
 
+config SPL_ATF_SUPPORT
+   bool "Support ARM Trusted Firmware"
+   depends on SPL && ARM64
+   help
+ ATF(ARM Trusted Firmware) is a component for ARM arch64 which which
+ is loaded by SPL(which is considered as BL2 in ATF terminology).
+ More detail at: https://github.com/ARM-software/arm-trusted-firmware
+
+config SPL_ATF_TEXT_BASE
+   depends on SPL_ATF_SUPPORT
+   hex "ATF BL31 base address"
+   help
+ This is the base address in memory for ATF BL31 text and entry point.
+
 config TPL_ENV_SUPPORT
bool "Support an environment"
depends on TPL
diff --git a/common/spl/Makefile b/common/spl/Makefile
index 1933cbd..b3b34d6 100644
--- a/common/spl/Makefile
+++ b/common/spl/Makefile
@@ -20,6 +20,7 @@ endif
 obj-$(CONFIG_SPL_UBI) += spl_ubi.o
 obj-$(CONFIG_SPL_NET_SUPPORT) += spl_net.o
 obj-$(CONFIG_SPL_MMC_SUPPORT) += spl_mmc.o
+obj-$(CONFIG_SPL_ATF_SUPPORT) += spl_atf.o
 obj-$(CONFIG_SPL_USB_SUPPORT) += spl_usb.o
 obj-$(CONFIG_SPL_FAT_SUPPORT) += spl_fat.o
 obj-$(CONFIG_SPL_EXT_SUPPORT) += spl_ext.o
diff --git a/common/spl/spl.c b/common/spl/spl.c
index a3e73b8..97f1163 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -372,6 +372,11 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
  gd->malloc_ptr / 1024);
 #endif
 
+   if (IS_ENABLED(CONFIG_SPL_ATF_SUPPORT)) {
+   debug("loaded - jumping to U-Boot via ATF BL31.\n");
+   bl31_entry();
+   }
+
debug("loaded - jumping to U-Boot...\n");
spl_board_prepare_for_boot();
jump_to_image_no_args(_image);
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
new file mode 100644
index 000..6e8f928
--- /dev/null
+++ b/common/spl/spl_atf.c
@@ -0,0 +1,97 @@
+/*
+ * Reference to the ARM TF Project,
+ * plat/arm/common/arm_bl2_setup.c
+ * Portions copyright (c) 2013-2016, ARM Limited and Contributors. All rights
+ * reserved.
+ * Copyright (C) 2016 Rockchip Electronic Co.,Ltd
+ * Written by Kever Yang 
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+static struct bl2_to_bl31_params_mem bl31_params_mem;
+static struct bl31_params *bl2_to_bl31_params;
+
+/**
+ * bl2_plat_get_bl31_params() - prepare params for bl31.
+ *
+ * This function assigns a pointer to the memory that the platform has kept
+ * aside to pass platform specific and trusted firmware related information
+ * to BL31. This memory is allocated by allocating memory to
+ * bl2_to_bl31_params_mem structure which is a superset of all the
+ * structure whose information is passed to BL31
+ * NOTE: This function should be called only once and should be done
+ * before generating params to BL31
+ *
+ * @return bl31 params structure pointer
+ */
+struct bl31_params *bl2_plat_get_bl31_params(void)
+{
+   struct entry_point_info *bl33_ep_info;
+
+   /*
+* Initialise the memory for all the arguments that needs to
+* be passed 

Re: [U-Boot] [PATCH v3] spl: add support to booting with ATF

2017-05-04 Thread Kever Yang

Hi


On 04/06/2017 12:40 AM, Masahiro Yamada wrote:

Hi.


2017-04-05 14:05 GMT+09:00 Kever Yang :


--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -670,6 +670,20 @@ config SPL_YMODEM_SUPPORT
   means of transmitting U-Boot over a serial line for using in SPL,
   with a checksum to ensure correctness.

+config SPL_ATF_SUPPORT
+   bool "Support ARM Trusted Firmware"
+   depends on SPL && ARM64
+   help
+ ATF(ARM Trusted Firmware) is a component for ARM arch64 which which
+ is loaded by SPL(which is considered as BL2 in ATF terminology).
+ More detail at: https://github.com/ARM-software/arm-trusted-firmware

This statement may not be precise.
ATF supports Aarch32 as well as Aarch64.


I thik this is just U-Boot side matter.
As far as I understood from the U-Boot directory structure
(I only see Aarch64 code in arch/arm/cpu/armv8),
U-Boot does not expect 32bit ARM code in ARMv8 generation
(such as Cortex-A32, Coretex-A35, ...).
As for U-Boot, ARM64 == ARMV8
unless I am missing something.


I would like to leave it as is now, people can remove this if there is 
aarch32 want to

support ATF, at least I didn't see any of them now.




+config SPL_ATF_TEXT_BASE
+   depends on SPL_ATF_SUPPORT
+   hex "ATF TEXT BASE addr"

hex "ATF BL31 base address"


Will fix, thanks.





+   help
+ This is the base address in memory for ATF text and entry point.

I'd like you to mention "BL31" explicitly
because there are many images in ATF.


Will fix, thanks.





  config TPL_ENV_SUPPORT
 bool "Support an environment"
 depends on TPL
diff --git a/common/spl/Makefile b/common/spl/Makefile
index 1933cbd..b3b34d6 100644
--- a/common/spl/Makefile
+++ b/common/spl/Makefile
@@ -20,6 +20,7 @@ endif
  obj-$(CONFIG_SPL_UBI) += spl_ubi.o
  obj-$(CONFIG_SPL_NET_SUPPORT) += spl_net.o
  obj-$(CONFIG_SPL_MMC_SUPPORT) += spl_mmc.o
+obj-$(CONFIG_SPL_ATF_SUPPORT) += spl_atf.o
  obj-$(CONFIG_SPL_USB_SUPPORT) += spl_usb.o
  obj-$(CONFIG_SPL_FAT_SUPPORT) += spl_fat.o
  obj-$(CONFIG_SPL_EXT_SUPPORT) += spl_ext.o
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 26bc9ef..7041e1b 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -374,6 +374,9 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
   gd->malloc_ptr / 1024);
  #endif

+   if (IS_ENABLED(CONFIG_SPL_ATF_SUPPORT))
+   bl31_entry();
+
 debug("loaded - jumping to U-Boot...\n");
 spl_board_prepare_for_boot();
 jump_to_image_no_args(_image);




 switch (spl_image.os) {
 case IH_OS_U_BOOT:
 debug("Jumping to U-Boot\n");
 break;
#ifdef CONFIG_SPL_OS_BOOT
 case IH_OS_LINUX:
 debug("Jumping to Linux\n");
 spl_board_prepare_for_linux();
 jump_to_image_linux(_image,
 (void *)CONFIG_SYS_SPL_ARGS_ADDR);
#endif
 default:
 debug("Unsupported OS image.. Jumping nevertheless..\n");
 }


Which debug message is printed
before SPL jumps to BL31?

Jumping to U-Boot or Linux or Unsupported OS?


It's Jumping to U-Boot now, how about add one message before jump to 
BL31 like this:

debug("loaded - jumping to U-Boot via ATF BL31.\n");









+void bl31_entry(void)
+{
+   struct bl31_params_t *bl31_params;
+   void (*entry)(struct bl31_params_t *params, void *plat_params) = NULL;
+
+   bl31_params = bl2_plat_get_bl31_params();
+   entry = (void *)CONFIG_SPL_ATF_TEXT_BASE;
+
+   raw_write_daif(SPSR_EXCEPTION_MASK);
+   dcache_disable();
+
+   entry(bl31_params, NULL);
+}

I guess SPL is supposed to load at least BL31 and BL33(=U-Boot full)
because BL31 does not have a facility to load images from non-volatile devices.

I can not see how to do it from this patch.

Relying on Andre's work for multi images in FIT?
http://patchwork.ozlabs.org/patch/745827/


Yes, I use Andre's patch to load multi image in FIT, this can handle 
flexible number of

ATF target.




I am not tracking how they are related, though.





+/***
+ * Structure used for telling the next BL how much of a particular type of
+ * memory is available for its use and how much is already used.
+ 
**/
+struct aapcs64_params_t {


Please do not add _t suffix for structure.



+   unsigned long arg0;
+   unsigned long arg1;
+   unsigned long arg2;
+   unsigned long arg3;
+   unsigned long arg4;
+   unsigned long arg5;
+   unsigned long arg6;
+   unsigned long arg7;
+};



In ATF, every structure has a shorthand
typedef with _t suffix, like this:

typedef struct aapcs64_params {
 u_register_t arg0;
 u_register_t arg1;
 u_register_t arg2;
 u_register_t arg3;
 

[U-Boot] [PATCH v3] regmap: add support for address cell 2

2017-05-04 Thread Kever Yang
ARM64 is using 64bit address which address cell is 2 instead of 1,
update to support it when of-platdata enabled.

Signed-off-by: Kever Yang 
---

Changes in v3:
- move of_plat_get_number() into lib/of_plat.c

Changes in v2:
- rename the fdtdec_get_number() to of_plat_get_number()

 drivers/core/regmap.c |  9 +
 include/of_plat.h | 22 ++
 lib/Makefile  |  3 +++
 lib/of_plat.c | 17 +
 4 files changed, 51 insertions(+)
 create mode 100644 include/of_plat.h
 create mode 100644 lib/of_plat.c

diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c
index 3bec3df..c03279e 100644
--- a/drivers/core/regmap.c
+++ b/drivers/core/regmap.c
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -49,11 +50,19 @@ int regmap_init_mem_platdata(struct udevice *dev, u32 *reg, 
int count,
if (!map)
return -ENOMEM;
 
+#ifdef CONFIG_PHYS_64BIT
+   map->base = of_plat_get_number(reg, 2);
+   for (range = map->range; count > 0; reg += 4, range++, count--) {
+   range->start = of_plat_get_number(reg, 2);
+   range->size = of_plat_get_number(reg + 2, 2);
+   }
+#else
map->base = *reg;
for (range = map->range; count > 0; reg += 2, range++, count--) {
range->start = *reg;
range->size = reg[1];
}
+#endif
 
*mapp = map;
 
diff --git a/include/of_plat.h b/include/of_plat.h
new file mode 100644
index 000..0badabb
--- /dev/null
+++ b/include/of_plat.h
@@ -0,0 +1,22 @@
+/*
+ * (C) Copyright 2017 Rockchip Electronics Co., Ltd
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __of_plat_h
+#define __of_plat_h
+
+#include "libfdt_env.h"
+/**
+ * Get a variable-sized number from a property
+ *
+ * This reads a number from one or more cells.
+ *
+ * @param ptr  Pointer to property
+ * @param cellsNumber of cells containing the number
+ * @return the value in the cells
+ */
+u64 of_plat_get_number(const fdt32_t *ptr, unsigned int cells);
+
+#endif
diff --git a/lib/Makefile b/lib/Makefile
index 23e9f1e..a988965 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -55,6 +55,9 @@ obj-$(CONFIG_$(SPL_)OF_CONTROL) += fdtdec_common.o
 obj-$(CONFIG_$(SPL_)OF_CONTROL) += fdtdec.o
 endif
 
+ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_SPL_OF_PLATDATA),yy)
+obj-$(CONFIG_$(SPL_)OF_CONTROL) += of_plat.o
+endif
 ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o
 obj-$(CONFIG_SPL_NET_SUPPORT) += net_utils.o
diff --git a/lib/of_plat.c b/lib/of_plat.c
new file mode 100644
index 000..cf1cd1e
--- /dev/null
+++ b/lib/of_plat.c
@@ -0,0 +1,17 @@
+/*
+ * (C) Copyright 2017 Rockchip Electronics Co., Ltd
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include "of_plat.h"
+
+u64 of_plat_get_number(const u32 *ptr, unsigned int cells)
+{
+   u64 number = 0;
+
+   while (cells--)
+   number = (number << 32) | (*ptr++);
+
+   return number;
+}
-- 
1.9.1

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


Re: [U-Boot] [U-Boot 3/3] rockchip: rk3288: enable rockusb support on rk3288 based device

2017-05-04 Thread Eddie Cai
2017-05-05 0:49 GMT+08:00 Simon Glass :
> Hi,
>
> On 4 May 2017 at 03:19, Lukasz Majewski  wrote:
>> Hi Eddie, Simon,
>>
>>> Hi Simon
>>>
>>> 2017-05-03 18:09 GMT+08:00 Simon Glass :
>>> > Hi Eddie,
>>> >
>>> > On 2 May 2017 at 04:37, Eddie Cai  wrote:
>>> >> Hi Simon
>>> >> 2017-03-20 10:30 GMT+08:00 Simon Glass :
>>> >>> Hi Eddie.
>>> >>>
>>> >>> On 15 March 2017 at 01:56, Eddie Cai 
>>> >>> wrote:
>>>  this patch enable rockusb support on rk3288 based device.
>>> 
>>>  Signed-off-by: Eddie Cai 
>>>  ---
>>>   include/configs/rk3288_common.h | 4 
>>>   1 file changed, 4 insertions(+)
>>> >>>
>>> >>> I think this should be done in Kconfig.
>>> >> since rockusb used so widely on rockchip soc based devices. every
>>> >> rockchip soc based
>>> >> device should support it. So I would like to put it in
>>> >> rk3288_common.h or even rockchip-common.h.
>>> >> what do you think?
>>> >
>>> > We are moving to removing the board config headers so cannot add new
>>> > non-Kconfig CONFIG options.
>>> >
>>> > You can add it to arch/arm/Kconfig - e.g. with 'imply CONFIG_'
>>> > under 'config ARCH_ROCKCHIP'.
>>> USB_FUNCTION_ROCKUSB depend on USB_GADGET, USB_GADGET_DOWNLOAD,
>>> CONFIG_G_DNL_VENDOR_NUM, CONFIG_G_DNL_PRODUCT_NUM
>>> should i move those config to arch/arm/Kconfig? how to define
>>> CONFIG_G_DNL_VENDOR_NUM
>>> and CONFIG_G_DNL_PRODUCT_NUM when select it?
>>
>> I would prefer to keep those CONFIG options as they are now (and are in
>> sync with other gadgets).
>
> These two are new though right?
>
> CONFIG_CMD_ROCKUSB
> CONFIG_USB_FUNCTION_ROCKUSB
>
> So they should be added to Kconfig. If they 'depend' on non-Kconfig
> options, that's fine IMO. We can't express that until the other
> options are converted.
>
> Let's convert them soon!
Does it means i can keep it in rk3288_common.h?
>
>>
>> The problem here is that the gadget infrastructure is a bit
>> "problematic" from the device model point of view.
>>
>> It has his own "structure" borrowed from Linux kernel.
>>
>> I've poked around and it seems like adding it to DM requires calling
>> "g_dnl_register()" with embedded name of the gadget (like
>> "usb_dnl_dfu").
>>
>> And such call is required for each different gadget (like mass storage,
>> dfu, fastboot).
>>
>> Or maybe we should add "stub" DM support to only indicate supported
>> gadgets (like dfu, ums, etc) and leave as much code untouched as
>> possible?
>
> I'm sure this can be resolved in some way. I admit I have not looked
> at it but was thinking of attacking usb_tty sometime, so perhaps might
> see if I can figure it out.
>
>>
>>> >
>>> > Please help to remove any options you can from the headers.
>>> >
>>> >>>
>>> 
>>>  diff --git a/include/configs/rk3288_common.h
>>>  b/include/configs/rk3288_common.h index b5606d4..b19a34d 100644
>>>  --- a/include/configs/rk3288_common.h
>>>  +++ b/include/configs/rk3288_common.h
>>>  @@ -74,6 +74,10 @@
>>>   #define CONFIG_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
>>>   #define CONFIG_FASTBOOT_BUF_SIZE   0x0800
>>> 
>>>  +/* rockusb  */
>>>  +#define CONFIG_CMD_ROCKUSB
>>>  +#define CONFIG_USB_FUNCTION_ROCKUSB
>>>  +
>>>   /* usb mass storage */
>>>   #define CONFIG_USB_FUNCTION_MASS_STORAGE
>>>   #define CONFIG_CMD_USB_MASS_STORAGE
>>>  --
>>>  2.7.4
>>> >
>>> > Regards,
>>> > Simon
>
> Regards,
> Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] 2017.05-RC3 hanging on DM3730

2017-05-04 Thread Adam Ford
On Thu, May 4, 2017 at 6:08 PM, Tom Rini  wrote:
> On Thu, May 04, 2017 at 05:58:47PM -0500, Adam Ford wrote:
>> On Thu, May 4, 2017 at 4:27 PM, Tom Rini  wrote:
>> > On Thu, May 04, 2017 at 04:06:33PM -0500, Adam Ford wrote:
>> >
>> >> Tom,
>> >>
>> >> I re-synced my U-boot trunk today and did a clean build and found that
>> >> SPL isn't able to load U-Boot.
>> >>
>> >> U-Boot SPL 2017.05-rc3 (May 04 2017 - 15:48:21)
>> >>
>> >>
>> >> I haven't had a chance yet to bisect the issue.  Do you know when you
>> >> plan to do the 2017.05 release?  I'd like to try and locate the issue
>> >> before the final release.
>> >
>> > I'd like to do the release on Monday.  Can you please start bisecting?
>>
>> I bisected it since I won't have time tomorrow or this weekend.
>>
>> Commit 7584f2e0fb0f ("arm: omap3: Compile clock.c with -marm option to
>> unbreak OMAP3530") seems to break the OMAP3630 (DM3730) in that
>> nothing boots at all:
>>
>>(dead)
>>
>>
>> Commit 19a75b8cf8d1("arm: omap3: Bring back ARM errata workaround
>> 725233") at least shows some activity, but not enough to do anything:
>>
>>U-Boot SPL 2017.03-7-g19a75b8 (May 04 2017 - 17:53:10)
>>
>>(dead)
>>
>> I am wondering if other OMAP36/37 devices have had any issues?
>
> My bbXM is working.  Can you try and see which of the errata is breaking
> your particular setup?  Thanks!

It appears to be a toolchain issue.  I use Buildroot which builds
everything from scratch. I specify some items like glibc, gcc version,
binutils, etc.

I am not sure why the removal of "CFLAGS_clock.o += -marm" causes an issue.

When I built it with Linaro 2016.11 it worked, but that version is
tuned for a corex-A9, but it proves the code is ok.  Sorry for the
noise.

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


Re: [U-Boot] 2017.05-RC3 hanging on DM3730

2017-05-04 Thread Tom Rini
On Thu, May 04, 2017 at 05:58:47PM -0500, Adam Ford wrote:
> On Thu, May 4, 2017 at 4:27 PM, Tom Rini  wrote:
> > On Thu, May 04, 2017 at 04:06:33PM -0500, Adam Ford wrote:
> >
> >> Tom,
> >>
> >> I re-synced my U-boot trunk today and did a clean build and found that
> >> SPL isn't able to load U-Boot.
> >>
> >> U-Boot SPL 2017.05-rc3 (May 04 2017 - 15:48:21)
> >>
> >>
> >> I haven't had a chance yet to bisect the issue.  Do you know when you
> >> plan to do the 2017.05 release?  I'd like to try and locate the issue
> >> before the final release.
> >
> > I'd like to do the release on Monday.  Can you please start bisecting?
> 
> I bisected it since I won't have time tomorrow or this weekend.
> 
> Commit 7584f2e0fb0f ("arm: omap3: Compile clock.c with -marm option to
> unbreak OMAP3530") seems to break the OMAP3630 (DM3730) in that
> nothing boots at all:
> 
>(dead)
> 
> 
> Commit 19a75b8cf8d1("arm: omap3: Bring back ARM errata workaround
> 725233") at least shows some activity, but not enough to do anything:
> 
>U-Boot SPL 2017.03-7-g19a75b8 (May 04 2017 - 17:53:10)
> 
>(dead)
> 
> I am wondering if other OMAP36/37 devices have had any issues?

My bbXM is working.  Can you try and see which of the errata is breaking
your particular setup?  Thanks!

-- 
Tom


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


Re: [U-Boot] 2017.05-RC3 hanging on DM3730

2017-05-04 Thread Adam Ford
On Thu, May 4, 2017 at 4:27 PM, Tom Rini  wrote:
> On Thu, May 04, 2017 at 04:06:33PM -0500, Adam Ford wrote:
>
>> Tom,
>>
>> I re-synced my U-boot trunk today and did a clean build and found that
>> SPL isn't able to load U-Boot.
>>
>> U-Boot SPL 2017.05-rc3 (May 04 2017 - 15:48:21)
>>
>>
>> I haven't had a chance yet to bisect the issue.  Do you know when you
>> plan to do the 2017.05 release?  I'd like to try and locate the issue
>> before the final release.
>
> I'd like to do the release on Monday.  Can you please start bisecting?

I bisected it since I won't have time tomorrow or this weekend.

Commit 7584f2e0fb0f ("arm: omap3: Compile clock.c with -marm option to
unbreak OMAP3530") seems to break the OMAP3630 (DM3730) in that
nothing boots at all:

   (dead)


Commit 19a75b8cf8d1("arm: omap3: Bring back ARM errata workaround
725233") at least shows some activity, but not enough to do anything:

   U-Boot SPL 2017.03-7-g19a75b8 (May 04 2017 - 17:53:10)

   (dead)

I am wondering if other OMAP36/37 devices have had any issues?

adam
> Thanks!
>
> --
> Tom
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v5 00/33] ARM: i.MX6: SabreSD: Add dts support

2017-05-04 Thread Fabio Estevam
Hi Jagan,

On Thu, May 4, 2017 at 12:11 PM, Jagan Teki  wrote:
> From: Jagan Teki 
>
> Compared to previous series, this series
> - remove DCD addition on SPL for duallite, since it's not working
> - Add board_fit_config_name_match for SPL to fetch board dts
> - Now we have single SPL deconfig file for all SabreSD cpu models.

This is good progress :-)

I will test your series probably next week.

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


Re: [U-Boot] 2017.05-RC3 hanging on DM3730

2017-05-04 Thread Tom Rini
On Thu, May 04, 2017 at 04:06:33PM -0500, Adam Ford wrote:

> Tom,
> 
> I re-synced my U-boot trunk today and did a clean build and found that
> SPL isn't able to load U-Boot.
> 
> U-Boot SPL 2017.05-rc3 (May 04 2017 - 15:48:21)
> 
> 
> I haven't had a chance yet to bisect the issue.  Do you know when you
> plan to do the 2017.05 release?  I'd like to try and locate the issue
> before the final release.

I'd like to do the release on Monday.  Can you please start bisecting?
Thanks!

-- 
Tom


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


[U-Boot] 2017.05-RC3 hanging on DM3730

2017-05-04 Thread Adam Ford
Tom,

I re-synced my U-boot trunk today and did a clean build and found that
SPL isn't able to load U-Boot.

U-Boot SPL 2017.05-rc3 (May 04 2017 - 15:48:21)


I haven't had a chance yet to bisect the issue.  Do you know when you
plan to do the 2017.05 release?  I'd like to try and locate the issue
before the final release.

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


[U-Boot] [PATCH v2 1/1] tools: sunxi: avoid read after end of string

2017-05-04 Thread Heinrich Schuchardt
The evaluation of option -c is incorrect:

According to the C99 standard endptr in the first strtol is always
set as  is not NULL.
So the first part of the or condition is always true.
If all digits in optarg are valid endptr will point to the closing \0
and the second strtol will read beyond the end of the string optarg
points to.

Signed-off-by: Heinrich Schuchardt 
---
v2:
  Simplify the logical expression.
v1:
  In the original patch I missed that envptr is always set in strtol
  and used an unnecessary check if endptr is non-NULL.
  [PATCH 1/1] tools: sunxi: avoid possible null pointer dereference
  https://patchwork.ozlabs.org/patch/758224/
---
 tools/sunxi-spl-image-builder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/sunxi-spl-image-builder.c b/tools/sunxi-spl-image-builder.c
index d538a38813..a367f11774 100644
--- a/tools/sunxi-spl-image-builder.c
+++ b/tools/sunxi-spl-image-builder.c
@@ -433,7 +433,7 @@ int main(int argc, char **argv)
break;
case 'c':
info.ecc_strength = strtol(optarg, , 0);
-   if (endptr || *endptr == '/')
+   if (*endptr == '/')
info.ecc_step_size = strtol(endptr + 1, NULL, 
0);
break;
case 'p':
-- 
2.11.0

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


Re: [U-Boot] [PATCH 1/5] dm: gpio: add BCM6345 gpio driver

2017-05-04 Thread Simon Glass
Hi Alvaro,

On 3 May 2017 at 07:07, Álvaro Fernández Rojas  wrote:
> This driver is based on linux/arch/mips/bcm63xx/gpio.c, simplified to allow
> defining one or two independent banks for each Broadcom SoC.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  drivers/gpio/Kconfig|   6 +++
>  drivers/gpio/Makefile   |   1 +
>  drivers/gpio/bcm6345_gpio.c | 125 
> 
>  3 files changed, 132 insertions(+)
>  create mode 100644 drivers/gpio/bcm6345_gpio.c

Reviewed-by: Simon Glass 

[...]

> +static int bcm6345_gpio_probe(struct udevice *dev)
> +{
> +   struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
> +   struct bcm6345_gpio_priv *priv = dev_get_priv(dev);
> +   fdt_addr_t data_addr, dirout_addr;
> +   fdt_size_t data_size, dirout_size;
> +
> +   dirout_addr = dev_get_addr_size_index(dev, 0, _size);
> +   if (dirout_addr == FDT_ADDR_T_NONE)
> +   return -EINVAL;
> +
> +   data_addr = dev_get_addr_size_index(dev, 1, _size);
> +   if (data_addr == FDT_ADDR_T_NONE)
> +   return -EINVAL;
> +
> +   priv->reg_data = ioremap(data_addr, data_size);
> +   priv->reg_dirout = ioremap(dirout_addr, dirout_size);
> +
> +   uc_priv->gpio_count = fdtdec_get_uint(gd->fdt_blob, 
> dev_of_offset(dev),
> + "ngpios", 32);
> +   uc_priv->bank_name = strdup(dev->name);

I don't think you need strdup(). If you do want this, you should add a
remove() function to free it.

> +
> +   return 0;
> +}
> +
> +static const struct udevice_id bcm6345_gpio_ids[] = {
> +   { .compatible = "brcm,bcm6345-gpio" },
> +   { /* sentinel */ }
> +};
> +
> +U_BOOT_DRIVER(bcm6345_gpio) = {
> +   .name = "bcm6345-gpio",
> +   .id = UCLASS_GPIO,
> +   .of_match = bcm6345_gpio_ids,
> +   .ops = _gpio_ops,
> +   .probe = bcm6345_gpio_probe,
> +   .priv_auto_alloc_size = sizeof(struct bcm6345_gpio_priv),
> +};
> --
> 2.1.4
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 2/5] mips: bmips: add bcm6345-gpio driver support for BCM6358

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:07, Álvaro Fernández Rojas  wrote:
> This SoC has one gpio bank divided into two 32 bit registers, with a total of
> 40 GPIOs.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/brcm,bcm6358.dtsi | 19 +++
>  1 file changed, 19 insertions(+)

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


Re: [U-Boot] [PATCH 3/3] mips: bmips: add NeufBox 4 (Sercomm) board

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:09, Álvaro Fernández Rojas  wrote:
> This serves as an example for bcm6358-leds.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/sfr,nb4-ser.dts | 93 
> +++
>  board/sfr/nb4_ser/Kconfig | 12 +
>  board/sfr/nb4_ser/MAINTAINERS |  6 +++
>  board/sfr/nb4_ser/Makefile|  5 +++
>  board/sfr/nb4_ser/nb4-ser.c   |  7 +++
>  configs/sfr_nb4-ser_ram_defconfig | 52 ++
>  include/configs/sfr_nb4_ser.h | 20 +
>  7 files changed, 195 insertions(+)
>  create mode 100644 arch/mips/dts/sfr,nb4-ser.dts
>  create mode 100644 board/sfr/nb4_ser/Kconfig
>  create mode 100644 board/sfr/nb4_ser/MAINTAINERS
>  create mode 100644 board/sfr/nb4_ser/Makefile
>  create mode 100644 board/sfr/nb4_ser/nb4-ser.c
>  create mode 100644 configs/sfr_nb4-ser_ram_defconfig
>  create mode 100644 include/configs/sfr_nb4_ser.h

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


Re: [U-Boot] [PATCH 4/5] mips: bmips: add Comtrend AR-5387un bcm6328-leds

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:08, Álvaro Fernández Rojas  wrote:
> This board has several LEDs attached to its BCM6328 led controller.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/comtrend,ar-5387un.dts| 30 ++
>  configs/comtrend_ar5387un_ram_defconfig |  4 
>  2 files changed, 34 insertions(+)
>

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


Re: [U-Boot] [PATCH 1/5] dm: led: add BCM6328 led driver

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:08, Álvaro Fernández Rojas  wrote:
> This driver is a simplified version of linux/drivers/leds/leds-bcm6328.c,
> simplified to remove HW leds and blink fallbacks.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  drivers/led/Kconfig   |   7 ++
>  drivers/led/Makefile  |   1 +
>  drivers/led/led_bcm6328.c | 262 
> ++
>  3 files changed, 270 insertions(+)
>  create mode 100644 drivers/led/led_bcm6328.c
>

Reviewed-by: Simon Glass 

But please see below.

Can you a DT binding file for this?

> diff --git a/drivers/led/Kconfig b/drivers/led/Kconfig
> index 309372a..50b27bd 100644
> --- a/drivers/led/Kconfig
> +++ b/drivers/led/Kconfig
> @@ -9,6 +9,13 @@ config LED
>   can provide access to board-specific LEDs. Use of the device tree
>   for configuration is encouraged.
>
> +config LED_BCM6328
> +   bool "LED Support for BCM6328"
> +   depends on LED && ARCH_BMIPS
> +   help
> + This option enables support for LEDs connected to the BCM6328
> + LED HW controller accessed via MMIO registers.

What features does it support? Flashing? How many LEDs?

[...]

> +static int bcm6328_led_probe(struct udevice *dev)
> +{
> +   struct led_uc_plat *uc_plat = dev_get_uclass_platdata(dev);
> +   fdt_addr_t addr;
> +   fdt_size_t size;
> +
> +   /* Top-level LED node */
> +   if (!uc_plat->label) {
> +   void __iomem *regs;
> +   u32 set_bits = 0;
> +
> +   addr = dev_get_addr_size_index(dev, 0, );
> +   if (addr == FDT_ADDR_T_NONE)
> +   return -EINVAL;
> +
> +   regs = ioremap(addr, size);
> +
> +   if (fdt_getprop(gd->fdt_blob, dev_of_offset(dev),
> +   "brcm,serial-leds", NULL))

Can you use fdtdec_get_bool() ?

> +   set_bits |= LED_INIT_SLEDEN_MASK;
> +   if (fdt_getprop(gd->fdt_blob, dev_of_offset(dev),
> +   "brcm,serial-mux", NULL))
> +   set_bits |= LED_INIT_SLEDMUX_MASK;
> +   if (fdt_getprop(gd->fdt_blob, dev_of_offset(dev),
> +   "brcm,serial-clk-low", NULL))
> +   set_bits |= LED_INIT_SLEDCLKNPOL_MASK;
> +   if (!fdt_getprop(gd->fdt_blob, dev_of_offset(dev),
> +"brcm,serial-dat-low", NULL))
> +   set_bits |= LED_INIT_SLEDDATANPOL_MASK;
> +   if (!fdt_getprop(gd->fdt_blob, dev_of_offset(dev),
> +"brcm,serial-shift-inv", NULL))
> +   set_bits |= LED_INIT_SLEDSHIFTDIR_MASK;
> +
> +   clrsetbits_be32(regs + LED_INIT_REG, ~0, set_bits);
> +   } else {
> +   struct bcm6328_led_priv *priv = dev_get_priv(dev);
> +   unsigned int pin;
> +
> +   addr = dev_get_addr_size_index(dev_get_parent(dev), 0, );
> +   if (addr == FDT_ADDR_T_NONE)
> +   return -EINVAL;
> +
> +   pin = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev), "reg",
> + LEDS_MAX);
> +   if (pin >= LEDS_MAX)
> +   return -EINVAL;
> +
> +   priv->regs = ioremap(addr, size);
> +   if (pin < 8) {
> +   /* LEDs 0-7 (bits 47:32) */
> +   priv->mode = priv->regs + LED_MODE_REG_HI;
> +   priv->shift = (pin << 1);
> +   } else {
> +   /* LEDs 8-23 (bits 31:0) */
> +   priv->mode = priv->regs + LED_MODE_REG_LO;
> +   priv->shift = ((pin - 8) << 1);
> +   }
> +
> +   if (fdt_getprop(gd->fdt_blob, dev_of_offset(dev), 
> "active-low",
> +   NULL))
> +   priv->active_low = true;
> +   }
> +
> +   return 0;
> +}
> +

[..]

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


Re: [U-Boot] [PATCH 2/5] mips: bmips: add bcm6345-clk driver support for BCM6358

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:09, Álvaro Fernández Rojas  wrote:
> This driver can control up to 32 clocks.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/brcm,bcm6358.dtsi   |  7 +++
>  include/dt-bindings/clock/bcm6358-clock.h | 24 
>  2 files changed, 31 insertions(+)
>  create mode 100644 include/dt-bindings/clock/bcm6358-clock.h

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


Re: [U-Boot] [PATCH 3/5] mips: bmips: add bcm6345-rst driver support for BCM6328

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:10, Álvaro Fernández Rojas  wrote:
> This driver can control up to 32 clocks.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/brcm,bcm6328.dtsi   |  7 +++
>  include/dt-bindings/reset/bcm6328-reset.h | 24 
>  2 files changed, 31 insertions(+)
>  create mode 100644 include/dt-bindings/reset/bcm6328-reset.h

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


Re: [U-Boot] [PATCH 2/3] mips: bmips: add bcm6358-led driver support for BCM6358

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:09, Álvaro Fernández Rojas  wrote:
> This driver can control up to 32 serial leds.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/brcm,bcm6358.dtsi | 9 +
>  1 file changed, 9 insertions(+)

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


Re: [U-Boot] [PATCH 1/5 v2] dm: device_remove: Don't return in device_chld_remove() upon error

2017-05-04 Thread Simon Glass
Hi Stefan,

On 2 May 2017 at 05:45, Stefan Roese  wrote:
> Hi Simon,
>
>
> On 02.05.2017 13:27, Simon Glass wrote:
>>
>> On 1 May 2017 at 00:14, Stefan Roese  wrote:
>>>
>>> Hi Simon,
>>>
>>>
>>> On 29.04.2017 02:26, Simon Glass wrote:


 On 24 April 2017 at 01:48, Stefan Roese  wrote:
>
>
> On my x86 platform I've noticed, that calling dm_uninit() or the new
> function dm_remove_devices_flags() does not remove the desired device
> at
> all. Debugging showed, that the serial uclass returns -EPERM in
> serial_pre_remove() and this leads to a complete stop of the device
> removal pretty early, as the serial device is one of the first ones in
> the DM. Here the dm tree output:
>
> => dm tree
>  Class   Probed   Name
> 
>  root[ + ]root_driver
>  rsa_mod_exp [   ]|-- mod_exp_sw
>  serial  [ + ]|-- serial
>  rtc [   ]|-- rtc
>  timer   [ + ]|-- tsc-timer
>  syscon  [ + ]|-- pch_pinctrl
>  ...
>
> In this example, device_remove(root) will stop directly after trying to
> remove the "serial" device.
>
> To solve this problem, this patch removes the return upon error check
> in
> the device_remove() call in device_chld_remove(). This leads to
> device_chld_remove() continuing with the device_remove() call to the
> following child devices.
>
> Signed-off-by: Stefan Roese 
> Cc: Simon Glass 
> Cc: Bin Meng 
> ---
> v2:
> - Add debug() output in error case
>
>  drivers/core/device-remove.c | 10 --
>  1 file changed, 8 insertions(+), 2 deletions(-)



 I thought that your change to force removal of the stdio dev would
 make this change unnecessary?
>>>
>>>
>>>
>>> Yes, the force removal made this change unnecessary in this specific
>>> case. But...
>>>
 I really would rather fix the root cause if we can.
>>>
>>>
>>>
>>> ... the current implementation to exit the loop over all children
>>> upon error and not remove the remaining children is wrong IMO. All
>>> devices should at least be tried to get removed, even if one fails
>>> to get removed. This is what this patch makes sure of.
>>
>>
>> Yes I see that, but not being able to remove is actually an error. In
>> the normal course of events, a device that will not remove itself is
>> likely buggy.
>
>
> Isn't it enough then to just print an error message in this case
> in this loop - change debug() to printf() in this current patch
> version? Then "users" of this code will be aware of such remove
> failures and can take appropriate actions (fix bug etc in their
> setup).

Possibly, but programmatically it becomes impossible to detect a
failure. Say the USB fails to stop its DMA, we might want to reboot
rather than continue to boot Linux and crash.

>
>> What do you think about adding a new remove flag to indicate that
>> failures should be skipped?
>
>
> I'm a bit afraid that this makes the code overly complex. But if
> you prefer to have it this way, then I can come up with such a
> version as well. Just let me know.

I don't think the complexity is too great. It does need a new test.
But I think we should hold the line on error checking even with
remove(), by default.

>
> Thanks,
> Stefan

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


Re: [U-Boot] [PATCH 1/5] dm: reset: add BCM6345 reset driver

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:10, Álvaro Fernández Rojas  wrote:
> This is a simplified version of linux/arch/mips/bcm63xx/reset.c
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  drivers/reset/Kconfig |  6 +++
>  drivers/reset/Makefile|  1 +
>  drivers/reset/reset-bcm6345.c | 89 
> +++
>  3 files changed, 96 insertions(+)
>  create mode 100644 drivers/reset/reset-bcm6345.c

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


Re: [U-Boot] [PATCH 4/5] mips: bmips: add bcm6345-clk driver support for BCM63268

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:09, Álvaro Fernández Rojas  wrote:
> This driver can control up to 32 clocks.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/brcm,bcm63268.dtsi   | 13 
>  include/dt-bindings/clock/bcm63268-clock.h | 52 
> ++
>  2 files changed, 65 insertions(+)
>  create mode 100644 include/dt-bindings/clock/bcm63268-clock.h

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


Re: [U-Boot] [PATCH 3/5] mips: bmips: add bcm6345-clk driver support for BCM6328

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:09, Álvaro Fernández Rojas  wrote:
> This driver can control up to 32 clocks.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/brcm,bcm6328.dtsi   |  7 +++
>  include/dt-bindings/clock/bcm6328-clock.h | 25 +
>  2 files changed, 32 insertions(+)
>  create mode 100644 include/dt-bindings/clock/bcm6328-clock.h
>

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


Re: [U-Boot] [PATCH 5/5] mips: bmips: enable bcm6345-reset driver for all BMIPS boards

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:10, Álvaro Fernández Rojas  wrote:
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  configs/comtrend_ar5387un_ram_defconfig | 3 +++
>  configs/comtrend_vr3032u_ram_defconfig  | 3 +++
>  configs/huawei_hg556a_ram_defconfig | 3 +++
>  configs/sfr_nb4-ser_ram_defconfig   | 3 +++
>  4 files changed, 12 insertions(+)
>

Reviewed-by: Simon Glass 

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


Re: [U-Boot] [PATCH 3/5] mips: bmips: add bcm6328-led driver support for BCM63268

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:08, Álvaro Fernández Rojas  wrote:
> This driver can control up to 24 LEDs and supports HW blinking and serial 
> leds.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/brcm,bcm63268.dtsi | 9 +
>  1 file changed, 9 insertions(+)
>

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


Re: [U-Boot] [PATCH 4/5] mips: bmips: add bcm6345-gpio driver support for BCM63268

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:07, Álvaro Fernández Rojas  wrote:
> This SoC has one gpio bank divided into two 32 bit registers, with a total of
> 52 GPIOs.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/brcm,bcm63268.dtsi | 19 +++
>  1 file changed, 19 insertions(+)

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


Re: [U-Boot] [PATCH 2/5] mips: bmips: add bcm6345-rst driver support for BCM6358

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:10, Álvaro Fernández Rojas  wrote:
> This driver can control up to 32 resets.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/brcm,bcm6358.dtsi   |  7 +++
>  include/dt-bindings/reset/bcm6358-reset.h | 21 +
>  2 files changed, 28 insertions(+)
>  create mode 100644 include/dt-bindings/reset/bcm6358-reset.h
>

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


Re: [U-Boot] [PATCH 5/5] mips: bmips: add Huawei HG556a gpio-leds

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:07, Álvaro Fernández Rojas  wrote:
> This board has several LEDs attached to gpio0.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/huawei,hg556a.dts | 73 
> +
>  configs/huawei_hg556a_ram_defconfig |  4 ++
>  2 files changed, 77 insertions(+)
>

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


Re: [U-Boot] [PATCH 1/5] dm: clk: add BCM6345 clock driver

2017-05-04 Thread Simon Glass
Hi Alvarao,

On 3 May 2017 at 07:09, Álvaro Fernández Rojas  wrote:
> This is a simplified version of linux/arch/mips/bcm63xx/clk.c
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  drivers/clk/Kconfig   |  8 +
>  drivers/clk/Makefile  |  1 +
>  drivers/clk/clk_bcm6345.c | 78 
> +++
>  3 files changed, 87 insertions(+)
>  create mode 100644 drivers/clk/clk_bcm6345.c

Reviewed-by: Simon Glass 

nits below

>
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 5ca958c..fa3fbe2 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -20,6 +20,14 @@ config SPL_CLK
>   setting up clocks within SPL, and allows the same drivers to be
>   used as U-Boot proper.
>
> +config CLK_BCM6345
> +   bool "Enable clock driver support for BCM6345"
> +   depends on CLK && ARCH_BMIPS
> +   default y
> +   help
> + This clock driver adds support for clock realted settings for
> + BCM6345.

Can you give a bit more detail here? Does it support all clocks?

> +
>  config CLK_BOSTON
> def_bool y if TARGET_BOSTON
> depends on CLK
> diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> index 01a8cd6..2746a80 100644
> --- a/drivers/clk/Makefile
> +++ b/drivers/clk/Makefile
> @@ -17,6 +17,7 @@ obj-y += tegra/
>  obj-$(CONFIG_CLK_UNIPHIER) += uniphier/
>  obj-$(CONFIG_CLK_EXYNOS) += exynos/
>  obj-$(CONFIG_CLK_AT91) += at91/
> +obj-$(CONFIG_CLK_BCM6345) += clk_bcm6345.o
>  obj-$(CONFIG_CLK_BOSTON) += clk_boston.o
>  obj-$(CONFIG_ARCH_ASPEED) += aspeed/
>  obj-$(CONFIG_STM32F7) += clk_stm32f7.o
> diff --git a/drivers/clk/clk_bcm6345.c b/drivers/clk/clk_bcm6345.c
> new file mode 100644
> index 000..0b52079
> --- /dev/null
> +++ b/drivers/clk/clk_bcm6345.c
> @@ -0,0 +1,78 @@
> +/*
> + * Copyright (C) 2017 Álvaro Fernández Rojas 
> + *
> + * Derived from linux/arch/mips/bcm63xx/clk.c:
> + * Copyright (C) 2008 Maxime Bizon 
> + *
> + * SPDX-License-Identifier:GPL-2.0+
> + */
> +
> +#include 
> +#include 

This should always go first.

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


Re: [U-Boot] [RESEND PATCH v2 4/6] boston: Setup memory ranges in FDT provided to Linux

2017-05-04 Thread Simon Glass
On 30 April 2017 at 13:22, Daniel Schwierzeck
 wrote:
> From: Paul Burton 
>
> The boston memory map isn't suited to the simple "all memory starting
> from 0" approach that the MIPS arch_fixup_fdt() implementation takes.
> Instead we need to indicate the first 256MiB of DDR from 0 and the rest
> from 0x9000. Implement ft_board_setup to do that.
>
> Signed-off-by: Paul Burton 
> Signed-off-by: Daniel Schwierzeck 
> ---
>
> Changes in v2: None
>
>  arch/mips/Kconfig|  1 +
>  board/imgtec/boston/Makefile |  1 +
>  board/imgtec/boston/dt.c | 27 +++
>  3 files changed, 29 insertions(+)
>  create mode 100644 board/imgtec/boston/dt.c

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


Re: [U-Boot] [RESEND PATCH v2 2/6] MIPS: Make CM GCR base configurable

2017-05-04 Thread Simon Glass
On 30 April 2017 at 13:22, Daniel Schwierzeck
 wrote:
> From: Paul Burton 
>
> Without adding a prompt for CONFIG_MIPS_CM_BASE, Kconfig doesn't allow
> defconfigs to set it. Provide the prompt in order to allow for that.
>
> Signed-off-by: Paul Burton 
> Signed-off-by: Daniel Schwierzeck 
>
> ---
>
> Changes in v2:
> - move to menu "General setup"
>
>  arch/mips/Kconfig | 19 ++-
>  1 file changed, 10 insertions(+), 9 deletions(-)

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


Re: [U-Boot] [PATCH 5/5] mips: bmips: add Comtrend VR-3032u bcm6328-leds

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:08, Álvaro Fernández Rojas  wrote:
> This board has several LEDs attached to its BCM6328 led controller.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/comtrend,vr-3032u.dts| 43 
> ++
>  configs/comtrend_vr3032u_ram_defconfig |  4 
>  2 files changed, 47 insertions(+)

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


Re: [U-Boot] [PATCH] ARM: mvebu: switch db-88f6820-amc to DM for i2c

2017-05-04 Thread Simon Glass
On 2 May 2017 at 02:35, Chris Packham  wrote:
> Move existing configuration from header file to defconfig or dts as
> appropriate.
>
> Signed-off-by: Chris Packham 
> ---
>
>  arch/arm/dts/armada-385-amc.dts  | 3 +++
>  configs/db-88f6820-amc_defconfig | 2 ++
>  include/configs/db-88f6820-amc.h | 7 ---
>  3 files changed, 5 insertions(+), 7 deletions(-)
>

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


Re: [U-Boot] [RESEND PATCH v2 3/6] boston: Move CM GCRs away from flash

2017-05-04 Thread Simon Glass
On 30 April 2017 at 13:22, Daniel Schwierzeck
 wrote:
> From: Paul Burton 
>
> Move the MIPS Coherence Manager (CM) Global Configuration Registers
> (GCRs) away from the region of the physical address space which the
> Boston board's parallel flash is found in, such that we can access all
> of flash without clobbering GCRs.
>
> Signed-off-by: Paul Burton 
> Signed-off-by: Daniel Schwierzeck 
>
> ---
>
> Changes in v2:
> - set default value for Boston in arch/mips/Kconfig
>
>  arch/mips/Kconfig | 1 +
>  1 file changed, 1 insertion(+)

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


Re: [U-Boot] [PATCH 3/5] mips: bmips: add bcm6345-gpio driver support for BCM6328

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:07, Álvaro Fernández Rojas  wrote:
> This SoC has one gpio bank with a total of 32 GPIOs.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/brcm,bcm6328.dtsi | 9 +
>  1 file changed, 9 insertions(+)

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


Re: [U-Boot] [PATCH 2/5] mips: bmips: add bcm6328-led driver support for BCM6328

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:08, Álvaro Fernández Rojas  wrote:
> This driver can control up to 24 LEDs and supports HW blinking and serial 
> leds.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/brcm,bcm6328.dtsi | 9 +
>  1 file changed, 9 insertions(+)
>

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


Re: [U-Boot] [PATCH 5/5] mips: bmips: enable bcm6345-clk driver for all BMIPS boards

2017-05-04 Thread Simon Glass
2017-05-03 7:09 GMT-06:00 Álvaro Fernández Rojas :
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  configs/comtrend_ar5387un_ram_defconfig | 1 +
>  configs/comtrend_vr3032u_ram_defconfig  | 1 +
>  configs/huawei_hg556a_ram_defconfig | 1 +
>  configs/sfr_nb4-ser_ram_defconfig   | 1 +
>  4 files changed, 4 insertions(+)
>

Reviewed-by: Simon Glass 

You might consider adding an imply to your Kconfig somewhere.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 4/5] mips: bmips: add bcm6345-rst driver support for BCM63268

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:10, Álvaro Fernández Rojas  wrote:
> This driver can control up to 32 clocks.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  arch/mips/dts/brcm,bcm63268.dtsi   |  7 +++
>  include/dt-bindings/reset/bcm63268-reset.h | 32 
> ++
>  2 files changed, 39 insertions(+)
>  create mode 100644 include/dt-bindings/reset/bcm63268-reset.h

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


Re: [U-Boot] [PATCH 1/3] dm: led: add BCM6358 led driver

2017-05-04 Thread Simon Glass
On 3 May 2017 at 07:09, Álvaro Fernández Rojas  wrote:
> This driver is a simplified version of linux/drivers/leds/leds-bcm6358.c
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  drivers/led/Kconfig   |   7 ++
>  drivers/led/Makefile  |   1 +
>  drivers/led/led_bcm6358.c | 227 
> ++
>  3 files changed, 235 insertions(+)
>  create mode 100644 drivers/led/led_bcm6358.c

Similar comments to the earlier LED driver.

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


Re: [U-Boot] [PATCH v3 3/4] tools: moveconfig: cleanup README entires

2017-05-04 Thread Simon Glass
On 2 May 2017 at 03:30, Chris Packham  wrote:
> The Kconfig description replaces the description in the README file so
> as options are migrated they can be removed from the README.
>
> Signed-off-by: Chris Packham 
> ---
>
> Changes in v3: None
> Changes in v2: None
>
>  tools/moveconfig.py | 41 +
>  1 file changed, 41 insertions(+)
>

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


Re: [U-Boot] [PATCH v3 4/4] README: remove CONFIG_CMD_DATE

2017-05-04 Thread Simon Glass
On 2 May 2017 at 03:30, Chris Packham  wrote:
> CONFIG_CMD_DATE was recently moved to Kconfig. Remove the now duplicate
> description of the option.
>
> Signed-off-by: Chris Packham 
> ---
>
> Changes in v3: None
> Changes in v2: None
>
>  README | 1 -
>  1 file changed, 1 deletion(-)

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


Re: [U-Boot] [RESEND PATCH v2 2/5] net: pch_gbe: Fix rx descriptor buffer addresses

2017-05-04 Thread Simon Glass
On 30 April 2017 at 13:57, Daniel Schwierzeck
 wrote:
> From: Paul Burton 
>
> The loop to set up buffer addresses in rx descriptors always operated on
> descriptor 0, rather than on each descriptor sequentially. Fix this in
> order to setup correct buffer addresses for each descriptor.
>
> Signed-off-by: Paul Burton 
> Signed-off-by: Daniel Schwierzeck 
> Reviewed-by: Bin Meng 
> Tested-by: Bin Meng 
>
> ---
>
> Changes in v2:
> - move the switch to dm_pci_virt_to_mem() in pch_gbe_rx_descs_init()
>   to the next patch as suggested by Bin Meng
>
>  drivers/net/pch_gbe.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Eek!

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


Re: [U-Boot] [RESEND PATCH v2 1/6] image: Use ram_top, not bi_memsize, in getenv_bootm_size

2017-05-04 Thread Simon Glass
Hi Daniel,

On 30 April 2017 at 13:22, Daniel Schwierzeck
 wrote:
> From: Paul Burton 
>
> When determining the region of memory to allow for use by bootm, using
> bi_memstart & adding bi_memsize can cause problems if that leads to an
> integer overflow. For example on some MIPS systems bi_memstart would be
> 0x8000 (ie. the start of the MIPS ckseg0 region) and if the
> system has 2GB of memory then the addition would wrap around to 0.
>
> The maximum amount of memory to be used by U-Boot is already accounted
> for by the ram_top field of struct global_data, so make use of that for
> the calculation instead.
>
> Signed-off-by: Paul Burton 
> Signed-off-by: Daniel Schwierzeck 
>
> ---
>
> Changes in v2:
> - also patch ARM specific code to get a consistent behaviour
>
>  common/image.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/common/image.c b/common/image.c
> index 0f88984f2d..160c4c6fbc 100644
> --- a/common/image.c
> +++ b/common/image.c
> @@ -494,11 +494,10 @@ phys_size_t getenv_bootm_size(void)
>
>  #if defined(CONFIG_ARM) && defined(CONFIG_NR_DRAM_BANKS)
> start = gd->bd->bi_dram[0].start;
> -   size = gd->bd->bi_dram[0].size;
>  #else
> start = gd->bd->bi_memstart;
> -   size = gd->bd->bi_memsize;
>  #endif
> +   size = gd->ram_top - start;
>

I'm a little nervous about this change. For ARM we might have
discontinuous DRAM segments. Can you not set bd->bi_memsize insead?

> s = getenv("bootm_low");
> if (s)
> --
> 2.11.0
>

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


Re: [U-Boot] [RESEND PATCH v2 5/6] boston: Bump CONFIG_SYS_BOOTM_LEN to 64MiB

2017-05-04 Thread Simon Glass
On 30 April 2017 at 13:22, Daniel Schwierzeck
 wrote:
> From: Paul Burton 
>
> The default value of CONFIG_SYS_BOOTM_LEN is too small for typical
> boston Linux kernels. Increase the limit to 64MB, which covers current
> kernels with plenty of breathing room.
>
> Signed-off-by: Paul Burton 
> Signed-off-by: Daniel Schwierzeck 
>
> ---
>
> Changes in v2:
> - rebased to current mainline
>
>  include/configs/boston.h | 5 +
>  1 file changed, 5 insertions(+)

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


Re: [U-Boot] [PATCH v3 2/4] tools: moveconfig: cleanup whitelist entries

2017-05-04 Thread Simon Glass
On 2 May 2017 at 03:30, Chris Packham  wrote:
> After moving to KConfig and removing from all headers options should be
> removed from config_whitelist.txt so the build starts complaining if
> someone adds them back.
>
> Acked-by: Masahiro Yamada 
> Signed-off-by: Chris Packham 
> ---
> Simon asked for it so here you go. I also thought about cleaning up the
> README file references too but that will take a little bit of work to
> parse reliably.
>
> Changes in v3:
> - Apply on top of cleanup patch
>
> Changes in v2:
> - Correct typo
> - Collect ack from Masahiro
>
>  tools/moveconfig.py | 20 
>  1 file changed, 20 insertions(+)

Thank you Chris.

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


Re: [U-Boot] [RESEND PATCH v2 3/5] net: pch_gbe: CPU accessible addresses are virtual

2017-05-04 Thread Simon Glass
On 30 April 2017 at 13:57, Daniel Schwierzeck
 wrote:
> From: Paul Burton 
>
> Use the virt_to_bus & bus_to_virt functions rather than phys_to_bus &
> bus_to_phys, since the addresses accessed by the CPU will be virtual
> rather than physical. On MIPS physical & virtual addresses differ as we
> use virtual addresses in kseg0, and attempting to use physical addresses
> directly caused problems as they're in the user segment which would be
> mapped via the uninitialised TLB.
>
> Signed-off-by: Paul Burton 
> Signed-off-by: Daniel Schwierzeck 
> Reviewed-by: Bin Meng 
> Tested-by: Bin Meng 
>
> ---
>
> Changes in v2:
> - move the switch to dm_pci_virt_to_mem() in pch_gbe_rx_descs_init()
>   from the previous patch to this one as suggested by Bin Meng
>
>  drivers/net/pch_gbe.c | 25 +
>  1 file changed, 13 insertions(+), 12 deletions(-)
>

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


Re: [U-Boot] [RESEND PATCH v2 4/5] net: pch_gbe: Add cache maintenance

2017-05-04 Thread Simon Glass
On 30 April 2017 at 13:57, Daniel Schwierzeck
 wrote:
> From: Paul Burton 
>
> On MIPS systems DMA isn't coherent with the CPU caches unless an IOCU is
> present. When there is no IOCU we need to writeback or invalidate the
> data caches at appropriate points. Perform this cache maintenance in
> the pch_gbe driver which is used on the MIPS Boston development board.
>
> Signed-off-by: Paul Burton 
> Reviewed-by: Bin Meng 
> Tested-by: Bin Meng 
> Signed-off-by: Daniel Schwierzeck 
> ---
>
> Changes in v2: None
>
>  drivers/net/pch_gbe.c | 12 
>  1 file changed, 12 insertions(+)

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


Re: [U-Boot] [PATCH v3 1/4] tools: moveconfig: extract helper function for user confirmation

2017-05-04 Thread Simon Glass
On 2 May 2017 at 03:30, Chris Packham  wrote:
> Avoid repetitive code dealing with asking the user for confirmation.
>
> Signed-off-by: Chris Packham 
> ---
>
> Changes in v3: None
> Changes in v2: None
>
>  tools/moveconfig.py | 37 ++---
>  1 file changed, 18 insertions(+), 19 deletions(-)

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


Re: [U-Boot] [U-Boot 3/3] rockchip: rk3288: enable rockusb support on rk3288 based device

2017-05-04 Thread Simon Glass
Hi,

On 4 May 2017 at 03:19, Lukasz Majewski  wrote:
> Hi Eddie, Simon,
>
>> Hi Simon
>>
>> 2017-05-03 18:09 GMT+08:00 Simon Glass :
>> > Hi Eddie,
>> >
>> > On 2 May 2017 at 04:37, Eddie Cai  wrote:
>> >> Hi Simon
>> >> 2017-03-20 10:30 GMT+08:00 Simon Glass :
>> >>> Hi Eddie.
>> >>>
>> >>> On 15 March 2017 at 01:56, Eddie Cai 
>> >>> wrote:
>>  this patch enable rockusb support on rk3288 based device.
>> 
>>  Signed-off-by: Eddie Cai 
>>  ---
>>   include/configs/rk3288_common.h | 4 
>>   1 file changed, 4 insertions(+)
>> >>>
>> >>> I think this should be done in Kconfig.
>> >> since rockusb used so widely on rockchip soc based devices. every
>> >> rockchip soc based
>> >> device should support it. So I would like to put it in
>> >> rk3288_common.h or even rockchip-common.h.
>> >> what do you think?
>> >
>> > We are moving to removing the board config headers so cannot add new
>> > non-Kconfig CONFIG options.
>> >
>> > You can add it to arch/arm/Kconfig - e.g. with 'imply CONFIG_'
>> > under 'config ARCH_ROCKCHIP'.
>> USB_FUNCTION_ROCKUSB depend on USB_GADGET, USB_GADGET_DOWNLOAD,
>> CONFIG_G_DNL_VENDOR_NUM, CONFIG_G_DNL_PRODUCT_NUM
>> should i move those config to arch/arm/Kconfig? how to define
>> CONFIG_G_DNL_VENDOR_NUM
>> and CONFIG_G_DNL_PRODUCT_NUM when select it?
>
> I would prefer to keep those CONFIG options as they are now (and are in
> sync with other gadgets).

These two are new though right?

CONFIG_CMD_ROCKUSB
CONFIG_USB_FUNCTION_ROCKUSB

So they should be added to Kconfig. If they 'depend' on non-Kconfig
options, that's fine IMO. We can't express that until the other
options are converted.

Let's convert them soon!

>
> The problem here is that the gadget infrastructure is a bit
> "problematic" from the device model point of view.
>
> It has his own "structure" borrowed from Linux kernel.
>
> I've poked around and it seems like adding it to DM requires calling
> "g_dnl_register()" with embedded name of the gadget (like
> "usb_dnl_dfu").
>
> And such call is required for each different gadget (like mass storage,
> dfu, fastboot).
>
> Or maybe we should add "stub" DM support to only indicate supported
> gadgets (like dfu, ums, etc) and leave as much code untouched as
> possible?

I'm sure this can be resolved in some way. I admit I have not looked
at it but was thinking of attacking usb_tty sometime, so perhaps might
see if I can figure it out.

>
>> >
>> > Please help to remove any options you can from the headers.
>> >
>> >>>
>> 
>>  diff --git a/include/configs/rk3288_common.h
>>  b/include/configs/rk3288_common.h index b5606d4..b19a34d 100644
>>  --- a/include/configs/rk3288_common.h
>>  +++ b/include/configs/rk3288_common.h
>>  @@ -74,6 +74,10 @@
>>   #define CONFIG_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
>>   #define CONFIG_FASTBOOT_BUF_SIZE   0x0800
>> 
>>  +/* rockusb  */
>>  +#define CONFIG_CMD_ROCKUSB
>>  +#define CONFIG_USB_FUNCTION_ROCKUSB
>>  +
>>   /* usb mass storage */
>>   #define CONFIG_USB_FUNCTION_MASS_STORAGE
>>   #define CONFIG_CMD_USB_MASS_STORAGE
>>  --
>>  2.7.4
>> >
>> > Regards,
>> > Simon

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


Re: [U-Boot] [RESEND PATCH v2 1/5] net: pch_gbe: Reset during probe

2017-05-04 Thread Simon Glass
On 30 April 2017 at 13:57, Daniel Schwierzeck
 wrote:
>
> From: Paul Burton 
>
> Using the EG20T gigabit ethernet controller on the MIPS Boston board, we
> find that we have to reset the controller in order for the RGMII link to
> the PHY to become functional. Without doing so we constantly time out in
> pch_gbe_mdio_ready.
>
> Signed-off-by: Paul Burton 
> Reviewed-by: Bin Meng 
> Tested-by: Bin Meng 
> Signed-off-by: Daniel Schwierzeck 
> ---
>
> Changes in v2: None
>
>  drivers/net/pch_gbe.c | 5 +
>  1 file changed, 5 insertions(+)

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


[U-Boot] [PATCH v5 23/33] ARM: dts: imx6qdl-sabresd: Add imx6dl-sabresd.dts

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add initial dts support for i.MX6 DualLite Sabresd board.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 arch/arm/dts/Makefile   |  1 +
 arch/arm/dts/imx6dl-sabresd.dts | 17 +
 2 files changed, 18 insertions(+)
 create mode 100644 arch/arm/dts/imx6dl-sabresd.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index dfcb59a..42165c0 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -332,6 +332,7 @@ dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb \
imx6sll-evk.dtb \
imx6dl-icore.dtb \
imx6dl-icore-rqs.dtb \
+   imx6dl-sabresd.dtb \
imx6q-icore.dtb \
imx6q-icore-rqs.dtb \
imx6q-logicpd.dtb \
diff --git a/arch/arm/dts/imx6dl-sabresd.dts b/arch/arm/dts/imx6dl-sabresd.dts
new file mode 100644
index 000..1e45f2f
--- /dev/null
+++ b/arch/arm/dts/imx6dl-sabresd.dts
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2013 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include "imx6dl.dtsi"
+#include "imx6qdl-sabresd.dtsi"
+
+/ {
+   model = "Freescale i.MX6 DualLite SABRE Smart Device Board";
+   compatible = "fsl,imx6dl-sabresd", "fsl,imx6dl";
+};
-- 
1.9.1

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


[U-Boot] [PATCH v5 30/33] ARM: i.MX6: sabresd: Move DM_* and OF_CONTROL to arch Kconfig

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Since all defconfig have common CONFIG_DM_* for respective
dm uclass configs move them on arch Kconfig and also move
CONFIG_OF_CONTROL

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 arch/arm/cpu/armv7/mx6/Kconfig| 8 
 configs/imx6dl_sabresd_defconfig  | 8 
 configs/imx6q_sabresd_defconfig   | 8 
 configs/imx6qdl_sabresd_spl_defconfig | 8 
 4 files changed, 8 insertions(+), 24 deletions(-)

diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
index a6958ba..c2aad06 100644
--- a/arch/arm/cpu/armv7/mx6/Kconfig
+++ b/arch/arm/cpu/armv7/mx6/Kconfig
@@ -145,8 +145,16 @@ config TARGET_IMX6SABRESD
bool "imx6sabresd"
select BOARD_LATE_INIT
select SUPPORT_SPL
+   select OF_CONTROL
select DM
+   select DM_ETH
+   select DM_GPIO
+   select DM_I2C
+   select DM_MMC
+   select DM_PMIC
+   select DM_REGULATOR
select DM_THERMAL
+   select DM_USB
select BOARD_EARLY_INIT_F
 
 config TARGET_KOSAGI_NOVENA
diff --git a/configs/imx6dl_sabresd_defconfig b/configs/imx6dl_sabresd_defconfig
index e0fc344..79035fb 100644
--- a/configs/imx6dl_sabresd_defconfig
+++ b/configs/imx6dl_sabresd_defconfig
@@ -45,14 +45,6 @@ CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
-CONFIG_OF_CONTROL=y
-CONFIG_DM_ETH=y
-CONFIG_DM_I2C=y
-CONFIG_DM_GPIO=y
-CONFIG_DM_MMC=y
-CONFIG_DM_PMIC=y
-CONFIG_DM_REGULATOR=y
-CONFIG_DM_USB=y
 # CONFIG_BLK is not set
 # CONFIG_DM_MMC_OPS is not set
 CONFIG_DM_PMIC_PFUZE100=y
diff --git a/configs/imx6q_sabresd_defconfig b/configs/imx6q_sabresd_defconfig
index de44e02..ceb1a80 100644
--- a/configs/imx6q_sabresd_defconfig
+++ b/configs/imx6q_sabresd_defconfig
@@ -45,14 +45,6 @@ CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
-CONFIG_OF_CONTROL=y
-CONFIG_DM_ETH=y
-CONFIG_DM_I2C=y
-CONFIG_DM_GPIO=y
-CONFIG_DM_MMC=y
-CONFIG_DM_PMIC=y
-CONFIG_DM_REGULATOR=y
-CONFIG_DM_USB=y
 # CONFIG_BLK is not set
 # CONFIG_DM_MMC_OPS is not set
 CONFIG_DM_PMIC_PFUZE100=y
diff --git a/configs/imx6qdl_sabresd_spl_defconfig 
b/configs/imx6qdl_sabresd_spl_defconfig
index 9d8c071..7d21932 100644
--- a/configs/imx6qdl_sabresd_spl_defconfig
+++ b/configs/imx6qdl_sabresd_spl_defconfig
@@ -55,14 +55,6 @@ CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
-CONFIG_OF_CONTROL=y
-CONFIG_DM_ETH=y
-CONFIG_DM_I2C=y
-CONFIG_DM_GPIO=y
-CONFIG_DM_MMC=y
-CONFIG_DM_PMIC=y
-CONFIG_DM_REGULATOR=y
-CONFIG_DM_USB=y
 # CONFIG_BLK is not set
 # CONFIG_DM_MMC_OPS is not set
 CONFIG_DM_PMIC_PFUZE100=y
-- 
1.9.1

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


[U-Boot] [PATCH v5 31/33] ARM: i.MX6: sabresd: Drop checkboard

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Since SabreSD is supporting fdt, there is no use
of printing the board name explicitly using checkboard
because dtb supported u-boot will print model like this

Model: Freescale i.MX6 Quad Plus SABRE Smart Device Board

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/freescale/imx6sabresd/imx6sabresd.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/board/freescale/imx6sabresd/imx6sabresd.c 
b/board/freescale/imx6sabresd/imx6sabresd.c
index 18c5d5d..64a44cb 100644
--- a/board/freescale/imx6sabresd/imx6sabresd.c
+++ b/board/freescale/imx6sabresd/imx6sabresd.c
@@ -449,12 +449,6 @@ int board_late_init(void)
return 0;
 }
 
-int checkboard(void)
-{
-   puts("Board: MX6-SabreSD\n");
-   return 0;
-}
-
 #ifdef CONFIG_SPL_BUILD
 #include 
 #include 
-- 
1.9.1

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


[U-Boot] [PATCH v5 25/33] ARM: i.MX6Q: sabresd: Add dts support for imx6q_sabresd

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add devicetree support for imx6q_sabresd non-spl board.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 configs/imx6q_sabresd_defconfig | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/configs/imx6q_sabresd_defconfig b/configs/imx6q_sabresd_defconfig
index e9758e3..6455577 100644
--- a/configs/imx6q_sabresd_defconfig
+++ b/configs/imx6q_sabresd_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_MX6SABRESD=y
 CONFIG_VIDEO=y
+CONFIG_DEFAULT_DEVICE_TREE="imx6q-sabresd"
 
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg,MX6Q"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -44,5 +45,18 @@ CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM_ETH=y
+CONFIG_DM_I2C=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_DM_PMIC=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_USB=y
+# CONFIG_BLK is not set
+# CONFIG_DM_MMC_OPS is not set
+CONFIG_DM_PMIC_PFUZE100=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FEC_MXC=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX6=y
-- 
1.9.1

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


[U-Boot] [PATCH v5 33/33] imx6sabresd: README: Update with dtb changes

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Now SabreSD board support SPL and non-SPL with devicetree
enabled, so update the README according with images generated
with respective builds.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/freescale/imx6sabresd/README | 46 +++---
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/board/freescale/imx6sabresd/README 
b/board/freescale/imx6sabresd/README
index 628d35f..71f9fe2 100644
--- a/board/freescale/imx6sabresd/README
+++ b/board/freescale/imx6sabresd/README
@@ -3,11 +3,11 @@ How to use and build U-Boot on mx6sabresd:
 
 Currently there are four methods for booting mx6sabresd boards:
 
-1. Booting from SD card via normal U-Boot (u-boot.imx)
+1. Booting from SD card via normal U-Boot (u-boot-dtb.imx)
 
 2. Booting from eMMC via normal U-Boot
 
-3. Booting via SPL (SPL and u-boot.img)
+3. Booting via SPL (SPL and u-boot-dtb.img)
 
 4. Booting via Falcon mode (SPL launches the kernel directly)
 
@@ -15,42 +15,42 @@ Currently there are four methods for booting mx6sabresd 
boards:
 1. Booting from SD card via normal U-Boot
 -
 
-$ make mx6qsabresd_defconfig (If you want to build for mx6qsabresd)
+$ make imx6q_sabresd_defconfig (If you want to build for imx6 quad sabresd)
 
 or
 
-$ make mx6dlsabresd_defconfig (If you want to build for mx6dlsabresd)
+$ make imx6dl_sabresd_defconfig (If you want to build for imx6 duallite 
sabresd)
 
 $ make
 
-This will generate the image called u-boot.imx.
+This will generate the image called u-boot-dtb.imx.
 
-- Flash the u-boot.imx binary into the SD card:
+- Flash the u-boot-dtb.imx binary into the SD card:
 
-$ sudo dd if=u-boot.imx of=/dev/sdb bs=1K seek=1 && sync
+$ sudo dd if=u-boot-dtb.imx of=/dev/sdb bs=1K seek=1 && sync
 
 
 2. Booting from eMMC via normal U-Boot
 --
 
-$ make mx6qsabresd_defconfig (If you want to build for mx6qsabresd)
+$ make imx6q_sabresd_defconfig (If you want to build for imx6 quad sabresd)
 
 or
 
-$ make mx6dlsabresd_defconfig (If you want to build for mx6dlsabresd)
+$ make imx6dl_sabresd_defconfig (If you want to build for imx6 duallite 
sabresd)
 
 $ make
 
-This will generate the image called u-boot.imx.
+This will generate the image called u-boot-dtb.imx.
 
-- Flash the u-boot.imx binary into the eMMC:
+- Flash the u-boot-dtb.imx binary into the eMMC:
 
 Set SW6 to download mode: 1100
 
 Plug a usb cable to USB-OTG and load the u-boot image using the imx_usb_loader
 tool (https://github.com/boundarydevices/imx_usb_loader):
 
-$ sudo ./imx_usb u-boot.imx
+$ sudo ./imx_usb u-boot-dtb.imx
 
 In U-boot change the eMMC partition config:
 
@@ -60,9 +60,9 @@ Mount the eMMC in the host PC:
 
 => ums 0 mmc 2
 
-Flash the u-boot.imx binary
+Flash the u-boot-dtb.imx binary
 
-$ sudo dd if=u-boot.imx of=/dev/sdX bs=1K seek=1 && sync
+$ sudo dd if=u-boot-dtb.imx of=/dev/sdX bs=1K seek=1 && sync
 
 Set SW6 to eMMC 8-bit boot: 11010110
 
@@ -70,38 +70,38 @@ Set SW6 to eMMC 8-bit boot: 11010110
 3. Booting via SPL
 --
 
-Other method for building U-Boot on mx6qsabresd and mx6qpsabresd is
+Other method for building U-Boot on imx6 quad and quadplus sabresd is
 through SPL. In order to do so:
 
-$ make mx6sabresd_spl_defconfig
+$ make imx6qdl_sabresd_spl_defconfig
 $ make
 
-This will generate the SPL image called SPL and the u-boot.img.
+This will generate the SPL image called SPL and the u-boot-dtb.img.
 
 - Flash the SPL image into the SD card:
 
 $ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 && sync
 
-- Flash the u-boot.img image into the SD card:
+- Flash the u-boot-dtb.img image into the SD card:
 
-$ sudo dd if=u-boot.img of=/dev/sdb bs=1K seek=69 && sync
+$ sudo dd if=u-boot-dtb.img of=/dev/sdb bs=1K seek=69 && sync
 
 
 4. Booting via Falcon mode
 --
 
-$ make mx6sabresd_spl_defconfig
+$ make imx6qdl_sabresd_spl_defconfig
 $ make
 
-This will generate the SPL image called SPL and the u-boot.img.
+This will generate the SPL image called SPL and the u-boot-dtb.img.
 
 - Flash the SPL image into the SD card:
 
 $ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 oflag=sync status=none && sync
 
-- Flash the u-boot.img image into the SD card:
+- Flash the u-boot-dtb.img image into the SD card:
 
-$ sudo dd if=u-boot.img of=/dev/sdb bs=1K seek=69 oflag=sync status=none && 
sync
+$ sudo dd if=u-boot-dtb.img of=/dev/sdb bs=1K seek=69 oflag=sync status=none 
&& sync
 
 Create a partition for root file system and extract it there:
 
-- 
1.9.1

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


[U-Boot] [PATCH v5 19/33] ARM: i.MX6: sabresd: Enable DM_ETH

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Enable DM_ETH for dt supported sabresd config boards:
- imx6q_sabresd_defconfig
- imx6qp_sabresd_defconfig

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/freescale/mx6sabresd/mx6sabresd.c | 6 ++
 configs/imx6qdl_sabresd_spl_defconfig   | 1 +
 2 files changed, 7 insertions(+)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index ac2cabc..3f73b9b 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -70,6 +70,7 @@ static iomux_v3_cfg_t const uart1_pads[] = {
MX6_PAD_CSI0_DAT11__UART1_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
 };
 
+#ifndef CONFIG_OF_CONTROL
 static iomux_v3_cfg_t const enet_pads[] = {
MX6_PAD_ENET_MDIO__ENET_MDIO| MUX_PAD_CTRL(ENET_PAD_CTRL),
MX6_PAD_ENET_MDC__ENET_MDC  | MUX_PAD_CTRL(ENET_PAD_CTRL),
@@ -100,6 +101,7 @@ static void setup_iomux_enet(void)
gpio_set_value(IMX_GPIO_NR(1, 25), 1);
udelay(100);
 }
+#endif
 
 static iomux_v3_cfg_t const usdhc2_pads[] = {
MX6_PAD_SD2_CLK__SD2_CLK| MUX_PAD_CTRL(USDHC_PAD_CTRL),
@@ -222,6 +224,7 @@ static void setup_spi(void)
imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads));
 }
 
+#ifndef CONFIG_OF_CONTROL
 iomux_v3_cfg_t const pcie_pads[] = {
MX6_PAD_EIM_D19__GPIO3_IO19 | MUX_PAD_CTRL(NO_PAD_CTRL),/* 
POWER */
MX6_PAD_GPIO_17__GPIO7_IO12 | MUX_PAD_CTRL(NO_PAD_CTRL),/* 
RESET */
@@ -231,6 +234,7 @@ static void setup_pcie(void)
 {
imx_iomux_v3_setup_multiple_pads(pcie_pads, ARRAY_SIZE(pcie_pads));
 }
+#endif
 
 iomux_v3_cfg_t const di0_pads[] = {
MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,/* DISP0_CLK */
@@ -507,6 +511,7 @@ int overwrite_console(void)
return 1;
 }
 
+#ifndef CONFIG_OF_CONTROL
 int board_eth_init(bd_t *bis)
 {
setup_iomux_enet();
@@ -514,6 +519,7 @@ int board_eth_init(bd_t *bis)
 
return cpu_eth_init(bis);
 }
+#endif
 
 #if defined(CONFIG_USB_EHCI_MX6) && !defined(CONFIG_DM_USB)
 #define USB_OTHERREGS_OFFSET   0x800
diff --git a/configs/imx6qdl_sabresd_spl_defconfig 
b/configs/imx6qdl_sabresd_spl_defconfig
index ec77587..46f9619 100644
--- a/configs/imx6qdl_sabresd_spl_defconfig
+++ b/configs/imx6qdl_sabresd_spl_defconfig
@@ -56,6 +56,7 @@ CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
 CONFIG_OF_CONTROL=y
+CONFIG_DM_ETH=y
 CONFIG_DM_I2C=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
-- 
1.9.1

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


[U-Boot] [PATCH v5 27/33] ARM: i.MX6: sabresd: Drop legacy non-fdt code

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

- Removed non-fdt code (becuase which has dt support)
- Remove mx6sabresd_spl_defconfig
- Re-arrange the header includes and removed unneeded includes.
- Move the SPL code in #ifdef CONFIG_SPL_BUILD area.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/freescale/mx6sabresd/MAINTAINERS  |   1 -
 board/freescale/mx6sabresd/mx6sabresd.c | 396 +---
 configs/mx6sabresd_spl_defconfig|  54 -
 include/configs/mx6sabresd.h|  23 --
 4 files changed, 63 insertions(+), 411 deletions(-)
 delete mode 100644 configs/mx6sabresd_spl_defconfig

diff --git a/board/freescale/mx6sabresd/MAINTAINERS 
b/board/freescale/mx6sabresd/MAINTAINERS
index 227c6dd..86e62e9 100644
--- a/board/freescale/mx6sabresd/MAINTAINERS
+++ b/board/freescale/mx6sabresd/MAINTAINERS
@@ -5,5 +5,4 @@ F:  board/freescale/mx6sabresd/
 F: include/configs/mx6sabresd.h
 F: configs/imx6dl_sabresd_defconfig
 F: configs/imx6q_sabresd_defconfig
-F: configs/mx6sabresd_spl_defconfig
 F: configs/imx6qdl_sabresd_spl_defconfig
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index 7c28cc7..18c5d5d 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -6,30 +6,24 @@
  * SPDX-License-Identifier:GPL-2.0+
  */
 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
 #include 
-#include 
+#include 
 #include 
+#include 
 #include 
-#include 
-#include 
-#include 
-#include 
+#include 
 #include 
+#include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "../common/pfuze.h"
-#include 
-#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -37,28 +31,9 @@ DECLARE_GLOBAL_DATA_PTR;
PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | \
PAD_CTL_SRE_FAST  | PAD_CTL_HYS)
 
-#define USDHC_PAD_CTRL (PAD_CTL_PUS_47K_UP |   \
-   PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \
-   PAD_CTL_SRE_FAST  | PAD_CTL_HYS)
-
-#define ENET_PAD_CTRL  (PAD_CTL_PUS_100K_UP |  \
-   PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS)
-
 #define SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \
  PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST)
 
-#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 I2C_PMIC   1
-
-#define I2C_PAD MUX_PAD_CTRL(I2C_PAD_CTRL)
-
-#define DISP0_PWR_EN   IMX_GPIO_NR(1, 21)
-
-#define KEY_VOL_UP IMX_GPIO_NR(1, 4)
-
 int dram_init(void)
 {
gd->ram_size = imx_ddr_size();
@@ -70,80 +45,6 @@ static iomux_v3_cfg_t const uart1_pads[] = {
MX6_PAD_CSI0_DAT11__UART1_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
 };
 
-#ifndef CONFIG_OF_CONTROL
-static iomux_v3_cfg_t const enet_pads[] = {
-   MX6_PAD_ENET_MDIO__ENET_MDIO| MUX_PAD_CTRL(ENET_PAD_CTRL),
-   MX6_PAD_ENET_MDC__ENET_MDC  | MUX_PAD_CTRL(ENET_PAD_CTRL),
-   MX6_PAD_RGMII_TXC__RGMII_TXC| MUX_PAD_CTRL(ENET_PAD_CTRL),
-   MX6_PAD_RGMII_TD0__RGMII_TD0| MUX_PAD_CTRL(ENET_PAD_CTRL),
-   MX6_PAD_RGMII_TD1__RGMII_TD1| MUX_PAD_CTRL(ENET_PAD_CTRL),
-   MX6_PAD_RGMII_TD2__RGMII_TD2| MUX_PAD_CTRL(ENET_PAD_CTRL),
-   MX6_PAD_RGMII_TD3__RGMII_TD3| MUX_PAD_CTRL(ENET_PAD_CTRL),
-   MX6_PAD_RGMII_TX_CTL__RGMII_TX_CTL  | MUX_PAD_CTRL(ENET_PAD_CTRL),
-   MX6_PAD_ENET_REF_CLK__ENET_TX_CLK   | MUX_PAD_CTRL(ENET_PAD_CTRL),
-   MX6_PAD_RGMII_RXC__RGMII_RXC| MUX_PAD_CTRL(ENET_PAD_CTRL),
-   MX6_PAD_RGMII_RD0__RGMII_RD0| MUX_PAD_CTRL(ENET_PAD_CTRL),
-   MX6_PAD_RGMII_RD1__RGMII_RD1| MUX_PAD_CTRL(ENET_PAD_CTRL),
-   MX6_PAD_RGMII_RD2__RGMII_RD2| MUX_PAD_CTRL(ENET_PAD_CTRL),
-   MX6_PAD_RGMII_RD3__RGMII_RD3| MUX_PAD_CTRL(ENET_PAD_CTRL),
-   MX6_PAD_RGMII_RX_CTL__RGMII_RX_CTL  | MUX_PAD_CTRL(ENET_PAD_CTRL),
-   /* AR8031 PHY Reset */
-   MX6_PAD_ENET_CRS_DV__GPIO1_IO25 | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
-static void setup_iomux_enet(void)
-{
-   imx_iomux_v3_setup_multiple_pads(enet_pads, ARRAY_SIZE(enet_pads));
-
-   /* Reset AR8031 PHY */
-   gpio_direction_output(IMX_GPIO_NR(1, 25) , 0);
-   mdelay(10);
-   gpio_set_value(IMX_GPIO_NR(1, 25), 1);
-   udelay(100);
-}
-#endif
-
-static iomux_v3_cfg_t const usdhc2_pads[] = {
-   MX6_PAD_SD2_CLK__SD2_CLK| MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD2_CMD__SD2_CMD| MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD2_DAT0__SD2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD2_DAT1__SD2_DATA1 | 

[U-Boot] [PATCH v5 11/33] ARM: i.MX6: sabresd: Enable DM_I2C and DM_PMIC

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Enable DM_I2C, DM_PMIC and DM_PMIC_PFUZE100 for dt
supported sabresd config board

I2C Log:

=> i2c bus
Bus 0:  i2c@021a
Bus 1:  i2c@021a4000
   08: pfuze100@08, offset len 1, flags 0
Bus 2:  i2c@021a8000
=> i2c dev 1
Setting bus to 1
=> i2c speed 10
Setting bus speed to 10 Hz
=> i2c probe
Valid chip addresses: 08 48
=> i2c md 08 0x0 0x20
: 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=> i2c md 48 0x0 0x20
: 00 f0 00 00 00 00 00 00 00 00 00 80 70 41 41 41pAAA
0010: 00 00 00 80 70 41 41 41 41 41 41 41 41 41 41 41pAAA

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/freescale/mx6sabresd/mx6sabresd.c | 7 ++-
 configs/imx6qdl_sabresd_spl_defconfig   | 3 +++
 include/configs/mx6sabresd.h| 4 +++-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index f7a89bc..f832697 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -202,6 +202,7 @@ static void enable_lvds(struct display_info_t const *dev)
enable_backlight();
 }
 
+#ifndef CONFIG_DM_I2C
 static struct i2c_pads_info i2c_pad_info1 = {
.scl = {
.i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL | I2C_PAD,
@@ -214,6 +215,7 @@ static struct i2c_pads_info i2c_pad_info1 = {
.gp = IMX_GPIO_NR(4, 13)
}
 };
+#endif
 
 static void setup_spi(void)
 {
@@ -594,8 +596,9 @@ int board_init(void)
 #ifdef CONFIG_MXC_SPI
setup_spi();
 #endif
+#ifndef CONFIG_DM_I2C
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, _pad_info1);
-
+#endif
 #ifdef CONFIG_USB_EHCI_MX6
setup_usb();
 #endif
@@ -603,6 +606,7 @@ int board_init(void)
return 0;
 }
 
+#ifndef CONFIG_DM_PMIC
 int power_init_board(void)
 {
struct pmic *p;
@@ -631,6 +635,7 @@ int power_init_board(void)
 
return 0;
 }
+#endif
 
 #ifdef CONFIG_MXC_SPI
 int board_spi_cs_gpio(unsigned bus, unsigned cs)
diff --git a/configs/imx6qdl_sabresd_spl_defconfig 
b/configs/imx6qdl_sabresd_spl_defconfig
index dc06b50..14021db 100644
--- a/configs/imx6qdl_sabresd_spl_defconfig
+++ b/configs/imx6qdl_sabresd_spl_defconfig
@@ -54,10 +54,13 @@ CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
 CONFIG_OF_CONTROL=y
+CONFIG_DM_I2C=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
+CONFIG_DM_PMIC=y
 # CONFIG_BLK is not set
 # CONFIG_DM_MMC_OPS is not set
+CONFIG_DM_PMIC_PFUZE100=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index 7c0e7a5..6ece575 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -52,7 +52,7 @@
 #endif
 
 /* I2C Configs */
-#ifdef CONFIG_SYS_I2C_MXC
+#if defined(CONFIG_SYS_I2C_MXC) && !defined(CONFIG_DM_I2C)
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_I2C_MXC_I2C1/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2/* enable I2C bus 2 */
@@ -61,10 +61,12 @@
 #endif
 
 /* PMIC */
+#ifndef CONFIG_DM_PMIC_PFUZE100
 #define CONFIG_POWER
 #define CONFIG_POWER_I2C
 #define CONFIG_POWER_PFUZE100
 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
+#endif
 
 /* USB Configs */
 #ifdef CONFIG_CMD_USB
-- 
1.9.1

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


[U-Boot] [PATCH v5 28/33] ARM: i.MX6: %s/mx6sabresd/imx6sabresd

2017-05-04 Thread Jagan Teki
Rename all mx6sabresd files and directories to imx6sabresd,
this will eventually compatible with Linux i.MX file notations
and also some of the boards(engicam) in the current tree are now
following same convention.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 arch/arm/cpu/armv7/mx6/Kconfig |   4 +-
 .../freescale/{mx6sabresd => imx6sabresd}/Kconfig  |   4 +-
 .../{mx6sabresd => imx6sabresd}/MAINTAINERS|   3 +-
 .../freescale/{mx6sabresd => imx6sabresd}/Makefile |   2 +-
 board/freescale/{mx6sabresd => imx6sabresd}/README |   0
 .../mx6sabresd.c => imx6sabresd/imx6sabresd.c} |   0
 board/freescale/imx6sabresd/mx6dlsabresd.cfg   | 131 
 board/freescale/imx6sabresd/mx6q_4x_mt41j128.cfg   | 169 +
 configs/imx6dl_sabresd_defconfig   |   2 +-
 configs/imx6q_sabresd_defconfig|   2 +-
 include/configs/{mx6sabresd.h => imx6sabresd.h}|   0
 11 files changed, 309 insertions(+), 8 deletions(-)
 rename board/freescale/{mx6sabresd => imx6sabresd}/Kconfig (70%)
 rename board/freescale/{mx6sabresd => imx6sabresd}/MAINTAINERS (76%)
 rename board/freescale/{mx6sabresd => imx6sabresd}/Makefile (86%)
 rename board/freescale/{mx6sabresd => imx6sabresd}/README (100%)
 rename board/freescale/{mx6sabresd/mx6sabresd.c => imx6sabresd/imx6sabresd.c} 
(100%)
 create mode 100644 board/freescale/imx6sabresd/mx6dlsabresd.cfg
 create mode 100644 board/freescale/imx6sabresd/mx6q_4x_mt41j128.cfg
 rename include/configs/{mx6sabresd.h => imx6sabresd.h} (100%)

diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
index af6dad3..5b7c246 100644
--- a/arch/arm/cpu/armv7/mx6/Kconfig
+++ b/arch/arm/cpu/armv7/mx6/Kconfig
@@ -204,7 +204,7 @@ config TARGET_MX6QSABREAUTO
select BOARD_EARLY_INIT_F
 
 config TARGET_MX6SABRESD
-   bool "mx6sabresd"
+   bool "imx6sabresd"
select BOARD_LATE_INIT
select SUPPORT_SPL
select DM
@@ -404,9 +404,9 @@ source "board/engicam/geam6ul/Kconfig"
 source "board/engicam/icorem6/Kconfig"
 source "board/engicam/icorem6_rqs/Kconfig"
 source "board/engicam/isiotmx6ul/Kconfig"
+source "board/freescale/imx6sabresd/Kconfig"
 source "board/freescale/mx6qarm2/Kconfig"
 source "board/freescale/mx6qsabreauto/Kconfig"
-source "board/freescale/mx6sabresd/Kconfig"
 source "board/freescale/mx6slevk/Kconfig"
 source "board/freescale/mx6sllevk/Kconfig"
 source "board/freescale/mx6sxsabresd/Kconfig"
diff --git a/board/freescale/mx6sabresd/Kconfig 
b/board/freescale/imx6sabresd/Kconfig
similarity index 70%
rename from board/freescale/mx6sabresd/Kconfig
rename to board/freescale/imx6sabresd/Kconfig
index e87dea0..54eebf0 100644
--- a/board/freescale/mx6sabresd/Kconfig
+++ b/board/freescale/imx6sabresd/Kconfig
@@ -1,12 +1,12 @@
 if TARGET_MX6SABRESD
 
 config SYS_BOARD
-   default "mx6sabresd"
+   default "imx6sabresd"
 
 config SYS_VENDOR
default "freescale"
 
 config SYS_CONFIG_NAME
-   default "mx6sabresd"
+   default "imx6sabresd"
 
 endif
diff --git a/board/freescale/mx6sabresd/MAINTAINERS 
b/board/freescale/imx6sabresd/MAINTAINERS
similarity index 76%
rename from board/freescale/mx6sabresd/MAINTAINERS
rename to board/freescale/imx6sabresd/MAINTAINERS
index 86e62e9..af72f92 100644
--- a/board/freescale/mx6sabresd/MAINTAINERS
+++ b/board/freescale/imx6sabresd/MAINTAINERS
@@ -1,8 +1,9 @@
 MX6SABRESD BOARD
 M: Fabio Estevam 
 S: Maintained
-F: board/freescale/mx6sabresd/
 F: include/configs/mx6sabresd.h
+F: board/freescale/imx6sabresd/
+F: include/configs/imx6sabresd.h
 F: configs/imx6dl_sabresd_defconfig
 F: configs/imx6q_sabresd_defconfig
 F: configs/imx6qdl_sabresd_spl_defconfig
diff --git a/board/freescale/mx6sabresd/Makefile 
b/board/freescale/imx6sabresd/Makefile
similarity index 86%
rename from board/freescale/mx6sabresd/Makefile
rename to board/freescale/imx6sabresd/Makefile
index cfca2ef..5459f46 100644
--- a/board/freescale/mx6sabresd/Makefile
+++ b/board/freescale/imx6sabresd/Makefile
@@ -6,4 +6,4 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-obj-y  := mx6sabresd.o
+obj-y  := imx6sabresd.o
diff --git a/board/freescale/mx6sabresd/README 
b/board/freescale/imx6sabresd/README
similarity index 100%
rename from board/freescale/mx6sabresd/README
rename to board/freescale/imx6sabresd/README
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/imx6sabresd/imx6sabresd.c
similarity index 100%
rename from board/freescale/mx6sabresd/mx6sabresd.c
rename to board/freescale/imx6sabresd/imx6sabresd.c
diff --git a/board/freescale/imx6sabresd/mx6dlsabresd.cfg 
b/board/freescale/imx6sabresd/mx6dlsabresd.cfg
new file mode 100644
index 000..be9f87f
--- /dev/null
+++ b/board/freescale/imx6sabresd/mx6dlsabresd.cfg
@@ -0,0 

[U-Boot] [PATCH v5 07/33] ARM: i.MX6QP: sabresd: Add initial devicetree support

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add initial dts support for i.MX6 Quad Plus Sabresd board.

Boot from MMC:
-
U-Boot SPL 2017.03-33690-ga80e4f6-dirty (Mar 30 2017 - 00:40:29)
Trying to boot from MMC1

U-Boot 2017.03-33690-ga80e4f6-dirty (Mar 30 2017 - 00:40:29 +0530)

CPU:   Freescale i.MX6QP rev1.0 996 MHz (running at 792 MHz)
CPU:   Automotive temperature grade (-40C to 125C) at 29C
Reset cause: POR
Model: Freescale i.MX6 Quad Plus SABRE Smart Device Board
Board: MX6-SabreSD
I2C:   ready
DRAM:  1 GiB
PMIC:  PFUZE100 ID=0x10
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
*** Warning - bad CRC, using default environment

gpio@020a4000: dir_output: error: gpio GPIO3_19 not reserved
gpio@020a4000: set_value: error: gpio GPIO3_19 not reserved
gpio@020b4000: dir_output: error: gpio GPIO7_12 not reserved
gpio@020b4000: set_value: error: gpio GPIO7_12 not reserved
PCI:   pcie phy link never came up
No panel detected: default to Hannstar-XGA
gpio@0209c000: dir_output: error: gpio GPIO1_21 not reserved
Display: Hannstar-XGA (1024x768)
In:serial
Out:   serial
Err:   serial
Net:   gpio@0209c000: dir_output: error: gpio GPIO1_25 not reserved
gpio@0209c000: set_value: error: gpio GPIO1_25 not reserved
FEC [PRIME]
Hit any key to stop autoboot:  0
=>

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/freescale/mx6sabresd/mx6sabresd.c | 4 +++-
 configs/imx6qdl_sabresd_spl_defconfig   | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index 93d0dc4..f7a89bc 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -772,7 +772,9 @@ int spl_start_uboot(void)
 #ifdef CONFIG_SPL_LOAD_FIT
 int board_fit_config_name_match(const char *name)
 {
-   if (is_mx6dq() && !strcmp(name, "imx6q-sabresd"))
+   if (is_mx6dqp() && !strcmp(name, "imx6qp-sabresd"))
+   return 0;
+   else if (is_mx6dq() && !strcmp(name, "imx6q-sabresd"))
return 0;
else
return -1;
diff --git a/configs/imx6qdl_sabresd_spl_defconfig 
b/configs/imx6qdl_sabresd_spl_defconfig
index 27c1311..a292518 100644
--- a/configs/imx6qdl_sabresd_spl_defconfig
+++ b/configs/imx6qdl_sabresd_spl_defconfig
@@ -13,7 +13,7 @@ CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_OF_LIBFDT=y
 CONFIG_VIDEO=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6q-sabresd"
-CONFIG_OF_LIST="imx6q-sabresd"
+CONFIG_OF_LIST="imx6qp-sabresd imx6q-sabresd"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
-- 
1.9.1

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


[U-Boot] [PATCH v5 22/33] ARM: i.MX6: sabresd: Add imx6_pcie_toggle_reset

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add imx6_pcie_toggle_reset on board file using dm_gpio_*
calls for OF_CONTROL configs.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/freescale/mx6sabresd/mx6sabresd.c | 31 +++
 1 file changed, 31 insertions(+)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index 2ed4e50..7c28cc7 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -561,6 +561,37 @@ int imx6_pcie_toggle_power(void)
 #endif
return 0;
 }
+
+int imx6_pcie_toggle_reset(void)
+{
+#ifdef CONFIG_PCIE_IMX_PERST_GPIO
+   struct gpio_desc reset;
+   int ret;
+
+   ret = dm_gpio_lookup_name("GPIO7_12", );
+   if (ret) {
+   printf("Cannot get GPIO7_12\n");
+   return ret;
+   }
+
+   ret = dm_gpio_request(, "reset");
+   if (ret) {
+   printf("Cannot request GPIO7_12\n");
+   return ret;
+   }
+
+   dm_gpio_set_dir_flags(, GPIOD_IS_OUT);
+
+   dm_gpio_set_value(, 0);
+   mdelay(20);
+   dm_gpio_set_value(, 1);
+   mdelay(20);
+
+#else
+   puts("WARNING: Make sure the PCIe #PERST line is connected!\n");
+#endif
+   return 0;
+}
 #endif
 
 #ifndef CONFIG_OF_CONTROL
-- 
1.9.1

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


[U-Boot] [PATCH v5 26/33] ARM: i.MX6DL: sabresd: Add dts support for imx6dl_sabresd

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add devicetree support for imx6dl_sabresd non-spl board.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 configs/imx6dl_sabresd_defconfig | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/configs/imx6dl_sabresd_defconfig b/configs/imx6dl_sabresd_defconfig
index c61fcd2..17df90b 100644
--- a/configs/imx6dl_sabresd_defconfig
+++ b/configs/imx6dl_sabresd_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_MX6SABRESD=y
 CONFIG_VIDEO=y
+CONFIG_DEFAULT_DEVICE_TREE="imx6dl-sabresd"
 
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6dlsabresd.cfg,MX6DL"
 CONFIG_BOOTDELAY=3
 # CONFIG_CONSOLE_MUX is not set
@@ -44,5 +45,18 @@ CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
+CONFIG_OF_CONTROL=y
+CONFIG_DM_ETH=y
+CONFIG_DM_I2C=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_DM_PMIC=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_USB=y
+# CONFIG_BLK is not set
+# CONFIG_DM_MMC_OPS is not set
+CONFIG_DM_PMIC_PFUZE100=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FEC_MXC=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX6=y
-- 
1.9.1

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


[U-Boot] [PATCH v5 18/33] ARM: i.MX6: sabre: Move CONFIG_FEC_MXC to defconfigs

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Moved CONFIG_FEC_MXC from include/configs/mxsabresd.h
to imx6 sabresd and sabreauto defconfigs.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 configs/imx6qdl_sabresd_spl_defconfig | 1 +
 configs/mx6dlsabreauto_defconfig  | 2 ++
 configs/mx6dlsabresd_defconfig| 1 +
 configs/mx6qpsabreauto_defconfig  | 2 ++
 configs/mx6qsabreauto_defconfig   | 2 ++
 configs/mx6qsabresd_defconfig | 1 +
 configs/mx6sabresd_spl_defconfig  | 1 +
 include/configs/mx6sabre_common.h | 3 ++-
 8 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/configs/imx6qdl_sabresd_spl_defconfig 
b/configs/imx6qdl_sabresd_spl_defconfig
index 4d37aff..ec77587 100644
--- a/configs/imx6qdl_sabresd_spl_defconfig
+++ b/configs/imx6qdl_sabresd_spl_defconfig
@@ -66,5 +66,6 @@ CONFIG_DM_USB=y
 # CONFIG_DM_MMC_OPS is not set
 CONFIG_DM_PMIC_PFUZE100=y
 CONFIG_SYS_I2C_MXC=y
+CONFIG_FEC_MXC=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
diff --git a/configs/mx6dlsabreauto_defconfig b/configs/mx6dlsabreauto_defconfig
index ba5ab8a..dae89fe 100644
--- a/configs/mx6dlsabreauto_defconfig
+++ b/configs/mx6dlsabreauto_defconfig
@@ -42,3 +42,5 @@ CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
+CONFIG_NETDEVICES=y
+CONFIG_FEC_MXC=y
diff --git a/configs/mx6dlsabresd_defconfig b/configs/mx6dlsabresd_defconfig
index 64a024b..c61fcd2 100644
--- a/configs/mx6dlsabresd_defconfig
+++ b/configs/mx6dlsabresd_defconfig
@@ -45,3 +45,4 @@ CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
 CONFIG_SYS_I2C_MXC=y
+CONFIG_FEC_MXC=y
diff --git a/configs/mx6qpsabreauto_defconfig b/configs/mx6qpsabreauto_defconfig
index 96a248e..2f95ab0 100644
--- a/configs/mx6qpsabreauto_defconfig
+++ b/configs/mx6qpsabreauto_defconfig
@@ -41,3 +41,5 @@ CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
+CONFIG_NETDEVICES=y
+CONFIG_FEC_MXC=y
diff --git a/configs/mx6qsabreauto_defconfig b/configs/mx6qsabreauto_defconfig
index 015207d..20b39dc 100644
--- a/configs/mx6qsabreauto_defconfig
+++ b/configs/mx6qsabreauto_defconfig
@@ -42,3 +42,5 @@ CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
+CONFIG_NETDEVICES=y
+CONFIG_FEC_MXC=y
diff --git a/configs/mx6qsabresd_defconfig b/configs/mx6qsabresd_defconfig
index 8617094..e9758e3 100644
--- a/configs/mx6qsabresd_defconfig
+++ b/configs/mx6qsabresd_defconfig
@@ -45,3 +45,4 @@ CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
 CONFIG_SYS_I2C_MXC=y
+CONFIG_FEC_MXC=y
diff --git a/configs/mx6sabresd_spl_defconfig b/configs/mx6sabresd_spl_defconfig
index c3eb03c..bba77b6 100644
--- a/configs/mx6sabresd_spl_defconfig
+++ b/configs/mx6sabresd_spl_defconfig
@@ -51,3 +51,4 @@ CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
 CONFIG_SYS_I2C_MXC=y
+CONFIG_FEC_MXC=y
diff --git a/include/configs/mx6sabre_common.h 
b/include/configs/mx6sabre_common.h
index 9b0fe5a..fbddb86 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -21,7 +21,7 @@
 /* MMC Configs */
 #define CONFIG_SYS_FSL_ESDHC_ADDR  0
 
-#define CONFIG_FEC_MXC
+#ifdef CONFIG_FEC_MXC
 #define CONFIG_MII
 #define IMX_FEC_BASE   ENET_BASE_ADDR
 #define CONFIG_FEC_XCV_TYPERGMII
@@ -30,6 +30,7 @@
 
 #define CONFIG_PHYLIB
 #define CONFIG_PHY_ATHEROS
+#endif
 
 #ifdef CONFIG_CMD_SF
 #define CONFIG_MXC_SPI
-- 
1.9.1

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


[U-Boot] [PATCH v5 14/33] ARM: dts: imx6qdl-sabresd: Add usb otg node

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add usb otg node for i.MX6QDL sabresd boards.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 arch/arm/dts/imx6qdl-sabresd.dtsi | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm/dts/imx6qdl-sabresd.dtsi 
b/arch/arm/dts/imx6qdl-sabresd.dtsi
index e38e370..0e104c1 100644
--- a/arch/arm/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/dts/imx6qdl-sabresd.dtsi
@@ -21,6 +21,17 @@
reg = <0x1000 0x4000>;
};
 
+   reg_usb_otg_vbus: regulator@0 {
+   compatible = "regulator-fixed";
+   reg = <0>;
+   regulator-name = "usb_otg_vbus";
+   regulator-min-microvolt = <500>;
+   regulator-max-microvolt = <500>;
+   gpio = < 22 0>;
+   enable-active-high;
+   vin-supply = <_reg>;
+   };
+
reg_usb_h1_vbus: regulator@1 {
compatible = "regulator-fixed";
reg = <1>;
@@ -77,6 +88,13 @@
status = "okay";
 };
 
+ {
+   vbus-supply = <_usb_otg_vbus>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_usbotg>;
+   status = "okay";
+};
+
  {
pinctrl-names = "default";
pinctrl-0 = <_usdhc2>;
@@ -134,6 +152,11 @@
>;
};
 
+   pinctrl_usbotg: usbotggrp {
+   fsl,pins = <
+   MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID   0x17059
+   >;
+   };
 
pinctrl_usdhc2: usdhc2grp {
fsl,pins = <
-- 
1.9.1

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


[U-Boot] [PATCH v5 29/33] ARM: i.MX6: %s/MX6SABRESD/IMX6SABRESD

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Rename MX6SABRESD with IMX6SABRESD so-that it can
compatible with Linux i.MX file notations.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 arch/arm/cpu/armv7/mx6/Kconfig  | 16 
 board/freescale/imx6sabresd/Kconfig |  2 +-
 board/freescale/imx6sabresd/MAINTAINERS |  2 +-
 configs/imx6dl_sabresd_defconfig|  2 +-
 configs/imx6q_sabresd_defconfig |  2 +-
 configs/imx6qdl_sabresd_spl_defconfig   |  2 +-
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
index 5b7c246..a6958ba 100644
--- a/arch/arm/cpu/armv7/mx6/Kconfig
+++ b/arch/arm/cpu/armv7/mx6/Kconfig
@@ -141,6 +141,14 @@ config TARGET_GW_VENTANA
bool "gw_ventana"
select SUPPORT_SPL
 
+config TARGET_IMX6SABRESD
+   bool "imx6sabresd"
+   select BOARD_LATE_INIT
+   select SUPPORT_SPL
+   select DM
+   select DM_THERMAL
+   select BOARD_EARLY_INIT_F
+
 config TARGET_KOSAGI_NOVENA
bool "Kosagi Novena"
select BOARD_LATE_INIT
@@ -203,14 +211,6 @@ config TARGET_MX6QSABREAUTO
select DM_THERMAL
select BOARD_EARLY_INIT_F
 
-config TARGET_MX6SABRESD
-   bool "imx6sabresd"
-   select BOARD_LATE_INIT
-   select SUPPORT_SPL
-   select DM
-   select DM_THERMAL
-   select BOARD_EARLY_INIT_F
-
 config TARGET_MX6SLEVK
bool "mx6slevk"
select SUPPORT_SPL
diff --git a/board/freescale/imx6sabresd/Kconfig 
b/board/freescale/imx6sabresd/Kconfig
index 54eebf0..958b90d 100644
--- a/board/freescale/imx6sabresd/Kconfig
+++ b/board/freescale/imx6sabresd/Kconfig
@@ -1,4 +1,4 @@
-if TARGET_MX6SABRESD
+if TARGET_IMX6SABRESD
 
 config SYS_BOARD
default "imx6sabresd"
diff --git a/board/freescale/imx6sabresd/MAINTAINERS 
b/board/freescale/imx6sabresd/MAINTAINERS
index af72f92..742799f 100644
--- a/board/freescale/imx6sabresd/MAINTAINERS
+++ b/board/freescale/imx6sabresd/MAINTAINERS
@@ -1,4 +1,4 @@
-MX6SABRESD BOARD
+IMX6SABRESD BOARD
 M: Fabio Estevam 
 S: Maintained
 F: include/configs/mx6sabresd.h
diff --git a/configs/imx6dl_sabresd_defconfig b/configs/imx6dl_sabresd_defconfig
index 91a5776..e0fc344 100644
--- a/configs/imx6dl_sabresd_defconfig
+++ b/configs/imx6dl_sabresd_defconfig
@@ -1,6 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
-CONFIG_TARGET_MX6SABRESD=y
+CONFIG_TARGET_IMX6SABRESD=y
 CONFIG_VIDEO=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6dl-sabresd"
 
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/imx6sabresd/mx6dlsabresd.cfg,MX6DL"
diff --git a/configs/imx6q_sabresd_defconfig b/configs/imx6q_sabresd_defconfig
index 43ca1fc..de44e02 100644
--- a/configs/imx6q_sabresd_defconfig
+++ b/configs/imx6q_sabresd_defconfig
@@ -1,6 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
-CONFIG_TARGET_MX6SABRESD=y
+CONFIG_TARGET_IMX6SABRESD=y
 CONFIG_VIDEO=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6q-sabresd"
 
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/imx6sabresd/mx6q_4x_mt41j128.cfg,MX6Q"
diff --git a/configs/imx6qdl_sabresd_spl_defconfig 
b/configs/imx6qdl_sabresd_spl_defconfig
index 46f9619..9d8c071 100644
--- a/configs/imx6qdl_sabresd_spl_defconfig
+++ b/configs/imx6qdl_sabresd_spl_defconfig
@@ -3,7 +3,7 @@ CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_TARGET_MX6SABRESD=y
+CONFIG_TARGET_IMX6SABRESD=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
-- 
1.9.1

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


[U-Boot] [PATCH v5 10/33] ARM: dts: imx6qdl-sabresd: Add PMIC pfuze100 node

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add PMIC pfuze100 node via i2c2 for i.MX6QDL sabresd boards.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 arch/arm/dts/imx6qdl-sabresd.dtsi | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/dts/imx6qdl-sabresd.dtsi 
b/arch/arm/dts/imx6qdl-sabresd.dtsi
index 491fdbf..4afa108 100644
--- a/arch/arm/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/dts/imx6qdl-sabresd.dtsi
@@ -34,6 +34,11 @@
pinctrl-names = "default";
pinctrl-0 = <_i2c2>;
status = "okay";
+
+   pmic: pfuze100@08 {
+   compatible = "fsl,pfuze100";
+   reg = <0x08>;
+   };
 };
 
  {
-- 
1.9.1

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


[U-Boot] [PATCH v5 15/33] ARM: i.MX6: sabresd: Enable CONFIG_DM_REGULATOR

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Enable CONFIG_DM_REGULATOR for i.MX6QDL sabresd boards.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 configs/imx6qdl_sabresd_spl_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/imx6qdl_sabresd_spl_defconfig 
b/configs/imx6qdl_sabresd_spl_defconfig
index 0ed8122..7cad5ab 100644
--- a/configs/imx6qdl_sabresd_spl_defconfig
+++ b/configs/imx6qdl_sabresd_spl_defconfig
@@ -60,6 +60,7 @@ CONFIG_DM_I2C=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_DM_PMIC=y
+CONFIG_DM_REGULATOR=y
 # CONFIG_BLK is not set
 # CONFIG_DM_MMC_OPS is not set
 CONFIG_DM_PMIC_PFUZE100=y
-- 
1.9.1

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


[U-Boot] [PATCH v5 13/33] ARM: dts: imx6qdl-sabresd: Add usb host node

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add usb host node for i.MX6QDL sabresd boards.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 arch/arm/dts/imx6qdl-sabresd.dtsi | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm/dts/imx6qdl-sabresd.dtsi 
b/arch/arm/dts/imx6qdl-sabresd.dtsi
index 4afa108..e38e370 100644
--- a/arch/arm/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/dts/imx6qdl-sabresd.dtsi
@@ -20,6 +20,17 @@
memory {
reg = <0x1000 0x4000>;
};
+
+   reg_usb_h1_vbus: regulator@1 {
+   compatible = "regulator-fixed";
+   reg = <1>;
+   regulator-name = "usb_h1_vbus";
+   regulator-min-microvolt = <500>;
+   regulator-max-microvolt = <500>;
+   gpio = < 29 0>;
+   enable-active-high;
+   vin-supply = <_reg>;
+   };
 };
 
  {
@@ -38,6 +49,13 @@
pmic: pfuze100@08 {
compatible = "fsl,pfuze100";
reg = <0x08>;
+
+   regulators {
+   swbst_reg: swbst {
+   regulator-min-microvolt = <500>;
+   regulator-max-microvolt = <515>;
+   };
+   };
};
 };
 
@@ -54,6 +72,11 @@
status = "okay";
 };
 
+ {
+   vbus-supply = <_usb_h1_vbus>;
+   status = "okay";
+};
+
  {
pinctrl-names = "default";
pinctrl-0 = <_usdhc2>;
-- 
1.9.1

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


[U-Boot] [PATCH v5 21/33] ARM: i.MX6: sabresd: Add imx6_pcie_toggle_power

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add imx6_pcie_toggle_power on board file using dm_gpio_*
calls for OF_CONTROL configs.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/freescale/mx6sabresd/mx6sabresd.c | 30 ++
 1 file changed, 30 insertions(+)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index 1df81b9..2ed4e50 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -533,6 +533,36 @@ int overwrite_console(void)
return 1;
 }
 
+#ifdef CONFIG_OF_CONTROL
+int imx6_pcie_toggle_power(void)
+{
+#ifdef CONFIG_PCIE_IMX_POWER_GPIO
+   struct gpio_desc toggle;
+   int ret;
+
+   ret = dm_gpio_lookup_name("GPIO3_19", );
+   if (ret) {
+   printf("Cannot get GPIO3_19\n");
+   return ret;
+   }
+
+   ret = dm_gpio_request(, "toggle");
+   if (ret) {
+   printf("Cannot request GPIO3_19\n");
+   return ret;
+   }
+
+   dm_gpio_set_dir_flags(, GPIOD_IS_OUT);
+
+   dm_gpio_set_value(, 0);
+   mdelay(20);
+   dm_gpio_set_value(, 1);
+   mdelay(20);
+#endif
+   return 0;
+}
+#endif
+
 #ifndef CONFIG_OF_CONTROL
 int board_eth_init(bd_t *bis)
 {
-- 
1.9.1

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


[U-Boot] [PATCH v5 08/33] ARM: i.MX6: sabresd: Move CONFIG_SYS_I2C_MXC to defconfigs

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Moved CONFIG_SYS_I2C_MXC from include/configs/mxsabresd.h
to imx6 sabresd defconfigs.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 configs/imx6qdl_sabresd_spl_defconfig | 1 +
 configs/mx6dlsabresd_defconfig| 1 +
 configs/mx6qsabresd_defconfig | 1 +
 configs/mx6sabresd_spl_defconfig  | 1 +
 include/configs/mx6sabresd.h  | 3 ++-
 5 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/configs/imx6qdl_sabresd_spl_defconfig 
b/configs/imx6qdl_sabresd_spl_defconfig
index a292518..dc06b50 100644
--- a/configs/imx6qdl_sabresd_spl_defconfig
+++ b/configs/imx6qdl_sabresd_spl_defconfig
@@ -58,5 +58,6 @@ CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
 # CONFIG_BLK is not set
 # CONFIG_DM_MMC_OPS is not set
+CONFIG_SYS_I2C_MXC=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
diff --git a/configs/mx6dlsabresd_defconfig b/configs/mx6dlsabresd_defconfig
index 0254a53..56f629f 100644
--- a/configs/mx6dlsabresd_defconfig
+++ b/configs/mx6dlsabresd_defconfig
@@ -42,3 +42,4 @@ CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
+CONFIG_SYS_I2C_MXC=y
diff --git a/configs/mx6qsabresd_defconfig b/configs/mx6qsabresd_defconfig
index cef7f1a..e598dc8 100644
--- a/configs/mx6qsabresd_defconfig
+++ b/configs/mx6qsabresd_defconfig
@@ -42,3 +42,4 @@ CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
+CONFIG_SYS_I2C_MXC=y
diff --git a/configs/mx6sabresd_spl_defconfig b/configs/mx6sabresd_spl_defconfig
index c89c3c6..d52e48f 100644
--- a/configs/mx6sabresd_spl_defconfig
+++ b/configs/mx6sabresd_spl_defconfig
@@ -48,3 +48,4 @@ CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_OF_LIBFDT=y
+CONFIG_SYS_I2C_MXC=y
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index 9885a5c..7c0e7a5 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -52,12 +52,13 @@
 #endif
 
 /* I2C Configs */
+#ifdef CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_MXC_I2C1/* enable I2C bus 1 */
 #define CONFIG_SYS_I2C_MXC_I2C2/* enable I2C bus 2 */
 #define CONFIG_SYS_I2C_MXC_I2C3/* enable I2C bus 3 */
 #define CONFIG_SYS_I2C_SPEED 10
+#endif
 
 /* PMIC */
 #define CONFIG_POWER
-- 
1.9.1

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


[U-Boot] [PATCH v5 32/33] ARM: i.MX6: sabresd: Cleanup board code

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

- Give proper tab alignment for display_info_t structure
- Add tab spaces UART_PAD_CTRL and SPI_PAD_CTRL
- Give proper alignment of reg init values on setup_display
- Add space and newline on board_init_f

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/freescale/imx6sabresd/imx6sabresd.c | 183 +++---
 1 file changed, 94 insertions(+), 89 deletions(-)

diff --git a/board/freescale/imx6sabresd/imx6sabresd.c 
b/board/freescale/imx6sabresd/imx6sabresd.c
index 64a44cb..7af18bc 100644
--- a/board/freescale/imx6sabresd/imx6sabresd.c
+++ b/board/freescale/imx6sabresd/imx6sabresd.c
@@ -27,12 +27,11 @@
 
 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 SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \
- PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST)
+#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 SPI_PAD_CTRL   (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \
+   PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST)
 
 int dram_init(void)
 {
@@ -201,67 +200,72 @@ static void do_enable_hdmi(struct display_info_t const 
*dev)
imx_enable_hdmi_phy();
 }
 
-struct display_info_t const displays[] = {{
-   .bus= -1,
-   .addr   = 0,
-   .pixfmt = IPU_PIX_FMT_RGB666,
-   .detect = NULL,
-   .enable = enable_lvds,
-   .mode   = {
-   .name   = "Hannstar-XGA",
-   .refresh= 60,
-   .xres   = 1024,
-   .yres   = 768,
-   .pixclock   = 15384,
-   .left_margin= 160,
-   .right_margin   = 24,
-   .upper_margin   = 29,
-   .lower_margin   = 3,
-   .hsync_len  = 136,
-   .vsync_len  = 6,
-   .sync   = FB_SYNC_EXT,
-   .vmode  = FB_VMODE_NONINTERLACED
-} }, {
-   .bus= -1,
-   .addr   = 0,
-   .pixfmt = IPU_PIX_FMT_RGB24,
-   .detect = detect_hdmi,
-   .enable = do_enable_hdmi,
-   .mode   = {
-   .name   = "HDMI",
-   .refresh= 60,
-   .xres   = 1024,
-   .yres   = 768,
-   .pixclock   = 15384,
-   .left_margin= 160,
-   .right_margin   = 24,
-   .upper_margin   = 29,
-   .lower_margin   = 3,
-   .hsync_len  = 136,
-   .vsync_len  = 6,
-   .sync   = FB_SYNC_EXT,
-   .vmode  = FB_VMODE_NONINTERLACED
-} }, {
-   .bus= 0,
-   .addr   = 0,
-   .pixfmt = IPU_PIX_FMT_RGB24,
-   .detect = NULL,
-   .enable = enable_rgb,
-   .mode   = {
-   .name   = "SEIKO-WVGA",
-   .refresh= 60,
-   .xres   = 800,
-   .yres   = 480,
-   .pixclock   = 29850,
-   .left_margin= 89,
-   .right_margin   = 164,
-   .upper_margin   = 23,
-   .lower_margin   = 10,
-   .hsync_len  = 10,
-   .vsync_len  = 10,
-   .sync   = 0,
-   .vmode  = FB_VMODE_NONINTERLACED
-} } };
+struct display_info_t const displays[] = {
+   {
+   .bus= -1,
+   .addr   = 0,
+   .pixfmt = IPU_PIX_FMT_RGB666,
+   .detect = NULL,
+   .enable = enable_lvds,
+   .mode   = {
+   .name   = "Hannstar-XGA",
+   .refresh= 60,
+   .xres   = 1024,
+   .yres   = 768,
+   .pixclock   = 15384,
+   .left_margin= 160,
+   .right_margin   = 24,
+   .upper_margin   = 29,
+   .lower_margin   = 3,
+   .hsync_len  = 136,
+   .vsync_len  = 6,
+   .sync   = FB_SYNC_EXT,
+   .vmode  = FB_VMODE_NONINTERLACED
+   }
+   }, {
+   .bus= -1,
+   .addr   = 0,
+   .pixfmt = IPU_PIX_FMT_RGB24,
+   .detect = detect_hdmi,
+   .enable = do_enable_hdmi,
+   .mode   = {
+   .name   = "HDMI",
+   .refresh= 60,
+   

[U-Boot] [PATCH v5 04/33] ARM: i.MX6: sabresd: Remove SPL_I2C_SUPPORT

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

I2C support not needed for SPL build, hence removed the
CONFIG_SPL_I2C_SUPPORT from mx6sabresd_spl_defconfig

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 configs/mx6sabresd_spl_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configs/mx6sabresd_spl_defconfig b/configs/mx6sabresd_spl_defconfig
index 7a46a44..c89c3c6 100644
--- a/configs/mx6sabresd_spl_defconfig
+++ b/configs/mx6sabresd_spl_defconfig
@@ -16,7 +16,6 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
 CONFIG_SPL=y
 CONFIG_SPL_EXT_SUPPORT=y
-CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_OS_BOOT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
-- 
1.9.1

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


[U-Boot] [PATCH v5 16/33] ARM: i.MX6: sabresd: Enable DM_USB

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Enable DM_USB for dt supported sabresd config boards:
- imx6q_sabresd_defconfig
- imx6qp_sabresd_defconfig

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/freescale/mx6sabresd/mx6sabresd.c | 4 ++--
 configs/imx6qdl_sabresd_spl_defconfig   | 1 +
 include/configs/mx6sabresd.h| 9 ++---
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index f832697..ac2cabc 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -515,7 +515,7 @@ int board_eth_init(bd_t *bis)
return cpu_eth_init(bis);
 }
 
-#ifdef CONFIG_USB_EHCI_MX6
+#if defined(CONFIG_USB_EHCI_MX6) && !defined(CONFIG_DM_USB)
 #define USB_OTHERREGS_OFFSET   0x800
 #define UCTRL_PWR_POL  (1 << 9)
 
@@ -599,7 +599,7 @@ int board_init(void)
 #ifndef CONFIG_DM_I2C
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, _pad_info1);
 #endif
-#ifdef CONFIG_USB_EHCI_MX6
+#if defined(CONFIG_USB_EHCI_MX6) && !defined(CONFIG_DM_USB)
setup_usb();
 #endif
 
diff --git a/configs/imx6qdl_sabresd_spl_defconfig 
b/configs/imx6qdl_sabresd_spl_defconfig
index 7cad5ab..4d37aff 100644
--- a/configs/imx6qdl_sabresd_spl_defconfig
+++ b/configs/imx6qdl_sabresd_spl_defconfig
@@ -61,6 +61,7 @@ CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
+CONFIG_DM_USB=y
 # CONFIG_BLK is not set
 # CONFIG_DM_MMC_OPS is not set
 CONFIG_DM_PMIC_PFUZE100=y
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index 6abe7a4..4f6bb1b 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -70,12 +70,15 @@
 
 /* USB Configs */
 #ifdef CONFIG_USB_EHCI_MX6
-#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
 #define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
-#define CONFIG_MXC_USB_FLAGS   0
-#define CONFIG_USB_MAX_CONTROLLER_COUNT1 /* Enabled USB controller 
number */
+
+# ifndef CONFIG_DM_USB
+#  define CONFIG_MXC_USB_FLAGS 0
+#  define CONFIG_USB_MAX_CONTROLLER_COUNT  1 /* Enabled USB controller 
number */
+#  define CONFIG_EHCI_HCD_INIT_AFTER_RESET
+# endif
 #endif
 
 #endif /* __MX6QSABRESD_CONFIG_H */
-- 
1.9.1

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


[U-Boot] [PATCH v5 20/33] ARM: i.MX6: sabresd: Add dm_gpio_* for backlight

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

For OF_CONTROL, gpio's need to configure through
dm_gpio_* calls instead of non-dm gpio code, So
add dm_gpio_* calls for dts supported code.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/freescale/mx6sabresd/mx6sabresd.c | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index 3f73b9b..1df81b9 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -190,7 +190,29 @@ static iomux_v3_cfg_t const bl_pads[] = {
 static void enable_backlight(void)
 {
imx_iomux_v3_setup_multiple_pads(bl_pads, ARRAY_SIZE(bl_pads));
+
+#ifdef CONFIG_OF_CONTROL
+   struct gpio_desc backlight;
+   int ret;
+
+   /* Set Brightness to high */
+   ret = dm_gpio_lookup_name("GPIO1_21", );
+   if (ret) {
+   printf("Cannot get GPIO1_21\n");
+   return;
+   }
+
+   ret = dm_gpio_request(, "backlight");
+   if (ret) {
+   printf("Cannot request GPIO1_21\n");
+   return;
+   }
+
+   dm_gpio_set_dir_flags(, GPIOD_IS_OUT);
+   dm_gpio_set_value(, 1);
+#else
gpio_direction_output(DISP0_PWR_EN, 1);
+#endif
 }
 
 static void enable_rgb(struct display_info_t const *dev)
-- 
1.9.1

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


[U-Boot] [PATCH v5 05/33] ARM: i.MX6Q: sabresd: Add initial devicetree support

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add initial devicetree support for i.MX6 Quad Sabresd board.

The configs item are copied from configs/mx6sabresd_spl_defconfig
and added
- CONFIG_OF_CONTROL=y
- CONFIG_DM_GPIO=y
- CONFIG_DM_MMC=y
- CONFIG_BLK is not set
- CONFIG_DM_MMC_OPS is not set
- CONFIG_PINCTRL=y
- CONFIG_PINCTRL_IMX6=y

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/freescale/mx6sabresd/MAINTAINERS  |   1 +
 board/freescale/mx6sabresd/mx6sabresd.c | 132 ++--
 configs/imx6qdl_sabresd_spl_defconfig   |  62 +++
 include/configs/mx6sabresd.h|   4 +
 4 files changed, 159 insertions(+), 40 deletions(-)
 create mode 100644 configs/imx6qdl_sabresd_spl_defconfig

diff --git a/board/freescale/mx6sabresd/MAINTAINERS 
b/board/freescale/mx6sabresd/MAINTAINERS
index add2314..ccb939d 100644
--- a/board/freescale/mx6sabresd/MAINTAINERS
+++ b/board/freescale/mx6sabresd/MAINTAINERS
@@ -6,3 +6,4 @@ F:  include/configs/mx6sabresd.h
 F: configs/mx6dlsabresd_defconfig
 F: configs/mx6qsabresd_defconfig
 F: configs/mx6sabresd_spl_defconfig
+F: configs/imx6qdl_sabresd_spl_defconfig
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index 80a7789..93d0dc4 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -241,7 +241,7 @@ static void setup_iomux_uart(void)
imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
 }
 
-#ifdef CONFIG_FSL_ESDHC
+#if defined(CONFIG_FSL_ESDHC) && !defined(CONFIG_OF_CONTROL)
 struct fsl_esdhc_cfg usdhc_cfg[3] = {
{USDHC2_BASE_ADDR},
{USDHC3_BASE_ADDR},
@@ -276,9 +276,9 @@ int board_mmc_getcd(struct mmc *mmc)
return ret;
 }
 
+#ifndef CONFIG_FSL_ESDHC
 int board_mmc_init(bd_t *bis)
 {
-#ifndef CONFIG_SPL_BUILD
int ret;
int i;
 
@@ -321,46 +321,9 @@ int board_mmc_init(bd_t *bis)
}
 
return 0;
-#else
-   struct src *psrc = (struct src *)SRC_BASE_ADDR;
-   unsigned reg = readl(>sbmr1) >> 11;
-   /*
-* Upon reading BOOT_CFG register the following map is done:
-* Bit 11 and 12 of BOOT_CFG register can determine the current
-* mmc port
-* 0x1  SD1
-* 0x2  SD2
-* 0x3  SD4
-*/
-
-   switch (reg & 0x3) {
-   case 0x1:
-   imx_iomux_v3_setup_multiple_pads(
-   usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
-   usdhc_cfg[0].esdhc_base = USDHC2_BASE_ADDR;
-   usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
-   gd->arch.sdhc_clk = usdhc_cfg[0].sdhc_clk;
-   break;
-   case 0x2:
-   imx_iomux_v3_setup_multiple_pads(
-   usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
-   usdhc_cfg[0].esdhc_base = USDHC3_BASE_ADDR;
-   usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
-   gd->arch.sdhc_clk = usdhc_cfg[0].sdhc_clk;
-   break;
-   case 0x3:
-   imx_iomux_v3_setup_multiple_pads(
-   usdhc4_pads, ARRAY_SIZE(usdhc4_pads));
-   usdhc_cfg[0].esdhc_base = USDHC4_BASE_ADDR;
-   usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK);
-   gd->arch.sdhc_clk = usdhc_cfg[0].sdhc_clk;
-   break;
-   }
-
-   return fsl_esdhc_initialize(bis, _cfg[0]);
-#endif
 }
 #endif
+#endif
 
 static int ar8031_phy_fixup(struct phy_device *phydev)
 {
@@ -717,6 +680,85 @@ int checkboard(void)
 #include 
 #include 
 
+#ifdef CONFIG_FSL_ESDHC
+
+#if defined(CONFIG_OF_CONTROL) && !defined(CONFIG_DM_MMC)
+struct fsl_esdhc_cfg usdhc_cfg[3] = {
+   {USDHC2_BASE_ADDR},
+   {USDHC3_BASE_ADDR},
+   {USDHC4_BASE_ADDR},
+};
+
+#define USDHC2_CD_GPIO IMX_GPIO_NR(2, 2)
+#define USDHC3_CD_GPIO IMX_GPIO_NR(2, 0)
+
+int board_mmc_get_env_dev(int devno)
+{
+   return devno - 1;
+}
+
+int board_mmc_getcd(struct mmc *mmc)
+{
+   struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
+   int ret = 0;
+
+   switch (cfg->esdhc_base) {
+   case USDHC2_BASE_ADDR:
+   ret = !gpio_get_value(USDHC2_CD_GPIO);
+   break;
+   case USDHC3_BASE_ADDR:
+   ret = !gpio_get_value(USDHC3_CD_GPIO);
+   break;
+   case USDHC4_BASE_ADDR:
+   ret = 1; /* eMMC/uSDHC4 is always present */
+   break;
+   }
+
+   return ret;
+}
+#endif
+
+int board_mmc_init(bd_t *bis)
+{
+   struct src *psrc = (struct src *)SRC_BASE_ADDR;
+   unsigned reg = readl(>sbmr1) >> 11;
+   /*
+* Upon reading BOOT_CFG register the following map is done:
+* Bit 11 and 12 of BOOT_CFG register 

[U-Boot] [PATCH v5 17/33] ARM: dts: imx6qdl-sabresd: Add FEC node

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add FEC node for i.MX6QDL Sabresd boards.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 arch/arm/dts/imx6qdl-sabresd.dtsi | 29 +
 1 file changed, 29 insertions(+)

diff --git a/arch/arm/dts/imx6qdl-sabresd.dtsi 
b/arch/arm/dts/imx6qdl-sabresd.dtsi
index 0e104c1..ca1aa58 100644
--- a/arch/arm/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/dts/imx6qdl-sabresd.dtsi
@@ -44,6 +44,14 @@
};
 };
 
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = <_enet>;
+   phy-mode = "rgmii";
+   phy-reset-gpios = < 25 0>;
+   status = "okay";
+};
+
  {
clock-frequency = <10>;
pinctrl-names = "default";
@@ -124,6 +132,27 @@
 
  {
imx6qdl-sabresd {
+   pinctrl_enet: enetgrp {
+   fsl,pins = <
+   MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0
+   MX6QDL_PAD_ENET_MDC__ENET_MDC   0x1b0b0
+   MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b030
+   MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b030
+   MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b030
+   MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b030
+   MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b030
+   MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL   0x1b030
+   MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK0x1b0b0
+   MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b030
+   MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b030
+   MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b030
+   MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b030
+   MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b030
+   MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL   0x1b030
+   MX6QDL_PAD_GPIO_16__ENET_REF_CLK
0x4001b0a8
+   >;
+   };
+
pinctrl_i2c1: i2c1grp {
fsl,pins = <
MX6QDL_PAD_CSI0_DAT8__I2C1_SDA  
0x4001b8b1
-- 
1.9.1

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


[U-Boot] [PATCH v5 06/33] ARM: dts: imx6qdl-sabresd: Add imx6qp-sabresd.dts

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add initial dts support for i.MX6 Quad Plus Sabresd board.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 arch/arm/dts/Makefile |  1 +
 arch/arm/dts/imx6qdl-sabresd.dtsi | 96 ---
 arch/arm/dts/imx6qp-sabresd.dts   | 85 ++
 3 files changed, 135 insertions(+), 47 deletions(-)
 create mode 100644 arch/arm/dts/imx6qp-sabresd.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 2efa7d0..dfcb59a 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -336,6 +336,7 @@ dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb \
imx6q-icore-rqs.dtb \
imx6q-logicpd.dtb \
imx6q-sabresd.dtb \
+   imx6qp-sabresd.dtb \
imx6sx-sabreauto.dtb \
imx6ul-geam-kit.dtb \
imx6ul-isiot-emmc.dtb \
diff --git a/arch/arm/dts/imx6qdl-sabresd.dtsi 
b/arch/arm/dts/imx6qdl-sabresd.dtsi
index 1846274..2986cb4 100644
--- a/arch/arm/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/dts/imx6qdl-sabresd.dtsi
@@ -56,56 +56,58 @@
 };
 
  {
-   pinctrl_uart1: uart1grp {
-   fsl,pins = <
-   MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA0x1b0b1
-   MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA0x1b0b1
-   >;
-   };
+   imx6qdl-sabresd {
+   pinctrl_uart1: uart1grp {
+   fsl,pins = <
+   MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA0x1b0b1
+   MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA0x1b0b1
+   >;
+   };
 
 
-   pinctrl_usdhc2: usdhc2grp {
-   fsl,pins = <
-   MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059
-   MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059
-   MX6QDL_PAD_SD2_DAT0__SD2_DATA0  0x17059
-   MX6QDL_PAD_SD2_DAT1__SD2_DATA1  0x17059
-   MX6QDL_PAD_SD2_DAT2__SD2_DATA2  0x17059
-   MX6QDL_PAD_SD2_DAT3__SD2_DATA3  0x17059
-   MX6QDL_PAD_NANDF_D4__SD2_DATA4  0x17059
-   MX6QDL_PAD_NANDF_D5__SD2_DATA5  0x17059
-   MX6QDL_PAD_NANDF_D6__SD2_DATA6  0x17059
-   MX6QDL_PAD_NANDF_D7__SD2_DATA7  0x17059
-   >;
-   };
+   pinctrl_usdhc2: usdhc2grp {
+   fsl,pins = <
+   MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059
+   MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059
+   MX6QDL_PAD_SD2_DAT0__SD2_DATA0  0x17059
+   MX6QDL_PAD_SD2_DAT1__SD2_DATA1  0x17059
+   MX6QDL_PAD_SD2_DAT2__SD2_DATA2  0x17059
+   MX6QDL_PAD_SD2_DAT3__SD2_DATA3  0x17059
+   MX6QDL_PAD_NANDF_D4__SD2_DATA4  0x17059
+   MX6QDL_PAD_NANDF_D5__SD2_DATA5  0x17059
+   MX6QDL_PAD_NANDF_D6__SD2_DATA6  0x17059
+   MX6QDL_PAD_NANDF_D7__SD2_DATA7  0x17059
+   >;
+   };
 
-   pinctrl_usdhc3: usdhc3grp {
-   fsl,pins = <
-   MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
-   MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059
-   MX6QDL_PAD_SD3_DAT0__SD3_DATA0  0x17059
-   MX6QDL_PAD_SD3_DAT1__SD3_DATA1  0x17059
-   MX6QDL_PAD_SD3_DAT2__SD3_DATA2  0x17059
-   MX6QDL_PAD_SD3_DAT3__SD3_DATA3  0x17059
-   MX6QDL_PAD_SD3_DAT4__SD3_DATA4  0x17059
-   MX6QDL_PAD_SD3_DAT5__SD3_DATA5  0x17059
-   MX6QDL_PAD_SD3_DAT6__SD3_DATA6  0x17059
-   MX6QDL_PAD_SD3_DAT7__SD3_DATA7  0x17059
-   >;
-   };
+   pinctrl_usdhc3: usdhc3grp {
+   fsl,pins = <
+   MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
+   MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059
+   MX6QDL_PAD_SD3_DAT0__SD3_DATA0  0x17059
+   MX6QDL_PAD_SD3_DAT1__SD3_DATA1  0x17059
+   MX6QDL_PAD_SD3_DAT2__SD3_DATA2  0x17059
+   MX6QDL_PAD_SD3_DAT3__SD3_DATA3  0x17059
+   MX6QDL_PAD_SD3_DAT4__SD3_DATA4  0x17059
+ 

[U-Boot] [PATCH v5 24/33] ARM: i.MX6: %s/mx6[dl|q]sabresd_defconfig/imx6[dl|q]_sabresd_defconfig

2017-05-04 Thread Jagan Teki
mx6dlsabresd_defconfig => imx6dl_sabresd_defconfig
mx6qsabresd_defconfig => imx6q_sabresd_defconfig

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/freescale/mx6sabresd/MAINTAINERS   | 4 ++--
 configs/{mx6dlsabresd_defconfig => imx6dl_sabresd_defconfig} | 0
 configs/{mx6qsabresd_defconfig => imx6q_sabresd_defconfig}   | 0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename configs/{mx6dlsabresd_defconfig => imx6dl_sabresd_defconfig} (100%)
 rename configs/{mx6qsabresd_defconfig => imx6q_sabresd_defconfig} (100%)

diff --git a/board/freescale/mx6sabresd/MAINTAINERS 
b/board/freescale/mx6sabresd/MAINTAINERS
index ccb939d..227c6dd 100644
--- a/board/freescale/mx6sabresd/MAINTAINERS
+++ b/board/freescale/mx6sabresd/MAINTAINERS
@@ -3,7 +3,7 @@ M:  Fabio Estevam 
 S: Maintained
 F: board/freescale/mx6sabresd/
 F: include/configs/mx6sabresd.h
-F: configs/mx6dlsabresd_defconfig
-F: configs/mx6qsabresd_defconfig
+F: configs/imx6dl_sabresd_defconfig
+F: configs/imx6q_sabresd_defconfig
 F: configs/mx6sabresd_spl_defconfig
 F: configs/imx6qdl_sabresd_spl_defconfig
diff --git a/configs/mx6dlsabresd_defconfig b/configs/imx6dl_sabresd_defconfig
similarity index 100%
rename from configs/mx6dlsabresd_defconfig
rename to configs/imx6dl_sabresd_defconfig
diff --git a/configs/mx6qsabresd_defconfig b/configs/imx6q_sabresd_defconfig
similarity index 100%
rename from configs/mx6qsabresd_defconfig
rename to configs/imx6q_sabresd_defconfig
-- 
1.9.1

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


[U-Boot] [PATCH v5 09/33] ARM: dts: imx6qdl-sabresd: Add I2C node's

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add I2C nodes for i.MX6QDL sabresd boards.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 arch/arm/dts/imx6qdl-sabresd.dtsi | 42 +++
 1 file changed, 42 insertions(+)

diff --git a/arch/arm/dts/imx6qdl-sabresd.dtsi 
b/arch/arm/dts/imx6qdl-sabresd.dtsi
index 2986cb4..491fdbf 100644
--- a/arch/arm/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/dts/imx6qdl-sabresd.dtsi
@@ -22,6 +22,27 @@
};
 };
 
+ {
+   clock-frequency = <10>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_i2c1>;
+   status = "okay";
+};
+
+ {
+   clock-frequency = <10>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_i2c2>;
+   status = "okay";
+};
+
+ {
+   clock-frequency = <10>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_i2c3>;
+   status = "okay";
+};
+
  {
pinctrl-names = "default";
pinctrl-0 = <_uart1>;
@@ -57,6 +78,27 @@
 
  {
imx6qdl-sabresd {
+   pinctrl_i2c1: i2c1grp {
+   fsl,pins = <
+   MX6QDL_PAD_CSI0_DAT8__I2C1_SDA  
0x4001b8b1
+   MX6QDL_PAD_CSI0_DAT9__I2C1_SCL  
0x4001b8b1
+   >;
+   };
+
+   pinctrl_i2c2: i2c2grp {
+   fsl,pins = <
+   MX6QDL_PAD_KEY_COL3__I2C2_SCL   
0x4001b8b1
+   MX6QDL_PAD_KEY_ROW3__I2C2_SDA   
0x4001b8b1
+   >;
+   };
+
+   pinctrl_i2c3: i2c3grp {
+   fsl,pins = <
+   MX6QDL_PAD_GPIO_3__I2C3_SCL 
0x4001b8b1
+   MX6QDL_PAD_GPIO_6__I2C3_SDA 
0x4001b8b1
+   >;
+   };
+
pinctrl_uart1: uart1grp {
fsl,pins = <
MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA0x1b0b1
-- 
1.9.1

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


[U-Boot] [PATCH v5 12/33] ARM: i.MX6: sabresd: defconfig move - CONFIG_USB_EHCI(_MX6)

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Defconfig move on i.MX6 Sabresd boards:
- CONFIG_USB_EHCI as CONFIG_USB_EHCI_HCD
- CONFIG_USB_EHCI_MX6

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 configs/imx6qdl_sabresd_spl_defconfig | 2 ++
 configs/mx6dlsabresd_defconfig| 2 ++
 configs/mx6qsabresd_defconfig | 2 ++
 configs/mx6sabresd_spl_defconfig  | 2 ++
 include/configs/mx6sabresd.h  | 4 +---
 5 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/configs/imx6qdl_sabresd_spl_defconfig 
b/configs/imx6qdl_sabresd_spl_defconfig
index 14021db..0ed8122 100644
--- a/configs/imx6qdl_sabresd_spl_defconfig
+++ b/configs/imx6qdl_sabresd_spl_defconfig
@@ -44,6 +44,8 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PCI=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_MX6=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
diff --git a/configs/mx6dlsabresd_defconfig b/configs/mx6dlsabresd_defconfig
index 56f629f..64a024b 100644
--- a/configs/mx6dlsabresd_defconfig
+++ b/configs/mx6dlsabresd_defconfig
@@ -33,6 +33,8 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PCI=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_MX6=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
diff --git a/configs/mx6qsabresd_defconfig b/configs/mx6qsabresd_defconfig
index e598dc8..8617094 100644
--- a/configs/mx6qsabresd_defconfig
+++ b/configs/mx6qsabresd_defconfig
@@ -33,6 +33,8 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PCI=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_MX6=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
diff --git a/configs/mx6sabresd_spl_defconfig b/configs/mx6sabresd_spl_defconfig
index d52e48f..c3eb03c 100644
--- a/configs/mx6sabresd_spl_defconfig
+++ b/configs/mx6sabresd_spl_defconfig
@@ -39,6 +39,8 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PCI=y
 CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_MX6=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index 6ece575..6abe7a4 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -69,9 +69,7 @@
 #endif
 
 /* USB Configs */
-#ifdef CONFIG_CMD_USB
-#define CONFIG_USB_EHCI
-#define CONFIG_USB_EHCI_MX6
+#ifdef CONFIG_USB_EHCI_MX6
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
-- 
1.9.1

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


[U-Boot] [PATCH v5 01/33] mx6sabresd: README: Fix to add space on dd command

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Fix to give space between of and bs of dd command.

Cc: Fabio Estevam 
Cc: Stefano Babic 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/freescale/mx6sabresd/README | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/freescale/mx6sabresd/README 
b/board/freescale/mx6sabresd/README
index bc0c0d0..628d35f 100644
--- a/board/freescale/mx6sabresd/README
+++ b/board/freescale/mx6sabresd/README
@@ -84,7 +84,7 @@ $ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 && sync
 
 - Flash the u-boot.img image into the SD card:
 
-$ sudo dd if=u-boot.img of=/dev/sdbbs=1K seek=69 && sync
+$ sudo dd if=u-boot.img of=/dev/sdb bs=1K seek=69 && sync
 
 
 4. Booting via Falcon mode
@@ -101,7 +101,7 @@ $ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 oflag=sync 
status=none && sync
 
 - Flash the u-boot.img image into the SD card:
 
-$ sudo dd if=u-boot.img of=/dev/sdbbs=1K seek=69 oflag=sync status=none && sync
+$ sudo dd if=u-boot.img of=/dev/sdb bs=1K seek=69 oflag=sync status=none && 
sync
 
 Create a partition for root file system and extract it there:
 
-- 
1.9.1

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


[U-Boot] [PATCH v5 03/33] ARM: dts: imx6qdl-sabresd: Add imx6q-sabresd.dts

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add initial dts support for i.MX6 Quad Sabresd board.

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 arch/arm/dts/Makefile  |  1 +
 arch/arm/dts/imx6q-sabresd.dts | 21 +
 2 files changed, 22 insertions(+)
 create mode 100644 arch/arm/dts/imx6q-sabresd.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index f3f53f3..2efa7d0 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -335,6 +335,7 @@ dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb \
imx6q-icore.dtb \
imx6q-icore-rqs.dtb \
imx6q-logicpd.dtb \
+   imx6q-sabresd.dtb \
imx6sx-sabreauto.dtb \
imx6ul-geam-kit.dtb \
imx6ul-isiot-emmc.dtb \
diff --git a/arch/arm/dts/imx6q-sabresd.dts b/arch/arm/dts/imx6q-sabresd.dts
new file mode 100644
index 000..5e62c24
--- /dev/null
+++ b/arch/arm/dts/imx6q-sabresd.dts
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2012 Freescale Semiconductor, Inc.
+ * Copyright 2011 Linaro Ltd.
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+
+#include "imx6q.dtsi"
+#include "imx6qdl-sabresd.dtsi"
+
+/ {
+   model = "Freescale i.MX6 Quad SABRE Smart Device Board";
+   compatible = "fsl,imx6q-sabresd", "fsl,imx6q";
+};
-- 
1.9.1

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


[U-Boot] [PATCH v5 02/33] ARM: dts: i.MX6: Add imx6qdl-sabresd.dtsi

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Add common minimal dtsi file for i.MX6QDL Sabresd boards,
- uart1
- usdhc2
- usdhc3
- usdhc4

Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 arch/arm/dts/imx6qdl-sabresd.dtsi | 111 ++
 1 file changed, 111 insertions(+)
 create mode 100644 arch/arm/dts/imx6qdl-sabresd.dtsi

diff --git a/arch/arm/dts/imx6qdl-sabresd.dtsi 
b/arch/arm/dts/imx6qdl-sabresd.dtsi
new file mode 100644
index 000..1846274
--- /dev/null
+++ b/arch/arm/dts/imx6qdl-sabresd.dtsi
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2012 Freescale Semiconductor, Inc.
+ * Copyright 2011 Linaro Ltd.
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include 
+
+/ {
+   chosen {
+   stdout-path = 
+   };
+
+   memory {
+   reg = <0x1000 0x4000>;
+   };
+};
+
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = <_uart1>;
+   status = "okay";
+};
+
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = <_usdhc2>;
+   bus-width = <8>;
+   cd-gpios = < 2 GPIO_ACTIVE_LOW>;
+   wp-gpios = < 3 GPIO_ACTIVE_HIGH>;
+   status = "okay";
+};
+
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = <_usdhc3>;
+   bus-width = <8>;
+   cd-gpios = < 0 GPIO_ACTIVE_LOW>;
+   wp-gpios = < 1 GPIO_ACTIVE_HIGH>;
+   status = "okay";
+};
+
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = <_usdhc4>;
+   bus-width = <8>;
+   non-removable;
+   no-1-8-v;
+   status = "okay";
+};
+
+ {
+   pinctrl_uart1: uart1grp {
+   fsl,pins = <
+   MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA0x1b0b1
+   MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA0x1b0b1
+   >;
+   };
+
+
+   pinctrl_usdhc2: usdhc2grp {
+   fsl,pins = <
+   MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059
+   MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059
+   MX6QDL_PAD_SD2_DAT0__SD2_DATA0  0x17059
+   MX6QDL_PAD_SD2_DAT1__SD2_DATA1  0x17059
+   MX6QDL_PAD_SD2_DAT2__SD2_DATA2  0x17059
+   MX6QDL_PAD_SD2_DAT3__SD2_DATA3  0x17059
+   MX6QDL_PAD_NANDF_D4__SD2_DATA4  0x17059
+   MX6QDL_PAD_NANDF_D5__SD2_DATA5  0x17059
+   MX6QDL_PAD_NANDF_D6__SD2_DATA6  0x17059
+   MX6QDL_PAD_NANDF_D7__SD2_DATA7  0x17059
+   >;
+   };
+
+   pinctrl_usdhc3: usdhc3grp {
+   fsl,pins = <
+   MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
+   MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059
+   MX6QDL_PAD_SD3_DAT0__SD3_DATA0  0x17059
+   MX6QDL_PAD_SD3_DAT1__SD3_DATA1  0x17059
+   MX6QDL_PAD_SD3_DAT2__SD3_DATA2  0x17059
+   MX6QDL_PAD_SD3_DAT3__SD3_DATA3  0x17059
+   MX6QDL_PAD_SD3_DAT4__SD3_DATA4  0x17059
+   MX6QDL_PAD_SD3_DAT5__SD3_DATA5  0x17059
+   MX6QDL_PAD_SD3_DAT6__SD3_DATA6  0x17059
+   MX6QDL_PAD_SD3_DAT7__SD3_DATA7  0x17059
+   >;
+   };
+
+   pinctrl_usdhc4: usdhc4grp {
+   fsl,pins = <
+   MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17059
+   MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10059
+   MX6QDL_PAD_SD4_DAT0__SD4_DATA0  0x17059
+   MX6QDL_PAD_SD4_DAT1__SD4_DATA1  0x17059
+   MX6QDL_PAD_SD4_DAT2__SD4_DATA2  0x17059
+   MX6QDL_PAD_SD4_DAT3__SD4_DATA3  0x17059
+   MX6QDL_PAD_SD4_DAT4__SD4_DATA4  0x17059
+   MX6QDL_PAD_SD4_DAT5__SD4_DATA5  0x17059
+   MX6QDL_PAD_SD4_DAT6__SD4_DATA6  0x17059
+   MX6QDL_PAD_SD4_DAT7__SD4_DATA7  0x17059
+   >;
+   };
+};
-- 
1.9.1

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


[U-Boot] [PATCH v5 00/33] ARM: i.MX6: SabreSD: Add dts support

2017-05-04 Thread Jagan Teki
From: Jagan Teki 

Compared to previous series, this series
- remove DCD addition on SPL for duallite, since it's not working
- Add board_fit_config_name_match for SPL to fetch board dts
- Now we have single SPL deconfig file for all SabreSD cpu models.

Changes for v5:
- rebase on master
- removed SPL support for i.MX6DL SabreSD
- Add board_fit_config_name_match for SPL to fetch board dts
- Add imx6qdl_sabresd_spl_defconfig for common SPL support 

Changes for v4:
- rebase on master
- Rename imx6[dl|q]_sabresd_spl_defconfig to imx6[dl|q]_sabresd_spl_defconfig
- Update README
- Move CONFIG_FEC_MXC to configs/mx6[dl|q|qp]sabreauto_defconfigs
- Add dts support for non-spl based defconfigs

Changes for v3:
- rebase on master
- Added patch 'ARM: i.MX6: sabresd: Cleanup board code'
- Added patch 'ARM: i.MX6DL: sabresd: Move DCD reginit on SPL'

Changes for v2:
- rebase on master
- Added new-patches.

Jagan Teki (33):
  mx6sabresd: README: Fix to add space on dd command
  ARM: dts: i.MX6: Add imx6qdl-sabresd.dtsi
  ARM: dts: imx6qdl-sabresd: Add imx6q-sabresd.dts
  ARM: i.MX6: sabresd: Remove SPL_I2C_SUPPORT
  ARM: i.MX6Q: sabresd: Add initial devicetree support
  ARM: dts: imx6qdl-sabresd: Add imx6qp-sabresd.dts
  ARM: i.MX6QP: sabresd: Add initial devicetree support
  ARM: i.MX6: sabresd: Move CONFIG_SYS_I2C_MXC to defconfigs
  ARM: dts: imx6qdl-sabresd: Add I2C node's
  ARM: dts: imx6qdl-sabresd: Add PMIC pfuze100 node
  ARM: i.MX6: sabresd: Enable DM_I2C and DM_PMIC
  ARM: i.MX6: sabresd: defconfig move - CONFIG_USB_EHCI(_MX6)
  ARM: dts: imx6qdl-sabresd: Add usb host node
  ARM: dts: imx6qdl-sabresd: Add usb otg node
  ARM: i.MX6: sabresd: Enable CONFIG_DM_REGULATOR
  ARM: i.MX6: sabresd: Enable DM_USB
  ARM: dts: imx6qdl-sabresd: Add FEC node
  ARM: i.MX6: sabre: Move CONFIG_FEC_MXC to defconfigs
  ARM: i.MX6: sabresd: Enable DM_ETH
  ARM: i.MX6: sabresd: Add dm_gpio_* for backlight
  ARM: i.MX6: sabresd: Add imx6_pcie_toggle_power
  ARM: i.MX6: sabresd: Add imx6_pcie_toggle_reset
  ARM: dts: imx6qdl-sabresd: Add imx6dl-sabresd.dts
  ARM: i.MX6: %s/mx6[dl|q]sabresd_defconfig/imx6[dl|q]_sabresd_defconfig
  ARM: i.MX6Q: sabresd: Add dts support for imx6q_sabresd
  ARM: i.MX6DL: sabresd: Add dts support for imx6dl_sabresd
  ARM: i.MX6: sabresd: Drop legacy non-fdt code
  ARM: i.MX6: %s/mx6sabresd/imx6sabresd
  ARM: i.MX6: %s/MX6SABRESD/IMX6SABRESD
  ARM: i.MX6: sabresd: Move DM_* and OF_CONTROL to arch Kconfig
  ARM: i.MX6: sabresd: Drop checkboard
  ARM: i.MX6: sabresd: Cleanup board code
  imx6sabresd: README: Update with dtb changes

 arch/arm/cpu/armv7/mx6/Kconfig |  26 +-
 arch/arm/dts/Makefile  |   3 +
 arch/arm/dts/imx6dl-sabresd.dts|  17 +
 arch/arm/dts/imx6q-sabresd.dts |  21 +
 arch/arm/dts/imx6qdl-sabresd.dtsi  | 235 +++
 arch/arm/dts/imx6qp-sabresd.dts|  85 +++
 .../freescale/{mx6sabresd => imx6sabresd}/Kconfig  |   6 +-
 board/freescale/imx6sabresd/MAINTAINERS|   9 +
 .../freescale/{mx6sabresd => imx6sabresd}/Makefile |   2 +-
 board/freescale/{mx6sabresd => imx6sabresd}/README |  46 +-
 .../mx6sabresd.c => imx6sabresd/imx6sabresd.c} | 733 +
 board/freescale/imx6sabresd/mx6dlsabresd.cfg   | 131 
 board/freescale/imx6sabresd/mx6q_4x_mt41j128.cfg   | 169 +
 board/freescale/mx6sabresd/MAINTAINERS |   8 -
 ...lsabresd_defconfig => imx6dl_sabresd_defconfig} |  14 +-
 ...6qsabresd_defconfig => imx6q_sabresd_defconfig} |  14 +-
 ...spl_defconfig => imx6qdl_sabresd_spl_defconfig} |  19 +-
 configs/mx6dlsabreauto_defconfig   |   2 +
 configs/mx6qpsabreauto_defconfig   |   2 +
 configs/mx6qsabreauto_defconfig|   2 +
 include/configs/{mx6sabresd.h => imx6sabresd.h}|  25 +-
 include/configs/mx6sabre_common.h  |   3 +-
 22 files changed, 1072 insertions(+), 500 deletions(-)
 create mode 100644 arch/arm/dts/imx6dl-sabresd.dts
 create mode 100644 arch/arm/dts/imx6q-sabresd.dts
 create mode 100644 arch/arm/dts/imx6qdl-sabresd.dtsi
 create mode 100644 arch/arm/dts/imx6qp-sabresd.dts
 rename board/freescale/{mx6sabresd => imx6sabresd}/Kconfig (56%)
 create mode 100644 board/freescale/imx6sabresd/MAINTAINERS
 rename board/freescale/{mx6sabresd => imx6sabresd}/Makefile (86%)
 rename board/freescale/{mx6sabresd => imx6sabresd}/README (60%)
 rename board/freescale/{mx6sabresd/mx6sabresd.c => imx6sabresd/imx6sabresd.c} 
(69%)
 create mode 100644 board/freescale/imx6sabresd/mx6dlsabresd.cfg
 create mode 100644 board/freescale/imx6sabresd/mx6q_4x_mt41j128.cfg
 delete mode 100644 board/freescale/mx6sabresd/MAINTAINERS
 rename configs/{mx6dlsabresd_defconfig => imx6dl_sabresd_defconfig} (71%)
 rename configs/{mx6qsabresd_defconfig => imx6q_sabresd_defconfig} (71%)
 rename configs/{mx6sabresd_spl_defconfig => imx6qdl_sabresd_spl_defconfig} 

Re: [U-Boot] [PATCH] sunxi: add support for Banana Pi M2 Plus board

2017-05-04 Thread Jagan Teki
On Thu, May 4, 2017 at 3:14 PM, Maxime Ripard
 wrote:
> On Wed, May 03, 2017 at 11:45:09PM +0800, Icenowy Zheng wrote:
>> Banana Pi M2 Plus is an Allwinner H3-based SBC by Sinovoip, which has
>> already mainline device tree file that have landed into U-Boot source
>> tree.
>>
>> Add a defconfig file for it and add the MAINTAINERS items.
>>
>> Signed-off-by: Icenowy Zheng 
>
> Acked-by: Maxime Ripard 

Applied to u-boot-sunxi/master

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 5/5] ARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards

2017-05-04 Thread Jorge Ramirez-Ortiz
This port adds support for:
1) Serial
2) eMMC
3) USB

It has been tested with ARM TRUSTED FIRMWARE running u-boot as the
BL33 executable [see board's README]

eMMC has been tested for reading and booting the loader[1] and linux
kernels as well as saving the u-boot environment.

USB has been tested with ASIX networking adapter and SanDisk 7.4GB
drive.

PSCI has been tested via the reset call.

The firwmare upgrade process has been tested via TFTP and USB FAT
filesystem containing the fastboot.bin image in one of the partitions.

Signed-off-by: Jorge Ramirez-Ortiz 
---
 arch/arm/Kconfig  |  11 ++
 arch/arm/include/asm/arch-hi3798cv200/dwmmc.h |  13 ++
 board/hisilicon/poplar/Kconfig|  15 ++
 board/hisilicon/poplar/MAINTAINERS|   6 +
 board/hisilicon/poplar/Makefile   |   7 +
 board/hisilicon/poplar/README | 232 ++
 board/hisilicon/poplar/poplar.c   |  88 ++
 configs/poplar_defconfig  |  25 +++
 include/configs/poplar.h  | 113 +
 9 files changed, 510 insertions(+)
 create mode 100644 arch/arm/include/asm/arch-hi3798cv200/dwmmc.h
 create mode 100644 board/hisilicon/poplar/Kconfig
 create mode 100644 board/hisilicon/poplar/MAINTAINERS
 create mode 100644 board/hisilicon/poplar/Makefile
 create mode 100644 board/hisilicon/poplar/README
 create mode 100644 board/hisilicon/poplar/poplar.c
 create mode 100644 configs/poplar_defconfig
 create mode 100644 include/configs/poplar.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1df6b36..d4eba7c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -816,6 +816,16 @@ config TARGET_HIKEY
  Support for HiKey 96boards platform. It features a HI6220
  SoC, with 8xA53 CPU, mali450 gpu, and 1GB RAM.
 
+config TARGET_POPLAR
+   bool "Support Poplar 96boards Enterprise Edition Platform"
+   select ARM64
+   select DM
+   select DM_SERIAL
+   select OF_CONTROL
+ help
+ Support for Poplar 96boards platform. It features a HI3798cv200
+ SoC, with 4xA53 CPU, MaliT720 GPU, and 1GB RAM.
+
 config TARGET_LS1012AQDS
bool "Support ls1012aqds"
select ARCH_LS1012A
@@ -1145,6 +1155,7 @@ source "board/grinn/chiliboard/Kconfig"
 source "board/gumstix/pepper/Kconfig"
 source "board/h2200/Kconfig"
 source "board/hisilicon/hikey/Kconfig"
+source "board/hisilicon/poplar/Kconfig"
 source "board/imx31_phycore/Kconfig"
 source "board/isee/igep0033/Kconfig"
 source "board/olimex/mx23_olinuxino/Kconfig"
diff --git a/arch/arm/include/asm/arch-hi3798cv200/dwmmc.h 
b/arch/arm/include/asm/arch-hi3798cv200/dwmmc.h
new file mode 100644
index 000..1060d94
--- /dev/null
+++ b/arch/arm/include/asm/arch-hi3798cv200/dwmmc.h
@@ -0,0 +1,13 @@
+/*
+ * (C) Copyright 2017 Linaro
+ * Jorge Ramirez-Ortiz 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#ifndef _HI3798cv200_DWMMC_H_
+#define _HI3798cv200_DWMMC_H_
+
+int hi6220_dwmci_add_port(int index, u32 regbase, int bus_width);
+
+#endif /* _HI3798cv200_DWMMC_H_ */
diff --git a/board/hisilicon/poplar/Kconfig b/board/hisilicon/poplar/Kconfig
new file mode 100644
index 000..3397295
--- /dev/null
+++ b/board/hisilicon/poplar/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_POPLAR
+
+config SYS_BOARD
+   default "poplar"
+
+config SYS_VENDOR
+   default "hisilicon"
+
+config SYS_SOC
+   default "hi3798cv200"
+
+config SYS_CONFIG_NAME
+   default "poplar"
+
+endif
diff --git a/board/hisilicon/poplar/MAINTAINERS 
b/board/hisilicon/poplar/MAINTAINERS
new file mode 100644
index 000..0cc01c8
--- /dev/null
+++ b/board/hisilicon/poplar/MAINTAINERS
@@ -0,0 +1,6 @@
+Poplar BOARD
+M: Jorge Ramirez-Ortiz 
+S: Maintained
+F: board/hisilicon/poplar
+F: include/configs/poplar.h
+F: configs/poplar_defconfig
diff --git a/board/hisilicon/poplar/Makefile b/board/hisilicon/poplar/Makefile
new file mode 100644
index 000..101545d
--- /dev/null
+++ b/board/hisilicon/poplar/Makefile
@@ -0,0 +1,7 @@
+#
+# (C) Copyright 2017 Linaro
+# Jorge Ramirez-Ortiz 
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+obj-y  := poplar.o
diff --git a/board/hisilicon/poplar/README b/board/hisilicon/poplar/README
new file mode 100644
index 000..015eef6
--- /dev/null
+++ b/board/hisilicon/poplar/README
@@ -0,0 +1,232 @@
+
+   Board Information
+
+
+Developed by HiSilicon, the board features the Hi3798C V200 with an
+integrated quad-core 64-bit ARM Cortex A53 processor and high
+performance Mali T720 GPU, making it capable of running any commercial
+set-top solution based on Linux 

[U-Boot] [PATCH 4/5] arm: mach-types: add hikey and poplar

2017-05-04 Thread Jorge Ramirez-Ortiz
Signed-off-by: Jorge Ramirez-Ortiz 
---
 arch/arm/include/asm/mach-types.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/include/asm/mach-types.h 
b/arch/arm/include/asm/mach-types.h
index 9f82efe..db06923 100644
--- a/arch/arm/include/asm/mach-types.h
+++ b/arch/arm/include/asm/mach-types.h
@@ -5057,4 +5057,6 @@
 #define MACH_TYPE_NASM25   5112
 #define MACH_TYPE_TOMATO   5113
 #define MACH_TYPE_OMAP3_MRC3D  5114
+#define MACH_TYPE_HI6220_HIKEY 5115
+#define MACH_TYPE_HI3798CV200_POPLAR   5116
 #endif
-- 
2.7.4

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


[U-Boot] [PATCH 3/5] driver: mmc: update debug info

2017-05-04 Thread Jorge Ramirez-Ortiz
This driver is used in another board; remove board information from
the driver debug log.

Signed-off-by: Jorge Ramirez-Ortiz 
---
 drivers/mmc/hi6220_dw_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/hi6220_dw_mmc.c b/drivers/mmc/hi6220_dw_mmc.c
index fdaf1e4..d795198 100644
--- a/drivers/mmc/hi6220_dw_mmc.c
+++ b/drivers/mmc/hi6220_dw_mmc.c
@@ -20,7 +20,7 @@
 
 static int hi6220_dwmci_core_init(struct dwmci_host *host, int index)
 {
-   host->name = "HiKey DWMMC";
+   host->name = "Hisilicon DWMMC";
 
host->dev_index = index;
 
-- 
2.7.4

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


[U-Boot] [PATCH 2/5] driver: usb: add EHCI driver for hi3787cv200 SoC

2017-05-04 Thread Jorge Ramirez-Ortiz
Signed-off-by: Jorge Ramirez-Ortiz 
---
 .../arm/include/asm/arch-hi3798cv200/hi3798cv200.h |  93 ++
 drivers/usb/host/Kconfig   |   6 +
 drivers/usb/host/Makefile  |   1 +
 drivers/usb/host/ehci-hi3798cv200.c| 196 +
 4 files changed, 296 insertions(+)
 create mode 100644 arch/arm/include/asm/arch-hi3798cv200/hi3798cv200.h
 create mode 100644 drivers/usb/host/ehci-hi3798cv200.c

diff --git a/arch/arm/include/asm/arch-hi3798cv200/hi3798cv200.h 
b/arch/arm/include/asm/arch-hi3798cv200/hi3798cv200.h
new file mode 100644
index 000..c67fda1
--- /dev/null
+++ b/arch/arm/include/asm/arch-hi3798cv200/hi3798cv200.h
@@ -0,0 +1,93 @@
+/*
+ * (C) Copyright 2017 Linaro
+ * Jorge Ramirez-Ortiz 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#ifndef __HI3798cv200_H__
+#define __HI3798cv200_H__
+
+#define REG_BASE_CRG   0xF8A22000
+#define REG_BASE_SCTL  0xF800
+#define REG_BASE_CRG   0xF8A22000
+#define REG_BASE_PERI_CTRL 0xF8A2
+
+/* DEVICES */
+#define REG_BASE_UART0 0xF8B0
+#define REG_BASE_EHCI  0XF989
+#define REG_BASE_MCI   0xF983
+#define REG_BASE_MMC0  0xF983
+
+/* SC */
+#define REG_SC_CTRL0x
+#define REG_SC_SYSRES  0x0004
+#define REG_SC_GEN00x0080
+#define REG_SC_GEN10x0084
+#define REG_SC_GEN20x0088
+#define REG_SC_GEN12   0x00B0
+
+/* USB EHCI driver */
+#define PERI_USB0  (0xF8A2 + 0x120)
+#define PERI_USB1  (0xF8A2 + 0x124)
+#define PERI_USB3  (0xF8A2 + 0x12c)
+#define PERI_USB4  (0xF8A2 + 0x130)
+
+#define WORDINTERFACE  (1 << 0)
+#define ULPI_BYPASS_EN_PORT0   (1 << 3)
+#define SS_BURST16_EN  (1 << 9)
+#define TEST_WRDATA(0x4)
+#define TEST_ADDR  (0x6 << 8)
+#define TEST_WREN  (1 << 21)
+#define TEST_CLK   (1 << 22)
+#define TEST_RSTN  (1 << 23)
+
+#define PERI_CRG46 (0xF8A22000 + 0xb8)
+#define USB2_BUS_CKEN  (1<<0)
+#define USB2_OHCI48M_CKEN  (1<<1)
+#define USB2_OHCI12M_CKEN  (1<<2)
+#define USB2_OTG_UTMI_CKEN (1<<3)
+#define USB2_HST_PHY_CKEN  (1<<4)
+#define USB2_UTMI0_CKEN(1<<5)
+#define USB2_BUS_SRST_REQ  (1<<12)
+#define USB2_UTMI0_SRST_REQ(1<<13)
+#define USB2_HST_PHY_SYST_REQ  (1<<16)
+#define USB2_OTG_PHY_SYST_REQ  (1<<17)
+#define USB2_CLK48_SEL (1<<20)
+
+#define PERI_CRG47 (0xF8A22000 + 0xbc)
+#define USB2_PHY01_REF_CKEN(1 << 0)
+#define USB2_PHY2_REF_CKEN (1 << 2)
+#define USB2_PHY01_SRST_REQ(1 << 4)
+#define USB2_PHY2_SRST_REQ (1 << 6)
+#define USB2_PHY01_SRST_TREQ0  (1 << 8)
+#define USB2_PHY01_SRST_TREQ1  (1 << 9)
+#define USB2_PHY2_SRST_TREQ(1 << 10)
+#define USB2_PHY01_REFCLK_SEL  (1 << 12)
+#define USB2_PHY2_REFCLK_SEL   (1 << 14)
+
+#define REG_START_MODE 0x
+#define REG_PERI_STAT  0x0004
+#define REG_PERI_CTRL  0x0008
+#define REG_PERI_CRG26 0x00A8
+#define NF_BOOTBW_MASK (1<<12)
+
+#define HI3798CV200_EHCI_CTRL  (PERI_USB0)
+
+/* Generate padding data ranges with unique identifiers. */
+#define ___cat(a,b) a##b
+#define __cat(a,b)  ___cat(a,b)
+#define __padding(__words) struct { __u32 __cat(__pad, __COUNTER__)[__words]; }
+
+struct hi3798cv200_ehci_ctrl_regs {
+   u32 peri_usb0;
+   u32 peri_usb1;
+   u32 peri_usb2;
+   u32 peri_usb3;
+   u32 peri_usb4;
+   __padding(0x7e1);
+   u32 peri_crg46;
+   u32 peri_crg47;
+};
+
+#endif
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 0bf8274..a749d0e 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -128,6 +128,12 @@ config USB_EHCI_ZYNQ
---help---
  Enable support for Zynq on-chip EHCI USB controller
 
+config USB_EHCI_POPLAR
+   bool "Support for HI3798cv200 EHCI USB controller"
+   default y
+   ---help---
+ Enable support for Poplar on-chip EHCI USB controller
+
 config USB_EHCI_GENERIC
bool "Support for generic EHCI USB controller"
depends on OF_CONTROL
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index 58c0cf5..3661636 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -52,6 +52,7 @@ obj-$(CONFIG_USB_EHCI_VCT) += ehci-vct.o

[U-Boot] [PATCH 1/5] ARM64: poplar: add device tree bindings

2017-05-04 Thread Jorge Ramirez-Ortiz
Signed-off-by: Jorge Ramirez-Ortiz 
---
 arch/arm/dts/hi3798cv200-poplar.dts | 169 +
 arch/arm/dts/hi3798cv200.dtsi   | 413 
 include/dt-bindings/clock/histb-clock.h |  66 +
 include/dt-bindings/reset/ti-syscon.h   |  38 +++
 4 files changed, 686 insertions(+)
 create mode 100644 arch/arm/dts/hi3798cv200-poplar.dts
 create mode 100644 arch/arm/dts/hi3798cv200.dtsi
 create mode 100644 include/dt-bindings/clock/histb-clock.h
 create mode 100644 include/dt-bindings/reset/ti-syscon.h

diff --git a/arch/arm/dts/hi3798cv200-poplar.dts 
b/arch/arm/dts/hi3798cv200-poplar.dts
new file mode 100644
index 000..4e2b1d1
--- /dev/null
+++ b/arch/arm/dts/hi3798cv200-poplar.dts
@@ -0,0 +1,169 @@
+/*
+ * DTS File for HiSilicon Poplar Development Board
+ *
+ * Copyright (c) 2016-2017 HiSilicon Technologies Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+/dts-v1/;
+
+#include 
+#include "hi3798cv200.dtsi"
+
+/ {
+   model = "HiSilicon Poplar Development Board";
+   compatible = "hisilicon,hi3798cv200-poplar", "hisilicon,hi3798cv200";
+
+   aliases {
+   serial0 = 
+   };
+
+   chosen {
+   stdout-path = "serial0:115200n8";
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0x0 0x 0x 0x8000>;
+   };
+
+   soc {
+   leds {
+   compatible = "gpio-leds";
+
+   user-led0 {
+   label = "USER-LED0";
+   gpios = < 3 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "heartbeat";
+   default-state = "off";
+   };
+
+   user-led1 {
+   label = "USER-LED1";
+   gpios = < 1 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "mmc0";
+   default-state = "off";
+   };
+
+   user-led2 {
+   label = "USER-LED2";
+   gpios = < 2 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "none";
+   default-state = "off";
+   };
+
+   user-led3 {
+   label = "USER-LED3";
+   gpios = < 6 GPIO_ACTIVE_LOW>;
+   linux,default-trigger = "cpu0";
+   default-state = "off";
+   };
+   };
+   };
+};
+
+ {
+   status = "ok";
+};
+
+ {
+   status = "ok";
+   label = "LS-UART0";
+};
+/* No optional LS-UART1 on Low Speed Expansion Connector. */
+
+ {
+   status = "ok";
+   label = "LS-I2C0";
+};
+
+ {
+   status = "ok";
+   label = "LS-I2C1";
+};
+
+ {
+   status = "ok";
+   label = "LS-SPI0";
+};
+
+ {
+   status = "ok";
+   gpio-line-names = "LS-GPIO-E",  "",
+ "",   "",
+ "",   "LS-GPIO-F",
+ "",   "LS-GPIO-J";
+};
+
+ {
+   status = "ok";
+   gpio-line-names = "LS-GPIO-H",  "LS-GPIO-I",
+ "LS-GPIO-L",  "LS-GPIO-G",
+ "LS-GPIO-K",  "",
+ "",   "";
+};
+
+ {
+   status = "ok";
+   gpio-line-names = "",   "",
+ "",   "",
+ "LS-GPIO-C",  "",
+ "",   "LS-GPIO-B";
+};
+
+ {
+   status = "ok";
+   gpio-line-names = "",   "",
+ "",   "",
+ "",   "LS-GPIO-D",
+ "",   "";
+};
+
+ {
+   status = "ok";
+   gpio-line-names = "",   "USER-LED-1",
+ "USER-LED-2", "",
+ "",   "LS-GPIO-A",
+ "",   "";
+};
+
+ {
+   status = "ok";
+   gpio-line-names = "",   "",
+ "",   "USER-LED-0",
+ "",   "",
+  

Re: [U-Boot] [PATCH] ARM: dts: OLinuXino Lime2 eMMC dts sync

2017-05-04 Thread Maxime Ripard
On Thu, May 04, 2017 at 11:51:19AM +0200, Olliver Schinagl wrote:
> Hey Maxime,
> 
> On 04-05-17 11:43, Maxime Ripard wrote:
> > Hi,
> > 
> > On Thu, May 04, 2017 at 11:00:31AM +0200, Olliver Schinagl wrote:
> > > Sync the sun7i-a20-olinuxino-lime2-emmc.dts with the upstream kernel,
> > > which fixes the power-sequencing pin being wrongfully set up.
> > 
> > You have a dependency between two patches. The usual way to deal with
> > that is to create a serie of patches so that they all work. Or at
> > least mentionning it.
>
> Well, I do not have a dependancy per-say. The dts was al ready there. The
> problem is some people have reported problems with the power sequencing
> sometimes not working properly for them.

You said in your note that it wasn't working properly without that
patch. That definitely looks like a dependency to me.

> > And you should also explain what was wrongfully set up. There's
> > nothing obvious from the patch below.
>
> You are right, it was just a sync from the upstream dt.

It wasn't "just a sync" if it was fixing an issue.

> Which is why I asked, how do we normally handle it, just copy/paste and make
> a patch was the answer there.
> 
> I think we need a better system as to keeping the device tree's in sync, if
> we want both to use the same device-tree, right?

This one works just fine. You just have to describe properly what
you're doing in your commit log.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


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


Re: [U-Boot] [PATCH v3 3/3] spl: dfu: reduce spl-dfu MLO size

2017-05-04 Thread Tom Rini
On Thu, May 04, 2017 at 03:45:30PM +0530, Ravi Babu wrote:

> compile out cli_hush.c for spl/dfu and
> use cli_simple_run_command for dfu to
> reduce the spl-dfu memory foot print.
> 
> Adding CONFIG_SPL_DFU_MMC to Kconfig and
> use CONFIG_IS_ENABLED(DFU_MMC).
> 
> Signed-off-by: Ravi Babu 
[snip]
> diff --git a/drivers/dfu/Makefile b/drivers/dfu/Makefile
> index 61f2b71..7060908 100644
> --- a/drivers/dfu/Makefile
> +++ b/drivers/dfu/Makefile
> @@ -6,7 +6,10 @@
>  #
>  
>  obj-$(CONFIG_USB_FUNCTION_DFU) += dfu.o
> +ifndef CONFIG_SPL_BUILD
>  obj-$(CONFIG_DFU_MMC) += dfu_mmc.o
> +endif
> +obj-$(CONFIG_SPL_DFU_MMC) += dfu_mmc.o

This becomes obj-$(CONFIG_$(SPL_)DFU_MMC) += dfu_mmc.o

> diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
> index 926ccbd..ba509db 100644
> --- a/drivers/dfu/dfu_mmc.c
> +++ b/drivers/dfu/dfu_mmc.c
[snip]
> @@ -154,7 +155,11 @@ static int mmc_file_op(enum dfu_op op, struct dfu_entity 
> *dfu,
>  
>   debug("%s: %s 0x%p\n", __func__, cmd_buf, cmd_buf);
>  
> +#if CONFIG_IS_ENABLED(DFU_MMC)
> + ret = cli_simple_run_command(cmd_buf, 0);
> +#else
>   ret = run_command(cmd_buf, 0);
> +#endif

This doesn't make sense.  CONFIG_IS_ENABLED(DFU_MMC) is true for
CONFIG_DFU_MMC or CONFIG_SPL_DFU_MMC.  Thanks!

-- 
Tom


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


[U-Boot] [ U-Boot ] armv8/start.S : what's the difference between CONFIG_ARMV8_SPIN_TABLE and CONFIG_ARMV8_MULTIENTRY

2017-05-04 Thread Cao Jie
 
Hi all
 
I am new to armv8's uboot and when I research codes about armv8/start.S I'm
confused by two option:
CONFIG_ARMV8_SPIN_TABLE and CONFIG_ARMV8_MULTIENTRY
Both option have the same function which cause slave CPUS to enter standby
mode, so why we have the two option for this case? What's the difference
between them?
 
Any feedback would be appreciate.
 
Thanks,
Jay
 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] board/BuR/common: incorrect check of dtb

2017-05-04 Thread Hannes Schmelzer

On 05/03/2017 11:44 PM, Heinrich Schuchardt wrote:

The logical expression to check the dtb is incorrect in
load_devicetree.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt 
---
I do not have a board for testing.
Please, review carefully.
---
  board/BuR/common/common.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 876150402c..c0316b9ebd 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -265,7 +265,7 @@ static int load_devicetree(void)
char *dtbname = getenv("dtb");
char *dtbdev = getenv("dtbdev");
char *dtppart = getenv("dtbpart");
-   if (!dtbdev || !dtbdev || !dtbname) {
+   if (!dtbdev || !dtbpart || !dtbname) {
printf("%s: // missing.\n", __func__);
return -1;
}

Reviewed-by: Hannes Schmelzer 
Acked-by: Hannes Schmelzer 

Thanks!

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


[U-Boot] [PATCH] drivers:usb:xhci:fsl: Implement Erratum A-010151 for FSL USB3 controller

2017-05-04 Thread yinbo . zhu
From: Sriram Dash 

Currently the controller by default enables the Receive Detect feature in P3
mode in USB 3.0 PHY. However, USB 3.0 PHY does not reliably support receive
detection in P3 mode.
Enabling the USB3 controller to configure USB in P2 mode whenever the Receive
Detect feature is required.

Signed-off-by: Sriram Dash 
Signed-off-by: Rajesh Bhagat 
Signed-off-by: yinbo.zhu 
---
 drivers/usb/host/xhci-dwc3.c | 5 +
 drivers/usb/host/xhci-fsl.c  | 7 +++
 include/linux/usb/dwc3.h | 1 +
 3 files changed, 13 insertions(+)

diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index 33961cd..adbd9b5 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -97,3 +97,8 @@ void dwc3_set_fladj(struct dwc3 *dwc3_reg, u32 val)
setbits_le32(_reg->g_fladj, GFLADJ_30MHZ_REG_SEL |
GFLADJ_30MHZ(val));
 }
+
+void dwc3_set_rxdetect_power_mode(struct dwc3 *dwc3_reg, u32 val)
+{
+   setbits_le32(_reg->g_usb3pipectl[0], val);
+}
diff --git a/drivers/usb/host/xhci-fsl.c b/drivers/usb/host/xhci-fsl.c
index 3a16624..ffb2242 100644
--- a/drivers/usb/host/xhci-fsl.c
+++ b/drivers/usb/host/xhci-fsl.c
@@ -85,6 +85,13 @@ static int fsl_xhci_core_init(struct fsl_xhci *fsl_xhci)
/* Change beat burst and outstanding pipelined transfers requests */
fsl_xhci_set_beat_burst_length(fsl_xhci->dwc3_reg);
 
+/*
+* A-010151: USB controller to configure USB in P2 mode
+* whenever the Receive Detect feature is required
+*/
+dwc3_set_rxdetect_power_mode(fsl_xhci->dwc3_reg,
+   DWC3_GUSB3PIPECTL_DISRXDETP3);
+
/*
 * A-010151: The dwc3 phy TSMC 28-nm HPM 0.9/1.8 V does not
 * reliably support Rx Detect in P3 mode(P3 is the default
diff --git a/include/linux/usb/dwc3.h b/include/linux/usb/dwc3.h
index c1b23b2..873b4db 100644
--- a/include/linux/usb/dwc3.h
+++ b/include/linux/usb/dwc3.h
@@ -220,5 +220,6 @@ void dwc3_set_mode(struct dwc3 *dwc3_reg, u32 mode);
 void dwc3_core_soft_reset(struct dwc3 *dwc3_reg);
 int dwc3_core_init(struct dwc3 *dwc3_reg);
 void dwc3_set_fladj(struct dwc3 *dwc3_reg, u32 val);
+void dwc3_set_rxdetect_power_mode(struct dwc3 *dwc3_reg, u32 val);
 #endif
 #endif /* __DWC3_H_ */
-- 
2.1.0.27.g96db324

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


[U-Boot] [PATCH v2 2/3] common: dfu: ignore reset for spl-dfu

2017-05-04 Thread Ravi Babu
The SPL-DFU feature enable to load and
execute u-boot from RAM over usb from
PC using dfu-util.
Hence dfu-reset should not be issued
when dfu-util -R switch is issued.

Signed-off-by: Ravi Babu 
---
 common/dfu.c   | 2 +-
 common/spl/Kconfig | 4 
 drivers/dfu/dfu.c  | 4 
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/common/dfu.c b/common/dfu.c
index 0e9f5f5..546a1ab 100644
--- a/common/dfu.c
+++ b/common/dfu.c
@@ -88,7 +88,7 @@ exit:
board_usb_cleanup(usbctrl_index, USB_INIT_DEVICE);
 
if (dfu_reset)
-   run_command("reset", 0);
+   do_reset(NULL, 0, 0, NULL);
 
g_dnl_clear_detach();
 
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 1231351..f51ae2c 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -6,6 +6,9 @@ config SUPPORT_SPL
 config SUPPORT_TPL
bool
 
+config SPL_DFU_NO_RESET
+   bool
+
 config SPL
bool
depends on SUPPORT_SPL
@@ -646,6 +649,7 @@ config SPL_USBETH_SUPPORT
 config SPL_DFU_SUPPORT
bool "Support DFU (Device Firmware Upgarde)"
select SPL_HASH_SUPPORT
+   select SPL_DFU_NO_RESET
depends on SPL_RAM_SUPPORT
help
  This feature enables the DFU (Device Firmware Upgarde) in SPL with
diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
index 8dacc1a..ceb33e3 100644
--- a/drivers/dfu/dfu.c
+++ b/drivers/dfu/dfu.c
@@ -35,7 +35,11 @@ static struct hash_algo *dfu_hash_algo;
  */
 __weak bool dfu_usb_get_reset(void)
 {
+#ifdef CONFIG_SPL_DFU_NO_RESET
+   return false;
+#else
return true;
+#endif
 }
 
 static int dfu_find_alt_num(const char *s)
-- 
1.9.1

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


Re: [U-Boot] [PATCH 1/2] armv8: ls1046ardb: Make NET independent of FMan

2017-05-04 Thread Mingkai Hu


> -Original Message-
> From: York Sun [mailto:york@nxp.com]
> Sent: Tuesday, April 25, 2017 11:40 PM
> To: u-boot@lists.denx.de
> Cc: Mingkai Hu ; york sun 
> Subject: [PATCH 1/2] armv8: ls1046ardb: Make NET independent of FMan
> 
> This allows using PCIe NIC without enabling DPAA FMan.
> 
> Signed-off-by: York Sun 
> CC: Mingkai Hu 
> ---
>  board/freescale/ls1046ardb/Makefile |  2 +-
>  include/configs/ls1046ardb.h| 15 +--
>  2 files changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/board/freescale/ls1046ardb/Makefile
> b/board/freescale/ls1046ardb/Makefile
> index b92ed0b..4076558 100644
> --- a/board/freescale/ls1046ardb/Makefile
> +++ b/board/freescale/ls1046ardb/Makefile
> @@ -7,6 +7,6 @@
>  obj-y += ddr.o
>  obj-y += ls1046ardb.o
>  ifndef CONFIG_SPL_BUILD
> -obj-$(CONFIG_SYS_DPAA_FMAN) += eth.o
> +obj-$(CONFIG_NET) += eth.o
>  obj-y += cpld.o
>  endif
> diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h
> index 67ee626..40a5635 100644
> --- a/include/configs/ls1046ardb.h
> +++ b/include/configs/ls1046ardb.h
> @@ -178,18 +178,20 @@
>  #define CONFIG_ENV_SECT_SIZE 0x4 /*
> 256KB */
>  #endif
> 
> +#define AQR105_IRQ_MASK  0x8000
>  /* FMan */
>  #ifndef SPL_NO_FMAN
> -#ifdef CONFIG_SYS_DPAA_FMAN
> -#define CONFIG_FMAN_ENET
> +
> +#ifdef CONFIG_NET
>  #define CONFIG_PHYLIB
> -#define CONFIG_PHYLIB_10G
>  #define CONFIG_PHY_GIGE  /* Include GbE speed/duplex
> detection */
> -
>  #define CONFIG_PHY_REALTEK
> -#define CONFIG_PHY_AQUANTIA
> -#define AQR105_IRQ_MASK  0x8000
> +#endif
> 
> +#ifdef CONFIG_SYS_DPAA_FMAN
> +#define CONFIG_FMAN_ENET
> +#define CONFIG_PHY_AQUANTIA
> +#define CONFIG_PHYLIB_10G
>  #define RGMII_PHY1_ADDR  0x1
>  #define RGMII_PHY2_ADDR  0x2
> 
> @@ -200,6 +202,7 @@
> 
>  #define CONFIG_ETHPRIME  "FM1@DTSEC3"
>  #endif
> +
>  #endif
> 
>  /* QSPI device */
> --
> 2.7.4

ACK.

And Tested-by: Mingkai Hu 

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


[U-Boot] [PATCH v3 1/3] spl: Kconfig: dfu: spl-dfu depends on SPL_RAM_SUPPORT

2017-05-04 Thread Ravi Babu
Since SPL_DFU_SUPPORT is depends on SPL_RAM_SUPPORT,
hence select SPL_DFU_SUPPORT only when
SPL_RAM_SUPPORT is chosen.

Signed-off-by: Ravi Babu 
Reviewed-by: Tom Rini 
---
 common/spl/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index ea6fbb6..1231351 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -646,6 +646,7 @@ config SPL_USBETH_SUPPORT
 config SPL_DFU_SUPPORT
bool "Support DFU (Device Firmware Upgarde)"
select SPL_HASH_SUPPORT
+   depends on SPL_RAM_SUPPORT
help
  This feature enables the DFU (Device Firmware Upgarde) in SPL with
  RAM memory device support. The ROM code will load and execute
-- 
1.9.1

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


[U-Boot] [PATCH v3 3/3] spl: dfu: reduce spl-dfu MLO size

2017-05-04 Thread Ravi Babu
compile out cli_hush.c for spl/dfu and
use cli_simple_run_command for dfu to
reduce the spl-dfu memory foot print.

Adding CONFIG_SPL_DFU_MMC to Kconfig and
use CONFIG_IS_ENABLED(DFU_MMC).

Signed-off-by: Ravi Babu 
---
---
 common/Makefile   | 1 -
 drivers/dfu/Kconfig   | 5 +
 drivers/dfu/Makefile  | 3 +++
 drivers/dfu/dfu_mmc.c | 5 +
 include/dfu.h | 2 +-
 5 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/common/Makefile b/common/Makefile
index 86225f1..6e90078 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -90,7 +90,6 @@ endif # !CONFIG_SPL_BUILD
 
 ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_SPL_DFU_SUPPORT) += dfu.o
-obj-$(CONFIG_SPL_DFU_SUPPORT) += cli_hush.o
 obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o
 obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
 obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig
index 56a98f5..99a0db1 100644
--- a/drivers/dfu/Kconfig
+++ b/drivers/dfu/Kconfig
@@ -17,6 +17,11 @@ config DFU_MMC
help
  This option enables using DFU to read and write to MMC based storage.
 
+config SPL_DFU_MMC
+   bool "MMC back end for SPL-DFU"
+   help
+ This option enables DFU for SPL to read and write to MMC based 
storage.
+
 config DFU_NAND
bool "NAND back end for DFU"
help
diff --git a/drivers/dfu/Makefile b/drivers/dfu/Makefile
index 61f2b71..7060908 100644
--- a/drivers/dfu/Makefile
+++ b/drivers/dfu/Makefile
@@ -6,7 +6,10 @@
 #
 
 obj-$(CONFIG_USB_FUNCTION_DFU) += dfu.o
+ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_DFU_MMC) += dfu_mmc.o
+endif
+obj-$(CONFIG_SPL_DFU_MMC) += dfu_mmc.o
 obj-$(CONFIG_DFU_NAND) += dfu_nand.o
 obj-$(CONFIG_DFU_RAM) += dfu_ram.o
 obj-$(CONFIG_DFU_SF) += dfu_sf.o
diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
index 926ccbd..ba509db 100644
--- a/drivers/dfu/dfu_mmc.c
+++ b/drivers/dfu/dfu_mmc.c
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static unsigned char *dfu_file_buf;
 static long dfu_file_buf_len;
@@ -154,7 +155,11 @@ static int mmc_file_op(enum dfu_op op, struct dfu_entity 
*dfu,
 
debug("%s: %s 0x%p\n", __func__, cmd_buf, cmd_buf);
 
+#if CONFIG_IS_ENABLED(DFU_MMC)
+   ret = cli_simple_run_command(cmd_buf, 0);
+#else
ret = run_command(cmd_buf, 0);
+#endif
if (ret) {
puts("dfu: Read error!\n");
return ret;
diff --git a/include/dfu.h b/include/dfu.h
index f39d3f1..94d2a49 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -203,7 +203,7 @@ static inline void dfu_set_defer_flush(struct dfu_entity 
*dfu)
 int dfu_write_from_mem_addr(struct dfu_entity *dfu, void *buf, int size);
 
 /* Device specific */
-#ifdef CONFIG_DFU_MMC
+#if CONFIG_IS_ENABLED(DFU_MMC)
 extern int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr, char *s);
 #else
 static inline int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr,
-- 
1.9.1

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


  1   2   >