Re: [U-Boot] [U-Boot-Board-Maintainers] [ANN] U-Boot v2019.07-rc4 released

2019-06-10 Thread Lukasz Majewski
Hi Tom,

> Hey all,
> 
> It's release day and here is v2019.07-rc4.   At this point, I know we
> have some regression fixes for i.MX that are coming, and I'm
> expecting a fix to the build time failure for tinker-rk3288.
> 
> To repeat myself about DM migration deadlines, first, let me say
> again, that DM is not required for SPL.  This comes up enough that I
> want to say it again here.  Next, if there is active progress on
> converting things, we'll keep from pulling the code out.  This is why
> for example, we haven't yet pulled out a lot of deprecated SPI code.
> Some of it is still in progress on being converted, so I need to
> update the series I posted after the last -rc to remove still less
> drivers.
> 
> In terms of a changelog, 
> git log --merges v2019.07-rc3..v2019.07-rc4
> continues to improve in quality.  If you're sending me a PR, please
> include a few lines or words in summary and I'll be sure to put it
> into the merge commit.
> 
> As I mentioned with -rc3, with this cycle is coming closer to an end,
> it's time to decide if we're going to keep this 3 month cycle or go
> back to 2 months.

I do prefer 3 months cycle. IMHO with 3 months cycle, we do have a time
to fix things and adding new code is done in merge window.

>  After the last release while I did get some
> feedback, the overall balance is still in the 3 month bucket.
> 
> I'm planning on doing -rc5 on June 24th with the release scheduled on
> July 8th.  Thanks all!
> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de


pgpOIA9TOy9k1.pgp
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH V2 2/2] watchdog: imx: Add DM support

2019-06-10 Thread Heiko Schocher

Hello Marek,

Am 09.06.2019 um 03:46 schrieb Marek Vasut:

Add DM and DT probing support to iMX watchdog driver. This should
allow boards to move over to this driver, enable SYSRESET_WATCHDOG
to handle cpu_reset() if required.

Signed-off-by: Marek Vasut 
Cc: Peng Fan 
Cc: Stefano Babic 
---
V2: No change
---
  drivers/watchdog/Kconfig|   2 +-
  drivers/watchdog/imx_watchdog.c | 119 +++-
  2 files changed, 104 insertions(+), 17 deletions(-)


just worked on similiar patch (not ready for mainline) ... patch looks
good to me, but I stumbled over a nitpick ...

CONFIG_WATCHDOG_TIMEOUT_MSECS is defined in imx_watchdog to 128000 ms

37 #ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
38 #define CONFIG_WATCHDOG_TIMEOUT_MSECS 128000
39 #endif

If now using DM approach it is set to 6 ms, see include/wdt.h

109 #if defined(CONFIG_WDT)
110 #ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
111 #define CONFIG_WATCHDOG_TIMEOUT_MSECS   (60 * 1000)
112 #endif
113 #define WATCHDOG_TIMEOUT_SECS   (CONFIG_WATCHDOG_TIMEOUT_MSECS / 1000)

Can you try my patch:
https://github.com/hsdenx/u-boot-test/commit/11503dba89cade8b81ee9d93d503d0bcce868b33

which moves WATCHDOG_TIMEOUT_MSECS to Kconfig ?
(Travis build just started, may not mainline ready, also patman
 notes in commit messages can now be removed.)

Thanks!

bye,
Heiko


diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 0330a3b3a1..5993865647 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -136,7 +136,7 @@ config XILINX_TB_WATCHDOG
  
  config IMX_WATCHDOG

bool "Enable Watchdog Timer support for IMX and LSCH2 of NXP"
-   select HW_WATCHDOG
+   select HW_WATCHDOG if !WDT
help
   Select this to enable the IMX and LSCH2 of Layerscape watchdog
   driver.
diff --git a/drivers/watchdog/imx_watchdog.c b/drivers/watchdog/imx_watchdog.c
index 14cc618074..53a3e9f5c7 100644
--- a/drivers/watchdog/imx_watchdog.c
+++ b/drivers/watchdog/imx_watchdog.c
@@ -5,7 +5,9 @@
   */
  
  #include 

+#include 
  #include 
+#include 
  #include 
  #include 
  #ifdef CONFIG_FSL_LSCH2
@@ -13,20 +15,40 @@
  #endif
  #include 
  
-#ifdef CONFIG_IMX_WATCHDOG

-void hw_watchdog_reset(void)
+static void imx_watchdog_expire_now(struct watchdog_regs *wdog)
+{
+   clrsetbits_le16(>wcr, WCR_WT_MSK, WCR_WDE);
+
+   writew(0x, >wsr);
+   writew(0x, >wsr);  /* load minimum 1/2 second timeout */
+   while (1) {
+   /*
+* spin for .5 seconds before reset
+*/
+   }
+}
+
+#if !defined(CONFIG_IMX_WATCHDOG) || \
+(defined(CONFIG_IMX_WATCHDOG) && !CONFIG_IS_ENABLED(WDT))
+void __attribute__((weak)) reset_cpu(ulong addr)
  {
-#ifndef CONFIG_WATCHDOG_RESET_DISABLE
struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
  
+	imx_watchdog_expire_now(wdog);

+}
+#endif
+
+#if defined(CONFIG_IMX_WATCHDOG)
+static void imx_watchdog_reset(struct watchdog_regs *wdog)
+{
+#ifndef CONFIG_WATCHDOG_RESET_DISABLE
writew(0x, >wsr);
writew(0x, >wsr);
  #endif /* CONFIG_WATCHDOG_RESET_DISABLE*/
  }
  
-void hw_watchdog_init(void)

+static void imx_watchdog_init(struct watchdog_regs *wdog)
  {
-   struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
u16 timeout;
  
  	/*

@@ -44,21 +66,86 @@ void hw_watchdog_init(void)
writew(WCR_WDZST | WCR_WDBG | WCR_WDE | WCR_WDT | WCR_SRS |
WCR_WDA | SET_WCR_WT(timeout), >wcr);
  #endif /* CONFIG_FSL_LSCH2*/
-   hw_watchdog_reset();
+   imx_watchdog_reset(wdog);
  }
-#endif
  
-void __attribute__((weak)) reset_cpu(ulong addr)

+#if !CONFIG_IS_ENABLED(WDT)
+void hw_watchdog_reset(void)
  {
struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
  
-	clrsetbits_le16(>wcr, WCR_WT_MSK, WCR_WDE);

+   imx_watchdog_reset(wdog);
+}
  
-	writew(0x, >wsr);

-   writew(0x, >wsr);  /* load minimum 1/2 second timeout */
-   while (1) {
-   /*
-* spin for .5 seconds before reset
-*/
-   }
+void hw_watchdog_init(void)
+{
+   struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
+
+   imx_watchdog_init(wdog);
+}
+#else
+struct imx_wdt_priv {
+   void __iomem *base;
+};
+
+static int imx_wdt_reset(struct udevice *dev)
+{
+   struct imx_wdt_priv *priv = dev_get_priv(dev);
+
+   imx_watchdog_reset(priv->base);
+
+   return 0;
+}
+
+static int imx_wdt_expire_now(struct udevice *dev, ulong flags)
+{
+   struct imx_wdt_priv *priv = dev_get_priv(dev);
+
+   imx_watchdog_expire_now(priv->base);
+   hang();
+
+   return 0;
+}
+
+static int imx_wdt_start(struct udevice *dev, u64 timeout, ulong flags)
+{
+   struct imx_wdt_priv *priv = dev_get_priv(dev);
+
+   imx_watchdog_init(priv->base);
+
+   return 0;
+}
+
+static int imx_wdt_probe(struct udevice *dev)
+{
+   struct 

Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions

2019-06-10 Thread Marek Vasut
On 6/11/19 3:17 AM, Peng Fan wrote:
>> partitions
>>
>> On 6/10/19 7:59 AM, Peng Fan wrote:
 Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing
 boot partitions

 Hi Marek, Peng,

 On 03/06/19 12:04 PM, Peng Fan wrote:
>
>> Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot
>> partitions
>>
>> According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation ,
>> HS200 & HS400 mode is not supported during boot operation. The
>> U-Boot code currently only applies this restriction to HS200 mode,
>> extend this to
>> HS400 mode as well.
 The spec in section 6.3.3 (according to my understanding) is talking
 about "boot operation" which is a way of getting data from the the
 eMMC without going through the Device identification mode (Section
 6.4.4) i.e. without sending any commands. All the host has to do is
 hold the command line low in Pre-Idle mode to automatically receive
 data at the preconfigured frequency and bus width.

 When U-boot is accessing the partition, it has already gone through
 the Device identification mode and is in data transfer mode (i.e. it
 needs to send commands for read/write to happen). In this case, we
 need to switch the partition in Extended CSD to access the boot
 partition (Section 6.2.5). The spec doesn't say anything about HS200 and
>> HS400 not being supported here.
>>>
>>> Yes, the spec does not mention this. It only mentions HS200/400 not
>>> supported during boot operation.
>>>

 Also, I don't see linux kernel switching down speed when trying to
 access a boot partition (unless its being very sneaky about it). So
 if you are seeing issues with accessing boot partitions at
 HS200/HS400 then you should probably look at how linux code is working
>> instead.
>>>
>>> There might be bug in U-Boot code.
>>
>> So are we gonna leave this inconsistency in for current release or what's it
>> gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next
>> release, but we should at least fix this in current release.
> 
> I'll pick up your patch in this release.

Right.

But I would still like to know whether we can access the HW partitions
in HS modes or not. And I would also like to know why we originally
prevented it.

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] i2c: designware: Get clock rate from clock DM

2019-06-10 Thread Marek Vasut
On 6/11/19 3:05 AM, Ley Foon Tan wrote:
> On Mon, Jun 10, 2019 at 8:07 PM Marek Vasut  wrote:
>>
>> On 6/10/19 8:07 AM, Ley Foon Tan wrote:
>> [...]
>>
>> [...]
>>
>>> @@ -523,8 +527,20 @@ static int designware_i2c_xfer(struct udevice 
>>> *bus, struct i2c_msg *msg,
>>>  static int designware_i2c_set_bus_speed(struct udevice *bus, unsigned 
>>> int speed)
>>>  {
>>>   struct dw_i2c *i2c = dev_get_priv(bus);
>>> + ulong rate;
>>> +
>>> +#if CONFIG_IS_ENABLED(CLK)
>>> + rate = clk_get_rate(>clk);
>>
>> Do we need to re-read the bus frequency for each transfer ?
>> I would expect set_bus_speed callback to set the frequencies once and
>> then keep them that way until it's called again.
> Yes, we can get clock rate when request clock in _probe(). Then keep a
> copy for future use.

 Not in .probe() , in set_bus_speed().
>>> My patch is doing it in designware_i2c_set_bus_speed() already.  We
>>> can't get clock rate in __dw_i2c_set_bus_speed(), because this
>>> function doesn't have struct udevice.
>>
>> include/i2c.h struct dm_i2c_ops {} :
>>
>> 388 /**
>> 389  * set_bus_speed() - set the speed of a bus (optional)
>> 390  *
>> 391  * The bus speed value will be updated by the uclass if this
>> function
>> 392  * does not return an error. This method is optional - if it
>> is not
>> 393  * provided then the driver can read the speed from
>> 394  * dev_get_uclass_priv(bus)->speed_hz
>> 395  *
>> 396  * @bus:Bus to adjust
>> 397  * @speed:  Requested speed in Hz
>> 398  * @return 0 if OK, -EINVAL for invalid values
>> 399  */
>> 400 int (*set_bus_speed)(struct udevice *bus, unsigned int speed);
>>
>> There's struct udevice right there ^
> 
> I'm confused now.
> 
> .set_bus_speed  = designware_i2c_set_bus_speed and my patch is doing
> get clock rate in .set_bus_speed callback already.
> 
> static const struct dm_i2c_ops designware_i2c_ops = {
> .xfer   = designware_i2c_xfer,
> .probe_chip = designware_i2c_probe_chip,
> .set_bus_speed  = designware_i2c_set_bus_speed,
> };

Uh, clearly I was confused as well, sorry.

Acked-by: Marek Vasut 

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot-Board-Maintainers] [ANN] U-Boot v2019.07-rc4 released

2019-06-10 Thread Marek Vasut
On 6/11/19 3:31 AM, Tom Rini wrote:
> Hey all,
> 
> It's release day and here is v2019.07-rc4.   At this point, I know we
> have some regression fixes for i.MX that are coming, and I'm expecting a
> fix to the build time failure for tinker-rk3288.
> 
> To repeat myself about DM migration deadlines, first, let me say again,
> that DM is not required for SPL.  This comes up enough that I want to
> say it again here.  Next, if there is active progress on converting
> things, we'll keep from pulling the code out.  This is why for example,
> we haven't yet pulled out a lot of deprecated SPI code.  Some of it is
> still in progress on being converted, so I need to update the series I
> posted after the last -rc to remove still less drivers.
> 
> In terms of a changelog, 
> git log --merges v2019.07-rc3..v2019.07-rc4
> continues to improve in quality.  If you're sending me a PR, please
> include a few lines or words in summary and I'll be sure to put it into
> the merge commit.

Do you have a list of the platforms that are currently in the danger zone ?

> As I mentioned with -rc3, with this cycle is coming closer to an end,
> it's time to decide if we're going to keep this 3 month cycle or go back
> to 2 months.  After the last release while I did get some feedback, the
> overall balance is still in the 3 month bucket.

I vote for 3 months, I very much like it.

> I'm planning on doing -rc5 on June 24th with the release scheduled on
> July 8th.  Thanks all!

Great

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 1/2] net: Convert CONFIG_IP_DEFRAG to Kconfig

2019-06-10 Thread Marek Vasut
Convert CONFIG_IP_DEFRAG to Kconfig, update defconfigs, headers
and whitelist. This patch is a follow-up on a patch by Christian
Gmeiner with the added config/header/whitelist updates.

Signed-off-by: Marek Vasut 
Reported-by: Christian Gmeiner 
Cc: Joe Hershberger 
---
 configs/apalis-tk1_defconfig | 1 +
 configs/apalis_imx6_defconfig| 1 +
 configs/apalis_t30_defconfig | 1 +
 configs/colibri-imx6ull_defconfig| 1 +
 configs/colibri_imx6_defconfig   | 1 +
 configs/colibri_imx7_defconfig   | 1 +
 configs/colibri_imx7_emmc_defconfig  | 1 +
 configs/colibri_t20_defconfig| 1 +
 configs/colibri_t30_defconfig| 1 +
 configs/sandbox64_defconfig  | 1 +
 configs/sandbox_defconfig| 1 +
 configs/sandbox_flattree_defconfig   | 1 +
 configs/sandbox_noblk_defconfig  | 1 +
 configs/sandbox_spl_defconfig| 1 +
 configs/tools-only_defconfig | 1 +
 configs/xilinx_versal_virt_defconfig | 1 +
 include/configs/apalis-tk1.h | 1 -
 include/configs/apalis_imx6.h| 1 -
 include/configs/apalis_t30.h | 1 -
 include/configs/colibri-imx6ull.h| 1 -
 include/configs/colibri_imx6.h   | 1 -
 include/configs/colibri_imx7.h   | 1 -
 include/configs/colibri_t20.h| 1 -
 include/configs/colibri_t30.h| 1 -
 include/configs/sandbox.h| 1 -
 include/configs/xilinx_versal.h  | 1 -
 net/Kconfig  | 7 +++
 scripts/config_whitelist.txt | 1 -
 28 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/configs/apalis-tk1_defconfig b/configs/apalis-tk1_defconfig
index be9d55e7d4..54031aa3b7 100644
--- a/configs/apalis-tk1_defconfig
+++ b/configs/apalis-tk1_defconfig
@@ -30,6 +30,7 @@ CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_OF_LIVE=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra124-apalis"
+CONFIG_IP_DEFRAG=y
 CONFIG_SPL_DM=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
index 3292d644aa..26cd36efc7 100644
--- a/configs/apalis_imx6_defconfig
+++ b/configs/apalis_imx6_defconfig
@@ -53,6 +53,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6-apalis"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_IP_DEFRAG=y
 CONFIG_DWC_AHSATA=y
 CONFIG_DFU_MMC=y
 CONFIG_DM_GPIO=y
diff --git a/configs/apalis_t30_defconfig b/configs/apalis_t30_defconfig
index 31a763536d..1a48c553b9 100644
--- a/configs/apalis_t30_defconfig
+++ b/configs/apalis_t30_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_OF_LIVE=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra30-apalis"
+CONFIG_IP_DEFRAG=y
 CONFIG_SPL_DM=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
diff --git a/configs/colibri-imx6ull_defconfig 
b/configs/colibri-imx6ull_defconfig
index 3dbb4d95b6..9c92f49494 100644
--- a/configs/colibri-imx6ull_defconfig
+++ b/configs/colibri-imx6ull_defconfig
@@ -45,6 +45,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6ull-colibri"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_IP_DEFRAG=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_NAND=y
 CONFIG_DM_GPIO=y
diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
index efb11ed987..1ebdb5dcbb 100644
--- a/configs/colibri_imx6_defconfig
+++ b/configs/colibri_imx6_defconfig
@@ -53,6 +53,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6-colibri"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_IP_DEFRAG=y
 CONFIG_DFU_MMC=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_I2C=y
diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig
index bfb84ecde8..8f9edf3b44 100644
--- a/configs/colibri_imx7_defconfig
+++ b/configs/colibri_imx7_defconfig
@@ -45,6 +45,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx7-colibri-rawnand"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_IP_DEFRAG=y
 CONFIG_FSL_CAAM=y
 CONFIG_DFU_NAND=y
 CONFIG_DM_GPIO=y
diff --git a/configs/colibri_imx7_emmc_defconfig 
b/configs/colibri_imx7_emmc_defconfig
index 9312de9406..08da620c50 100644
--- a/configs/colibri_imx7_emmc_defconfig
+++ b/configs/colibri_imx7_emmc_defconfig
@@ -40,6 +40,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx7-colibri-emmc"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_IP_DEFRAG=y
 CONFIG_FSL_CAAM=y
 CONFIG_DFU_MMC=y
 CONFIG_DM_GPIO=y
diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig
index 15fb9555f3..127523de9f 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -35,6 +35,7 @@ CONFIG_CMD_UBI=y
 CONFIG_OF_LIVE=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra20-colibri"
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_IP_DEFRAG=y
 CONFIG_SPL_DM=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
diff --git a/configs/colibri_t30_defconfig b/configs/colibri_t30_defconfig
index 2d12fc10c4..326548e84a 100644
--- a/configs/colibri_t30_defconfig
+++ 

[U-Boot] [PATCH 2/2] net: Convert CONFIG_TFTP_BLOCKSIZE to Kconfig

2019-06-10 Thread Marek Vasut
Convert CONFIG_TFTP_BLOCKSIZE to Kconfig, update defconfigs,
headers and whitelist.

Signed-off-by: Marek Vasut 
Cc: Christian Gmeiner 
Cc: Joe Hershberger 
---
 configs/apalis-tk1_defconfig | 1 +
 configs/apalis_imx6_defconfig| 1 +
 configs/apalis_t30_defconfig | 1 +
 configs/colibri-imx6ull_defconfig| 1 +
 configs/colibri_imx6_defconfig   | 1 +
 configs/colibri_imx7_defconfig   | 1 +
 configs/colibri_imx7_emmc_defconfig  | 1 +
 configs/colibri_t20_defconfig| 1 +
 configs/colibri_t30_defconfig| 1 +
 configs/xilinx_versal_virt_defconfig | 1 +
 include/configs/apalis-tk1.h | 1 -
 include/configs/apalis_imx6.h| 1 -
 include/configs/apalis_t30.h | 1 -
 include/configs/colibri-imx6ull.h| 1 -
 include/configs/colibri_imx6.h   | 1 -
 include/configs/colibri_imx7.h   | 1 -
 include/configs/colibri_t20.h| 1 -
 include/configs/colibri_t30.h| 1 -
 include/configs/xilinx_versal.h  | 2 --
 net/Kconfig  | 6 ++
 scripts/config_whitelist.txt | 1 -
 21 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/configs/apalis-tk1_defconfig b/configs/apalis-tk1_defconfig
index 54031aa3b7..820fc6e5f0 100644
--- a/configs/apalis-tk1_defconfig
+++ b/configs/apalis-tk1_defconfig
@@ -31,6 +31,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_OF_LIVE=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra124-apalis"
 CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_SPL_DM=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
index 26cd36efc7..248922cd56 100644
--- a/configs/apalis_imx6_defconfig
+++ b/configs/apalis_imx6_defconfig
@@ -54,6 +54,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6-apalis"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=4096
 CONFIG_DWC_AHSATA=y
 CONFIG_DFU_MMC=y
 CONFIG_DM_GPIO=y
diff --git a/configs/apalis_t30_defconfig b/configs/apalis_t30_defconfig
index 1a48c553b9..9fde233220 100644
--- a/configs/apalis_t30_defconfig
+++ b/configs/apalis_t30_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_OF_LIVE=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra30-apalis"
 CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_SPL_DM=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
diff --git a/configs/colibri-imx6ull_defconfig 
b/configs/colibri-imx6ull_defconfig
index 9c92f49494..1c027299b6 100644
--- a/configs/colibri-imx6ull_defconfig
+++ b/configs/colibri-imx6ull_defconfig
@@ -46,6 +46,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6ull-colibri"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_DFU_MMC=y
 CONFIG_DFU_NAND=y
 CONFIG_DM_GPIO=y
diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
index 1ebdb5dcbb..56e512d529 100644
--- a/configs/colibri_imx6_defconfig
+++ b/configs/colibri_imx6_defconfig
@@ -54,6 +54,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6-colibri"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_DFU_MMC=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_I2C=y
diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig
index 8f9edf3b44..a689d886b7 100644
--- a/configs/colibri_imx7_defconfig
+++ b/configs/colibri_imx7_defconfig
@@ -46,6 +46,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx7-colibri-rawnand"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_FSL_CAAM=y
 CONFIG_DFU_NAND=y
 CONFIG_DM_GPIO=y
diff --git a/configs/colibri_imx7_emmc_defconfig 
b/configs/colibri_imx7_emmc_defconfig
index 08da620c50..50d8de5f8b 100644
--- a/configs/colibri_imx7_emmc_defconfig
+++ b/configs/colibri_imx7_emmc_defconfig
@@ -41,6 +41,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx7-colibri-emmc"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_FSL_CAAM=y
 CONFIG_DFU_MMC=y
 CONFIG_DM_GPIO=y
diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig
index 127523de9f..ee2ccd0e04 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -36,6 +36,7 @@ CONFIG_OF_LIVE=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra20-colibri"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=1536
 CONFIG_SPL_DM=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
diff --git a/configs/colibri_t30_defconfig b/configs/colibri_t30_defconfig
index 326548e84a..04368d3e4e 100644
--- a/configs/colibri_t30_defconfig
+++ b/configs/colibri_t30_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_OF_LIVE=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra30-colibri"
 CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_SPL_DM=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
diff --git a/configs/xilinx_versal_virt_defconfig 
b/configs/xilinx_versal_virt_defconfig
index 9000573cda..3ce6c031ad 100644
--- a/configs/xilinx_versal_virt_defconfig
+++ 

Re: [U-Boot] Please pull u-boot-video

2019-06-10 Thread Tom Rini
On Mon, Jun 10, 2019 at 12:06:29PM +0200, Anatolij Gustschin wrote:

> Hi Tom,
> 
> please pull video fixes and mxsfb DM_VIDEO conversion for v2019.07.
> 
> Travis CI: https://travis-ci.org/vdsao/u-boot-video/builds/541462360
> 
> Thanks,
> Anatolij
> 
> The following changes since commit 38c2a8a00132b4dcc6a0bb5baf5146b9eb9eb2d2:
> 
>   Merge tag 'efi-2019-07-rc4' of git://git.denx.de/u-boot-efi (2019-06-02 
> 18:19:45 -0400)
> 
> are available in the Git repository at:
> 
>   git://git.denx.de/u-boot-video.git tags/video-updates-for-2019.07-rc3
> 
> for you to fetch changes up to f944b15966d410fd81f6051a836f86d5263f617e:
> 
>   video: meson: hdmi-supply regulator should be optional (2019-06-05 10:51:46 
> +0200)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] Pull requesti v2: u-boot-spi/master

2019-06-10 Thread Tom Rini
On Mon, Jun 10, 2019 at 06:05:21PM +0530, Jagan Teki wrote:

> Hi Tom,
> 
> Please pull this PR.
> 
> Summary:
> - mpc8xxx spi driver fixes (Mario)
> - mpc8xxx spi dm conversion (Mario, Jagan)
> - SPI DM Migration update (Jagan)
> 
> Travis-CI: https://travis-ci.org/openedev/u-boot-amarula/builds/543612089
> 
> Changes for v2:
> - include "ids8313: Disable SPI" patch
> 
> thanks,
> Jagan.
> 
> The following changes since commit 748198cb8d32d41bc35e6f492bac9948f339bece:
> 
>   Revert "Makefile: Prioritize external dtb if defined" (2019-05-19 18:09:35 
> -0400)
> 
> are available in the Git repository at:
> 
>   git://git.denx.de/u-boot-spi.git master
> 
> for you to fetch changes up to d1505ad8c00ea8e3dae682b2637a9f22da0dd234:
> 
>   dm: MIGRATION: Update migration status for SPI (2019-06-10 17:59:49 +0530)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


[U-Boot] [ANN] U-Boot v2019.07-rc4 released

2019-06-10 Thread Tom Rini
Hey all,

It's release day and here is v2019.07-rc4.   At this point, I know we
have some regression fixes for i.MX that are coming, and I'm expecting a
fix to the build time failure for tinker-rk3288.

To repeat myself about DM migration deadlines, first, let me say again,
that DM is not required for SPL.  This comes up enough that I want to
say it again here.  Next, if there is active progress on converting
things, we'll keep from pulling the code out.  This is why for example,
we haven't yet pulled out a lot of deprecated SPI code.  Some of it is
still in progress on being converted, so I need to update the series I
posted after the last -rc to remove still less drivers.

In terms of a changelog, 
git log --merges v2019.07-rc3..v2019.07-rc4
continues to improve in quality.  If you're sending me a PR, please
include a few lines or words in summary and I'll be sure to put it into
the merge commit.

As I mentioned with -rc3, with this cycle is coming closer to an end,
it's time to decide if we're going to keep this 3 month cycle or go back
to 2 months.  After the last release while I did get some feedback, the
overall balance is still in the 3 month bucket.

I'm planning on doing -rc5 on June 24th with the release scheduled on
July 8th.  Thanks all!

-- 
Tom


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


Re: [U-Boot] [PULL] u-boot-atmel-fixes-2019.07-a

2019-06-10 Thread Tom Rini
On Mon, Jun 10, 2019 at 06:26:16AM +, eugen.hris...@microchip.com wrote:

> 
> Hello Tom,
> 
> Please pull tag u-boot-atmel-fixes-2019.07-a , the first set of fixes 
> for u-boot-atmel for 2019.07 release.
> 
> The fixes include small SPL fixes for the sama5d2 ICP board, and nand 
> flash fixes for sama5d2 PTC and sama5d4_xplained
> 
> Travis CI: https://travis-ci.org/ehristev/u-boot/builds/542744241
> 
> Thanks,
> Eugen
> 
> The following changes since commit 
> a69120a0d7c8d4044cdaceea9eb03913ba4e49c7:
>  
> 
>Prepare v2019.07-rc1 (2019-04-29 21:54:04 -0400) 
> 
>  
> 
> are available in the git repository at: 
> 
>  
> 
>git://git.denx.de/u-boot-atmel.git tags/u-boot-atmel-fixes-2019.07-a 
> 
>  
> 
> for you to fetch changes up to 9ed91550d548f76f40e22f0562ff3c4ba15f85c7: 
> 
>  
> 
>configs: at91: sama5d2_icp: enable CONFIG_SPL_AT91_MCK_BYPASS and 
> resync (2019-06-06 10:56:42 +0300)
>  
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] Pull request, u-boot-tegra/master

2019-06-10 Thread Tom Rini
On Wed, Jun 05, 2019 at 01:50:59PM -0700, Tom Warren wrote:

>  Tom,
> 
> Please pull u-boot-tegra/master into U-Boot/master. Thanks!
> 
> All Tegra builds are OK, and Stephen's automated test system reports that
> all tests pass.
> 
> The following changes since commit 6d93d245c148f10f15724601650fab3a665f102c:
> 
>   Merge git://git.denx.de/u-boot-riscv (2019-06-05 10:07:31 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-tegra.git master
> 
> for you to fetch changes up to 879a3bc1c2f3e2aadd6f05e6427cf4d97a272f9a:
> 
>   ARM: tegra: Mark built-in Ethernet as default on Jetson TX2 (2019-06-05
> 09:16:35 -0700)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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] mmc: Avoid HS400 mode when accessing boot partitions

2019-06-10 Thread Peng Fan
> partitions
> 
> On 6/10/19 7:59 AM, Peng Fan wrote:
> >> Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing
> >> boot partitions
> >>
> >> Hi Marek, Peng,
> >>
> >> On 03/06/19 12:04 PM, Peng Fan wrote:
> >>>
>  Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot
>  partitions
> 
>  According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation ,
>  HS200 & HS400 mode is not supported during boot operation. The
>  U-Boot code currently only applies this restriction to HS200 mode,
>  extend this to
>  HS400 mode as well.
> >> The spec in section 6.3.3 (according to my understanding) is talking
> >> about "boot operation" which is a way of getting data from the the
> >> eMMC without going through the Device identification mode (Section
> >> 6.4.4) i.e. without sending any commands. All the host has to do is
> >> hold the command line low in Pre-Idle mode to automatically receive
> >> data at the preconfigured frequency and bus width.
> >>
> >> When U-boot is accessing the partition, it has already gone through
> >> the Device identification mode and is in data transfer mode (i.e. it
> >> needs to send commands for read/write to happen). In this case, we
> >> need to switch the partition in Extended CSD to access the boot
> >> partition (Section 6.2.5). The spec doesn't say anything about HS200 and
> HS400 not being supported here.
> >
> > Yes, the spec does not mention this. It only mentions HS200/400 not
> > supported during boot operation.
> >
> >>
> >> Also, I don't see linux kernel switching down speed when trying to
> >> access a boot partition (unless its being very sneaky about it). So
> >> if you are seeing issues with accessing boot partitions at
> >> HS200/HS400 then you should probably look at how linux code is working
> instead.
> >
> > There might be bug in U-Boot code.
> 
> So are we gonna leave this inconsistency in for current release or what's it
> gonna be ? Like I said, we're in rc3, it's fine to do bigger changes in next
> release, but we should at least fix this in current release.

I'll pick up your patch in this release.

Regards,
Peng.

> 
> I would also like to hear from Jean why he originally introduced this for 
> HS200
> mode.
> 
> --
> Best regards,
> Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 2/2] spi: Add SPI controller driver for UniPhier SoCs

2019-06-10 Thread Kunihiko Hayashi
Add SPI controller driver implemented in Socionext UniPhier SoCs.
This controller has the SPI master mode only.

Signed-off-by: Kunihiko Hayashi 
---
 drivers/spi/Kconfig|   8 +
 drivers/spi/Makefile   |   1 +
 drivers/spi/uniphier_spi.c | 443 +
 3 files changed, 452 insertions(+)
 create mode 100644 drivers/spi/uniphier_spi.c

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 7044da3..f985c28 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -272,6 +272,14 @@ config TI_QSPI
  Enable the TI Quad-SPI (QSPI) driver for DRA7xx and AM43xx evms.
  This driver support spi flash single, quad and memory reads.
 
+config UNIPHIER_SPI
+   bool "Socionext UniPhier SPI driver"
+   depends on ARCH_UNIPHIER
+   help
+ Enable the Socionext UniPhier SPI driver. This driver can
+ be used to access SPI chips on platforms embedding this
+ UniPhier IP core.
+
 config XILINX_SPI
bool "Xilinx SPI driver"
help
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index 8be9a4b..f6bbb4c 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -57,6 +57,7 @@ obj-$(CONFIG_TEGRA114_SPI) += tegra114_spi.o
 obj-$(CONFIG_TEGRA20_SFLASH) += tegra20_sflash.o
 obj-$(CONFIG_TEGRA20_SLINK) += tegra20_slink.o
 obj-$(CONFIG_TEGRA210_QSPI) += tegra210_qspi.o
+obj-$(CONFIG_UNIPHIER_SPI) += uniphier_spi.o
 obj-$(CONFIG_XILINX_SPI) += xilinx_spi.o
 obj-$(CONFIG_ZYNQ_SPI) += zynq_spi.o
 obj-$(CONFIG_ZYNQ_QSPI) += zynq_qspi.o
diff --git a/drivers/spi/uniphier_spi.c b/drivers/spi/uniphier_spi.c
new file mode 100644
index 000..6840726
--- /dev/null
+++ b/drivers/spi/uniphier_spi.c
@@ -0,0 +1,443 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * uniphier_spi.c - Socionext UniPhier SPI driver
+ * Copyright 2019 Socionext, Inc.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define SSI_CTL0x00
+#define   SSI_CTL_EN   BIT(0)
+
+#define SSI_CKS0x04
+#define   SSI_CKS_CKRAT_MASK   GENMASK(7, 0)
+#define   SSI_CKS_CKPHSBIT(14)
+#define   SSI_CKS_CKINIT   BIT(13)
+#define   SSI_CKS_CKDLYBIT(12)
+
+#define SSI_TXWDS  0x08
+#define   SSI_TXWDS_WDLEN_MASK GENMASK(13, 8)
+#define   SSI_TXWDS_TDTF_MASK  GENMASK(7, 6)
+#define   SSI_TXWDS_DTLEN_MASK GENMASK(5, 0)
+
+#define SSI_RXWDS  0x0c
+#define   SSI_RXWDS_RDTF_MASK  GENMASK(7, 6)
+#define   SSI_RXWDS_DTLEN_MASK GENMASK(5, 0)
+
+#define SSI_FPS0x10
+#define   SSI_FPS_FSPOLBIT(15)
+#define   SSI_FPS_FSTRTBIT(14)
+
+#define SSI_SR 0x14
+#define   SSI_SR_BUSY  BIT(7)
+#define   SSI_SR_TNF   BIT(5)
+#define   SSI_SR_RNE   BIT(0)
+
+#define SSI_IE 0x18
+#define   SSI_IE_RCIE  BIT(3)
+#define   SSI_IE_RORIE BIT(0)
+
+#define SSI_IS 0x1c
+#define   SSI_IS_RXRS  BIT(9)
+#define   SSI_IS_RCID  BIT(3)
+#define   SSI_IS_RORID BIT(0)
+
+#define SSI_IC 0x1c
+#define   SSI_IC_TCIC  BIT(4)
+#define   SSI_IC_RCIC  BIT(3)
+#define   SSI_IC_RORIC BIT(0)
+
+#define SSI_FC 0x20
+#define   SSI_FC_TXFFL BIT(12)
+#define   SSI_FC_TXFTH_MASKGENMASK(11, 8)
+#define   SSI_FC_RXFFL BIT(4)
+#define   SSI_FC_RXFTH_MASKGENMASK(3, 0)
+
+#define SSI_TXDR   0x24
+#define SSI_RXDR   0x24
+
+#define SSI_FIFO_DEPTH 8U
+
+#define SSI_REG_TIMEOUT(CONFIG_SYS_HZ / 100)   /* 10 ms */
+#define SSI_XFER_TIMEOUT   (CONFIG_SYS_HZ) /* 1 sec */
+
+#define SSI_CLK5000/* internal I/O clock: 
50MHz */
+
+/* uniphier spi register set */
+struct uniphier_spi_regs {
+   u32 ctl;/* 0x00 */
+   u32 cks;/* 0x04 */
+   u32 txwds;  /* 0x08 */
+   u32 rxwds;  /* 0x0C */
+   u32 fps;/* 0x10 */
+   u32 sr; /* 0x14 */
+   u32 ie; /* 0x18 */
+   u32 ic; /* 0x1C */
+   u32 fc; /* 0x20 */
+   u32 xdr;/* 0x24 */
+};
+
+/* uniphier spi platform data */
+struct uniphier_spi_platdata {
+   struct uniphier_spi_regs *regs;
+   u32 frequency;  /* input frequency */
+   u32 speed_hz;
+   uint deactivate_delay_us;   /* Delay to wait after deactivate */
+   uint activate_delay_us; /* Delay to wait after activate */
+};
+
+/* uniphier spi priv */
+struct uniphier_spi_priv {
+   struct uniphier_spi_regs *regs;
+   u8 mode;
+   u8 fifo_depth;
+   u8 bits_per_word;
+   ulong last_transaction_us;  /* Time of last transaction end */
+};
+
+static void uniphier_spi_enable(struct uniphier_spi_regs *regs, int enable)
+{
+   u32 val;

[U-Boot] [PATCH 1/2] pinctrl: uniphier: Add SPI pin-mux settings

2019-06-10 Thread Kunihiko Hayashi
Add pin-mux settings for SPI controller.

Signed-off-by: Kunihiko Hayashi 
---
 drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c |  8 
 drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c | 16 
 drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c  |  4 
 drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c |  8 
 drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c |  8 
 drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c | 12 
 drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c |  8 
 drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c |  8 
 drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c |  4 
 9 files changed, 76 insertions(+)

diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c 
b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c
index f2c99d4..5efaa2f 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c
@@ -28,6 +28,10 @@ static const int i2c4_muxvals[] = {1, 1};
 static const unsigned nand_pins[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
 15, 16, 17};
 static const int nand_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0};
+static const unsigned spi0_pins[] = {56, 57, 58, 59};
+static const int spi0_muxvals[] = {0, 0, 0, 0};
+static const unsigned spi1_pins[] = {169, 170, 171, 172};
+static const int spi1_muxvals[] = {1, 1, 1, 1};
 static const unsigned system_bus_pins[] = {1, 2, 6, 7, 8, 9, 10, 11, 12, 13,
   14, 15, 16, 17};
 static const int system_bus_muxvals[] = {0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -58,6 +62,8 @@ static const struct uniphier_pinctrl_group 
uniphier_ld11_groups[] = {
UNIPHIER_PINCTRL_GROUP(i2c3),
UNIPHIER_PINCTRL_GROUP(i2c4),
UNIPHIER_PINCTRL_GROUP(nand),
+   UNIPHIER_PINCTRL_GROUP(spi0),
+   UNIPHIER_PINCTRL_GROUP(spi1),
UNIPHIER_PINCTRL_GROUP(system_bus),
UNIPHIER_PINCTRL_GROUP(system_bus_cs1),
UNIPHIER_PINCTRL_GROUP(uart0),
@@ -77,6 +83,8 @@ static const char * const uniphier_ld11_functions[] = {
UNIPHIER_PINMUX_FUNCTION(i2c3),
UNIPHIER_PINMUX_FUNCTION(i2c4),
UNIPHIER_PINMUX_FUNCTION(nand),
+   UNIPHIER_PINMUX_FUNCTION(spi0),
+   UNIPHIER_PINMUX_FUNCTION(spi1),
UNIPHIER_PINMUX_FUNCTION(system_bus),
UNIPHIER_PINMUX_FUNCTION(uart0),
UNIPHIER_PINMUX_FUNCTION(uart1),
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c 
b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
index 8ec87f2..d3c5833 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
@@ -43,6 +43,14 @@ static const unsigned nand_pins[] = {3, 4, 5, 6, 7, 8, 9, 
10, 11, 12, 13, 14,
 static const int nand_muxvals[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0};
 static const unsigned sd_pins[] = {10, 11, 12, 13, 14, 15, 16, 17};
 static const int sd_muxvals[] = {3, 3, 3, 3, 3, 3, 3, 3};  /* No SDVOLC */
+static const unsigned spi0_pins[] = {56, 57, 58, 59};
+static const int spi0_muxvals[] = {0, 0, 0, 0};
+static const unsigned spi1_pins[] = {169, 170, 171, 172};
+static const int spi1_muxvals[] = {1, 1, 1, 1};
+static const unsigned spi2_pins[] = {86, 87, 88, 89};
+static const int spi2_muxvals[] = {1, 1, 1, 1};
+static const unsigned spi3_pins[] = {74, 75, 76, 77};
+static const int spi3_muxvals[] = {1, 1, 1, 1};
 static const unsigned system_bus_pins[] = {1, 2, 6, 7, 8, 9, 10, 11, 12, 13,
   14, 15, 16, 17};
 static const int system_bus_muxvals[] = {0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -77,6 +85,10 @@ static const struct uniphier_pinctrl_group 
uniphier_ld20_groups[] = {
UNIPHIER_PINCTRL_GROUP(i2c4),
UNIPHIER_PINCTRL_GROUP(nand),
UNIPHIER_PINCTRL_GROUP(sd),
+   UNIPHIER_PINCTRL_GROUP(spi0),
+   UNIPHIER_PINCTRL_GROUP(spi1),
+   UNIPHIER_PINCTRL_GROUP(spi2),
+   UNIPHIER_PINCTRL_GROUP(spi3),
UNIPHIER_PINCTRL_GROUP(system_bus),
UNIPHIER_PINCTRL_GROUP(system_bus_cs1),
UNIPHIER_PINCTRL_GROUP(uart0),
@@ -99,6 +111,10 @@ static const char * const uniphier_ld20_functions[] = {
UNIPHIER_PINMUX_FUNCTION(i2c4),
UNIPHIER_PINMUX_FUNCTION(nand),
UNIPHIER_PINMUX_FUNCTION(sd),
+   UNIPHIER_PINMUX_FUNCTION(spi0),
+   UNIPHIER_PINMUX_FUNCTION(spi1),
+   UNIPHIER_PINMUX_FUNCTION(spi2),
+   UNIPHIER_PINMUX_FUNCTION(spi3),
UNIPHIER_PINMUX_FUNCTION(system_bus),
UNIPHIER_PINMUX_FUNCTION(uart0),
UNIPHIER_PINMUX_FUNCTION(uart1),
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c 
b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
index c822bcc..bf1a9e9 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
@@ -37,6 +37,8 @@ static const unsigned nand_cs1_pins[] = {22, 23};
 static const int 

[U-Boot] [PATCH 0/2] Add support for UniPhier SPI controller

2019-06-10 Thread Kunihiko Hayashi
This series adds support for SPI controller and its pin-mux settings
implemented in UniPhier SoCs.

Kunihiko Hayashi (2):
  pinctrl: uniphier: Add SPI pin-mux settings
  spi: Add SPI controller driver for UniPhier SoCs

 drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c |   8 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c |  16 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c  |   4 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c |   8 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c |   8 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c |  12 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c |   8 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c |   8 +
 drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c |   4 +
 drivers/spi/Kconfig  |   8 +
 drivers/spi/Makefile |   1 +
 drivers/spi/uniphier_spi.c   | 443 +++
 12 files changed, 528 insertions(+)
 create mode 100644 drivers/spi/uniphier_spi.c

-- 
2.7.4

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


Re: [U-Boot] [PATCH] i2c: designware: Get clock rate from clock DM

2019-06-10 Thread Ley Foon Tan
On Mon, Jun 10, 2019 at 8:07 PM Marek Vasut  wrote:
>
> On 6/10/19 8:07 AM, Ley Foon Tan wrote:
> [...]
>
>  [...]
> 
> > @@ -523,8 +527,20 @@ static int designware_i2c_xfer(struct udevice 
> > *bus, struct i2c_msg *msg,
> >  static int designware_i2c_set_bus_speed(struct udevice *bus, unsigned 
> > int speed)
> >  {
> >   struct dw_i2c *i2c = dev_get_priv(bus);
> > + ulong rate;
> > +
> > +#if CONFIG_IS_ENABLED(CLK)
> > + rate = clk_get_rate(>clk);
> 
>  Do we need to re-read the bus frequency for each transfer ?
>  I would expect set_bus_speed callback to set the frequencies once and
>  then keep them that way until it's called again.
> >>> Yes, we can get clock rate when request clock in _probe(). Then keep a
> >>> copy for future use.
> >>
> >> Not in .probe() , in set_bus_speed().
> > My patch is doing it in designware_i2c_set_bus_speed() already.  We
> > can't get clock rate in __dw_i2c_set_bus_speed(), because this
> > function doesn't have struct udevice.
>
> include/i2c.h struct dm_i2c_ops {} :
>
> 388 /**
> 389  * set_bus_speed() - set the speed of a bus (optional)
> 390  *
> 391  * The bus speed value will be updated by the uclass if this
> function
> 392  * does not return an error. This method is optional - if it
> is not
> 393  * provided then the driver can read the speed from
> 394  * dev_get_uclass_priv(bus)->speed_hz
> 395  *
> 396  * @bus:Bus to adjust
> 397  * @speed:  Requested speed in Hz
> 398  * @return 0 if OK, -EINVAL for invalid values
> 399  */
> 400 int (*set_bus_speed)(struct udevice *bus, unsigned int speed);
>
> There's struct udevice right there ^

I'm confused now.

.set_bus_speed  = designware_i2c_set_bus_speed and my patch is doing
get clock rate in .set_bus_speed callback already.

static const struct dm_i2c_ops designware_i2c_ops = {
.xfer   = designware_i2c_xfer,
.probe_chip = designware_i2c_probe_chip,
.set_bus_speed  = designware_i2c_set_bus_speed,
};

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


Re: [U-Boot] [PATCH 0/3] Intel FPGA PCIe fixes

2019-06-10 Thread Ley Foon Tan
On Fri, May 24, 2019 at 10:30 AM Ley Foon Tan  wrote:
>
> This patchset fix issues in Intel FPGA PCIe driver.
> - Fix TLP polling timeout
> - Fix enumerating mult-function PCIe device issue
> - Fix PCIe switch read config register issue
>
> Ley Foon Tan (3):
>   pci: intel: Increase TLP polling counter
>   pci: intel: Fix error when enumerating multi-function PCIe device
>   pci: intel: Fix configuration type based on secondary number
>
>  drivers/pci/pcie_intel_fpga.c | 18 +++---
>  1 file changed, 11 insertions(+), 7 deletions(-)
Any comment on these patches?

Thanks

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


Re: [U-Boot] [PATCH 1/5] env: allow undefined CONFIG_SYS_MMC_ENV_DEV

2019-06-10 Thread Tom Rini
On Mon, Jun 10, 2019 at 10:35:36AM +0100, Andre Przywara wrote:
> On Sat, 8 Jun 2019 09:13:52 -0400
> Tom Rini  wrote:
> 
> Hi Tom,
> 
> thanks for having a look!
> 
> > On Sat, Jun 08, 2019 at 02:26:54AM +0100, Andre Przywara wrote:
> > > So far we are required to always define the CONFIG_SYS_MMC_ENV_DEV
> > > variable, even if a platform specific function overrides the weak
> > > function that is using it.
> > > 
> > > Check for the existence of this Kconfig variable, eliminating the need
> > > to define a dummy value.
> > > 
> > > Signed-off-by: Andre Przywara 
> > > ---
> > >  env/mmc.c | 4 
> > >  1 file changed, 4 insertions(+)
> > > 
> > > diff --git a/env/mmc.c b/env/mmc.c
> > > index c3cf35d01b..122fec3af8 100644
> > > --- a/env/mmc.c
> > > +++ b/env/mmc.c
> > > @@ -124,7 +124,11 @@ __weak int mmc_get_env_addr(struct mmc *mmc, int 
> > > copy, u32 *env_addr)
> > >  
> > >  __weak int mmc_get_env_dev(void)
> > >  {
> > > +#ifdef CONFIG_SYS_MMC_ENV_DEV
> > >   return CONFIG_SYS_MMC_ENV_DEV;
> > > +#else
> > > + return 0;
> > > +#endif
> > >  }
> > >  
> > >  #ifdef CONFIG_SYS_MMC_ENV_PART  
> > 
> > Since 0 is a valid device, I'm concerned this might lead to unintended
> > behavior.  Can we return some error code here and catch it later?
> 
> I see your point. I think originally my idea was that 0 would hopefully be a 
> valid device in any case, so it would just work in those cases. But I see the 
> trouble that this papers over a bug (namely CONFIG_SYS_MMC_ENV_DEV not being 
> defined).
> Looking at all those users I find it rather dangerous (and tedious) to check 
> for this in all callers.
> 
> What about printing an error message, here in that function? Ideally this 
> would be spotted immediately upon initial testing, so would never be exposed 
> to a real user.
> Something like "Please either define CONFIG_SYS_MMC_ENV_DEV or provide a 
> mmc_get_en_dev() implementation."?

That might be OK.  Just check the resulting binaries that the string
does get discarded from the build when we have a non-weak function in
that case.  Thanks!

-- 
Tom


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


[U-Boot] Need some help with verified u-boot (Signature verification failed)

2019-06-10 Thread Rayees Shamsuddin
Hi,

I am trying to get verified u-boot working on a Tegra TX2 board. I get an error 
while trying to verify the signature. I am not quite sure how to proceed 
forward to resolve this. Any help would be appreciated.

U-boot version:
U-Boot 2016.07-dirty (Jun 07 2019 - 10:46:18 -0700)
aarch64-linux-gnu-gcc (Linaro GCC 7.4-2019.02) 7.4.1 20181213 
[linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4]
GNU ld (Linaro_Binutils-2019.02) 2.28.2.20170706

This is the verification error I got:


Tegra186 (P2771--500) # load mmc 0:1 0x8000 boot/fitImage_Tegra
34393994 bytes read in 867 ms (37.8 MiB/s)
Tegra186 (P2771--500) # bootm 0x8000
## Loading kernel from FIT Image at 8000 ...
Using 'conf@1' configuration
Verifying Hash Integrity ... sha256,rsa4096:tx2_key- Failed to verify required 
signature 'key-tx2_key'
Bad Data Hash
ERROR: can't get kernel image!
I realize that there may be some issues with the load address of the image - 
not sure if that is why the error "can't get kernel image!" happens. But I am 
trying to resolve the signature error first.

Using fit_check_sign
There is a tool called fit_check_sign to check if the signature is fine. I got 
the following results when I ran the tool
sudo ../sources/u-boot/tools/fit_check_sign -f fitImage_Tegra -k 
tegra186-p2771--500_pubkey.dtb

Verifying Hash Integrity ... sha256,rsa4096:tx2_key+
## Loading kernel from FIT Image at 7fd7974db000 ...
   Using 'conf@1' configuration
   Verifying Hash Integrity ...
sha256,rsa4096:tx2_key+
OK

   Trying 'kernel@1' kernel subimage
 Description:  Linux kernel
 Created:  Mon Jun 10 10:27:57 2019
 Type: Kernel Image
 Compression:  uncompressed
 Data Size:34048008 Bytes = 33250.01 kB = 32.47 MB
 Architecture: AArch64
 OS:   Linux
 Load Address: 0x8040
 Entry Point:  0x8040
 Hash algo:sha256
 Hash value:   
1ab04b15e67dad84c467cd354acb791cd5089ece37491d1771270e4f37af5f13
   Verifying Hash Integrity ...
sha256+
OK

   Loading Kernel Image ... Image too large: increase CONFIG_SYS_BOOTM_LEN
Must RESET board to recover
## Loading fdt from FIT Image at 7fd7974db000 ...
   Using 'conf@1' configuration
   Trying 'fdt@1' fdt subimage
 Description:  DTB for Tegra TX2
 Created:  Mon Jun 10 10:27:57 2019
 Type: Flat Device Tree
 Compression:  uncompressed
 Data Size:344105 Bytes = 336.04 kB = 0.33 MB
 Architecture: AArch64
 Hash algo:sha256
 Hash value:   
e8fbc4d332c0c1d957a77a57576191dfea0e1151193cedc671aecfb415d2782a
   Verifying Hash Integrity ...
sha256+
OK

   Loading Flat Device Tree ... OK

## Loading ramdisk from FIT Image at 7fd7974db000 ...
   Using 'conf@1' configuration
Could not find subimage node

Signature check Bad (error 1)

Steps I used to create the fitImage

Generate a new key-pair using openssl
mkdir keys
openssl genrsa -F4 -out keys/tx2_key.key 4096 (Use 2048 instead of 4096 if boot 
time is unacceptable)
openssl req -batch -new -x509 -key keys/tx2_key.key -out keys/tx2_key.crt

sudo ../sources/u-boot/tools/mkimage -f fitImage_Tegra.its -K 
tegra186-p2771--500_pubkey.dtb -k keys -r fitImage_Tegra
This will create the fitimage
FIT description: fitImage for Tegra
Created: Thu Jun  6 13:11:36 2019
 Image 0 (kernel@1)
  Description:  Linux kernel
  Created:  Thu Jun  6 13:11:36 2019
  Type: Kernel Image
  Compression:  uncompressed
  Data Size:34048008 Bytes = 33250.01 kB = 32.47 MB
  Architecture: AArch64
  OS:   Linux
  Load Address: 0x8000
  Entry Point:  0x8000
  Hash algo:sha256
  Hash value:   1ab04b15e67dad84c467cd354acb791cd5089ece37491d1771270e4f37af5f13
 Image 1 (fdt@1)
  Description:  DTB for Tegra TX2
  Created:  Thu Jun  6 13:11:36 2019
  Type: Flat Device Tree
  Compression:  uncompressed
  Data Size:344105 Bytes = 336.04 kB = 0.33 MB
  Architecture: AArch64
  Hash algo:sha256
  Hash value:   e8fbc4d332c0c1d957a77a57576191dfea0e1151193cedc671aecfb415d2782a
 Default Configuration: 'conf@1'
 Configuration 0 (conf@1)
  Description:  Boot Linux kernel and FDT
  Kernel:   kernel@1
  FDT:  fdt@1

Then I rebuild u-boot from source to incorporate the public key into its dtb.
make EXT_DTB=../../fit/tegra186-p2771--500_pubkey.dtb


Thanks a lot for your help

Rayees Shamsuddin

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


Re: [U-Boot] [PATCH v4 12/13] clk: Port Linux common clock framework

2019-06-10 Thread Lukasz Majewski
Hi Stefano,

> > This commit brings the files from Linux kernel to provide clocks
> > support as it is used on the Linux kernel with common clock
> > framework [CCF] setup. The directory structure has been preserved.
> > The ported code only supports reading information from PLL, MUX,
> > Divider, etc and enabling/disabling the clocks USDHCx/ECSPIx
> > depending on used bus. Moreover, it is agnostic to the alias
> > numbering as the information about the clock is read from device
> > tree. One needs to pay attention to the comments indicating
> > necessary for U-boot's DM changes.
> > If needed the code can be extended to support the "set" part of the
> > clock management.
> > Signed-off-by: Lukasz Majewski   
> 
> Applied to u-boot-imx, master, thanks !

Thanks for pulling this code, but the v4 is not the final one.

Simon had some comments regarding the overall design and architecture
of this port. Unfortunately I did not have time to address them yet.

I'm planning to do it ASAP, but IMHO it would be best to drop this
series (so the final one would be applied from the outset).

Sorry for trouble.

> 
> Best regards,
> Stefano Babic
> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de


pgpyngvpFK3RX.pgp
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 0/2] efi_loader: implement event queue

2019-06-10 Thread Heinrich Schuchardt
Up to now we have only been using a flag queued for events. But this does
not satisfy the requirements of the UEFI spec. Events must be notified in
the sequence of decreasing TPL level and within a TPL level in the sequence
of signaling.

Implement a queue for signaled events.

Adjust the test case for event groups.

Heinrich Schuchardt (2):
  efi_selftest: correct event group test
  efi_loader: implement event queue

 include/efi_loader.h |  4 +-
 lib/efi_loader/efi_boottime.c| 94 ++--
 lib/efi_selftest/efi_selftest_event_groups.c |  9 +-
 3 files changed, 74 insertions(+), 33 deletions(-)

--
2.20.1

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


[U-Boot] [PATCH 1/2] efi_selftest: correct event group test

2019-06-10 Thread Heinrich Schuchardt
If any member of the event group is signaled, all members must be set to
signaled and their notification functions have to be queued.

Signed-off-by: Heinrich Schuchardt 
---
 lib/efi_selftest/efi_selftest_event_groups.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lib/efi_selftest/efi_selftest_event_groups.c 
b/lib/efi_selftest/efi_selftest_event_groups.c
index 5a7980c5d0..6dcde50648 100644
--- a/lib/efi_selftest/efi_selftest_event_groups.c
+++ b/lib/efi_selftest/efi_selftest_event_groups.c
@@ -80,12 +80,11 @@ static int execute(void)
return EFI_ST_FAILURE;
}
for (j = 0; j < GROUP_SIZE; ++j) {
-   if (counter[j] != i) {
+   if (counter[j] != 2 * i + 1) {
efi_st_printf("i %u, j %u, count %u\n",
  (unsigned int)i, (unsigned int)j,
  (unsigned int)counter[j]);
-   efi_st_error(
-   "Notification function was called\n");
+   efi_st_error("Notification function was not 
called\n");
return EFI_ST_FAILURE;
}
/* Clear signaled state */
@@ -94,7 +93,7 @@ static int execute(void)
efi_st_error("Event was not signaled\n");
return EFI_ST_FAILURE;
}
-   if (counter[j] != i) {
+   if (counter[j] != 2 * i + 1) {
efi_st_printf("i %u, j %u, count %u\n",
  (unsigned int)i, (unsigned int)j,
  (unsigned int)counter[j]);
@@ -109,7 +108,7 @@ static int execute(void)
"Signaled state not cleared\n");
return EFI_ST_FAILURE;
}
-   if (counter[j] != i + 1) {
+   if (counter[j] != 2 * i + 2) {
efi_st_printf("i %u, j %u, count %u\n",
  (unsigned int)i, (unsigned int)j,
  (unsigned int)counter[j]);
--
2.20.1

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


[U-Boot] [PATCH 2/2] efi_loader: implement event queue

2019-06-10 Thread Heinrich Schuchardt
Up to now we have only been using a flag queued for events. But this does
not satisfy the requirements of the UEFI spec. Events must be notified in
the sequence of decreasing TPL level and within a TPL level in the sequence
of signaling.

Implement a queue for signaled events.

Signed-off-by: Heinrich Schuchardt 
---
 include/efi_loader.h  |  4 +-
 lib/efi_loader/efi_boottime.c | 94 +--
 2 files changed, 70 insertions(+), 28 deletions(-)

diff --git a/include/efi_loader.h b/include/efi_loader.h
index 8a3f8fe03d..f0e1313f93 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -256,6 +256,7 @@ struct efi_loaded_image_obj {
  * struct efi_event
  *
  * @link:  Link to list of all events
+ * @queue_link:Link to the list of queued events
  * @type:  Type of event, see efi_create_event
  * @notify_tpl:Task priority level of notifications
  * @nofify_function:   Function to call when the event is triggered
@@ -264,11 +265,11 @@ struct efi_loaded_image_obj {
  * @trigger_time:  Period of the timer
  * @trigger_next:  Next time to trigger the timer
  * @trigger_type:  Type of timer, see efi_set_timer
- * @is_queued: The notification function is queued
  * @is_signaled:   The event occurred. The event is in the signaled state.
  */
 struct efi_event {
struct list_head link;
+   struct list_head queue_link;
uint32_t type;
efi_uintn_t notify_tpl;
void (EFIAPI *notify_function)(struct efi_event *event, void *context);
@@ -277,7 +278,6 @@ struct efi_event {
u64 trigger_next;
u64 trigger_time;
enum efi_timer_delay trigger_type;
-   bool is_queued;
bool is_signaled;
 };

diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index c146b47128..fa01bbda70 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -27,6 +27,9 @@ LIST_HEAD(efi_obj_list);
 /* List of all events */
 LIST_HEAD(efi_events);

+/* List of queued events */
+LIST_HEAD(efi_event_queue);
+
 /* Flag to disable timer activity in ExitBootServices() */
 static bool timers_enabled = true;

@@ -163,6 +166,44 @@ const char *__efi_nesting_dec(void)
return indent_string(--nesting_level);
 }

+/**
+ * efi_event_is_queued() - check if an event is queued
+ *
+ * @event: event
+ * Return: true if event is queued
+ */
+static bool efi_event_is_queued(struct efi_event *event)
+{
+   return !!event->queue_link.next;
+}
+
+/**
+ * efi_process_event_queue() - process event queue
+ */
+static void efi_process_event_queue(void)
+{
+   while (!list_empty(_event_queue)) {
+   struct efi_event *event;
+   efi_uintn_t old_tpl;
+
+   event = list_first_entry(_event_queue, struct efi_event,
+queue_link);
+   if (efi_tpl >= event->notify_tpl)
+   return;
+   list_del(>queue_link);
+   event->queue_link.next = NULL;
+   event->queue_link.prev = NULL;
+   /* Events must be executed at the event's TPL */
+   old_tpl = efi_tpl;
+   efi_tpl = event->notify_tpl;
+   EFI_CALL_VOID(event->notify_function(event,
+event->notify_context));
+   efi_tpl = old_tpl;
+   if (event->type == EVT_NOTIFY_SIGNAL)
+   event->is_signaled = 0;
+   }
+}
+
 /**
  * efi_queue_event() - queue an EFI event
  * @event: event to signal
@@ -170,25 +211,31 @@ const char *__efi_nesting_dec(void)
  * This function queues the notification function of the event for future
  * execution.
  *
- * The notification function is called if the task priority level of the event
- * is higher than the current task priority level.
- *
- * For the SignalEvent service see efi_signal_event_ext.
- *
  */
 static void efi_queue_event(struct efi_event *event)
 {
-   if (event->notify_function) {
-   event->is_queued = true;
-   /* Check TPL */
-   if (efi_tpl >= event->notify_tpl)
-   return;
-   event->is_queued = false;
-   EFI_CALL_VOID(event->notify_function(event,
-event->notify_context));
-   } else {
-   event->is_queued = false;
+   struct efi_event *item = NULL;
+
+   if (!event->notify_function)
+   return;
+
+   if (!efi_event_is_queued(event)) {
+   /*
+* Events must be notified in order of decreasing task priority
+* level. Insert the new event accordingly.
+*/
+   list_for_each_entry(item, _event_queue, queue_link) {
+   if (item->notify_tpl < event->notify_tpl) {
+   

Re: [U-Boot] [PATCH 2/2] i.MX6: nand: add nandbcb command for imx

2019-06-10 Thread Stefano Babic
On 10/06/19 21:18, Shyam Saini wrote:
 Thanks for this work - this is still missing in current U-Boot. I will
 merge this for the upcoming release - letting this in, we could win some
 more testers helping to adjust if there are some issues.
>>>
>>> Thanks. Looks like it is FINALLY making it into the main tree...
>>
>>
>> Never say never...and it is not yet in.
> 
> Oops
> 
>> Patch breaks several boards due to the moving of  mxs-nand.h.  In fact,
>> drivers/mtd/nand/raw/mxs_nand_dt.c expects to find the file in the same
>> directory.
> 
> Sorry, I should have asked this earlier.
> The current patch uses some mtd nand driver api to access bch_geometry
> elements. I was not sure whether to use driver/ includes files in
> arch/ directorty so, I
> moved it from divers/ to arch/ directory.
> 
> Would be totally fine if I resend a patch which includes mxs-nand.h
> from drivers/
> in arch/ code ?
> 

Yes, it is fine.

> Please let me know if you have any other suggestion.
> 
> Thanks a lot,
> Shyam
> 


-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2 v3] net: introduce MDIO DM class for MDIO devices

2019-06-10 Thread Joe Hershberger
On Mon, Jun 3, 2019 at 11:11 AM Alex Marginean  wrote:
>
> Adds UCLASS_MDIO DM class supporting MDIO buses that are probed as
> stand-alone devices.  Useful in particular for systems that support
> DM_ETH and have a stand-alone MDIO hardware block shared by multiple
> Ethernet interfaces.
>
> Signed-off-by: Alex Marginean 
> ---
>
> Changes in v2:
> - fixed several comments using wrong API names
> - dropped dm_ from names of internal functions that don't use udevice 
> *
> - fixed UCLASS driver name
> - added missing mdio_unregister in dm_mdio_pre_remove
> - added a comment on why spaces in names aren't ok
> - added a comment on how static mdio_read/_write/_reset functions
> are used
> Changes in v3:
> - none


Not sure if you already noticed this [1] or not, but there may be
something there that you want to incorporate or maybe not.

Cheers,
-Joe

[1] - https://patchwork.ozlabs.org/patch/939726/
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [EXT] Did anything ever happen with mvmdio / marvell xsmi support?

2019-06-10 Thread Joe Hershberger
Hi all,

On Sun, Jun 9, 2019 at 8:45 PM Ken Ma  wrote:
>
> Dear Nevo
>
> My team was cut off last year, so I could not continue it.
> If you could, please help give it a go.
>
> The patches passed review, but a sandbox driver is missed from Simon Glass 
> comments, so the patches are not merged.
>
> Thanks a lot for your information.
>
> Yours,
> Ken
>
> -Original Message-
> From: Nevo Hed 
> Sent: Thursday, June 6, 2019 9:09 PM
> To: u-boot@lists.denx.de
> Cc: Ken Ma ; joe.hershber...@ni.com; Matthew Pelland 
> 
> Subject: [EXT] Did anything ever happen with mvmdio / marvell xsmi support?
>
> External Email
>
> --
> Hi All
>
> Last I see is version 4 of a patchset that is almost a year old with some 
> change requests within
>
> - [PATCH v4 1/2] dm: mdio: add a uclass for MDIO
> (https://lists.denx.de/pipermail/u-boot/2018-July/334118.html)
> - [PATCH v4 2/2] mdio: add marvell MDIO driver
> (https://lists.denx.de/pipermail/u-boot/2018-July/333750.html)
>
> I see no trace of this on u-boot repos (i think I looked at the primary, the 
> `-net`, the `-marvell` and even the `-dm` repos)
>
> I do see similar work in Marvell's public github repo
> (g...@github.com:MarvellEmbeddedProcessors/u-boot-marvell.git) but said 
> repo/branch seems to be significantly outdated relative to u-boot master.
>
> - Ken, Is there intention on your side to wrap this up?
> - If not or if if yes but not in the near future we could give it a go, is 
> there anything that I should be aware of?

It is likely that this version [1] is likely to go into next release.
The marvel MDIO driver could be updated to work with that uclass.

Cheers,
-Joe

[1] - https://patchwork.ozlabs.org/patch/1109368/

>
>  Thanks
>   --Nevo
>
> p.s. new to the mailing list - feel free to hit me over the head or direct me 
> if not following correct protocol.
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2 v3] test: dm: add MDIO test

2019-06-10 Thread Joe Hershberger
On Mon, Jun 3, 2019 at 11:13 AM Alex Marginean  wrote:
>
> A very simple test for DM_MDIO, mimicks a register write/read through the
> sandbox bus to a dummy PHY.
>
> Signed-off-by: Alex Marginean 

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


Re: [U-Boot] [PATCH 1/2 v3] net: introduce MDIO DM class for MDIO devices

2019-06-10 Thread Joe Hershberger
On Mon, Jun 3, 2019 at 11:11 AM Alex Marginean  wrote:
>
> Adds UCLASS_MDIO DM class supporting MDIO buses that are probed as
> stand-alone devices.  Useful in particular for systems that support
> DM_ETH and have a stand-alone MDIO hardware block shared by multiple
> Ethernet interfaces.
>
> Signed-off-by: Alex Marginean 
> ---
>
> Changes in v2:
> - fixed several comments using wrong API names
> - dropped dm_ from names of internal functions that don't use udevice 
> *
> - fixed UCLASS driver name
> - added missing mdio_unregister in dm_mdio_pre_remove
> - added a comment on why spaces in names aren't ok
> - added a comment on how static mdio_read/_write/_reset functions
> are used
> Changes in v3:
> - none
>

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


Re: [U-Boot] [PATCH 2/2] i.MX6: nand: add nandbcb command for imx

2019-06-10 Thread Sergey Kubushyn

On Mon, 10 Jun 2019, Stefano Babic wrote:




On 10/06/19 19:35, Sergey Kubushyn wrote:

On Mon, 10 Jun 2019, Stefano Babic wrote:


Hi Jagan, Shyam,


[dd]


Thanks for this work - this is still missing in current U-Boot. I will
merge this for the upcoming release - letting this in, we could win some
more testers helping to adjust if there are some issues.


Thanks. Looks like it is FINALLY making it into the main tree...


Never say never...and it is not yet in.


:)


Patch breaks several boards due to the moving of  mxs-nand.h.  In fact,
drivers/mtd/nand/raw/mxs_nand_dt.c expects to find the file in the same
directory.

Could someone of you fix this and repost, please ?


Eh, let Shyam do this -- I'm out of programming realm now, back to
Electrical Engineering which is my primary trade...

Might get back from time to time as I'm still in charge of lowest level
firmware at my new job but that is not my primary role anymore...

---
**
*  KSI@homeKOI8 Net  < >  The impossible we do immediately.  *
*  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
**
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v8 04/14] mmc: sdhci: Add support for sdhci-caps-mask

2019-06-10 Thread Faiz Abbas
Add Support for masking some bits in the capabilities
register of a host controller.

Also remove the redundant readl() into caps1.

Signed-off-by: Faiz Abbas 
Reviewed-by: Tom Rini 
---
 drivers/mmc/sdhci.c | 18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index e2bb90abbd..666b2cbaa5 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -643,8 +644,18 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct 
sdhci_host *host,
u32 f_max, u32 f_min)
 {
u32 caps, caps_1 = 0;
+#if CONFIG_IS_ENABLED(DM_MMC)
+   u32 mask[2] = {0};
+   int ret;
+   ret = dev_read_u32_array(host->mmc->dev, "sdhci-caps-mask",
+mask, 2);
+   if (ret && ret != -1)
+   return ret;
 
+   caps = ~mask[1] & sdhci_readl(host, SDHCI_CAPABILITIES);
+#else
caps = sdhci_readl(host, SDHCI_CAPABILITIES);
+#endif
 
 #ifdef CONFIG_MMC_SDHCI_SDMA
if (!(caps & SDHCI_CAN_DO_SDMA)) {
@@ -684,7 +695,11 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct 
sdhci_host *host,
 
/* Check whether the clock multiplier is supported or not */
if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
+#if CONFIG_IS_ENABLED(DM_MMC)
+   caps_1 = ~mask[0] & sdhci_readl(host, SDHCI_CAPABILITIES_1);
+#else
caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
+#endif
host->clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >>
SDHCI_CLOCK_MUL_SHIFT;
}
@@ -741,9 +756,6 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct 
sdhci_host *host,
cfg->host_caps &= ~MMC_MODE_HS_52MHz;
}
 
-   if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300)
-   caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
-
if (!(cfg->voltages & MMC_VDD_165_195) ||
(host->quirks & SDHCI_QUIRK_NO_1_8_V))
caps_1 &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
-- 
2.19.2

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


Re: [U-Boot] [PATCH 2/2] i.MX6: nand: add nandbcb command for imx

2019-06-10 Thread Shyam Saini
> >> Thanks for this work - this is still missing in current U-Boot. I will
> >> merge this for the upcoming release - letting this in, we could win some
> >> more testers helping to adjust if there are some issues.
> >
> > Thanks. Looks like it is FINALLY making it into the main tree...
>
>
> Never say never...and it is not yet in.

Oops

> Patch breaks several boards due to the moving of  mxs-nand.h.  In fact,
> drivers/mtd/nand/raw/mxs_nand_dt.c expects to find the file in the same
> directory.

Sorry, I should have asked this earlier.
The current patch uses some mtd nand driver api to access bch_geometry
elements. I was not sure whether to use driver/ includes files in
arch/ directorty so, I
moved it from divers/ to arch/ directory.

Would be totally fine if I resend a patch which includes mxs-nand.h
from drivers/
in arch/ code ?

Please let me know if you have any other suggestion.

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


[U-Boot] [PATCH v8 08/14] mmc: am654_sdhci: Add Support for PHY

2019-06-10 Thread Faiz Abbas
Add support in the driver for handling phy specific registers.

Signed-off-by: Faiz Abbas 
Reviewed-by: Tom Rini 
---
 drivers/mmc/Kconfig   |   1 +
 drivers/mmc/am654_sdhci.c | 225 --
 2 files changed, 219 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 0062ad1bb9..41e8a270d8 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -458,6 +458,7 @@ config MMC_SDHCI_AM654
depends on ARCH_K3
depends on MMC_SDHCI
depends on DM_MMC && OF_CONTROL && BLK
+   depends on REGMAP
help
  Support for Secure Digital Host Controller Interface (SDHCI)
  controllers present on TI's AM654 SOCs.
diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index a8c92277f7..b9a7924d4e 100644
--- a/drivers/mmc/am654_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -10,21 +10,189 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
+/* CTL_CFG Registers */
+#define CTL_CFG_2  0x14
+
+#define SLOTTYPE_MASK  GENMASK(31, 30)
+#define SLOTTYPE_EMBEDDED  BIT(30)
+
+/* PHY Registers */
+#define PHY_CTRL1  0x100
+#define PHY_CTRL2  0x104
+#define PHY_CTRL3  0x108
+#define PHY_CTRL4  0x10C
+#define PHY_CTRL5  0x110
+#define PHY_CTRL6  0x114
+#define PHY_STAT1  0x130
+#define PHY_STAT2  0x134
+
+#define IOMUX_ENABLE_SHIFT 31
+#define IOMUX_ENABLE_MASK  BIT(IOMUX_ENABLE_SHIFT)
+#define OTAPDLYENA_SHIFT   20
+#define OTAPDLYENA_MASKBIT(OTAPDLYENA_SHIFT)
+#define OTAPDLYSEL_SHIFT   12
+#define OTAPDLYSEL_MASKGENMASK(15, 12)
+#define STRBSEL_SHIFT  24
+#define STRBSEL_MASK   GENMASK(27, 24)
+#define SEL50_SHIFT8
+#define SEL50_MASK BIT(SEL50_SHIFT)
+#define SEL100_SHIFT   9
+#define SEL100_MASKBIT(SEL100_SHIFT)
+#define DLL_TRIM_ICP_SHIFT 4
+#define DLL_TRIM_ICP_MASK  GENMASK(7, 4)
+#define DR_TY_SHIFT20
+#define DR_TY_MASK GENMASK(22, 20)
+#define ENDLL_SHIFT1
+#define ENDLL_MASK BIT(ENDLL_SHIFT)
+#define DLLRDY_SHIFT   0
+#define DLLRDY_MASKBIT(DLLRDY_SHIFT)
+#define PDB_SHIFT  0
+#define PDB_MASK   BIT(PDB_SHIFT)
+#define CALDONE_SHIFT  1
+#define CALDONE_MASK   BIT(CALDONE_SHIFT)
+#define RETRIM_SHIFT   17
+#define RETRIM_MASKBIT(RETRIM_SHIFT)
+
+#define DRIVER_STRENGTH_50_OHM 0x0
+#define DRIVER_STRENGTH_33_OHM 0x1
+#define DRIVER_STRENGTH_66_OHM 0x2
+#define DRIVER_STRENGTH_100_OHM0x3
+#define DRIVER_STRENGTH_40_OHM 0x4
+
 #define AM654_SDHCI_MIN_FREQ   40
 
 struct am654_sdhci_plat {
struct mmc_config cfg;
struct mmc mmc;
-   unsigned int f_max;
+   struct regmap *base;
+   bool non_removable;
+   u32 otap_del_sel;
+   u32 trm_icp;
+   u32 drv_strength;
+   bool dll_on;
+};
+
+static int am654_sdhci_set_ios_post(struct sdhci_host *host)
+{
+   struct udevice *dev = host->mmc->dev;
+   struct am654_sdhci_plat *plat = dev_get_platdata(dev);
+   unsigned int speed = host->mmc->clock;
+   int sel50, sel100;
+   u32 mask, val;
+   int ret;
+
+   /* Reset SD Clock Enable */
+   val = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
+   val &= ~SDHCI_CLOCK_CARD_EN;
+   sdhci_writew(host, val, SDHCI_CLOCK_CONTROL);
+
+   /* power off phy */
+   if (plat->dll_on) {
+   regmap_update_bits(plat->base, PHY_CTRL1, ENDLL_MASK, 0);
+
+   plat->dll_on = false;
+   }
+
+   /* restart clock */
+   sdhci_set_clock(host->mmc, speed);
+
+   /* switch phy back on */
+   if (speed > AM654_SDHCI_MIN_FREQ) {
+   mask = OTAPDLYENA_MASK | OTAPDLYSEL_MASK;
+   val = (1 << OTAPDLYENA_SHIFT) |
+ (plat->otap_del_sel << OTAPDLYSEL_SHIFT);
+   regmap_update_bits(plat->base, PHY_CTRL4, mask, val);
+   switch (speed) {
+   case 2:
+   sel50 = 0;
+   sel100 = 0;
+   break;
+   case 1:
+   sel50 = 0;
+   sel100 = 1;
+   break;
+   default:
+   sel50 = 1;
+   sel100 = 0;
+   }
+
+   /* Configure PHY DLL frequency */
+   mask = SEL50_MASK | SEL100_MASK;
+   val = (sel50 << SEL50_SHIFT) | (sel100 << SEL100_SHIFT);
+   regmap_update_bits(plat->base, PHY_CTRL5, mask, val);
+
+   /* Enable DLL */
+   regmap_update_bits(plat->base, PHY_CTRL1, ENDLL_MASK,
+  0x1 << ENDLL_SHIFT);
+   /*
+* Poll for DLL ready. Use a one second timeout.
+* Works in all experiments done 

[U-Boot] [PATCH v8 12/14] configs: am65x: Add configs to support environment in eMMC

2019-06-10 Thread Faiz Abbas
Add configs such that U-boot environment is in eMMC by default.

Signed-off-by: Faiz Abbas 
---
 configs/am65x_evm_a53_defconfig |  5 ++---
 include/configs/am65x_evm.h | 10 ++
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/configs/am65x_evm_a53_defconfig b/configs/am65x_evm_a53_defconfig
index 3f6cf7e6b3..5fd9aacd68 100644
--- a/configs/am65x_evm_a53_defconfig
+++ b/configs/am65x_evm_a53_defconfig
@@ -41,9 +41,7 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="k3-am654-base-board"
 CONFIG_SPL_MULTI_DTB_FIT=y
 CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
-CONFIG_ENV_IS_IN_FAT=y
-CONFIG_ENV_FAT_INTERFACE="mmc"
-CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
+CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
@@ -76,3 +74,4 @@ CONFIG_SOC_TI=y
 CONFIG_SYSRESET=y
 CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_TI_SCI=y
+CONFIG_FAT_WRITE=y
diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
index b043bf886b..e9e9d4a9dc 100644
--- a/include/configs/am65x_evm.h
+++ b/include/configs/am65x_evm.h
@@ -68,6 +68,16 @@
EXTRA_ENV_AM65X_BOARD_SETTINGS  \
EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC
 
+/* MMC ENV related defines */
+#ifdef CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV 0
+#define CONFIG_SYS_MMC_ENV_PART1
+#define CONFIG_ENV_SIZE(128 << 10)
+#define CONFIG_ENV_OFFSET  0x68
+#define CONFIG_ENV_OFFSET_REDUND   (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+#endif
+
 /* Now for the remaining common defines */
 #include 
 
-- 
2.19.2

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


[U-Boot] [PATCH v8 11/14] mmc: am654_sdhci: Add a platform specific set_control_reg() callback

2019-06-10 Thread Faiz Abbas
Add a platform specific set_control_reg() callback to help switch to
UHS speed modes.

Signed-off-by: Faiz Abbas 
Reviewed-by: Tom Rini 
---
 drivers/mmc/am654_sdhci.c | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index b9a7924d4e..fe633aa39a 100644
--- a/drivers/mmc/am654_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -75,6 +75,21 @@ struct am654_sdhci_plat {
bool dll_on;
 };
 
+static void am654_sdhci_set_control_reg(struct sdhci_host *host)
+{
+   struct mmc *mmc = (struct mmc *)host->mmc;
+   u32 reg;
+
+   if (IS_SD(host->mmc) &&
+   mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180) {
+   reg = sdhci_readw(host, SDHCI_HOST_CONTROL2);
+   reg |= SDHCI_CTRL_VDD_180;
+   sdhci_writew(host, reg, SDHCI_HOST_CONTROL2);
+   }
+
+   sdhci_set_uhs_timing(host);
+}
+
 static int am654_sdhci_set_ios_post(struct sdhci_host *host)
 {
struct udevice *dev = host->mmc->dev;
@@ -143,7 +158,8 @@ static int am654_sdhci_set_ios_post(struct sdhci_host *host)
 }
 
 const struct sdhci_ops am654_sdhci_ops = {
-   .set_ios_post = _sdhci_set_ios_post,
+   .set_ios_post   = _sdhci_set_ios_post,
+   .set_control_reg= _sdhci_set_control_reg,
 };
 
 int am654_sdhci_init(struct am654_sdhci_plat *plat)
-- 
2.19.2

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


[U-Boot] [PATCH v8 13/14] am65x_evm: Add Support for creating a filesystem GPT partition in eMMC

2019-06-10 Thread Faiz Abbas
Add Support for creating a GPT partition for the filesystem in eMMC.
The filesystem is created in the user partition (partition 0).

Signed-off-by: Faiz Abbas 
---
 include/configs/am65x_evm.h | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
index e9e9d4a9dc..51abab3943 100644
--- a/include/configs/am65x_evm.h
+++ b/include/configs/am65x_evm.h
@@ -34,6 +34,10 @@
 
 #define CONFIG_SYS_BOOTM_LEN   SZ_64M
 
+#define PARTS_DEFAULT \
+   /* Linux partitions */ \
+   "name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0"
+
 /* U-Boot general configuration */
 #define EXTRA_ENV_AM65X_BOARD_SETTINGS \
"findfdt="  \
@@ -48,7 +52,7 @@
"name_kern=Image\0" \
"console=ttyS2,115200n8\0"  \
"args_all=setenv optargs earlycon=ns16550a,mmio32,0x0280\0" \
-   "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0"
+   "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0"\
 
 /* U-Boot MMC-specific configuration */
 #define EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC \
@@ -60,7 +64,8 @@
"init_mmc=run args_all args_mmc\0"  \
"get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0" \
"get_kern_mmc=load mmc ${bootpart} ${loadaddr} "\
-   "${bootdir}/${name_kern}\0"
+   "${bootdir}/${name_kern}\0" \
+   "partitions=" PARTS_DEFAULT
 
 /* Incorporate settings into the U-Boot environment */
 #define CONFIG_EXTRA_ENV_SETTINGS  \
-- 
2.19.2

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


[U-Boot] [PATCH v8 14/14] configs: am65x_evm_a53: Add Support for creating GPT partitions

2019-06-10 Thread Faiz Abbas
Add Support for creating GPT partitions in U-boot.

Signed-off-by: Faiz Abbas 
---
 configs/am65x_evm_a53_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/am65x_evm_a53_defconfig b/configs/am65x_evm_a53_defconfig
index 5fd9aacd68..43d2ccc5ed 100644
--- a/configs/am65x_evm_a53_defconfig
+++ b/configs/am65x_evm_a53_defconfig
@@ -30,12 +30,12 @@ CONFIG_SPL_REMOTEPROC=y
 CONFIG_SPL_YMODEM_SUPPORT=y
 CONFIG_CMD_ASKENV=y
 # CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_REMOTEPROC=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 # CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="k3-am654-base-board"
-- 
2.19.2

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


[U-Boot] [PATCH v8 10/14] mmc: sdhci: Add support for HOST_CONTROL2 and setting UHS timings

2019-06-10 Thread Faiz Abbas
The HOST_CONTROL2 register is a part of SDHC v3.00 and not just specific
to arasan/zynq controllers. Add the same to sdhci.h.

Also create a common API to set UHS timings in HOST_CONTROL2.

Signed-off-by: Faiz Abbas 
Reviewed-by: Tom Rini 
---
 drivers/mmc/sdhci.c  | 28 +
 drivers/mmc/zynq_sdhci.c | 45 
 include/sdhci.h  | 19 -
 3 files changed, 55 insertions(+), 37 deletions(-)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 7665441204..a6b95a4cb5 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -533,6 +533,34 @@ static void sdhci_set_power(struct sdhci_host *host, 
unsigned short power)
sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL);
 }
 
+void sdhci_set_uhs_timing(struct sdhci_host *host)
+{
+   struct mmc *mmc = (struct mmc *)host->mmc;
+   u32 reg;
+
+   reg = sdhci_readw(host, SDHCI_HOST_CONTROL2);
+   reg &= ~SDHCI_CTRL_UHS_MASK;
+
+   switch (mmc->selected_mode) {
+   case UHS_SDR50:
+   case MMC_HS_52:
+   reg |= SDHCI_CTRL_UHS_SDR50;
+   break;
+   case UHS_DDR50:
+   case MMC_DDR_52:
+   reg |= SDHCI_CTRL_UHS_DDR50;
+   break;
+   case UHS_SDR104:
+   case MMC_HS_200:
+   reg |= SDHCI_CTRL_UHS_SDR104;
+   break;
+   default:
+   reg |= SDHCI_CTRL_UHS_SDR12;
+   }
+
+   sdhci_writew(host, reg, SDHCI_HOST_CONTROL2);
+}
+
 #ifdef CONFIG_DM_MMC
 static int sdhci_set_ios(struct udevice *dev)
 {
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index 08023783de..c525084250 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -48,11 +48,6 @@ static const u8 mode2timing[] = {
[MMC_HS_200] = MMC_HS200_BUS_SPEED,
 };
 
-#define SDHCI_HOST_CTRL2   0x3E
-#define SDHCI_CTRL2_MODE_MASK  0x7
-#define SDHCI_18V_SIGNAL   0x8
-#define SDHCI_CTRL_EXEC_TUNING 0x0040
-#define SDHCI_CTRL_TUNED_CLK   0x80
 #define SDHCI_TUNING_LOOP_COUNT40
 
 static void arasan_zynqmp_dll_reset(struct sdhci_host *host, u8 deviceid)
@@ -99,9 +94,9 @@ static int arasan_sdhci_execute_tuning(struct mmc *mmc, u8 
opcode)
host = priv->host;
deviceid = priv->deviceid;
 
-   ctrl = sdhci_readw(host, SDHCI_HOST_CTRL2);
+   ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
ctrl |= SDHCI_CTRL_EXEC_TUNING;
-   sdhci_writew(host, ctrl, SDHCI_HOST_CTRL2);
+   sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2);
 
mdelay(1);
 
@@ -133,7 +128,7 @@ static int arasan_sdhci_execute_tuning(struct mmc *mmc, u8 
opcode)
sdhci_writew(host, SDHCI_TRNS_READ, SDHCI_TRANSFER_MODE);
 
mmc_send_cmd(mmc, , NULL);
-   ctrl = sdhci_readw(host, SDHCI_HOST_CTRL2);
+   ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
 
if (cmd.cmdidx == MMC_CMD_SEND_TUNING_BLOCK)
udelay(1);
@@ -142,7 +137,7 @@ static int arasan_sdhci_execute_tuning(struct mmc *mmc, u8 
opcode)
 
if (tuning_loop_counter < 0) {
ctrl &= ~SDHCI_CTRL_TUNED_CLK;
-   sdhci_writel(host, ctrl, SDHCI_HOST_CTRL2);
+   sdhci_writel(host, ctrl, SDHCI_HOST_CONTROL2);
}
 
if (!(ctrl & SDHCI_CTRL_TUNED_CLK)) {
@@ -184,36 +179,14 @@ static void arasan_sdhci_set_control_reg(struct 
sdhci_host *host)
return;
 
if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180) {
-   reg = sdhci_readw(host, SDHCI_HOST_CTRL2);
-   reg |= SDHCI_18V_SIGNAL;
-   sdhci_writew(host, reg, SDHCI_HOST_CTRL2);
+   reg = sdhci_readw(host, SDHCI_HOST_CONTROL2);
+   reg |= SDHCI_CTRL_VDD_180;
+   sdhci_writew(host, reg, SDHCI_HOST_CONTROL2);
}
 
if (mmc->selected_mode > SD_HS &&
-   mmc->selected_mode <= UHS_DDR50) {
-   reg = sdhci_readw(host, SDHCI_HOST_CTRL2);
-   reg &= ~SDHCI_CTRL2_MODE_MASK;
-   switch (mmc->selected_mode) {
-   case UHS_SDR12:
-   reg |= UHS_SDR12_BUS_SPEED;
-   break;
-   case UHS_SDR25:
-   reg |= UHS_SDR25_BUS_SPEED;
-   break;
-   case UHS_SDR50:
-   reg |= UHS_SDR50_BUS_SPEED;
-   break;
-   case UHS_SDR104:
-   reg |= UHS_SDR104_BUS_SPEED;
-   break;
-   case UHS_DDR50:
-   reg |= UHS_DDR50_BUS_SPEED;
-   break;
-   default:
-   break;
-   }
-   sdhci_writew(host, reg, SDHCI_HOST_CTRL2);
-   }
+   mmc->selected_mode <= UHS_DDR50)
+   sdhci_set_uhs_timing(host);
 }
 #endif
 
diff --git a/include/sdhci.h b/include/sdhci.h

[U-Boot] [PATCH v8 07/14] mmc: sdhci: Make set_ios_post() return int

2019-06-10 Thread Faiz Abbas
Make set_ios_post() return int to faciliate error handling in
platform drivers.

Signed-off-by: Faiz Abbas 
---
 drivers/mmc/sdhci.c   | 2 +-
 drivers/mmc/xenon_sdhci.c | 4 +++-
 include/sdhci.h   | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 27706e5b88..7665441204 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -583,7 +583,7 @@ static int sdhci_set_ios(struct mmc *mmc)
 
/* If available, call the driver specific "post" set_ios() function */
if (host->ops && host->ops->set_ios_post)
-   host->ops->set_ios_post(host);
+   return host->ops->set_ios_post(host);
 
return 0;
 }
diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c
index b576511338..829b75683b 100644
--- a/drivers/mmc/xenon_sdhci.c
+++ b/drivers/mmc/xenon_sdhci.c
@@ -326,7 +326,7 @@ static void xenon_mask_cmd_conflict_err(struct sdhci_host 
*host)
 }
 
 /* Platform specific function for post set_ios configuration */
-static void xenon_sdhci_set_ios_post(struct sdhci_host *host)
+static int xenon_sdhci_set_ios_post(struct sdhci_host *host)
 {
struct xenon_sdhci_priv *priv = host->mmc->priv;
uint speed = host->mmc->tran_speed;
@@ -364,6 +364,8 @@ static void xenon_sdhci_set_ios_post(struct sdhci_host 
*host)
 
/* Re-init the PHY */
xenon_mmc_phy_set(host);
+
+   return 0;
 }
 
 /* Install a driver specific handler for post set_ios configuration */
diff --git a/include/sdhci.h b/include/sdhci.h
index 820cd16e92..3dcbc14965 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -247,7 +247,7 @@ struct sdhci_ops {
 #endif
int (*get_cd)(struct sdhci_host *host);
void(*set_control_reg)(struct sdhci_host *host);
-   void(*set_ios_post)(struct sdhci_host *host);
+   int (*set_ios_post)(struct sdhci_host *host);
void(*set_clock)(struct sdhci_host *host, u32 div);
int (*platform_execute_tuning)(struct mmc *host, u8 opcode);
void (*set_delay)(struct sdhci_host *host);
-- 
2.19.2

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


[U-Boot] [PATCH v8 09/14] configs: am65x_evm: Enable CONFIG_REGMAP

2019-06-10 Thread Faiz Abbas
Add Support for CONFIG_REGMAP.

Signed-off-by: Faiz Abbas 
Reviewed-by: Tom Rini 
---
 configs/am65x_evm_a53_defconfig | 2 ++
 configs/am65x_evm_r5_defconfig  | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/configs/am65x_evm_a53_defconfig b/configs/am65x_evm_a53_defconfig
index ff41d66e4d..3f6cf7e6b3 100644
--- a/configs/am65x_evm_a53_defconfig
+++ b/configs/am65x_evm_a53_defconfig
@@ -47,6 +47,8 @@ CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
 CONFIG_DM=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_CLK_TI_SCI=y
diff --git a/configs/am65x_evm_r5_defconfig b/configs/am65x_evm_r5_defconfig
index 6d7ba4d77c..6a261c20ac 100644
--- a/configs/am65x_evm_r5_defconfig
+++ b/configs/am65x_evm_r5_defconfig
@@ -51,6 +51,8 @@ CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
 CONFIG_DM=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
-- 
2.19.2

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


[U-Boot] [PATCH v8 06/14] arm: dts: k3: Add phy specific properties to SD card node

2019-06-10 Thread Faiz Abbas
With changes in the driver requiring phy related properties,
add the same for the SD card node to prevent breaking boot with
the driver update.

Signed-off-by: Faiz Abbas 
Reviewed-by: Tom Rini 
---
 arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 3 +++
 arch/arm/dts/k3-am654-r5-base-board.dts  | 1 +
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi 
b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
index 589a90f9f9..c43888f36d 100644
--- a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
@@ -34,6 +34,8 @@
clocks = <_clks 48 1>;
power-domains = <_pds 48>;
max-frequency = <2500>;
+   ti,otap-del-sel = <0x2>;
+   ti,trm-icp = <0x8>;
};
 
 };
@@ -190,4 +192,5 @@
pinctrl-names = "default";
pinctrl-0 = <_mmc1_pins_default>;
sdhci-caps-mask = <0x7 0x0>;
+   ti,driver-strength-ohm = <50>;
 };
diff --git a/arch/arm/dts/k3-am654-r5-base-board.dts 
b/arch/arm/dts/k3-am654-r5-base-board.dts
index 1ca4757ca5..8deda328d0 100644
--- a/arch/arm/dts/k3-am654-r5-base-board.dts
+++ b/arch/arm/dts/k3-am654-r5-base-board.dts
@@ -174,4 +174,5 @@
clock-names = "clk_xin";
clocks = <_200mhz>;
/delete-property/ power-domains;
+   ti,driver-strength-ohm = <50>;
 };
-- 
2.19.2

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


[U-Boot] [PATCH v8 05/14] mmc: sdhci: Make sdhci_set_clock() non static

2019-06-10 Thread Faiz Abbas
The am654_sdhci driver needs to switch the clock off
before disabling its phy dll and needs to re-enable
the clock before enabling the phy again.

Therefore, make the sdhci_set_clock() function accessible
in the am654_sdhci driver.

Signed-off-by: Faiz Abbas 
Reviewed-by: Tom Rini 
---
 drivers/mmc/sdhci.c | 2 +-
 include/sdhci.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 666b2cbaa5..27706e5b88 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -409,7 +409,7 @@ static int sdhci_execute_tuning(struct udevice *dev, uint 
opcode)
return 0;
 }
 #endif
-static int sdhci_set_clock(struct mmc *mmc, unsigned int clock)
+int sdhci_set_clock(struct mmc *mmc, unsigned int clock)
 {
struct sdhci_host *host = mmc->priv;
unsigned int div, clk = 0, timeout;
diff --git a/include/sdhci.h b/include/sdhci.h
index eee493ab5f..820cd16e92 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -470,6 +470,7 @@ int add_sdhci(struct sdhci_host *host, u32 f_max, u32 
f_min);
 #ifdef CONFIG_DM_MMC
 /* Export the operations to drivers */
 int sdhci_probe(struct udevice *dev);
+int sdhci_set_clock(struct mmc *mmc, unsigned int clock);
 extern const struct dm_mmc_ops sdhci_ops;
 #else
 #endif
-- 
2.19.2

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


[U-Boot] [PATCH v8 02/14] mmc: am654_sdhci: Remove quirks

2019-06-10 Thread Faiz Abbas
The host controller works perfectly well without having to add any
quirks. Remove them.

Signed-off-by: Faiz Abbas 
Reviewed-by: Tom Rini 
---
 drivers/mmc/am654_sdhci.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index 2d08fe3347..a8c92277f7 100644
--- a/drivers/mmc/am654_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -54,9 +54,6 @@ static int am654_sdhci_probe(struct udevice *dev)
return clock;
}
 
-   host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD |
-  SDHCI_QUIRK_BROKEN_R1B;
-
host->max_clk = clock;
 
ret = sdhci_setup_cfg(>cfg, host, plat->f_max,
-- 
2.19.2

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


[U-Boot] [PATCH v8 01/14] arm64: dts: k3: Sync sdhci0 node from kernel and change driver name

2019-06-10 Thread Faiz Abbas
Sync the sdhci0 node from kernel. This changes the compatible that is
required to be there in the driver. Change the same for the SD card node
which is not yet supported in kernel. This also syncs the main_pmx0 node
as a side effect.

Also change the name of the driver to match the compatible in kernel.

Signed-off-by: Faiz Abbas 
Reviewed-by: Tom Rini 
---
 arch/arm/dts/k3-am65-main.dtsi| 22 +++
 arch/arm/dts/k3-am654-base-board-u-boot.dtsi  | 27 ++---
 arch/arm/dts/k3-am654-base-board.dts  | 28 ++
 arch/arm/dts/k3-am654-r5-base-board.dts   | 38 +++
 configs/am65x_evm_a53_defconfig   |  2 +-
 configs/am65x_evm_r5_defconfig|  2 +-
 drivers/mmc/Kconfig   |  8 ++--
 drivers/mmc/Makefile  |  2 +-
 .../mmc/{k3_arsan_sdhci.c => am654_sdhci.c}   | 36 +-
 9 files changed, 116 insertions(+), 49 deletions(-)
 rename drivers/mmc/{k3_arsan_sdhci.c => am654_sdhci.c} (67%)

diff --git a/arch/arm/dts/k3-am65-main.dtsi b/arch/arm/dts/k3-am65-main.dtsi
index adcd6341e4..84fed12fbd 100644
--- a/arch/arm/dts/k3-am65-main.dtsi
+++ b/arch/arm/dts/k3-am65-main.dtsi
@@ -69,4 +69,26 @@
clock-frequency = <4800>;
current-speed = <115200>;
};
+
+   main_pmx0: pinmux@11c000 {
+   compatible = "pinctrl-single";
+   reg = <0x0 0x11c000 0x0 0x2e4>;
+   #pinctrl-cells = <1>;
+   pinctrl-single,register-width = <32>;
+   pinctrl-single,function-mask = <0x>;
+   };
+
+   sdhci0: sdhci@4f8 {
+   compatible = "ti,am654-sdhci-5.1";
+   reg = <0x0 0x4f8 0x0 0x260>, <0x0 0x4f9 0x0 0x134>;
+   power-domains = <_pds 47>;
+   clocks = <_clks 47 0>, <_clks 47 1>;
+   clock-names = "clk_ahb", "clk_xin";
+   interrupts = ;
+   mmc-ddr-1_8v;
+   mmc-hs200-1_8v;
+   ti,otap-del-sel = <0x2>;
+   ti,trm-icp = <0x8>;
+   dma-coherent;
+   };
 };
diff --git a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi 
b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
index f5c8253831..589a90f9f9 100644
--- a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
@@ -19,14 +19,6 @@
 _main{
u-boot,dm-spl;
 
-   main_pmx0: pinmux@11c000 {
-   compatible = "pinctrl-single";
-   reg = <0x0 0x11c000 0x0 0x2e4>;
-   #pinctrl-cells = <1>;
-   pinctrl-single,register-width = <32>;
-   pinctrl-single,function-mask = <0x>;
-   };
-
main_pmx1: pinmux@11c2e8 {
compatible = "pinctrl-single";
reg = <0x0 0x11c2e8 0x0 0x24>;
@@ -35,17 +27,8 @@
pinctrl-single,function-mask = <0x>;
};
 
-   sdhci0: sdhci@04F8 {
-   compatible = "arasan,sdhci-5.1";
-   reg = <0x0 0x4F8 0x0 0x1000>,
- <0x0 0x4F9 0x0 0x400>;
-   clocks = <_clks 47 1>;
-   power-domains = <_pds 47>;
-   max-frequency = <2500>;
-   };
-
sdhci1: sdhci@04FA {
-   compatible = "arasan,sdhci-5.1";
+   compatible = "ti,am654-sdhci-5.1";
reg = <0x0 0x4FA 0x0 0x1000>,
  <0x0 0x4FB 0x0 0x400>;
clocks = <_clks 48 1>;
@@ -164,7 +147,8 @@
AM65X_IOPAD(0x0190, PIN_INPUT_PULLUP, 0)/* 
(A24) MMC0_DAT5 */
AM65X_IOPAD(0x018c, PIN_INPUT_PULLUP, 0)/* 
(B26) MMC0_DAT6 */
AM65X_IOPAD(0x0188, PIN_INPUT_PULLUP, 0)/* 
(D25) MMC0_DAT7 */
-   AM65X_IOPAD(0x01b0, PIN_INPUT, 0)   
/* (C25) MMC0_DS */
+   AM65X_IOPAD(0x01b4, PIN_INPUT_PULLUP, 0)/* 
(A23) MMC0_SDCD */
+   AM65X_IOPAD(0x01b0, PIN_INPUT, 0)   /* 
(C25) MMC0_DS */
>;
u-boot,dm-spl;
};
@@ -198,11 +182,6 @@
 
  {
u-boot,dm-spl;
-   status = "okay";
-   non-removable;
-   bus-width = <8>;
-   pinctrl-names = "default";
-   pinctrl-0 = <_mmc0_pins_default>;
 };
 
  {
diff --git a/arch/arm/dts/k3-am654-base-board.dts 
b/arch/arm/dts/k3-am654-base-board.dts
index af6956fdc1..ab233916c6 100644
--- a/arch/arm/dts/k3-am654-base-board.dts
+++ b/arch/arm/dts/k3-am654-base-board.dts
@@ -6,6 +6,7 @@
 /dts-v1/;
 
 #include "k3-am654.dtsi"
+#include 
 
 / {
compatible =  "ti,am654-evm", "ti,am654";
@@ -34,3 +35,30 @@
};
};
 };
+
+_pmx0 {
+   main_mmc0_pins_default: main_mmc0_pins_default {
+   pinctrl-single,pins = <
+   AM65X_IOPAD(0x01a8, PIN_INPUT_PULLDOWN, 0)

[U-Boot] [PATCH v8 03/14] regmap: Add API regmap_init_mem_index()

2019-06-10 Thread Faiz Abbas
In device nodes with more than one entry in the reg property,
it is sometimes useful to regmap only of the entries. Add an
API regmap_init_mem_index() to facilitate this.

Signed-off-by: Faiz Abbas 
Reviewed-by: Tom Rini 
---
 drivers/core/regmap.c | 42 ++
 include/regmap.h  |  2 ++
 2 files changed, 44 insertions(+)

diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c
index 5ef0f71c8b..d1d12eef38 100644
--- a/drivers/core/regmap.c
+++ b/drivers/core/regmap.c
@@ -108,6 +108,48 @@ static int init_range(ofnode node, struct regmap_range 
*range, int addr_len,
return 0;
 }
 
+int regmap_init_mem_index(ofnode node, struct regmap **mapp, int index)
+{
+   struct regmap *map;
+   int addr_len, size_len;
+   int ret;
+
+   addr_len = ofnode_read_simple_addr_cells(ofnode_get_parent(node));
+   if (addr_len < 0) {
+   debug("%s: Error while reading the addr length (ret = %d)\n",
+ ofnode_get_name(node), addr_len);
+   return addr_len;
+   }
+
+   size_len = ofnode_read_simple_size_cells(ofnode_get_parent(node));
+   if (size_len < 0) {
+   debug("%s: Error while reading the size length: (ret = %d)\n",
+ ofnode_get_name(node), size_len);
+   return size_len;
+   }
+
+   map = regmap_alloc(1);
+   if (!map)
+   return -ENOMEM;
+
+   ret = init_range(node, map->ranges, addr_len, size_len, index);
+   if (ret)
+   return ret;
+
+   if (ofnode_read_bool(node, "little-endian"))
+   map->endianness = REGMAP_LITTLE_ENDIAN;
+   else if (ofnode_read_bool(node, "big-endian"))
+   map->endianness = REGMAP_BIG_ENDIAN;
+   else if (ofnode_read_bool(node, "native-endian"))
+   map->endianness = REGMAP_NATIVE_ENDIAN;
+   else /* Default: native endianness */
+   map->endianness = REGMAP_NATIVE_ENDIAN;
+
+   *mapp = map;
+
+   return ret;
+}
+
 int regmap_init_mem(ofnode node, struct regmap **mapp)
 {
struct regmap_range *range;
diff --git a/include/regmap.h b/include/regmap.h
index 3cd7a66cea..0854200a9c 100644
--- a/include/regmap.h
+++ b/include/regmap.h
@@ -330,6 +330,8 @@ int regmap_init_mem(ofnode node, struct regmap **mapp);
 int regmap_init_mem_platdata(struct udevice *dev, fdt_val_t *reg, int count,
 struct regmap **mapp);
 
+int regmap_init_mem_index(ofnode node, struct regmap **mapp, int index);
+
 /**
  * regmap_get_range() - Obtain the base memory address of a regmap range
  *
-- 
2.19.2

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


[U-Boot] [PATCH v8 00/14] Add Support for eMMC in AM65x-evm

2019-06-10 Thread Faiz Abbas
Add Support for eMMC in TI's AM65x-evm. The series starts
by syncing the sdhci0 node from the kernel. Then it adds APIs and
changes to the driver required for handling the driver's integrated
phy. The current maximum supported speed is DDR52. Higher speeds and
tuning support will be added in a subsequent series.

Tested with Andreas's latest series[1] on top. Can be applied
independently of that series though.

Changes in v8:
1. Fixed build issues with some xylinx configs.
2. Fixed-up patch 10 to patch 8 so it makes more sense now.

Changes in v7:
Fixed a device tree entry in patch 1 and tested eMMC boot as well
with Andreas's latest series[1].

Changes in v6:
1. Squashed one more dependency for clk_200mhz from Andreas's patches[1]
   into patch 1. Patches now build without any help from the other
series.

2. Improved line wrapping in patch 8.

Changes in v5:
Patches were tested with Andreas's system firmware patches[1] but can
now be
independently merged cleanly on latest U-boot.

Changes in v4:
1. Dropped the patch including regmap_read_poll_timeout() because that
support was
   already added by someone else
2. Fixed a NULL pointer exception in patch 8.
3. Rebased on top of latest master
4. Added extra patches to support GPT partitions in user partition
5. Added Support for environment in eMMC by default

Changes in v3:
Patch 9: Got rid of variable ret

Changes in v2:
Patch 9: Fixed return value
Patch 12: Fixed spacing

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=111844

Faiz Abbas (14):
  arm64: dts: k3: Sync sdhci0 node from kernel and change driver name
  mmc: am654_sdhci: Remove quirks
  regmap: Add API regmap_init_mem_index()
  mmc: sdhci: Add support for sdhci-caps-mask
  mmc: sdhci: Make sdhci_set_clock() non static
  arm: dts: k3: Add phy specific properties to SD card node
  mmc: sdhci: Make set_ios_post() return int
  mmc: am654_sdhci: Add Support for PHY
  configs: am65x_evm: Enable CONFIG_REGMAP
  mmc: sdhci: Add support for HOST_CONTROL2 and setting UHS timings
  mmc: am654_sdhci: Add a platform specific set_control_reg() callback
  configs: am65x: Add configs to support environment in eMMC
  am65x_evm: Add Support for creating a filesystem GPT partition in eMMC
  configs: am65x_evm_a53: Add Support for creating GPT partitions

 arch/arm/dts/k3-am65-main.dtsi   |  22 ++
 arch/arm/dts/k3-am654-base-board-u-boot.dtsi |  30 +-
 arch/arm/dts/k3-am654-base-board.dts |  28 ++
 arch/arm/dts/k3-am654-r5-base-board.dts  |  39 +++
 configs/am65x_evm_a53_defconfig  |  11 +-
 configs/am65x_evm_r5_defconfig   |   4 +-
 drivers/core/regmap.c|  42 +++
 drivers/mmc/Kconfig  |   9 +-
 drivers/mmc/Makefile |   2 +-
 drivers/mmc/am654_sdhci.c| 333 +++
 drivers/mmc/k3_arsan_sdhci.c | 109 --
 drivers/mmc/sdhci.c  |  50 ++-
 drivers/mmc/xenon_sdhci.c|   4 +-
 drivers/mmc/zynq_sdhci.c |  45 +--
 include/configs/am65x_evm.h  |  19 +-
 include/regmap.h |   2 +
 include/sdhci.h  |  22 +-
 17 files changed, 581 insertions(+), 190 deletions(-)
 create mode 100644 drivers/mmc/am654_sdhci.c
 delete mode 100644 drivers/mmc/k3_arsan_sdhci.c

-- 
2.19.2

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


Re: [U-Boot] [PATCH 2/2] i.MX6: nand: add nandbcb command for imx

2019-06-10 Thread Stefano Babic


On 10/06/19 19:35, Sergey Kubushyn wrote:
> On Mon, 10 Jun 2019, Stefano Babic wrote:
> 
>> Hi Jagan, Shyam,
> 
> [dd]
> 
>> Thanks for this work - this is still missing in current U-Boot. I will
>> merge this for the upcoming release - letting this in, we could win some
>> more testers helping to adjust if there are some issues.
> 
> Thanks. Looks like it is FINALLY making it into the main tree...


Never say never...and it is not yet in.

Patch breaks several boards due to the moving of  mxs-nand.h.  In fact,
drivers/mtd/nand/raw/mxs_nand_dt.c expects to find the file in the same
directory.

Could someone of you fix this and repost, please ?

Best regards,
Stefano


-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] ARM: davinci: da850: Manual pinmux only when PINCTRL not available

2019-06-10 Thread Adam Ford
With a recent update to the pinctrl-single driver and the fact
that the da850evm has both DM and OF_CONTROL working in both SPL
and U-Boot, some of the manual pinmuxing can be setup to only
be activated when either the driver doesn't have DM for it, or
when CONFIG_PINMUX isn't available (only during SPL).  If the
code ever shrinks enough to support PINCTRL in SPL, a lot of this
can go away.  This also remove some manual pinmuxing not needed
by SPL to give SPL a little more breathing room.

Signed-off-by: Adam Ford 

diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index a90b7a3538..5180128db4 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -216,21 +216,29 @@ static const struct pinmux_config gpio_pins[] = {
 };
 
 const struct pinmux_resource pinmuxes[] = {
+#ifndef CONFIG_SPL_BUILD
 #ifdef CONFIG_DRIVER_TI_EMAC
PINMUX_ITEM(emac_pins_mdio),
 #ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
PINMUX_ITEM(emac_pins_rmii),
 #else
PINMUX_ITEM(emac_pins_mii),
-#endif
-#endif
+#endif /* CONFIG_DRIVER_TI_EMAC */
+#endif /* CONFIG_DRIVER_TI_EMAC_USE_RMII */
+#endif /* CONFIG_SPL_BUILD */
 #ifdef CONFIG_SPI_FLASH
+#if !CONFIG_IS_ENABLED(PINCTRL)
PINMUX_ITEM(spi1_pins_base),
PINMUX_ITEM(spi1_pins_scs0),
 #endif
+#endif
+#if !CONFIG_IS_ENABLED(PINCTRL)
PINMUX_ITEM(uart2_pins_txrx),
PINMUX_ITEM(uart2_pins_rtscts),
+#endif
+#if !CONFIG_IS_ENABLED(PINCTRL)
PINMUX_ITEM(i2c0_pins),
+#endif
 #ifdef CONFIG_NAND_DAVINCI
PINMUX_ITEM(emifa_pins_cs3),
PINMUX_ITEM(emifa_pins_cs4),
@@ -241,8 +249,10 @@ const struct pinmux_resource pinmuxes[] = {
 #endif
PINMUX_ITEM(gpio_pins),
 #ifdef CONFIG_MMC_DAVINCI
+#if !CONFIG_IS_ENABLED(PINCTRL)
PINMUX_ITEM(mmc0_pins),
 #endif
+#endif
 };
 
 const int pinmuxes_size = ARRAY_SIZE(pinmuxes);
-- 
2.17.1

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


[U-Boot] [PATCH] pinctrl: pinctrl-single: Add 'pinctrl-single, bits' support

2019-06-10 Thread Adam Ford
The TI Davinci (da850/l138/am1808) use pinctrl-single,bits for
pinmuxing peripherals.  This patch allosw the pinctrl-single
driver to parse the pinctrl-single,bits options and correctly
setup devices.

Signed-off-by: Adam Ford 

diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 9dec88c1aa..1e3ad974a1 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -16,6 +16,7 @@ struct single_pdata {
int offset; /* index of last configuration register */
u32 mask;   /* configuration-value mask bits */
int width;  /* configuration register bit width */
+   bool bits_per_mux;
 };
 
 struct single_fdt_pin_cfg {
@@ -23,6 +24,12 @@ struct single_fdt_pin_cfg {
fdt32_t val;/* configuration register value */
 };
 
+struct single_fdt_bits_cfg {
+   fdt32_t reg;/* configuration register offset */
+   fdt32_t val;/* configuration register value */
+   fdt32_t mask;   /* configuration register mask */
+};
+
 /**
  * single_configure_pins() - Configure pins based on FDT data
  *
@@ -71,15 +78,53 @@ static int single_configure_pins(struct udevice *dev,
return 0;
 }
 
+static int single_configure_bits(struct udevice *dev,
+const struct single_fdt_bits_cfg *pins,
+int size)
+{
+   struct single_pdata *pdata = dev->platdata;
+   int count = size / sizeof(struct single_fdt_bits_cfg);
+   phys_addr_t n, reg;
+   u32 val, mask;
+
+   for (n = 0; n < count; n++, pins++) {
+   reg = fdt32_to_cpu(pins->reg);
+   if ((reg < 0) || (reg > pdata->offset)) {
+   dev_dbg(dev, "  invalid register offset 0x%pa\n", );
+   continue;
+   }
+   reg += pdata->base;
+
+   mask = fdt32_to_cpu(pins->mask);
+   val = fdt32_to_cpu(pins->val) & mask;
+
+   switch (pdata->width) {
+   case 16:
+   writew((readw(reg) & ~mask) | val, reg);
+   break;
+   case 32:
+   writel((readl(reg) & ~mask) | val, reg);
+   break;
+   default:
+   dev_warn(dev, "unsupported register width %i\n",
+pdata->width);
+   continue;
+   }
+   dev_dbg(dev, "  reg/val 0x%pa/0x%08x\n", , val);
+   }
+   return 0;
+}
 static int single_set_state(struct udevice *dev,
struct udevice *config)
 {
const void *fdt = gd->fdt_blob;
const struct single_fdt_pin_cfg *prop;
+   const struct single_fdt_bits_cfg *prop_bits;
int len;
 
prop = fdt_getprop(fdt, dev_of_offset(config), "pinctrl-single,pins",
   );
+
if (prop) {
dev_dbg(dev, "configuring pins for %s\n", config->name);
if (len % sizeof(struct single_fdt_pin_cfg)) {
@@ -87,9 +132,24 @@ static int single_set_state(struct udevice *dev,
return -FDT_ERR_BADSTRUCTURE;
}
single_configure_pins(dev, prop, len);
-   len = 0;
+   return 0;
}
 
+   /* pinctrl-single,pins not found so check for pinctrl-single,bits */
+   prop_bits = fdt_getprop(fdt, dev_of_offset(config),
+   "pinctrl-single,bits",
+   );
+   if (prop_bits) {
+   dev_dbg(dev, "configuring pins for %s\n", config->name);
+   if (len % sizeof(struct single_fdt_bits_cfg)) {
+   dev_dbg(dev, "  invalid bits configuration in fdt\n");
+   return -FDT_ERR_BADSTRUCTURE;
+   }
+   single_configure_bits(dev, prop_bits, len);
+   return 0;
+   }
+
+   /* Neither 'pinctrl-single,pins' nor 'pinctrl-single,bits' were found */
return len;
 }
 
@@ -119,6 +179,9 @@ static int single_ofdata_to_platdata(struct udevice *dev)
pdata->mask = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
 "pinctrl-single,function-mask",
 0x);
+   pdata->bits_per_mux = fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
+ "pinctrl-single,bit-per-mux");
+
return 0;
 }
 
-- 
2.17.1

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


[U-Boot] [PATCH] MIPS: add compile time definition of L2 cache size

2019-06-10 Thread Ramon Fried
If configuration is set to skip low level init, automatic
probe of L2 cache size is not performed and the size is set to 0.
Flushing or invalidating the L2 cache will fail in this case.

Add a static configuration (SYS_DCACHE_LINE_SIZE) with default set to 0.

Signed-off-by: Ramon Fried 
---
 arch/mips/Kconfig | 10 +-
 arch/mips/lib/cache.c |  2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 5cb9bdf2ee..235bb5b7e6 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -408,9 +408,17 @@ config SYS_ICACHE_LINE_SIZE
help
  The size of L1 Icache lines, if known at compile time.
 
+config SYS_SCACHE_LINE_SIZE
+   int
+   default 0
+   help
+ The size of L2 cache lines, if known at compile time.
+
+
 config SYS_CACHE_SIZE_AUTO
def_bool y if SYS_DCACHE_SIZE = 0 && SYS_ICACHE_SIZE = 0 && \
-   SYS_DCACHE_LINE_SIZE = 0 && SYS_ICACHE_LINE_SIZE = 0
+   SYS_DCACHE_LINE_SIZE = 0 && SYS_ICACHE_LINE_SIZE = 0 && \
+   SYS_SCACHE_LINE_SIZE = 0
help
  Select this (or let it be auto-selected by not defining any cache
  sizes) in order to allow U-Boot to automatically detect the sizes
diff --git a/arch/mips/lib/cache.c b/arch/mips/lib/cache.c
index d56fd1e0f4..0ddae30f2c 100644
--- a/arch/mips/lib/cache.c
+++ b/arch/mips/lib/cache.c
@@ -87,7 +87,7 @@ static inline unsigned long scache_line_size(void)
 #ifdef CONFIG_MIPS_L2_CACHE
return gd->arch.l2_line_size;
 #else
-   return 0;
+   return CONFIG_SYS_SCACHE_LINE_SIZE;
 #endif
 }
 
-- 
2.21.0

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


[U-Boot] [PATCH v2 2/2] MIPS: add dma-mapping.h implementation

2019-06-10 Thread Ramon Fried
add implementation for dma_alloc_coherent(),
dma_free_coherent(), dma_map_single() and dma_free_single()

Signed-off-by: Ramon Fried 
---
v2: fix warning caused by missing casts.

 arch/mips/include/asm/dma-mapping.h | 48 +
 1 file changed, 48 insertions(+)
 create mode 100644 arch/mips/include/asm/dma-mapping.h

diff --git a/arch/mips/include/asm/dma-mapping.h 
b/arch/mips/include/asm/dma-mapping.h
new file mode 100644
index 00..387427c13b
--- /dev/null
+++ b/arch/mips/include/asm/dma-mapping.h
@@ -0,0 +1,48 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * (C) Copyright 2019
+ * Ramon Fried 
+ */
+
+#ifndef __ASM_MIPS_DMA_MAPPING_H
+#define __ASM_MIPS_DMA_MAPPING_H
+
+#include 
+#include 
+#definedma_mapping_error(x, y) 0
+
+static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
+{
+   void *vaddr = memalign(ARCH_DMA_MINALIGN,
+  ROUND(len, ARCH_DMA_MINALIGN));
+
+   *handle = CPHYSADDR((unsigned long)vaddr);
+   return (void *)(CKSEG1ADDR((unsigned long)vaddr));
+}
+
+static inline void dma_free_coherent(void *addr)
+{
+   free((void *)CPHYSADDR((unsigned long)addr));
+}
+
+static inline unsigned long dma_map_single(volatile void *vaddr, size_t len,
+  enum dma_data_direction dir)
+{
+   unsigned long dma_addr = CPHYSADDR((unsigned long)vaddr);
+
+   if (dir == DMA_TO_DEVICE)
+   flush_dcache_range((unsigned long)vaddr,
+  (unsigned long)vaddr + len);
+   if (dir == DMA_FROM_DEVICE)
+   invalidate_dcache_range((unsigned long)vaddr,
+   (unsigned long)vaddr + len);
+
+   return dma_addr;
+}
+
+static inline void dma_unmap_single(volatile void *vaddr, size_t len,
+   unsigned long paddr)
+{
+}
+
+#endif /* __ASM_MIPS_DMA_MAPPING_H */
-- 
2.21.0

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


[U-Boot] [PATCH v2 1/2] MIPS: add empty arch/clk.h

2019-06-10 Thread Ramon Fried
The file is needed for compilation of various
drivers (IE. macb).
Add empty implementation so compilation succeeds.

Signed-off-by: Ramon Fried 
---
v2: Moved the new file to the correct location.

 arch/mips/include/asm/arch/clk.h | 11 +++
 1 file changed, 11 insertions(+)
 create mode 100644 arch/mips/include/asm/arch/clk.h

diff --git a/arch/mips/include/asm/arch/clk.h b/arch/mips/include/asm/arch/clk.h
new file mode 100644
index 00..c01e0973cd
--- /dev/null
+++ b/arch/mips/include/asm/arch/clk.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (c) Ramon Fried 
+ */
+
+#ifndef __ASM_MIPS_ARCH_CLK_H
+#define __ASM_MIPS_ARCH_CLK_H
+
+/* Note: This is a placeholder header for driver compilation. */
+
+#endif
-- 
2.21.0

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


Re: [U-Boot] Using fw_setenv to set negative numbers

2019-06-10 Thread Ken Sloat
> -Original Message-
> From: Anatolij Gustschin 
> Sent: Wednesday, June 5, 2019 12:22 PM
> To: Ken Sloat 
> Cc: u-boot@lists.denx.de
> Subject: Re: [U-Boot] Using fw_setenv to set negative numbers
> 
> [This is an EXTERNAL EMAIL]
> 
> 
> On Wed, 5 Jun 2019 15:57:55 +
> Ken Sloat ksl...@aampglobal.com wrote:
> ...
> > How can I set a negative number using the standard command call to
> fw_setenv?
> > For example, if want to set bootdelay to a value of -2 (boot without
> > delay), I currently cannot just say:
> > fw_setenv bootdelay -2
> 
> Try using "fw_setenv bootdelay -- -2" command, it should work.
> 
> --
> Anatolij 

Thanks Anatolij! This worked!

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


Re: [U-Boot] [PATCH 2/2] i.MX6: nand: add nandbcb command for imx

2019-06-10 Thread Sergey Kubushyn

On Mon, 10 Jun 2019, Stefano Babic wrote:


Hi Jagan, Shyam,


[dd]


Thanks for this work - this is still missing in current U-Boot. I will
merge this for the upcoming release - letting this in, we could win some
more testers helping to adjust if there are some issues.


Thanks. Looks like it is FINALLY making it into the main tree...

---
**
*  KSI@homeKOI8 Net  < >  The impossible we do immediately.  *
*  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
**
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] i.MX6: nand: add nandbcb command for imx

2019-06-10 Thread Stefano Babic
Hi Jagan, Shyam,

On 06/06/19 10:59, Shyam Saini wrote:
> Writing/updating boot image in nand device is not
> straight forward in i.MX6 platform and it requires
> boot control block(BCB) to be configured.
> 
> It becomes difficult to use uboot 'nand' command to
> write BCB since it requires platform specific attributes
> need to be taken care of.
> 
> It is even difficult to use existing msx-nand.c driver by
> incorporating BCB attributes like mxs_dma_desc does
> because it requires change in mtd and nand command.
> 
> So, cmd_nandbcb implemented in arch/arm/mach-imx
> 
> BCB contains two data structures, Firmware Configuration Block(FCB)
> and Discovered Bad Block Table(DBBT). FCB has nand timings,
> DBBT search area, page address of firmware.
> 
> On summary, nandbcb update will
> - erase the entire partition
> - create BCB by creating 2 FCB/DBBT block followed by
>   1 FW block based on partition size and erasesize.
> - fill FCB/DBBT structures
> - write FW/SPL on FW1
> - write FCB/DBBT in first 2 blocks
> 
> for nand boot, up on reset bootrom look for FCB structure in
> first block's if FCB found the nand timings are loaded for
> further reads. once FCB read done, DTTB will load and finally
> firmware will be loaded which is boot image.
> 
> Refer section "NAND Boot" from doc/imx/common/imx6.txt for more usage
> information.


Thanks for this work - this is still missing in current U-Boot. I will
merge this for the upcoming release - letting this in, we could win some
more testers helping to adjust if there are some issues.

Thanks again,
Stefano

> 
> Signed-off-by: Jagan Teki 
> Signed-off-by: Sergey Kubushyn 
> Signed-off-by: Shyam Saini 
> ---
> Changes for v4:
> - Remove obselete apis and use bch_geometry structure for calculating
>   ecc level, bad block start bit and bad block byte
> - Write firmware only once
> - Shorten variable names
> - Update commit message
> - Update docs as per current patch
> - Fix checkpatch warnings
> Changes for v3:
> - Fixed multi-line comments
> - Better error handling for failed allocations
> Changes for v2:
> - Fixed commit message notes
> - Updated proper commit message
> - Update doc/README.imx6 with NAND boot details
> - Fixed long length variable names.
> - Fixed Gigantic variable name.
> - NULL checks for kzalloc
> - Move Kconfig option in separate patch
> - Fixed checkpatch warninigs
> ---
>  arch/arm/include/asm/mach-imx/imx-nandbcb.h| 111 +++
>  .../arm/include/asm/mach-imx/mxs-nand.h|   0
>  arch/arm/mach-imx/Makefile |   1 +
>  arch/arm/mach-imx/cmd_nandbcb.c| 369 
> +
>  doc/imx/common/imx6.txt|  75 +
>  drivers/mtd/nand/raw/mxs_nand.c|   2 +-
>  drivers/mtd/nand/raw/mxs_nand_spl.c|   3 +-
>  7 files changed, 559 insertions(+), 2 deletions(-)
>  create mode 100644 arch/arm/include/asm/mach-imx/imx-nandbcb.h
>  rename drivers/mtd/nand/raw/mxs_nand.h => 
> arch/arm/include/asm/mach-imx/mxs-nand.h (100%)
>  create mode 100644 arch/arm/mach-imx/cmd_nandbcb.c
> 
> diff --git a/arch/arm/include/asm/mach-imx/imx-nandbcb.h 
> b/arch/arm/include/asm/mach-imx/imx-nandbcb.h
> new file mode 100644
> index 00..033659a038
> --- /dev/null
> +++ b/arch/arm/include/asm/mach-imx/imx-nandbcb.h
> @@ -0,0 +1,111 @@
> +/*
> + * Copyright (C) 2017 Jagan Teki 
> + *
> + * SPDX-License-Identifier:  GPL-2.0+
> + */
> +
> +#ifndef _IMX_NAND_BCB_H_
> +#define _IMX_NAND_BCB_H_
> +
> +#define FCB_FINGERPRINT  0x20424346  /* 'FCB' */
> +#define FCB_VERSION_10x0100
> +
> +#define DBBT_FINGERPRINT20x54424244  /* 'DBBT' */
> +#define DBBT_VERSION_1   0x0100
> +
> +struct dbbt_block {
> + u32 checksum;   /* reserved on i.MX6 */
> + u32 fingerprint;
> + u32 version;
> + u32 numberbb;   /* reserved on i.MX6 */
> + u32 dbbtpages;
> +};
> +
> +struct fcb_block {
> + u32 checksum;   /* First fingerprint in first byte */
> + u32 fingerprint;/* 2nd fingerprint at byte 4 */
> + u32 version;/* 3rd fingerprint at byte 8 */
> + u8 datasetup;
> + u8 datahold;
> + u8 addr_setup;
> + u8 dsample_time;
> +
> + /* These are for application use only and not for ROM. */
> + u8 nandtiming;
> + u8 rea;
> + u8 rloh;
> + u8 rhoh;
> + u32 pagesize;   /* 2048 for 2K pages, 4096 for 4K pages */
> + u32 oob_pagesize;   /* 2112 for 2K pages, 4314 for 4K pages */
> + u32 sectors;/* Number of 2K sections per block */
> + u32 nr_nand;/* Total Number of NANDs - not used by ROM */
> + u32 nr_die; /* Number of separate chips in this NAND */
> + u32 celltype;   /* MLC or SLC */
> + u32 ecc_type;   /* Type of ECC, can be one of BCH-0-20 */
> + u32 ecc_nr; /* Number of bytes for Block0 - BCH */
> +
> +  

Re: [U-Boot] [PATCH 1/2] arm: i.MX: Add CMD_NANDBCB Kconfig entry

2019-06-10 Thread Stefano Babic


On 06/06/19 10:59, Shyam Saini wrote:
> Add Kconfig entry for CMD_NANDBCB, and default y on i.MX6
> platform with NAND_MXS defined.
> 
> Signed-off-by: Jagan Teki 
> Signed-off-by: Shyam Saini 
> ---
> Hi,
> 
> This patch series is based on feedback gathered from this [1] discussion
> and [2] patch submitted by Stefan.
> 
> [1] https://patchwork.ozlabs.org/patch/870467/
> [2] https://patchwork.ozlabs.org/patch/897222/
> 
> Changes for v4:
> - No change
> Changes for v3:
> - Fixed Typo 'seprate'
> Changes for v2:
> - New patch
> 
>  arch/arm/mach-imx/Kconfig | 11 +++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
> index ec09ef240f..5dd286f9a7 100644
> --- a/arch/arm/mach-imx/Kconfig
> +++ b/arch/arm/mach-imx/Kconfig
> @@ -71,6 +71,17 @@ config CMD_HDMIDETECT
> This enables the 'hdmidet' command which detects if an HDMI monitor
> is connected.
>  
> +config CMD_NANDBCB
> + bool "i.MX6 NAND Boot Control Block(BCB) command"
> + depends on NAND && CMD_MTDPARTS
> + default y if ARCH_MX6 && NAND_MXS
> + help
> +   Unlike normal 'nand write/erase' commands, this command update
> +   Boot Control Block(BCB) for i.MX6 platform NAND IP's.
> +
> +   This is similar to kobs-ng, which is used in Linux as separate
> +   rootfs package.
> +
>  config NXP_BOARD_REVISION
>   bool "Read NXP board revision from fuses"
>   depends on ARCH_MX6 || ARCH_MX7
> 

Reviewed-by: Stefano Babic 

best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [EXT] Re: [PATCH v1] net: use block layer in net driver

2019-06-10 Thread Joe Hershberger
On Sun, Jun 2, 2019 at 9:28 PM Yinbo Zhu  wrote:
>
>
>
> > -Original Message-
> > From: Joe Hershberger [mailto:joe.hershber...@gmail.com]
> > Sent: 2019年6月1日 19:16
> > To: Yinbo Zhu 
> > Cc: York Sun ; u-boot@lists.denx.de; Xiaobo Xie
> > ; Jiafei Pan ; Ran Wang
> > 
> > Subject: [EXT] Re: [U-Boot] [PATCH v1] net: use block layer in net driver
> >
> > Caution: EXT Email
> >
> > On Thu, May 9, 2019 at 3:02 PM Joe Hershberger 
> > wrote:
> > >
> > > On Wed, Apr 17, 2019 at 4:02 AM Yinbo Zhu  wrote:
> > > >
> > > > From: Yinbo Zhu 
> > > >
> > > > At present the MMC subsystem maintains its own list of MMC devices.
> > > > This cannot work with driver model when CONFIG_BLK is enabled, use
> > > > blk_dread to replace previous mmc read interface,
> > > >
> > > > Signed-off-by: Yinbo Zhu 
> > > > ---
> > > >  drivers/net/phy/cortina.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c
> > > > index a04a118f90..2337c3403c 100644
> > > > --- a/drivers/net/phy/cortina.c
> > > > +++ b/drivers/net/phy/cortina.c
> > > > @@ -176,7 +176,7 @@ void cs4340_upload_firmware(struct phy_device
> > *phydev)
> > > > printf("MMC read: dev # %u, block # %u, count %u ...\n",
> > > >dev, blk, cnt);
> > > > mmc_init(mmc);
> > > > -   (void)mmc->block_dev.block_read(>block_dev, blk,
> > cnt,
> > > > +   (void)blk_dread(mmc_get_blk_desc(mmc), blk, cnt,
> > > > addr);
> > >
> > > Should this be switching on CONFIG_BLK or CONFIG_DM_MMC or something.
> >
> > Any word?
> >
> Yes, need enable above two config. And default uboot had enabled them.

OK, if this depends on them, even if they are default, this block
should check for the option in v2. Also, if there is still a use-case
for the "mmc->block_dev.block_read" that exists with different or
fewer options, then that could also be a config option instead of
replaced.

Thanks,
-Joe

>
> Regards,
> Yinbo
> > >
> > > > }
> > > >  #endif
> > > > --
> > > > 2.17.1
> > > >
> > > > ___
> > > > U-Boot mailing list
> > > > U-Boot@lists.denx.de
> > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
> > > >
> > sts.denx.de%2Flistinfo%2Fu-bootdata=02%7C01%7Cyinbo.zhu%40nxp.c
> > > >
> > om%7Cf4dd39cb85174bb474e208d6e682980b%7C686ea1d3bc2b4c6fa92cd9
> > 9c5c30
> > > >
> > 1635%7C0%7C1%7C636949845952441371sdata=PJGcNYuSLsAndJaGTBe
> > khmEN
> > > > sad96LwmV92jLec5mrs%3Dreserved=0
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v7 11/15] mmc: sdhci: Add support for HOST_CONTROL2 and setting UHS timings

2019-06-10 Thread Faiz Abbas
Hi Andreas,

On 10/06/19 8:44 PM, Andreas Dannenberg wrote:
> Hi Faiz,
> 
> On Fri, Jun 07, 2019 at 09:07:32AM +0530, Lokesh Vutla wrote:
>>
>>
>> On 06/06/19 7:24 PM, Faiz Abbas wrote:
>>> The HOST_CONTROL2 register is a part of SDHC v3.00 and not just specific
>>> to arasan/zynq controllers. Add the same to sdhci.h.
>>>
>>> Also create a common API to set UHS timings in HOST_CONTROL2.
>>>
>>> Signed-off-by: Faiz Abbas 
>>> Reviewed-by: Tom Rini 
>>> Tested-by: Lokesh Vutla 
>>
>> This is causing build failure for the following defconfig:
>> xilinx_zynqmp_zcu104_revA_defconfig
>>
>> ➜  u-boot git:(master) v78make xilinx_zynqmp_zcu104_revA_defconfig
>>   HOSTCC  scripts/basic/fixdep
>>   HOSTCC  scripts/kconfig/conf.o
>>   YACCscripts/kconfig/zconf.tab.c
>>   LEX scripts/kconfig/zconf.lex.c
>>   HOSTCC  scripts/kconfig/zconf.tab.o
>> v8  HOSTLD  scripts/kconfig/conf
>> #
>> # configuration written to .config
>> #
>> ➜  u-boot git:(master) v78make -j4 -s
>> drivers/mmc/zynq_sdhci.c: In function ‘arasan_sdhci_execute_tuning’:
>> drivers/mmc/zynq_sdhci.c:97:27: error: ‘SDHCI_HOST_CTRL2’ undeclared (first 
>> use
>> in this function); did you mean ‘SDHCI_HOST_CONTROL2’?
>>   ctrl = sdhci_readw(host, SDHCI_HOST_CTRL2);
>>^~~~
>>SDHCI_HOST_CONTROL2
>> drivers/mmc/zynq_sdhci.c:97:27: note: each undeclared identifier is reported
>> only once for each function it appears in
>> drivers/mmc/zynq_sdhci.c: In function ‘arasan_sdhci_set_control_reg’:
>> drivers/mmc/zynq_sdhci.c:182:27: error: ‘SDHCI_HOST_CTRL2’ undeclared (first 
>> use
>> in this function); did you mean ‘SDHCI_HOST_CONTROL2’?
>>reg = sdhci_readw(host, SDHCI_HOST_CTRL2);
>>^~~~
>>SDHCI_HOST_CONTROL2
>> drivers/mmc/zynq_sdhci.c:183:10: error: ‘SDHCI_18V_SIGNAL’ undeclared (first 
>> use
>> in this function); did you mean ‘SDHCI_DIV_HI_MASK’?
>>reg |= SDHCI_18V_SIGNAL;
>>   ^~~~
>>   SDHCI_DIV_HI_MASK
>> scripts/Makefile.build:278: recipe for target 'drivers/mmc/zynq_sdhci.o' 
>> failed
>> make[2]: *** [drivers/mmc/zynq_sdhci.o] Error 1
>> scripts/Makefile.build:432: recipe for target 'drivers/mmc' failed
>> make[1]: *** [drivers/mmc] Error 2
>> Makefile:1582: recipe for target 'drivers' failed
>> make: *** [drivers] Error 2
>> make: *** Waiting for unfinished jobs
>>
>>
>> Can you fix it and repost the series?
> 
> Can you re-create the issue?
> 
> Just bubbling this up to the top as it is the first series needed for TI K3
> support...
> 

Running travis on a final version. Will post soon.

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


Re: [U-Boot] [PATCH v7 11/15] mmc: sdhci: Add support for HOST_CONTROL2 and setting UHS timings

2019-06-10 Thread Andreas Dannenberg
Hi Faiz,

On Fri, Jun 07, 2019 at 09:07:32AM +0530, Lokesh Vutla wrote:
> 
> 
> On 06/06/19 7:24 PM, Faiz Abbas wrote:
> > The HOST_CONTROL2 register is a part of SDHC v3.00 and not just specific
> > to arasan/zynq controllers. Add the same to sdhci.h.
> > 
> > Also create a common API to set UHS timings in HOST_CONTROL2.
> > 
> > Signed-off-by: Faiz Abbas 
> > Reviewed-by: Tom Rini 
> > Tested-by: Lokesh Vutla 
> 
> This is causing build failure for the following defconfig:
> xilinx_zynqmp_zcu104_revA_defconfig
> 
> ➜  u-boot git:(master) v78make xilinx_zynqmp_zcu104_revA_defconfig
>   HOSTCC  scripts/basic/fixdep
>   HOSTCC  scripts/kconfig/conf.o
>   YACCscripts/kconfig/zconf.tab.c
>   LEX scripts/kconfig/zconf.lex.c
>   HOSTCC  scripts/kconfig/zconf.tab.o
> v8  HOSTLD  scripts/kconfig/conf
> #
> # configuration written to .config
> #
> ➜  u-boot git:(master) v78make -j4 -s
> drivers/mmc/zynq_sdhci.c: In function ‘arasan_sdhci_execute_tuning’:
> drivers/mmc/zynq_sdhci.c:97:27: error: ‘SDHCI_HOST_CTRL2’ undeclared (first 
> use
> in this function); did you mean ‘SDHCI_HOST_CONTROL2’?
>   ctrl = sdhci_readw(host, SDHCI_HOST_CTRL2);
>^~~~
>SDHCI_HOST_CONTROL2
> drivers/mmc/zynq_sdhci.c:97:27: note: each undeclared identifier is reported
> only once for each function it appears in
> drivers/mmc/zynq_sdhci.c: In function ‘arasan_sdhci_set_control_reg’:
> drivers/mmc/zynq_sdhci.c:182:27: error: ‘SDHCI_HOST_CTRL2’ undeclared (first 
> use
> in this function); did you mean ‘SDHCI_HOST_CONTROL2’?
>reg = sdhci_readw(host, SDHCI_HOST_CTRL2);
>^~~~
>SDHCI_HOST_CONTROL2
> drivers/mmc/zynq_sdhci.c:183:10: error: ‘SDHCI_18V_SIGNAL’ undeclared (first 
> use
> in this function); did you mean ‘SDHCI_DIV_HI_MASK’?
>reg |= SDHCI_18V_SIGNAL;
>   ^~~~
>   SDHCI_DIV_HI_MASK
> scripts/Makefile.build:278: recipe for target 'drivers/mmc/zynq_sdhci.o' 
> failed
> make[2]: *** [drivers/mmc/zynq_sdhci.o] Error 1
> scripts/Makefile.build:432: recipe for target 'drivers/mmc' failed
> make[1]: *** [drivers/mmc] Error 2
> Makefile:1582: recipe for target 'drivers' failed
> make: *** [drivers] Error 2
> make: *** Waiting for unfinished jobs
> 
> 
> Can you fix it and repost the series?

Can you re-create the issue?

Just bubbling this up to the top as it is the first series needed for TI K3
support...

Thanks,
Andreas

> 
> Thanks and regards,
> Lokesh
> 
> 
> > ---
> >  drivers/mmc/sdhci.c  | 28 
> >  drivers/mmc/zynq_sdhci.c | 31 ++-
> >  include/sdhci.h  | 19 ++-
> >  3 files changed, 48 insertions(+), 30 deletions(-)
> > 
> > diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> > index 75e6567631..79edb18fe5 100644
> > --- a/drivers/mmc/sdhci.c
> > +++ b/drivers/mmc/sdhci.c
> > @@ -533,6 +533,34 @@ static void sdhci_set_power(struct sdhci_host *host, 
> > unsigned short power)
> > sdhci_writeb(host, pwr, SDHCI_POWER_CONTROL);
> >  }
> >  
> > +void sdhci_set_uhs_timing(struct sdhci_host *host)
> > +{
> > +   struct mmc *mmc = (struct mmc *)host->mmc;
> > +   u32 reg;
> > +
> > +   reg = sdhci_readw(host, SDHCI_HOST_CONTROL2);
> > +   reg &= ~SDHCI_CTRL_UHS_MASK;
> > +
> > +   switch (mmc->selected_mode) {
> > +   case UHS_SDR50:
> > +   case MMC_HS_52:
> > +   reg |= SDHCI_CTRL_UHS_SDR50;
> > +   break;
> > +   case UHS_DDR50:
> > +   case MMC_DDR_52:
> > +   reg |= SDHCI_CTRL_UHS_DDR50;
> > +   break;
> > +   case UHS_SDR104:
> > +   case MMC_HS_200:
> > +   reg |= SDHCI_CTRL_UHS_SDR104;
> > +   break;
> > +   default:
> > +   reg |= SDHCI_CTRL_UHS_SDR12;
> > +   }
> > +
> > +   sdhci_writew(host, reg, SDHCI_HOST_CONTROL2);
> > +}
> > +
> >  #ifdef CONFIG_DM_MMC
> >  static int sdhci_set_ios(struct udevice *dev)
> >  {
> > diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
> > index 08023783de..b39e1d7a19 100644
> > --- a/drivers/mmc/zynq_sdhci.c
> > +++ b/drivers/mmc/zynq_sdhci.c
> > @@ -48,11 +48,6 @@ static const u8 mode2timing[] = {
> > [MMC_HS_200] = MMC_HS200_BUS_SPEED,
> >  };
> >  
> > -#define SDHCI_HOST_CTRL2   0x3E
> > -#define SDHCI_CTRL2_MODE_MASK  0x7
> > -#define SDHCI_18V_SIGNAL   0x8
> > -#define SDHCI_CTRL_EXEC_TUNING 0x0040
> > -#define SDHCI_CTRL_TUNED_CLK   0x80
> >  #define SDHCI_TUNING_LOOP_COUNT40
> >  
> >  static void arasan_zynqmp_dll_reset(struct sdhci_host *host, u8 deviceid)
> > @@ -190,30 +185,8 @@ static void arasan_sdhci_set_control_reg(struct 
> > sdhci_host *host)
> > }
> >  
> > if (mmc->selected_mode > SD_HS &&
> > -   mmc->selected_mode <= UHS_DDR50) {
> > -   reg = sdhci_readw(host, SDHCI_HOST_CTRL2);
> > -   reg &= ~SDHCI_CTRL2_MODE_MASK;
> > -   switch (mmc->selected_mode) {
> > -   case 

Re: [U-Boot] [PATCH] ARM: imx: cm_fx6: Drop ad-hoc SATA binding

2019-06-10 Thread Marek Vasut
On 6/10/19 4:24 PM, Stefano Babic wrote:
> Hi Marek,
> 
> On 12/05/19 22:43, Marek Vasut wrote:
>> Drop the ad-hoc AHCI binding code, this is superseded by
>> CONFIG_DWC_AHSATA_AHCI=y resp. drivers/ata/dwc_ahsata.c
>>
>> Signed-off-by: Marek Vasut 
>> Cc: Christopher Spinrath 
>> Cc: Fabio Estevam 
>> Cc: Igor Grinberg 
>> Cc: Nikita Kiryanov 
>> Cc: Stefano Babic 
>> ---
>>  board/compulab/cm_fx6/cm_fx6.c | 63 --
>>  configs/cm_fx6_defconfig   |  1 -
>>  2 files changed, 64 deletions(-)
>>
>> diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
>> index d42f57d4b7..b8f15cf3ab 100644
>> --- a/board/compulab/cm_fx6/cm_fx6.c
>> +++ b/board/compulab/cm_fx6/cm_fx6.c
>> @@ -724,66 +724,3 @@ U_BOOT_DEVICE(cm_fx6_serial) = {
>>  .name   = "serial_mxc",
>>  .platdata = _fx6_mxc_serial_plat,
>>  };
>> -
>> -#if CONFIG_IS_ENABLED(AHCI)
>> -static int sata_imx_probe(struct udevice *dev)
>> -{
>> -int i, err;
>> -
>> -/* Make sure this gpio has logical 0 value */
>> -gpio_direction_output(CM_FX6_SATA_PWLOSS_INT, 0);
>> -udelay(100);
>> -cm_fx6_sata_power(1);
> 
> cm_fx6_sata_power() is still defined and not used in the board, this
> raises at least a warning (apart of Christopher's comments).
> 

AFAIR Christopher will be fixing this patch, so drop it.

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] ARM: imx: cm_fx6: Drop ad-hoc SATA binding

2019-06-10 Thread Stefano Babic
Hi Marek,

On 12/05/19 22:43, Marek Vasut wrote:
> Drop the ad-hoc AHCI binding code, this is superseded by
> CONFIG_DWC_AHSATA_AHCI=y resp. drivers/ata/dwc_ahsata.c
> 
> Signed-off-by: Marek Vasut 
> Cc: Christopher Spinrath 
> Cc: Fabio Estevam 
> Cc: Igor Grinberg 
> Cc: Nikita Kiryanov 
> Cc: Stefano Babic 
> ---
>  board/compulab/cm_fx6/cm_fx6.c | 63 --
>  configs/cm_fx6_defconfig   |  1 -
>  2 files changed, 64 deletions(-)
> 
> diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
> index d42f57d4b7..b8f15cf3ab 100644
> --- a/board/compulab/cm_fx6/cm_fx6.c
> +++ b/board/compulab/cm_fx6/cm_fx6.c
> @@ -724,66 +724,3 @@ U_BOOT_DEVICE(cm_fx6_serial) = {
>   .name   = "serial_mxc",
>   .platdata = _fx6_mxc_serial_plat,
>  };
> -
> -#if CONFIG_IS_ENABLED(AHCI)
> -static int sata_imx_probe(struct udevice *dev)
> -{
> - int i, err;
> -
> - /* Make sure this gpio has logical 0 value */
> - gpio_direction_output(CM_FX6_SATA_PWLOSS_INT, 0);
> - udelay(100);
> - cm_fx6_sata_power(1);

cm_fx6_sata_power() is still defined and not used in the board, this
raises at least a warning (apart of Christopher's comments).

Stefano

> -
> - for (i = 0; i < CM_FX6_SATA_INIT_RETRIES; i++) {
> - err = setup_sata();
> - if (err) {
> - printf("SATA setup failed: %d\n", err);
> - return err;
> - }
> -
> - udelay(100);
> -
> - err = dwc_ahsata_probe(dev);
> - if (!err)
> - break;
> -
> - /* There is no device on the SATA port */
> - if (sata_dm_port_status(0, 0) == 0)
> - break;
> -
> - /* There's a device, but link not established. Retry */
> - device_remove(dev, DM_REMOVE_NORMAL);
> - }
> -
> - return 0;
> -}
> -
> -static int sata_imx_remove(struct udevice *dev)
> -{
> - cm_fx6_sata_power(0);
> - mdelay(250);
> -
> - return 0;
> -}
> -
> -struct ahci_ops sata_imx_ops = {
> - .port_status = dwc_ahsata_port_status,
> - .reset  = dwc_ahsata_bus_reset,
> - .scan   = dwc_ahsata_scan,
> -};
> -
> -static const struct udevice_id sata_imx_ids[] = {
> - { .compatible = "fsl,imx6q-ahci" },
> - { }
> -};
> -
> -U_BOOT_DRIVER(sata_imx) = {
> - .name   = "dwc_ahci",
> - .id = UCLASS_AHCI,
> - .of_match   = sata_imx_ids,
> - .ops= _imx_ops,
> - .probe  = sata_imx_probe,
> - .remove = sata_imx_remove,  /* reset bus to stop it */
> -};
> -#endif /* AHCI */
> diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
> index ce3f9de3f9..e928cbc948 100644
> --- a/configs/cm_fx6_defconfig
> +++ b/configs/cm_fx6_defconfig
> @@ -52,7 +52,6 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6q-cm-fx6"
>  CONFIG_ENV_IS_IN_SPI_FLASH=y
>  CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
>  CONFIG_DWC_AHSATA=y
> -# CONFIG_DWC_AHSATA_AHCI is not set
>  CONFIG_DM_KEYBOARD=y
>  CONFIG_DM_MMC=y
>  CONFIG_FSL_ESDHC=y
> 

-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [GIT] Pull request: u-boot-dfu (10.06.2019)

2019-06-10 Thread Marek Vasut
On 6/10/19 3:17 PM, Lukasz Majewski wrote:
> Hi Marek,
> 
>> On 6/10/19 2:15 PM, Lukasz Majewski wrote:
>>> On Mon, 10 Jun 2019 14:09:30 +0200
>>> Marek Vasut  wrote:
>>>   
 On 6/10/19 8:16 AM, Lukasz Majewski wrote:  
> Dear Marek,
>
> The following changes since commit
> 6d277fb0ed145f82dd50cc6e99d2fa553a588c3b:
>
>   spl: Correct SPL_SIZE_LIMIT Kconfig option (2019-06-08 07:49:00
> -0400)
>
> are available in the git repository at:
>
>   git://git.denx.de/u-boot-dfu.git 
>
> for you to fetch changes up to
> 91810aa7fded782deda5de5320dae19876e4a558:
>
>   usb: gadget: error out if g_dnl registration fails (2019-06-09
>   17:13:07 +0200)
>
> 
> Marek Vasut (1):
>   spl: dfu: Fix printed variable name
>
> Sjoerd Simons (1):
>   usb: gadget: error out if g_dnl registration fails
>
>  cmd/usb_gadget_sdp.c | 11 ---
>  common/spl/spl_dfu.c |  2 +-
>  common/spl/spl_sdp.c |  6 +-
>  3 files changed, 14 insertions(+), 5 deletions(-)

 The PR doesn't tell me which branch to pull :-(
  
>>>
>>> Ach... sorry.
>>>
>>> Please find the branch below:
>>> http://git.denx.de/?p=u-boot/u-boot-dfu.git;a=shortlog;h=refs/heads/master  
>>
>> Can you please just put such information into the PR next time ?
>> Without me having to even start a browser ?
>>
> 
> Yes, I will. Apologize for inconvenience.

Thanks

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] Fix watchdog timeout setup for mt7623n (banana-pi r2)

2019-06-10 Thread shannon
Fixes a bugged implementation of watchdog reset for mediatek cores
Changeset 06985289d452ad2423145cfed8cece61a7f8cec6
 "watdchdog: Implement generic watchdog_reset() version"
 brought this bug to light

Moves reconfiguration call to mtk_wdt_reset to a more appropriate location in 
mtk_wdt_start


Signed-off-by: Shannon Barber 
---
 drivers/watchdog/mtk_wdt.c | 28 +---
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index 0b501733f2..a7d4c7a3b8 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -70,18 +70,30 @@ static int mtk_wdt_expire_now(struct udevice *dev, ulong 
flags)
return 0;
 }
 
-static void mtk_wdt_set_timeout(struct udevice *dev, unsigned int timeout)
+static void mtk_wdt_set_timeout(struct udevice *dev, unsigned int timeout_ms)
 {
struct mtk_wdt_priv *priv = dev_get_priv(dev);
 
/*
-* One bit is the value of 512 ticks
-* The clock has 32 KHz
+* One WDT_LENGTH count is 512 ticks of the wdt clock
+* Clock runs at 32768 Hz
+* e.g. 15.625 ms per count (nominal)
+* We want the ceiling after dividing timeout_ms by 15.625 ms
+* We add 15624 prior to the divide to implement the ceiling
+* We prevent over-flow by clamping the timeout_ms value here
+*  as the maximum WDT_LENGTH counts is 1023 -> 15.984375 sec
+* We also enforce a minimum of 1 count
+* Many watchdog peripherals have a self-imposed count of 1
+*  that is added to the register counts.
+*  The MediaTek docs lack details to know if this is the case here.
+*  So we enforce a minimum of 1 to guarantee operation.
 */
-   timeout = WDT_LENGTH_TIMEOUT(timeout << 6) | WDT_LENGTH_KEY;
-   writel(timeout, priv->base + MTK_WDT_LENGTH);
-
-   mtk_wdt_reset(dev);
+   if(timeout_ms > 15984) timeout_ms = 15984;
+   u64 timeout_us = timeout_ms * 1000;
+   u32 timeout_cc = (u32) ( (15624 + timeout_us) / 15625 );
+   if(timeout_cc == 0) timeout_cc = 1;
+   u32 length = WDT_LENGTH_TIMEOUT(timeout_cc) | WDT_LENGTH_KEY;
+   writel(length, priv->base + MTK_WDT_LENGTH);
 }
 
 static int mtk_wdt_start(struct udevice *dev, u64 timeout, ulong flags)
@@ -90,6 +102,8 @@ static int mtk_wdt_start(struct udevice *dev, u64 timeout, 
ulong flags)
 
mtk_wdt_set_timeout(dev, timeout);
 
+mtk_wdt_reset(dev);
+
/* Enable watchdog reset signal */
setbits_le32(priv->base + MTK_WDT_MODE,
 WDT_MODE_EN | WDT_MODE_KEY | WDT_MODE_EXTEN);
-- 
2.17.1
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] Pull request: u-boot-staging

2019-06-10 Thread Anatolij Gustschin
On Mon, 10 Jun 2019 09:42:48 -0400
Tom Rini tr...@konsulko.com wrote:

> Since I'm expecting a PR from Stefano that includes the changes for
> mx6sabre* to fit within SPL limits (and hoping he grabs the change to
> make exceeding the limit a build error), shouldn't this just come from
> him with all that?  Thanks!

Yes, Stefano confirmed in another email that he included the FEC patch.
You can ignore this pull request, I think. Thanks!

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


Re: [U-Boot] Pull request: u-boot-staging

2019-06-10 Thread Tom Rini
On Mon, Jun 10, 2019 at 01:26:08PM +0200, Anatolij Gustschin wrote:
> Hi Tom,
> 
> please pull FEC driver fix for v2019.07.
> 
> Travis CI: https://travis-ci.org/vdsao/u-boot-video/builds/542223249
> 
> Thanks,
> Anatolij
> 
> The following changes since commit 38c2a8a00132b4dcc6a0bb5baf5146b9eb9eb2d2:
> 
>   Merge tag 'efi-2019-07-rc4' of git://git.denx.de/u-boot-efi (2019-06-02 
> 18:19:45 -0400)
> 
> are available in the Git repository at:
> 
>   git://git.denx.de/u-boot-staging.git tags/fixes-for-2019.07
> 
> for you to fetch changes up to 023e2f900020991aedb3d57a257d46963b76221b:
> 
>   net: fec_mxc: not access reserved register on i.MX8 (2019-06-04 16:57:35 
> +0200)
> 
> 
> - fix FEC exception/SERROR on i.MX8X
> 
> 
> Peng Fan (1):
>   net: fec_mxc: not access reserved register on i.MX8
> 
>  drivers/net/fec_mxc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Since I'm expecting a PR from Stefano that includes the changes for
mx6sabre* to fit within SPL limits (and hoping he grabs the change to
make exceeding the limit a build error), shouldn't this just come from
him with all that?  Thanks!

-- 
Tom


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


Re: [U-Boot] Bring tinker-rk3288 back into SPL size limit?

2019-06-10 Thread Jagan Teki
On Sat, Jun 8, 2019 at 11:35 PM Tom Rini  wrote:
>
> Hey,
>
> With Heinrich's series to enforce a size limit on SPL and Simon
> Goldschmidt's enhancements on top of that, we're now seeing that
> tinker-rk3288 has an SPL that is too large to function.  And it's now
> also causing the build to fail.  So, good that we're catching this at
> least.  Can you please look into what we need to do to get the image to
> fit within the size constraints?  Thanks!

I have used TPL before with tinker while supporting falcon. I think we
can use TPL here, what do you think?
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] Bring tinker-rk3288 back into SPL size limit?

2019-06-10 Thread Philipp Tomsich
+Kever.

> On 08.06.2019, at 20:05, Tom Rini  wrote:
> 
> Hey,
> 
> With Heinrich's series to enforce a size limit on SPL and Simon
> Goldschmidt's enhancements on top of that, we're now seeing that
> tinker-rk3288 has an SPL that is too large to function.  And it's now
> also causing the build to fail.  So, good that we're catching this at
> least.  Can you please look into what we need to do to get the image to
> fit within the size constraints?  Thanks!
> 
> -- 
> Tom

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


Re: [U-Boot] [GIT] Pull request: u-boot-dfu (10.06.2019)

2019-06-10 Thread Lukasz Majewski
Hi Marek,

> On 6/10/19 2:15 PM, Lukasz Majewski wrote:
> > On Mon, 10 Jun 2019 14:09:30 +0200
> > Marek Vasut  wrote:
> >   
> >> On 6/10/19 8:16 AM, Lukasz Majewski wrote:  
> >>> Dear Marek,
> >>>
> >>> The following changes since commit
> >>> 6d277fb0ed145f82dd50cc6e99d2fa553a588c3b:
> >>>
> >>>   spl: Correct SPL_SIZE_LIMIT Kconfig option (2019-06-08 07:49:00
> >>> -0400)
> >>>
> >>> are available in the git repository at:
> >>>
> >>>   git://git.denx.de/u-boot-dfu.git 
> >>>
> >>> for you to fetch changes up to
> >>> 91810aa7fded782deda5de5320dae19876e4a558:
> >>>
> >>>   usb: gadget: error out if g_dnl registration fails (2019-06-09
> >>>   17:13:07 +0200)
> >>>
> >>> 
> >>> Marek Vasut (1):
> >>>   spl: dfu: Fix printed variable name
> >>>
> >>> Sjoerd Simons (1):
> >>>   usb: gadget: error out if g_dnl registration fails
> >>>
> >>>  cmd/usb_gadget_sdp.c | 11 ---
> >>>  common/spl/spl_dfu.c |  2 +-
> >>>  common/spl/spl_sdp.c |  6 +-
> >>>  3 files changed, 14 insertions(+), 5 deletions(-)
> >>
> >> The PR doesn't tell me which branch to pull :-(
> >>  
> > 
> > Ach... sorry.
> > 
> > Please find the branch below:
> > http://git.denx.de/?p=u-boot/u-boot-dfu.git;a=shortlog;h=refs/heads/master  
> 
> Can you please just put such information into the PR next time ?
> Without me having to even start a browser ?
> 

Yes, I will. Apologize for inconvenience.


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de


pgpHRybTMux1E.pgp
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] net: fec_mxc: not access reserved register on i.MX8

2019-06-10 Thread Anatolij Gustschin
Hi Stefano,

On Mon, 10 Jun 2019 15:02:37 +0200
Stefano Babic sba...@denx.de wrote:
... 
> I have this in u-boot-imx, too, but I do not think it is a problem when
> we send PR to Tom.

OK, thanks! Yes, it shouldn't be a problem.

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


Re: [U-Boot] [PATCH] net: fec_mxc: not access reserved register on i.MX8

2019-06-10 Thread Stefano Babic
Hi Anatolji,

On 10/06/19 13:24, Anatolij Gustschin wrote:
> On Mon, 15 Apr 2019 05:18:33 +
> Peng Fan peng@nxp.com wrote:
> 
>> We should not access reserved register on i.MX8, otherwise met SERROR
>>
>> Signed-off-by: Peng Fan 
>> ---
>>  drivers/net/fec_mxc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Applied to u-boot-staging/ag...@denx.de, thanks!
> 

I have this in u-boot-imx, too, but I do not think it is a problem when
we send PR to Tom.

Stefano

-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [RESEND Patch] net: mscc: refactor mscc_miim

2019-06-10 Thread Daniel Schwierzeck


Am 09.06.19 um 15:27 schrieb Horatiu Vultur:
> Because all MSCC SoC use the same MDIO bus, put the implementation in
> one common file(mscc_miim) and make all the other MSCC network drivers to
> use these functions.
> 
> Signed-off-by: Horatiu Vultur 
> ---
>  drivers/net/mscc_eswitch/Makefile |  10 +--
>  drivers/net/mscc_eswitch/jr2_switch.c | 119 
> ++
>  drivers/net/mscc_eswitch/luton_switch.c   | 101 +
>  drivers/net/mscc_eswitch/mscc_miim.c  |  28 +++
>  drivers/net/mscc_eswitch/mscc_miim.h  |  14 +++-
>  drivers/net/mscc_eswitch/ocelot_switch.c  | 104 +-
>  drivers/net/mscc_eswitch/serval_switch.c  | 101 +
>  drivers/net/mscc_eswitch/servalt_switch.c | 102 +
>  8 files changed, 63 insertions(+), 516 deletions(-)
> 

Reviewed-by: Daniel Schwierzeck 

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


[U-Boot] Pull requesti v2: u-boot-spi/master

2019-06-10 Thread Jagan Teki
Hi Tom,

Please pull this PR.

Summary:
- mpc8xxx spi driver fixes (Mario)
- mpc8xxx spi dm conversion (Mario, Jagan)
- SPI DM Migration update (Jagan)

Travis-CI: https://travis-ci.org/openedev/u-boot-amarula/builds/543612089

Changes for v2:
- include "ids8313: Disable SPI" patch

thanks,
Jagan.

The following changes since commit 748198cb8d32d41bc35e6f492bac9948f339bece:

  Revert "Makefile: Prioritize external dtb if defined" (2019-05-19 18:09:35 
-0400)

are available in the Git repository at:

  git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to d1505ad8c00ea8e3dae682b2637a9f22da0dd234:

  dm: MIGRATION: Update migration status for SPI (2019-06-10 17:59:49 +0530)


Jagan Teki (2):
  spi: mpc8xxx: Convert to DM
  dm: MIGRATION: Update migration status for SPI

Mario Six (18):
  ids8313: Disable SPI
  spi: mpc8xxx: Use short type names
  spi: mpc8xxx: Fix comments
  spi: mpc8xxx: Rename camel-case variables
  spi: mpc8xxx: Fix space after cast
  spi: mpc8xxx: Fix function names in strings
  spi: mpc8xxx: Replace defines with enums
  spi: mpc8xxx: Use IO accessors
  spi: mpc8xxx: Simplify if
  spi: mpc8xxx: Get rid of is_read
  spi: mpc8xxx: Simplify logic a bit
  spi: mpc8xxx: Reduce scope of loop variables
  spi: mpc8xxx: Make code more readable
  spi: mpc8xxx: Rename variable
  spi: mpc8xxx: Document LEN setting better
  spi: mpc8xxx: Re-order transfer setup
  spi: mpc8xxx: Fix if check
  spi: mpc8xxx: Use get_timer

 configs/ids8313_defconfig  |   3 -
 doc/driver-model/MIGRATION.txt |   6 +-
 drivers/spi/Kconfig|  10 +-
 drivers/spi/mpc8xxx_spi.c  | 279 +++--
 4 files changed, 194 insertions(+), 104 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] Pull requesti v2: u-boot-spi/master

2019-06-10 Thread Jagan Teki
Hi Tom,

Please pull this PR.

Summary:
- mpc8xxx spi driver fixes (Mario)
- mpc8xxx spi dm conversion (Mario, Jagan)
- SPI DM Migration update (Jagan)

Travis-CI: https://travis-ci.org/openedev/u-boot-amarula/builds/543612089

Changes for v2:
- include "ids8313: Disable SPI" patch

thanks,
Jagan.

The following changes since commit 748198cb8d32d41bc35e6f492bac9948f339bece:

  Revert "Makefile: Prioritize external dtb if defined" (2019-05-19 18:09:35 
-0400)

are available in the Git repository at:

  git://git.denx.de/u-boot-spi.git spi

for you to fetch changes up to d1505ad8c00ea8e3dae682b2637a9f22da0dd234:

  dm: MIGRATION: Update migration status for SPI (2019-06-10 17:59:49 +0530)


Jagan Teki (2):
  spi: mpc8xxx: Convert to DM
  dm: MIGRATION: Update migration status for SPI

Mario Six (18):
  ids8313: Disable SPI
  spi: mpc8xxx: Use short type names
  spi: mpc8xxx: Fix comments
  spi: mpc8xxx: Rename camel-case variables
  spi: mpc8xxx: Fix space after cast
  spi: mpc8xxx: Fix function names in strings
  spi: mpc8xxx: Replace defines with enums
  spi: mpc8xxx: Use IO accessors
  spi: mpc8xxx: Simplify if
  spi: mpc8xxx: Get rid of is_read
  spi: mpc8xxx: Simplify logic a bit
  spi: mpc8xxx: Reduce scope of loop variables
  spi: mpc8xxx: Make code more readable
  spi: mpc8xxx: Rename variable
  spi: mpc8xxx: Document LEN setting better
  spi: mpc8xxx: Re-order transfer setup
  spi: mpc8xxx: Fix if check
  spi: mpc8xxx: Use get_timer

 configs/ids8313_defconfig  |   3 -
 doc/driver-model/MIGRATION.txt |   6 +-
 drivers/spi/Kconfig|  10 +-
 drivers/spi/mpc8xxx_spi.c  | 279 +++--
 4 files changed, 194 insertions(+), 104 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] ids8313: Disable SPI

2019-06-10 Thread Jagan Teki
On Fri, Jun 7, 2019 at 3:05 PM Mario Six  wrote:
>
> With the recent SPI changes, the ids8313 board won't compile anymore.
>
> Until further information from the manufacturer, disable SPI support, so
> that the board will at least compile again.
>
> Signed-off-by: Mario Six 
> ---

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


Re: [U-Boot] [GIT] Pull request: u-boot-dfu (10.06.2019)

2019-06-10 Thread Marek Vasut
On 6/10/19 2:15 PM, Lukasz Majewski wrote:
> On Mon, 10 Jun 2019 14:09:30 +0200
> Marek Vasut  wrote:
> 
>> On 6/10/19 8:16 AM, Lukasz Majewski wrote:
>>> Dear Marek,
>>>
>>> The following changes since commit
>>> 6d277fb0ed145f82dd50cc6e99d2fa553a588c3b:
>>>
>>>   spl: Correct SPL_SIZE_LIMIT Kconfig option (2019-06-08 07:49:00
>>> -0400)
>>>
>>> are available in the git repository at:
>>>
>>>   git://git.denx.de/u-boot-dfu.git 
>>>
>>> for you to fetch changes up to
>>> 91810aa7fded782deda5de5320dae19876e4a558:
>>>
>>>   usb: gadget: error out if g_dnl registration fails (2019-06-09
>>>   17:13:07 +0200)
>>>
>>> 
>>> Marek Vasut (1):
>>>   spl: dfu: Fix printed variable name
>>>
>>> Sjoerd Simons (1):
>>>   usb: gadget: error out if g_dnl registration fails
>>>
>>>  cmd/usb_gadget_sdp.c | 11 ---
>>>  common/spl/spl_dfu.c |  2 +-
>>>  common/spl/spl_sdp.c |  6 +-
>>>  3 files changed, 14 insertions(+), 5 deletions(-)  
>>
>> The PR doesn't tell me which branch to pull :-(
>>
> 
> Ach... sorry.
> 
> Please find the branch below:
> http://git.denx.de/?p=u-boot/u-boot-dfu.git;a=shortlog;h=refs/heads/master

Can you please just put such information into the PR next time ? Without
me having to even start a browser ?

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v1 07/11] DTS: Add imx6q-display5-u-boot.dtsi file with u-boot specific properties

2019-06-10 Thread Lukasz Majewski
Hi Adam,

> On Sun, Jun 9, 2019 at 3:55 PM Lukasz Majewski  wrote:
> >
> > This file setups UART5 based serial to be used as pre-relocation
> > console in the U-Boot proper.
> >
> > On purpose pinux configuration is omitted here as it has been
> > already done in SPL. For early pre-relocation code we only need the
> > serial device from DTS.
> >
> > Signed-off-by: Lukasz Majewski 
> > ---
> >
> >  arch/arm/dts/imx6q-display5-u-boot.dtsi | 44
> > + 1 file changed, 44 insertions(+)
> >  create mode 100644 arch/arm/dts/imx6q-display5-u-boot.dtsi
> >
> > diff --git a/arch/arm/dts/imx6q-display5-u-boot.dtsi
> > b/arch/arm/dts/imx6q-display5-u-boot.dtsi new file mode 100644
> > index 00..b942218b7a
> > --- /dev/null
> > +++ b/arch/arm/dts/imx6q-display5-u-boot.dtsi
> > @@ -0,0 +1,44 @@
> > +// SPDX-License-Identifier: GPL-2.0+
> > +/*
> > + * Copyright 2019
> > + * Lukasz Majewski, DENX Software Engineering, lu...@denx.de
> > + *
> > + * SPDX-License-Identifier: GPL-2.0+ or X11
> > + */
> > +
> > +/*
> > + * The minimal augmentation DTS U-Boot file to allow UART5
> > + * configuration in the pre-relocation stage of U-Boot
> > + * proper.
> > + *
> > + * As the same UART is already configured in SPL, we don't need
> > + * setup pinmux for it again.
> > + */
> > +
> > +/ {
> > +   aliases {
> > +   mmc0 = 
> > +   };
> > +
> > +   soc {
> > +   u-boot,dm-pre-reloc;
> > +
> > +   aips-bus@210 {
> > +   u-boot,dm-pre-reloc;
> > +   };
> > +   };  
> 
> You could consider including  arch/arm/dts/imx6qdl-u-boot.dtsi.  This
> would have the soc node, aips-bus node, and the iomuxc and then you
> could just add the uart, stdio-patch and aliases.  It's just a
> suggestion.

Thanks for the suggestion. Indeed in the first draft of this conversion
I indeed used the imx6qdl-u-boot.dts [1] and then included the rest.

However, my goal is to not start any unnecessary devices before
relocation for U-Boot proper (excluding the serial, which is only used).

Unfortunately, the imx6qdl-u-boot.dts defines the above properties as
'u-boot,dm-spl' which I want to avoid (as SPL for now must be left
untouched).

Moreover, the gpio1 and iomux have the 'u-boot,dm-spl' property, which
I do not want to use.

I will probably reuse this file when we convert SPL to DM. 



[1] -
http://git.denx.de/?p=u-boot/u-boot-dfu.git;a=blob;f=arch/arm/dts/imx6qdl-u-boot.dtsi;h=0aa29e38b831deb48db8990bc00929dbd3877a39;hb=refs/heads/master

> 
> 
> adam
> > +
> > +   chosen {
> > +   stdout-path = 
> > +   };
> > +};
> > +
> > + {
> > +   at24@50 {
> > +   u-boot,i2c-offset-len = <2>;
> > +   };
> > +};
> > +
> > + {
> > +   u-boot,dm-pre-reloc;
> > +};
> > --
> > 2.11.0
> >  




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de


pgpy2quqB4xNH.pgp
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [GIT] Pull request: u-boot-dfu (10.06.2019)

2019-06-10 Thread Lukasz Majewski
On Mon, 10 Jun 2019 14:09:30 +0200
Marek Vasut  wrote:

> On 6/10/19 8:16 AM, Lukasz Majewski wrote:
> > Dear Marek,
> > 
> > The following changes since commit
> > 6d277fb0ed145f82dd50cc6e99d2fa553a588c3b:
> > 
> >   spl: Correct SPL_SIZE_LIMIT Kconfig option (2019-06-08 07:49:00
> > -0400)
> > 
> > are available in the git repository at:
> > 
> >   git://git.denx.de/u-boot-dfu.git 
> > 
> > for you to fetch changes up to
> > 91810aa7fded782deda5de5320dae19876e4a558:
> > 
> >   usb: gadget: error out if g_dnl registration fails (2019-06-09
> >   17:13:07 +0200)
> > 
> > 
> > Marek Vasut (1):
> >   spl: dfu: Fix printed variable name
> > 
> > Sjoerd Simons (1):
> >   usb: gadget: error out if g_dnl registration fails
> > 
> >  cmd/usb_gadget_sdp.c | 11 ---
> >  common/spl/spl_dfu.c |  2 +-
> >  common/spl/spl_sdp.c |  6 +-
> >  3 files changed, 14 insertions(+), 5 deletions(-)  
> 
> The PR doesn't tell me which branch to pull :-(
> 

Ach... sorry.

Please find the branch below:
http://git.denx.de/?p=u-boot/u-boot-dfu.git;a=shortlog;h=refs/heads/master

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de


pgpsFpnw_uivS.pgp
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [GIT] Pull request: u-boot-dfu (10.06.2019)

2019-06-10 Thread Marek Vasut
On 6/10/19 8:16 AM, Lukasz Majewski wrote:
> Dear Marek,
> 
> The following changes since commit
> 6d277fb0ed145f82dd50cc6e99d2fa553a588c3b:
> 
>   spl: Correct SPL_SIZE_LIMIT Kconfig option (2019-06-08 07:49:00 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-dfu.git 
> 
> for you to fetch changes up to 91810aa7fded782deda5de5320dae19876e4a558:
> 
>   usb: gadget: error out if g_dnl registration fails (2019-06-09
>   17:13:07 +0200)
> 
> 
> Marek Vasut (1):
>   spl: dfu: Fix printed variable name
> 
> Sjoerd Simons (1):
>   usb: gadget: error out if g_dnl registration fails
> 
>  cmd/usb_gadget_sdp.c | 11 ---
>  common/spl/spl_dfu.c |  2 +-
>  common/spl/spl_sdp.c |  6 +-
>  3 files changed, 14 insertions(+), 5 deletions(-)

The PR doesn't tell me which branch to pull :-(

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] i2c: designware: Get clock rate from clock DM

2019-06-10 Thread Marek Vasut
On 6/10/19 8:07 AM, Ley Foon Tan wrote:
[...]

 [...]

> @@ -523,8 +527,20 @@ static int designware_i2c_xfer(struct udevice *bus, 
> struct i2c_msg *msg,
>  static int designware_i2c_set_bus_speed(struct udevice *bus, unsigned 
> int speed)
>  {
>   struct dw_i2c *i2c = dev_get_priv(bus);
> + ulong rate;
> +
> +#if CONFIG_IS_ENABLED(CLK)
> + rate = clk_get_rate(>clk);

 Do we need to re-read the bus frequency for each transfer ?
 I would expect set_bus_speed callback to set the frequencies once and
 then keep them that way until it's called again.
>>> Yes, we can get clock rate when request clock in _probe(). Then keep a
>>> copy for future use.
>>
>> Not in .probe() , in set_bus_speed().
> My patch is doing it in designware_i2c_set_bus_speed() already.  We
> can't get clock rate in __dw_i2c_set_bus_speed(), because this
> function doesn't have struct udevice.

include/i2c.h struct dm_i2c_ops {} :

388 /**
389  * set_bus_speed() - set the speed of a bus (optional)
390  *
391  * The bus speed value will be updated by the uclass if this
function
392  * does not return an error. This method is optional - if it
is not
393  * provided then the driver can read the speed from
394  * dev_get_uclass_priv(bus)->speed_hz
395  *
396  * @bus:Bus to adjust
397  * @speed:  Requested speed in Hz
398  * @return 0 if OK, -EINVAL for invalid values
399  */
400 int (*set_bus_speed)(struct udevice *bus, unsigned int speed);

There's struct udevice right there ^

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [RFC 4/4] colibri_vf: enable DM_VIDEO

2019-06-10 Thread Igor Opaniuk
From: Igor Opaniuk 

Enable DM_VIDEO for Colibri VF.

Signed-off-by: Igor Opaniuk 
---
 configs/colibri_vf_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig
index 3a267bdbc6..445176aa64 100644
--- a/configs/colibri_vf_defconfig
+++ b/configs/colibri_vf_defconfig
@@ -88,7 +88,7 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_VIDEO_FSL_DCU_FB=y
-CONFIG_VIDEO=y
+CONFIG_DM_VIDEO=y
 CONFIG_SYS_CONSOLE_FG_COL=0x00
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_FDT_FIXUP_PARTITIONS=y
-- 
2.17.1

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


[U-Boot] [RFC 1/4] video: fsl_dcu_fb: refactor init functions

2019-06-10 Thread Igor Opaniuk
From: Igor Opaniuk 

Move dcu-related code to fsl_dcu_probe_common, keep in video_hw_init()
only legacy video stack (filling GraphicPanel struct etc.).

Add wrappers for all init functions, that will let to provide
struct fb_info as an additional param (needed for further moving it from
the global scope to driver private data struct in DM converted driver).

Signed-off-by: Igor Opaniuk 
---
 board/freescale/ls1021aqds/dcu.c |   6 +-
 board/toradex/colibri_vf/dcu.c   |   6 +-
 drivers/video/fsl_dcu_fb.c   | 107 +--
 include/fsl_dcu_fb.h |  12 +++-
 4 files changed, 77 insertions(+), 54 deletions(-)

diff --git a/board/freescale/ls1021aqds/dcu.c b/board/freescale/ls1021aqds/dcu.c
index 14855ea1d9..c4eac5e302 100644
--- a/board/freescale/ls1021aqds/dcu.c
+++ b/board/freescale/ls1021aqds/dcu.c
@@ -39,7 +39,9 @@ unsigned int dcu_set_pixel_clock(unsigned int pixclock)
return div;
 }
 
-int platform_dcu_init(unsigned int xres, unsigned int yres,
+int platform_dcu_init(struct fb_info *fbinfo,
+ unsigned int xres,
+ unsigned int yres,
  const char *port,
  struct fb_videomode *dcu_fb_videomode)
 {
@@ -85,7 +87,7 @@ int platform_dcu_init(unsigned int xres, unsigned int yres,
printf("DCU: Switching to %s monitor @ %ux%u\n", name, xres, yres);
 
pixel_format = 32;
-   fsl_dcu_init(xres, yres, pixel_format);
+   fsl_dcu_init(fbinfo, xres, yres, pixel_format);
 
return 0;
 }
diff --git a/board/toradex/colibri_vf/dcu.c b/board/toradex/colibri_vf/dcu.c
index c36e90cd22..c688ed79ff 100644
--- a/board/toradex/colibri_vf/dcu.c
+++ b/board/toradex/colibri_vf/dcu.c
@@ -26,11 +26,13 @@ unsigned int dcu_set_pixel_clock(unsigned int pixclock)
return div;
 }
 
-int platform_dcu_init(unsigned int xres, unsigned int yres,
+int platform_dcu_init(struct fb_info *fbinfo,
+ unsigned int xres,
+ unsigned int yres,
  const char *port,
  struct fb_videomode *dcu_fb_videomode)
 {
-   fsl_dcu_init(xres, yres, 32);
+   fsl_dcu_init(fbinfo, xres, yres, 32);
 
return 0;
 }
diff --git a/drivers/video/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c
index 9f6e7f83b0..f789ec597d 100644
--- a/drivers/video/fsl_dcu_fb.c
+++ b/drivers/video/fsl_dcu_fb.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright 2014 Freescale Semiconductor, Inc.
+ * Copyright 2019 Toradex AG
  *
  * FSL DCU Framebuffer driver
  */
@@ -240,20 +241,22 @@ static void reset_total_layers(void)
}
 }
 
-static int layer_ctrldesc_init(int index, u32 pixel_format)
+static int layer_ctrldesc_init(struct fb_info fbinfo,
+  int index, u32 pixel_format)
 {
struct dcu_reg *regs = (struct dcu_reg *)CONFIG_SYS_DCU_ADDR;
unsigned int bpp = BPP_24_RGB888;
 
dcu_write32(>ctrldescl[index][0],
-   DCU_CTRLDESCLN_1_HEIGHT(info.var.yres) |
-   DCU_CTRLDESCLN_1_WIDTH(info.var.xres));
+   DCU_CTRLDESCLN_1_HEIGHT(fbinfo.var.yres) |
+   DCU_CTRLDESCLN_1_WIDTH(fbinfo.var.xres));
 
dcu_write32(>ctrldescl[index][1],
DCU_CTRLDESCLN_2_POSY(0) |
DCU_CTRLDESCLN_2_POSX(0));
 
-   dcu_write32(>ctrldescl[index][2], (unsigned int)info.screen_base);
+   dcu_write32(>ctrldescl[index][2],
+   (unsigned int)fbinfo.screen_base);
 
switch (pixel_format) {
case 16:
@@ -294,42 +297,42 @@ static int layer_ctrldesc_init(int index, u32 
pixel_format)
return 0;
 }
 
-int fsl_dcu_init(unsigned int xres, unsigned int yres,
-unsigned int pixel_format)
+int fsl_dcu_init(struct fb_info *fbinfo, unsigned int xres,
+unsigned int yres, unsigned int pixel_format)
 {
struct dcu_reg *regs = (struct dcu_reg *)CONFIG_SYS_DCU_ADDR;
unsigned int div, mode;
 
-   info.screen_size =
-   info.var.xres * info.var.yres * (info.var.bits_per_pixel / 8);
+   fbinfo->screen_size = fbinfo->var.xres * fbinfo->var.yres *
+(fbinfo->var.bits_per_pixel / 8);
 
-   if (info.screen_size > CONFIG_VIDEO_FSL_DCU_MAX_FB_SIZE_MB) {
-   info.screen_size = 0;
+   if (fbinfo->screen_size > CONFIG_VIDEO_FSL_DCU_MAX_FB_SIZE_MB) {
+   fbinfo->screen_size = 0;
return -ENOMEM;
}
 
/* Reserve framebuffer at the end of memory */
gd->fb_base = gd->bd->bi_dram[0].start +
-   gd->bd->bi_dram[0].size - info.screen_size;
-   info.screen_base = (char *)gd->fb_base;
+   gd->bd->bi_dram[0].size - fbinfo->screen_size;
+   fbinfo->screen_base = (char *)gd->fb_base;
 
-   memset(info.screen_base, 0, info.screen_size);
+   memset(fbinfo->screen_base, 0, 

[U-Boot] [RFC 2/4] video: fsl_dcu_fb: add DM_VIDEO support

2019-06-10 Thread Igor Opaniuk
From: Igor Opaniuk 

Extend the driver to build with DM_VIDEO enabled. DTS files
must additionally include 'u-boot,dm-pre-reloc' property in
soc and child nodes to enable driver binding to fsl_dcu_fb device.

Currently display timings aren't obtained from DT.

Signed-off-by: Igor Opaniuk 
---
 board/toradex/colibri_vf/colibri_vf.c |   4 +-
 drivers/video/Kconfig |   2 +-
 drivers/video/fsl_dcu_fb.c| 112 +-
 3 files changed, 97 insertions(+), 21 deletions(-)

diff --git a/board/toradex/colibri_vf/colibri_vf.c 
b/board/toradex/colibri_vf/colibri_vf.c
index 9d63fbf3bd..dad754b31f 100644
--- a/board/toradex/colibri_vf/colibri_vf.c
+++ b/board/toradex/colibri_vf/colibri_vf.c
@@ -430,7 +430,9 @@ int checkboard(void)
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, bd_t *bd)
 {
+#ifndef CONFIG_DM_VIDEO
int ret = 0;
+#endif
 #ifdef CONFIG_FDT_FIXUP_PARTITIONS
static const struct node_info nodes[] = {
{ "fsl,vf610-nfc", MTD_DEV_TYPE_NAND, }, /* NAND flash */
@@ -440,7 +442,7 @@ int ft_board_setup(void *blob, bd_t *bd)
puts("   Updating MTD partitions...\n");
fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
 #endif
-#ifdef CONFIG_VIDEO_FSL_DCU_FB
+#if defined(CONFIG_VIDEO_FSL_DCU_FB) && !defined(CONFIG_DM_VIDEO)
ret = fsl_dcu_fixedfb_setup(blob);
if (ret)
return ret;
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index c3781b160d..261fa98517 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -484,7 +484,7 @@ config VIDEO_IVYBRIDGE_IGD
 
 config VIDEO_FSL_DCU_FB
bool "Enable Freescale Display Control Unit"
-   depends on VIDEO
+   depends on VIDEO || DM_VIDEO
help
 This enables support for Freescale Display Control Unit (DCU4)
 module found on Freescale Vybrid and QorIQ family of SoCs.
diff --git a/drivers/video/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c
index f789ec597d..add64b85b5 100644
--- a/drivers/video/fsl_dcu_fb.c
+++ b/drivers/video/fsl_dcu_fb.c
@@ -8,10 +8,12 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include "videomodes.h"
 
@@ -219,8 +221,6 @@ struct dcu_reg {
u32 ctrldescl[DCU_LAYER_MAX_NUM][16];
 };
 
-static struct fb_info info;
-
 static void reset_total_layers(void)
 {
struct dcu_reg *regs = (struct dcu_reg *)CONFIG_SYS_DCU_ADDR;
@@ -302,7 +302,11 @@ int fsl_dcu_init(struct fb_info *fbinfo, unsigned int xres,
 {
struct dcu_reg *regs = (struct dcu_reg *)CONFIG_SYS_DCU_ADDR;
unsigned int div, mode;
-
+/*
+ * When DM_VIDEO is enabled reservation of framebuffer is done
+ * in advance during bind() call.
+ */
+#if !CONFIG_IS_ENABLED(DM_VIDEO)
fbinfo->screen_size = fbinfo->var.xres * fbinfo->var.yres *
 (fbinfo->var.bits_per_pixel / 8);
 
@@ -310,13 +314,13 @@ int fsl_dcu_init(struct fb_info *fbinfo, unsigned int 
xres,
fbinfo->screen_size = 0;
return -ENOMEM;
}
-
/* Reserve framebuffer at the end of memory */
gd->fb_base = gd->bd->bi_dram[0].start +
gd->bd->bi_dram[0].size - fbinfo->screen_size;
fbinfo->screen_base = (char *)gd->fb_base;
 
memset(fbinfo->screen_base, 0, fbinfo->screen_size);
+#endif
 
reset_total_layers();
 
@@ -429,6 +433,32 @@ int fsl_probe_common(struct fb_info *fbinfo, unsigned int 
*win_x,
 options + 8, fsl_dcu_mode_db);
 }
 
+#ifndef CONFIG_DM_VIDEO
+static struct fb_info info;
+
+#if defined(CONFIG_OF_BOARD_SETUP)
+int fsl_dcu_fixedfb_setup(void *blob)
+{
+   u64 start, size;
+   int ret;
+
+   start = gd->bd->bi_dram[0].start;
+   size = gd->bd->bi_dram[0].size - info.screen_size;
+
+   /*
+* Align size on section size (1 MiB).
+*/
+   size &= 0xfff0;
+   ret = fdt_fixup_memory_banks(blob, , , 1);
+   if (ret) {
+   eprintf("Cannot setup fb: Error reserving memory\n");
+   return ret;
+   }
+
+   return 0;
+}
+#endif
+
 void *video_hw_init(void)
 {
static GraphicDevice ctfb;
@@ -448,25 +478,69 @@ void *video_hw_init(void)
return 
 }
 
-#if defined(CONFIG_OF_BOARD_SETUP)
-int fsl_dcu_fixedfb_setup(void *blob)
+#else /* ifndef CONFIG_DM_VIDEO */
+
+static int fsl_dcu_video_probe(struct udevice *dev)
 {
-   u64 start, size;
-   int ret;
+   struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
+   struct video_priv *uc_priv = dev_get_uclass_priv(dev);
+   struct fb_info fbinfo = { 0 };
+   unsigned int win_x;
+   unsigned int win_y;
+   u32 fb_start, fb_end;
+   int ret = 0;
+
+   fb_start = plat->base & ~(MMU_SECTION_SIZE - 1);
+   fb_end = plat->base + plat->size;
+   fb_end = ALIGN(fb_end, 1 << MMU_SECTION_SHIFT);
+
+   

[U-Boot] [RFC 3/4] ARM: dts: colibri_vf: Add dcu0 node

2019-06-10 Thread Igor Opaniuk
From: Igor Opaniuk 

Add dumb node for NXP Display Control Unit0(DCU), which permits DM_ENABLED
converted driver to be probed. Currently no display timings are provided
in this node.

Signed-off-by: Igor Opaniuk 
---
 arch/arm/dts/vf-colibri-u-boot.dtsi | 4 
 arch/arm/dts/vf-colibri.dtsi| 5 +
 arch/arm/dts/vf.dtsi| 6 ++
 3 files changed, 15 insertions(+)

diff --git a/arch/arm/dts/vf-colibri-u-boot.dtsi 
b/arch/arm/dts/vf-colibri-u-boot.dtsi
index db86739805..2294ee9551 100644
--- a/arch/arm/dts/vf-colibri-u-boot.dtsi
+++ b/arch/arm/dts/vf-colibri-u-boot.dtsi
@@ -21,3 +21,7 @@
  {
u-boot,dm-pre-reloc;
 };
+
+ {
+   u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/vf-colibri.dtsi b/arch/arm/dts/vf-colibri.dtsi
index 91ca4e4ddd..9de4b28e87 100644
--- a/arch/arm/dts/vf-colibri.dtsi
+++ b/arch/arm/dts/vf-colibri.dtsi
@@ -14,6 +14,7 @@
 
aliases {
usb0 =  /* required for ums */
+   display1 = 
};
 
reg_usbh_vbus: regulator-usbh-vbus {
@@ -241,3 +242,7 @@
pinctrl-0 = <_uart0>;
status = "okay";
 };
+
+ {
+   status = "okay";
+};
diff --git a/arch/arm/dts/vf.dtsi b/arch/arm/dts/vf.dtsi
index 5e3b2c5b9d..5f69d0fd6e 100644
--- a/arch/arm/dts/vf.dtsi
+++ b/arch/arm/dts/vf.dtsi
@@ -145,6 +145,12 @@
#gpio-cells = <2>;
};
 
+   dcu0: dcu@40058000 {
+   compatible = "fsl,vf610-dcu";
+   reg = <0x40058000 0x1200>;
+   status = "disabled";
+   };
+
ehci0: ehci@40034000 {
compatible = "fsl,vf610-usb";
reg = <0x40034000 0x800>;
-- 
2.17.1

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


[U-Boot] [RFC 0/4] Convert fsl_dcu_fb to DM_VIDEO

2019-06-10 Thread Igor Opaniuk
From: Igor Opaniuk 

This series of patches refactors and extends NXP DCU video driver to
be built with DM_VIDEO enabled. DTS files must additionally include
'u-boot,dm-pre-reloc' property in soc and child nodes to enable driver
binding to fsl_dcu_fb device.

Current limitations: configuration (display timings etc.) isn't fetched
from the DT node. I plan to add this in the next series.

Also enables DM_VIDEO by default for Colibri VF.


Igor Opaniuk (4):
  video: fsl_dcu_fb: refactor init functions
  video: fsl_dcu_fb: add DM_VIDEO support
  ARM: dts: colibri_vf: Add dcu0 node
  colibri_vf: enable DM_VIDEO

 arch/arm/dts/vf-colibri-u-boot.dtsi   |   4 +
 arch/arm/dts/vf-colibri.dtsi  |   5 +
 arch/arm/dts/vf.dtsi  |   6 +
 board/freescale/ls1021aqds/dcu.c  |   6 +-
 board/toradex/colibri_vf/colibri_vf.c |   4 +-
 board/toradex/colibri_vf/dcu.c|   6 +-
 configs/colibri_vf_defconfig  |   2 +-
 drivers/video/Kconfig |   2 +-
 drivers/video/fsl_dcu_fb.c| 213 ++
 include/fsl_dcu_fb.h  |  12 +-
 10 files changed, 187 insertions(+), 73 deletions(-)

-- 
2.17.1

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


Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot partitions

2019-06-10 Thread Marek Vasut
On 6/10/19 7:59 AM, Peng Fan wrote:
>> Subject: Re: [U-Boot] [PATCH] mmc: Avoid HS400 mode when accessing boot
>> partitions
>>
>> Hi Marek, Peng,
>>
>> On 03/06/19 12:04 PM, Peng Fan wrote:
>>>
 Subject: [PATCH] mmc: Avoid HS400 mode when accessing boot partitions

 According to JEDEC JESD84-B51.pdf section 6.3.3 Boot operation ,
 HS200 & HS400 mode is not supported during boot operation. The U-Boot
 code currently only applies this restriction to HS200 mode, extend
 this to
 HS400 mode as well.
>> The spec in section 6.3.3 (according to my understanding) is talking about
>> "boot operation" which is a way of getting data from the the eMMC without
>> going through the Device identification mode (Section 6.4.4) i.e. without
>> sending any commands. All the host has to do is hold the command line low in
>> Pre-Idle mode to automatically receive data at the preconfigured frequency
>> and bus width.
>>
>> When U-boot is accessing the partition, it has already gone through the
>> Device identification mode and is in data transfer mode (i.e. it needs to 
>> send
>> commands for read/write to happen). In this case, we need to switch the
>> partition in Extended CSD to access the boot partition (Section 6.2.5). The
>> spec doesn't say anything about HS200 and HS400 not being supported here.
> 
> Yes, the spec does not mention this. It only mentions HS200/400 not supported
> during boot operation.
> 
>>
>> Also, I don't see linux kernel switching down speed when trying to access a
>> boot partition (unless its being very sneaky about it). So if you are seeing
>> issues with accessing boot partitions at HS200/HS400 then you should
>> probably look at how linux code is working instead.
> 
> There might be bug in U-Boot code.

So are we gonna leave this inconsistency in for current release or
what's it gonna be ? Like I said, we're in rc3, it's fine to do bigger
changes in next release, but we should at least fix this in current release.

I would also like to hear from Jean why he originally introduced this
for HS200 mode.

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] Pull request: u-boot-staging

2019-06-10 Thread Anatolij Gustschin
Hi Tom,

please pull FEC driver fix for v2019.07.

Travis CI: https://travis-ci.org/vdsao/u-boot-video/builds/542223249

Thanks,
Anatolij

The following changes since commit 38c2a8a00132b4dcc6a0bb5baf5146b9eb9eb2d2:

  Merge tag 'efi-2019-07-rc4' of git://git.denx.de/u-boot-efi (2019-06-02 
18:19:45 -0400)

are available in the Git repository at:

  git://git.denx.de/u-boot-staging.git tags/fixes-for-2019.07

for you to fetch changes up to 023e2f900020991aedb3d57a257d46963b76221b:

  net: fec_mxc: not access reserved register on i.MX8 (2019-06-04 16:57:35 
+0200)


- fix FEC exception/SERROR on i.MX8X


Peng Fan (1):
  net: fec_mxc: not access reserved register on i.MX8

 drivers/net/fec_mxc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] net: fec_mxc: not access reserved register on i.MX8

2019-06-10 Thread Anatolij Gustschin
On Mon, 15 Apr 2019 05:18:33 +
Peng Fan peng@nxp.com wrote:

> We should not access reserved register on i.MX8, otherwise met SERROR
> 
> Signed-off-by: Peng Fan 
> ---
>  drivers/net/fec_mxc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-staging/ag...@denx.de, thanks!

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


Re: [U-Boot] [PATCH v1 07/11] DTS: Add imx6q-display5-u-boot.dtsi file with u-boot specific properties

2019-06-10 Thread Adam Ford
On Sun, Jun 9, 2019 at 3:55 PM Lukasz Majewski  wrote:
>
> This file setups UART5 based serial to be used as pre-relocation
> console in the U-Boot proper.
>
> On purpose pinux configuration is omitted here as it has been already
> done in SPL. For early pre-relocation code we only need the serial
> device from DTS.
>
> Signed-off-by: Lukasz Majewski 
> ---
>
>  arch/arm/dts/imx6q-display5-u-boot.dtsi | 44 
> +
>  1 file changed, 44 insertions(+)
>  create mode 100644 arch/arm/dts/imx6q-display5-u-boot.dtsi
>
> diff --git a/arch/arm/dts/imx6q-display5-u-boot.dtsi 
> b/arch/arm/dts/imx6q-display5-u-boot.dtsi
> new file mode 100644
> index 00..b942218b7a
> --- /dev/null
> +++ b/arch/arm/dts/imx6q-display5-u-boot.dtsi
> @@ -0,0 +1,44 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright 2019
> + * Lukasz Majewski, DENX Software Engineering, lu...@denx.de
> + *
> + * SPDX-License-Identifier: GPL-2.0+ or X11
> + */
> +
> +/*
> + * The minimal augmentation DTS U-Boot file to allow UART5
> + * configuration in the pre-relocation stage of U-Boot
> + * proper.
> + *
> + * As the same UART is already configured in SPL, we don't need
> + * setup pinmux for it again.
> + */
> +
> +/ {
> +   aliases {
> +   mmc0 = 
> +   };
> +
> +   soc {
> +   u-boot,dm-pre-reloc;
> +
> +   aips-bus@210 {
> +   u-boot,dm-pre-reloc;
> +   };
> +   };

You could consider including  arch/arm/dts/imx6qdl-u-boot.dtsi.  This
would have the soc node, aips-bus node, and the iomuxc and then you
could just add the uart, stdio-patch and aliases.  It's just a
suggestion.


adam
> +
> +   chosen {
> +   stdout-path = 
> +   };
> +};
> +
> + {
> +   at24@50 {
> +   u-boot,i2c-offset-len = <2>;
> +   };
> +};
> +
> + {
> +   u-boot,dm-pre-reloc;
> +};
> --
> 2.11.0
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 1/3] armv8: ls2088aqds: Add bootcmd for TFA boot

2019-06-10 Thread Wasim Khan
Add bootcmd for IFC NOR boot and SD boot.

Signed-off-by: Wasim Khan 
---
Changes in v2:
- Corrected Copyright info

 include/configs/ls2080aqds.h | 45 ++--
 1 file changed, 39 insertions(+), 6 deletions(-)

diff --git a/include/configs/ls2080aqds.h b/include/configs/ls2080aqds.h
index 74c7dc4..11c6ffd 100644
--- a/include/configs/ls2080aqds.h
+++ b/include/configs/ls2080aqds.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright 2017 NXP
+ * Copyright 2017, 2019 NXP
  * Copyright 2015 Freescale Semiconductor
  */
 
@@ -378,8 +378,8 @@ unsigned long get_board_ddr_clk(void);
"hwconfig=fsl_ddr:bank_intlv=auto\0"\
"loadaddr=0x8010\0" \
"loadaddr_sd=0x9010\0" \
-   "kernel_addr=0x10\0"\
-   "kernel_addr_sd=0x800\0"\
+   "kernel_addr=0x58100\0"   \
+   "kernel_addr_sd=0x8000\0"\
"ramdisk_addr=0x80\0"   \
"ramdisk_size=0x200\0"  \
"fdt_high=0xa000\0" \
@@ -389,9 +389,23 @@ unsigned long get_board_ddr_clk(void);
"kernel_load=0xa000\0"  \
"kernel_size=0x280\0"   \
"kernel_size_sd=0x14000\0"   \
-   "mcinitcmd=fsl_mc start mc 0x580a0" \
-   " 0x580e0 \0"   \
-   "mcmemsize=0x7000 \0"
+   "load_addr=0xa000\0"\
+   "kernelheader_addr=0x58080\0"   \
+   "kernelheader_addr_r=0x8020\0"  \
+   "kernelheader_size=0x4\0"   \
+   "BOARD=ls2088aqds\0" \
+   "mcmemsize=0x7000 \0" \
+   IFC_MC_INIT_CMD \
+   "nor_bootcmd=echo Trying load from nor..;"  \
+   "cp.b $kernel_addr $load_addr " \
+   "$kernel_size ; env exists secureboot && "  \
+   "cp.b $kernelheader_addr $kernelheader_addr_r " \
+   "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; "\
+   "bootm $load_addr#$BOARD\0" \
+   "sd_bootcmd=echo Trying load from SD ..;" \
+   "mmcinfo; mmc read $load_addr " \
+   "$kernel_addr_sd $kernel_size_sd && "   \
+   "bootm $load_addr#$BOARD\0"
 #elif defined(CONFIG_SD_BOOT)
 #define CONFIG_EXTRA_ENV_SETTINGS  \
"hwconfig=fsl_ddr:bank_intlv=auto\0"\
@@ -426,6 +440,25 @@ unsigned long get_board_ddr_clk(void);
 #endif /* CONFIG_TFABOOT */
 #endif /* CONFIG_SECURE_BOOT */
 
+#ifdef CONFIG_TFABOOT
+#define SD_BOOTCOMMAND \
+   "env exists mcinitcmd && env exists secureboot "\
+   "&& mmcinfo && mmc read $load_addr 0x3c00 0x800 " \
+   "&& esbc_validate $load_addr; " \
+   "env exists mcinitcmd && run mcinitcmd "\
+   "&& mmc read 0x8800 0x6800 0x800 "  \
+   "&& fsl_mc lazyapply dpl 0x8800; "  \
+   "run sd_bootcmd; "  \
+   "env exists secureboot && esbc_halt;"
+
+#define IFC_NOR_BOOTCOMMAND\
+   "env exists mcinitcmd && env exists secureboot "\
+   "&& esbc_validate 0x58078; env exists mcinitcmd "\
+   "&& fsl_mc lazyapply dpl 0x580d0;"  \
+   "run nor_bootcmd; " \
+   "env exists secureboot && esbc_halt;"
+#endif
+
 #if defined(CONFIG_FSL_MC_ENET) && !defined(CONFIG_SPL_BUILD)
 #define CONFIG_FSL_MEMAC
 #define CONFIG_PHYLIB_10G
-- 
2.7.4

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


Re: [U-Boot] [PATCH 2/3] pico-imx6ul: MAINTAINERS: Unify all board entries

2019-06-10 Thread Stefano Babic


On 10/06/19 11:49, sba...@denx.de wrote:
>> It is easier to consolidate all boards into a single entry.
>> Signed-off-by: Fabio Estevam 
> 
> Applied to u-boot-imx, master, thanks !
> 

As note: I have added  configs/pico-imx7d_bl33_defconfig to fix Travis.

Regards,
Stefano


-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v4 02/13] dm: Fix documentation entry as there is

2019-06-10 Thread sbabic
> There is no UCLASS_CLOCK uclass defined. Instead we do use the UCLASS_CLK.
> Signed-off-by: Lukasz Majewski 
> Reviewed-by: Simon Glass 
> Reviewed-by: Peng Fan 

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

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


[U-Boot] [PATCH v2 2/3] armv8: ls2088aqds: Fix MC firmware loading during SD boot

2019-06-10 Thread Wasim Khan
During SD boot, MC firmware and DPC are copied from SD card to DDR.
Size reserved between MC and DPC firmware on DDR is 1MB.
If the size of MC firmware(load address 0x8000) is more than 1 MB
then part of MC firmware will be overwritten by DPC firmware (load
address 0x8010).

Fix: Update the MC/DPL/DPC firmware's DDR address as per their
respective addresses in SD card.

Signed-off-by: Wasim Khan 
---
Changes in v2:
- No Change.

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

diff --git a/include/configs/ls2080aqds.h b/include/configs/ls2080aqds.h
index 11c6ffd..18f30b5 100644
--- a/include/configs/ls2080aqds.h
+++ b/include/configs/ls2080aqds.h
@@ -368,9 +368,9 @@ unsigned long get_board_ddr_clk(void);
 #else
 #ifdef CONFIG_TFABOOT
 #define SD_MC_INIT_CMD \
-   "mmcinfo;mmc read 0x8000 0x5000 0x800;"  \
-   "mmc read 0x8010 0x7000 0x800;" \
-   "fsl_mc start mc 0x8000 0x8010\0"
+   "mmcinfo;mmc read 0x80a0 0x5000 0x1200;"  \
+   "mmc read 0x80e0 0x7000 0x800;" \
+   "fsl_mc start mc 0x80a0 0x80e0\0"
 #define IFC_MC_INIT_CMD\
"fsl_mc start mc 0x580a0" \
" 0x580e0 \0"
@@ -446,8 +446,8 @@ unsigned long get_board_ddr_clk(void);
"&& mmcinfo && mmc read $load_addr 0x3c00 0x800 " \
"&& esbc_validate $load_addr; " \
"env exists mcinitcmd && run mcinitcmd "\
-   "&& mmc read 0x8800 0x6800 0x800 "  \
-   "&& fsl_mc lazyapply dpl 0x8800; "  \
+   "&& mmc read 0x80d0 0x6800 0x800 "  \
+   "&& fsl_mc lazyapply dpl 0x80d0; "  \
"run sd_bootcmd; "  \
"env exists secureboot && esbc_halt;"
 
-- 
2.7.4

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


[U-Boot] [PATCH V2 1/7] ARM: dts: imx: novena: Import Novena DT

2019-06-10 Thread sbabic
> Import iMX6Q Novena device tree from Linux 5.1-rc7 37624b58542f .
> Enable DT control in full U-Boot .
> Signed-off-by: Marek Vasut 
> Cc: Fabio Estevam 
> Cc: Stefano Babic 
> Cc: Vagrant Cascadian 

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

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


[U-Boot] [PATCH v2 3/3] armv8: ls2088ardb: Fix MC firmware loading during SD boot

2019-06-10 Thread Wasim Khan
During SD boot, MC firmware and DPC are copied from SD card to DDR.
Size reserved between MC and DPC firmware on DDR is 1MB.
If the size of MC firmware(load address 0x8000) is more than 1 MB
then part of MC firmware will be overwritten by DPC firmware (load
address 0x8010).

Fix: Update the MC/DPL/DPC firmware's DDR address as per their
respective addresses in SD card.

Signed-off-by: Wasim Khan 
---
Changes in v2:
- Corrected Copyright info

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

diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index 2e8a8bb..bfb54be 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright 2017 NXP
+ * Copyright 2017, 2019 NXP
  * Copyright 2015 Freescale Semiconductor
  */
 
@@ -342,14 +342,14 @@ unsigned long get_board_sys_clk(void);
"esbc_validate 0x2074;" \
"fsl_mc start mc 0x20a0 0x20e0 \0"
 #define SD_MC_INIT_CMD \
-   "mmcinfo;mmc read 0x8000 0x5000 0x800;" \
-   "mmc read 0x8010 0x7000 0x800;" \
+   "mmcinfo;mmc read 0x80a0 0x5000 0x1200;" \
+   "mmc read 0x80e0 0x7000 0x800;" \
"env exists secureboot && " \
"mmc read 0x8070 0x3800 0x10 && "   \
"mmc read 0x8074 0x3A00 0x10 && "   \
"esbc_validate 0x8070 && "  \
"esbc_validate 0x8074 ;"\
-   "fsl_mc start mc 0x8000 0x8010\0"
+   "fsl_mc start mc 0x80a0 0x80e0\0"
 #define IFC_MC_INIT_CMD\
"env exists secureboot && " \
"esbc_validate 0x58070 && " \
@@ -528,8 +528,8 @@ unsigned long get_board_sys_clk(void);
"&& mmcinfo && mmc read $load_addr 0x3c00 0x800 " \
"&& esbc_validate $load_addr; " \
"env exists mcinitcmd && run mcinitcmd "\
-   "&& mmc read 0x8800 0x6800 0x800 "  \
-   "&& fsl_mc lazyapply dpl 0x8800; "  \
+   "&& mmc read 0x80d0 0x6800 0x800 "  \
+   "&& fsl_mc lazyapply dpl 0x80d0; "  \
"run distro_bootcmd;run sd_bootcmd; "   \
"env exists secureboot && esbc_halt;"
 
-- 
2.7.4

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


[U-Boot] Please pull u-boot-video

2019-06-10 Thread Anatolij Gustschin
Hi Tom,

please pull video fixes and mxsfb DM_VIDEO conversion for v2019.07.

Travis CI: https://travis-ci.org/vdsao/u-boot-video/builds/541462360

Thanks,
Anatolij

The following changes since commit 38c2a8a00132b4dcc6a0bb5baf5146b9eb9eb2d2:

  Merge tag 'efi-2019-07-rc4' of git://git.denx.de/u-boot-efi (2019-06-02 
18:19:45 -0400)

are available in the Git repository at:

  git://git.denx.de/u-boot-video.git tags/video-updates-for-2019.07-rc3

for you to fetch changes up to f944b15966d410fd81f6051a836f86d5263f617e:

  video: meson: hdmi-supply regulator should be optional (2019-06-05 10:51:46 
+0200)


- mxsfb DM_VIDEO conversion
- splash fix for DM_VIDEO configurations
- meson HDMI fix for boards without hdmi-supply regulator


Igor Opaniuk (8):
  splash: display splash in DM_VIDEO configurations
  colibri imx6/t20: enable CONFIG_SYS_WHITE_ON_BLACK
  video: mxsfb: change mxs_lcd_init signature
  video: mxsfb: reorder includes
  video: mxsfb: refactor video_hw_init()
  video: mxsfb: add DM_VIDEO support
  ARM: dts: colibri_imx7: Add lcdif node
  colibri_imx7_emmc: enable DM_VIDEO

Maxime Jourdan (1):
  video: meson: hdmi-supply regulator should be optional

 arch/arm/dts/imx7-colibri-emmc.dts  |   2 +
 arch/arm/dts/imx7-colibri.dtsi  |  28 +
 arch/arm/mach-imx/cpu.c |   2 +-
 arch/arm/mach-imx/mx7/soc.c |   2 +-
 common/lcd.c|  13 +--
 common/splash.c |  16 ++-
 common/stdio.c  |   4 +
 configs/colibri_imx6_defconfig  |   1 +
 configs/colibri_imx7_emmc_defconfig |   2 +-
 configs/colibri_t20_defconfig   |   1 +
 drivers/video/meson/meson_dw_hdmi.c |  14 ++-
 drivers/video/mxsfb.c   | 219 +---
 include/configs/colibri_imx7.h  |   2 +-
 include/splash.h|   6 +-
 14 files changed, 250 insertions(+), 62 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 3/3] pico-imx6ul: MAINTAINERS: Add pico-dwarf entry

2019-06-10 Thread sbabic
> pico-dwarf-imx6ul_defconfig does not have an entry in MAINTAINERS file,
> so add it to avoid a build warning.
> Reported-by: Stefano Babic 
> Signed-off-by: Fabio Estevam 

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

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


[U-Boot] [PATCH v1 2/2] config: Update KP's imx53 HSC config to

2019-06-10 Thread sbabic
> The information about pressed key is relevant in performing correct
> update and recovery scenarios via USB pendrive.
> This commit modifies envs to provide it.
> Signed-off-by: Lukasz Majewski 

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

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


[U-Boot] [PATCH v2] apalis_imx6: add device tree to makefile

2019-06-10 Thread sbabic
> From: Marcel Ziswiler 
> Add device tree to Makefile to avoid newly introduced error:
> Device Tree Source is not correctly specified.
> Please define 'CONFIG_DEFAULT_DEVICE_TREE'
> or build with 'DEVICE_TREE=' argument
> make[1]: *** [dts/Makefile:28: arch/arm/dts/imx6-apalis.dtb] Error 1
> make: *** [Makefile:1009: dts/dt.dtb] Error 2
> Signed-off-by: Marcel Ziswiler 
> Reviewed-by: Igor Opaniuk 

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

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


[U-Boot] [PATCH v4 11/13] clk: test: Provide unit test for

2019-06-10 Thread sbabic
> This commit provides sandbox unit test for clk_get_parent_rate() method.
> For testing the default test clocks setup had to be adjusted to emulate
> structure similar to clocks in the Common Clock Framework [CCF]
> (for iMX devices).
> The clk_get_parent_rate() relies on dev->driver_data having the pointer
> to proper struct clk.
> It uses internally clk_get_parent() method also tested by this test.
> Signed-off-by: Lukasz Majewski 

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

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


[U-Boot] [PATCH 2/3] pico-imx6ul: MAINTAINERS: Unify all board entries

2019-06-10 Thread sbabic
> It is easier to consolidate all boards into a single entry.
> Signed-off-by: Fabio Estevam 

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

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


  1   2   3   >