Re: [PATCH v2] Revert "mmc: fsl_esdhc_imx: use VENDORSPEC_FRC_SDCLK_ON to control card clock output"

2021-06-21 Thread Pierre-Jean Texier

Hi Fabio,

Le 07/06/2021 à 22:40, Fabio Estevam a écrit :

This reverts commit 63756575b42b8b4fb3f59cbbf0cedf03331bc2d2.

Since this commit a imx6qdl-pico board boots extremely slowly
in both SPL as well as U-Boot proper.

Fix this regression by reverting the offending commit for now.

Signed-off-by: Fabio Estevam 


This commit fixes the issue with the imx7s-warp.

Tested-by: Pierre-Jean Texier 

Thanks,
--
Piere-Jean Texier


Re: [PATCH 2/2] usb: ehci-mx6: Do not fail when 'reg' is not found

2021-06-21 Thread Pierre-Jean Texier

Fabio,

Le 20/06/2021 à 18:28, Fabio Estevam a écrit :

Hi Pierre-Jean,

On 20/06/2021 13:01, Pierre-Jean Texier wrote:


Thanks for the fix.

Successfully tested on two boards:
 - imx7s-warp,
 - imx7d-pico-pi

Tested-by: Pierre-Jean Texier 


Thanks for testing.

As you tested on the imx7s-warp board, you probably
noticed a 'slowdown' related to the MMC.


Yes indeed, I noticed this issue.



I have sent a revert to restore the original MMC behavior:
https://lore.kernel.org/u-boot/am0pr04mb5283657fefd76e04a8ba3f7b90...@am0pr04mb5283.eurprd04.prod.outlook.com/T/#t 



If this patch helps on your test, could you please send
a Tested-by tag for this one too?


Sure, will do ;)

Thanks,
--
Pierre-Jean Texier


Re: [PATCH 2/2] usb: ehci-mx6: Do not fail when 'reg' is not found

2021-06-21 Thread Pierre-Jean Texier

Hi Fabio,

Le 20/06/2021 à 17:00, Fabio Estevam a écrit :

Unlike imx6, on imx7 the USB PHY is described as:

usbphynop1: usbphynop1 {
compatible = "usb-nop-xceiv";
clocks = < IMX7D_USB_PHY1_CLK>;
clock-names = "main_clk";
#phy-cells = <0>;
};

which does not have the 'reg' property.

Do not return an error when the 'reg' property is not found
for the USB PHY.

This fixes USB gadget regression on a imx7s-warp board.

Successfully tested the "ums 0 mmc 0" command on two boards:
imx7s-warp and imx6dl-pico-pi.

Signed-off-by: Fabio Estevam 


Thanks for the fix.

Successfully tested on two boards:
 - imx7s-warp,
 - imx7d-pico-pi

Tested-by: Pierre-Jean Texier 


---
  drivers/usb/host/ehci-mx6.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 48b5c8b0c53c..c3e4170513ec 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -583,7 +583,7 @@ static int mx6_parse_dt_addrs(struct udevice *dev)
  
  	addr = (void __iomem *)fdtdec_get_addr(blob, phy_off, "reg");

if ((fdt_addr_t)addr == FDT_ADDR_T_NONE)
-   return -EINVAL;
+   addr = NULL;
  
  	priv->phy_addr = addr;
  



Regards,
--
Pierre-Jean Texier


Re: [U-Boot] [PATCH 2/2] warp7: Remove duplicate "mmc dev" command

2019-10-23 Thread Pierre-Jean Texier

Hi Fabio,

Le 23/10/2019 à 16:20, Fabio Estevam a écrit :

The "mmc dev" command is being called twice.

Remove the extra call.

Signed-off-by: Fabio Estevam 
---
  include/configs/warp7.h | 1 -
  1 file changed, 1 deletion(-)

diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 9c6ee6997f..f1fc6c714f 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -94,7 +94,6 @@
"fi;\0" \
  
  #define CONFIG_BOOTCOMMAND \

-  "mmc dev ${mmcdev};" \
   "mmc dev ${mmcdev}; if mmc rescan; then " \
   "run do_bootscript_hab;" \
   "if run loadbootscript; then " \



Reviewed-by: Pierre-Jean Texier 
Tested-by: Pierre-Jean Texier 

Thanks !

--
Pierre-Jean Texier
Embedded Linux Engineer
https://koncepto.io
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] warp7: Remove CONFIG_SYS_FSL_ESDHC_ADDR

2019-10-23 Thread Pierre-Jean Texier

Hi Fabio,

Le 23/10/2019 à 16:20, Fabio Estevam a écrit :

warp7 uses the driver model and it retrieves the ESDHC
base address from device tree.

Remove the unneeded CONFIG_SYS_FSL_ESDHC_ADDR definition.

Signed-off-by: Fabio Estevam 
---
  include/configs/warp7.h | 1 -
  1 file changed, 1 deletion(-)

diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 73541fe176..9c6ee6997f 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -17,7 +17,6 @@
  #define CONFIG_SYS_MALLOC_LEN (35 * SZ_1M)
  
  /* MMC Config*/

-#define CONFIG_SYS_FSL_ESDHC_ADDR   USDHC3_BASE_ADDR
  #define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
  #define CONFIG_SYS_MMC_IMG_LOAD_PART  1
  



Reviewed-by: Pierre-Jean Texier 
Tested-by: Pierre-Jean Texier 

Thanks !

--
Pierre-Jean Texier
Embedded Linux Engineer
https://koncepto.io
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] warp7: Fix U-Boot corruption after saving the environment

2019-10-21 Thread Pierre-Jean Texier

Fabio,

Le 21/10/2019 à 18:50, Fabio Estevam a écrit :

Hi Pierre-Jean,

On Mon, Oct 21, 2019 at 1:43 PM Pierre-Jean Texier  wrote:


On top-of master 32ded50 ("spl: mmc: make eMMC HW boot
partition configuration optional ")
I am not able to reproduce the described behavior.


I used u-boot-imx tree and this is what I get:

ls -al u-boot-dtb.imx
-rw-r--r-- 1 fabio fabio 547840 out 21 13:45 u-boot-dtb.imx


Same for me, but I can't reproduce this issue :/



Original CONFIG_ENV_OFFSET is:
#define CONFIG_ENV_OFFSET (8 * SZ_64K)

CONFIG_ENV_OFFSET = 8 * 64 * 1024 = 524288

So the u-boot-dtb.imx is overlapping the env region.


Indeed.



Maybe your compiler is producing a smaller binary and you are not
getting the issue.

Anyway, it is safer to increase CONFIG_ENV_OFFSET and use
CONFIG_BOARD_SIZE_LIMIT to detect such problem in build-time.



You're right, I agree with that ;)

So,

Acked-by: Pierre-Jean Texier 
Tested-by: Pierre-Jean Texier 

Thanks !

Regards

--
Pierre-Jean Texier
Embedded Linux Engineer
https://koncepto.io
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] warp7: Fix U-Boot corruption after saving the environment

2019-10-21 Thread Pierre-Jean Texier

Hello Fabio,

Le 21/10/2019 à 16:22, Fabio Estevam a écrit :

U-Boot binary has grown in such a way that it goes beyond the reserved
area for the environment variables.
 
Running "saveenv" followed by a "reset" causes U-Boot to hang because

of this overlap.

On top-of master 32ded50 ("spl: mmc: make eMMC HW boot
partition configuration optional ")
I am not able to reproduce the described behavior.

See above:
-

=> env set foo bar
=> env save
Saving Environment to MMC... Writing to MMC(0)... OK
=> reset
resetting ...


U-Boot 2019.10-00750-g32ded50 (Oct 21 2019 - 17:42:20 +0200)

CPU:   Freescale i.MX7S rev1.2 800 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 41C
Reset cause: POR
Model: Warp i.MX7 Board
Board: WARP7 in secure mode OPTEE DRAM 0x9d00-0xa000
DRAM:  464 MiB
MMC:   FSL_SDHC: 1, FSL_SDHC: 0
Loading Environment from MMC... OK
In:serial@3086
Out:   serial@3086
Err:   serial@3086
SEC0: RNG instantiated
Net:   usb_ether
Warning: usb_ether (eth0) using random MAC address - 4a:fd:63:75:a8:29

Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0(part 0) is current device
switch to partitions #0, OK
mmc0(part 0) is current device
8417416 bytes read in 125 ms (64.2 MiB/s)
Booting from mmc ...
29058 bytes read in 11 ms (2.5 MiB/s)
Kernel image @ 0x8080 [ 0x00 - 0x807088 ]
## Flattened Device Tree blob at 8300
   Booting using the fdt blob at 0x8300
   Using Device Tree in place at 8300, end 8300a181

Starting kernel ...

[0.00] Booting Linux on physical CPU 0x0

Did you change anything in your configuration?

Thanks !

Pierre-Jean

 
Fix this problem by increasing the CONFIG_ENV_OFFSET size.
 
Also, in order to prevent this same problem in the future, use

CONFIG_BOARD_SIZE_LIMIT, which will detect the overlap in build-time.
 
CONFIG_BOARD_SIZE_LIMIT does not accept math expressions, so declare

CONFIG_ENV_OFFSET with its direct value instead.

Signed-off-by: Fabio Estevam 
---
  include/configs/warp7.h | 13 -
  1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 73541fe176..d103567cf4 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -132,7 +132,18 @@
  /* environment organization */
  #define CONFIG_ENV_SIZE   SZ_8K
  
-#define CONFIG_ENV_OFFSET		(8 * SZ_64K)

+/* Environment starts at 768k = 768 * 1024 = 786432 */
+#define CONFIG_ENV_OFFSET  786432
+/*
+ * Detect overlap between U-Boot image and environment area in build-time
+ *
+ * CONFIG_BOARD_SIZE_LIMIT = CONFIG_ENV_OFFSET - u-boot-dtb.imx offset
+ * CONFIG_BOARD_SIZE_LIMIT = 768k - 1k = 767k = 785408
+ *
+ * Currently CONFIG_BOARD_SIZE_LIMIT does not handle expressions, so
+ * write the direct value here
+ */
+#define CONFIG_BOARD_SIZE_LIMIT785408
  #define CONFIG_SYS_FSL_USDHC_NUM  1
  
  #define CONFIG_SYS_MMC_ENV_DEV		0




--
Pierre-Jean Texier
Embedded Linux Engineer
https://koncepto.io
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [u-boot-imx/next] WaRP7 & Pico-Pi i.MX7 NOK

2019-10-07 Thread Pierre-Jean Texier

Hi Stefano,

Le 07/10/2019 à 21:58, Stefano Babic a écrit :

Hi Pierre-Jen,

On 07/10/19 20:44, Pierre-Jean Texier wrote:

Stefano, Peng,

I just compiled a fresh U-Boot with u-boot-imx/next and It looks
like commit 34f2feb ("imx: mmc_env: update runtime SD/MMC boot env
device") [1]
breaks my WaRP7 (but the same for the Pico-Pi i.MX7, tested by Joris in
CC),
see logs after:

U-Boot 2019.10-rc4-00232-gd03193d (Oct 07 2019 - 18:44:25 +0200)

CPU:   Freescale i.MX7S rev1.2 800 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 33C
Reset cause: POR
Model: Warp i.MX7 Board
Board: WARP7 in secure mode OPTEE DRAM 0x9d00-0xa000
DRAM:  464 MiB
MMC:   FSL_SDHC: 1, FSL_SDHC: 0
Loading Environment from MMC... MMC Device 2 not found
*** Warning - No MMC card found, using default environment
...
=> env default -f -a
## Resetting to default environment
=> env save
Saving Environment to MMC... MMC Device 2 not found
No MMC card found
Failed (1)

FYI, with a git revert -s 34f2feb92db6146831bafa696b7b46785c9f6b10,
all is working fine:



Thanks for testing - at the moment, I will drop it from -next.


No problem - thanks, I will update my repo after that.




=> env default -f -a
## Resetting to default environment
=> env save
Saving Environment to MMC... Writing to MMC(0)... OK

So, can you consider this commit 'not applicable' for 2019.10 ?



None of what you see in -next is for 2019.10. My last PR had already too
many patches and it cannot flow into 2019.10. Currently, -next has ~130
new commit, it cannot flow into the release - I will send PR afterwards.


Understood, thanks for the clarification :).

BR,

Pierre-Jean



Best regards,
Stefano




--
Pierre-Jean Texier
Embedded Linux Engineer
https://koncepto.io
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [u-boot-imx/next] WaRP7 & Pico-Pi i.MX7 NOK

2019-10-07 Thread Pierre-Jean Texier

Stefano, Peng,

I just compiled a fresh U-Boot with u-boot-imx/next and It looks
like commit 34f2feb ("imx: mmc_env: update runtime SD/MMC boot env 
device") [1]
breaks my WaRP7 (but the same for the Pico-Pi i.MX7, tested by Joris in 
CC),

see logs after:

U-Boot 2019.10-rc4-00232-gd03193d (Oct 07 2019 - 18:44:25 +0200)

CPU:   Freescale i.MX7S rev1.2 800 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 33C
Reset cause: POR
Model: Warp i.MX7 Board
Board: WARP7 in secure mode OPTEE DRAM 0x9d00-0xa000
DRAM:  464 MiB
MMC:   FSL_SDHC: 1, FSL_SDHC: 0
Loading Environment from MMC... MMC Device 2 not found
*** Warning - No MMC card found, using default environment
...
=> env default -f -a
## Resetting to default environment
=> env save
Saving Environment to MMC... MMC Device 2 not found
No MMC card found
Failed (1)

FYI, with a git revert -s 34f2feb92db6146831bafa696b7b46785c9f6b10,
all is working fine:

=> env default -f -a
## Resetting to default environment
=> env save
Saving Environment to MMC... Writing to MMC(0)... OK

So, can you consider this commit 'not applicable' for 2019.10 ?

BR

[1] - 
https://github.com/sbabic/u-boot-imx/commit/34f2feb92db6146831bafa696b7b46785c9f6b10

--
Pierre-Jean Texier
Embedded Linux Engineer
https://koncepto.io
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] envtools with tools-only_defconfig fails to build after v2019.10-rc1

2019-09-24 Thread Pierre-Jean Texier

Hi Tom,

Le 24/09/2019 à 21:52, Tom Rini a écrit :

Looks like we also need to change travis/gitlab to building "tools-al

Already in the series [1].
In fact, I added a step for building "envtools" with the command:
 $: make tools-only_config envtools

I preferred not to use "tools-all" in order to have a better
visualization on Travis and Gitlab.

Also, It appears that Joe has already "Acked".

Thanks !

[1] - http://patchwork.ozlabs.org/patch/1153104/
--
Pierre-Jean Texier
Embedded Linux Engineer
https://koncepto.io
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] envtools with tools-only_defconfig fails to build after v2019.10-rc1

2019-09-24 Thread Pierre-Jean Texier

Hi Vagrant,

Le 24/09/2019 à 04:04, Vagrant Cascadian a écrit :

I've been unable to successfully run "make envtools" on recent versions
of u-boot, and finally got a chance to git bisect it.

It looks like commit 9fb625ce05539fe6876a59ce1dcadb76b33c6f6e,
introduced after 2019.10-rc1, breaks building envtools:

#!/bin/sh
# test-bisect
set -e
set -x
make clean
make tools-only_defconfig
make NO_SDL=1 envtools


Bisecting: 8 revisions left to test after this (roughly 3 steps)
[9fb625ce05539fe6876a59ce1dcadb76b33c6f6e] env: Move env_set() to env.h
running ../test-bisect
+ make clean
   CLEAN   u-boot.cfg
+ make tools-only_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
   HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
+ make NO_SDL=1 envtools
scripts/kconfig/conf  --syncconfig Kconfig
   CHK include/config.h
   CFG u-boot.cfg
   GEN include/autoconf.mk
   GEN include/autoconf.mk.dep
   CHK include/config/uboot.release
   UPD include/config/uboot.release
   CHK include/generated/version_autogenerated.h
   UPD include/generated/version_autogenerated.h
   CHK include/generated/timestamp_autogenerated.h
   UPD include/generated/timestamp_autogenerated.h
   LD  tools/env/built-in.o
   HOSTCC  tools/env/crc32.o
   HOSTCC  tools/env/ctype.o
   HOSTCC  tools/env/env_attr.o
   HOSTCC  tools/env/env_flags.o
In file included from tools/env/../../env/flags.c:7,
  from tools/env/env_flags.c:1:
include/env.h:97:1: error: unknown type name 'ulong'; did you mean
'long'?
97 | ulong env_get_ulong(const char *name, int base, ulong
default_val);
   | ^
   | long
include/env.h:97:49: error: unknown type name 'ulong'; did you mean
'long'?
97 | ulong env_get_ulong(const char *name, int base, ulong
default_val);
   | ^
   | long
include/env.h:106:40: error: unknown type name 'ulong'; did you mean
'long'?
   106 | int env_set_ulong(const char *varname, ulong value);
   |^
   |long
include/env.h:118:1: error: unknown type name 'ulong'; did you mean
'long'?
   118 | ulong env_get_hex(const char *varname, ulong default_val);
   | ^
   | long
include/env.h:118:40: error: unknown type name 'ulong'; did you mean
'long'?
   118 | ulong env_get_hex(const char *varname, ulong default_val);
   |^
   |long
include/env.h:127:38: error: unknown type name 'ulong'; did you mean
'long'?
   127 | int env_set_hex(const char *varname, ulong value);
   |  ^
   |  long
include/env.h: In function 'env_set_addr':
include/env.h:138:31: error: 'ulong' undeclared (first use in this
function)
   138 |  return env_set_hex(varname, (ulong)addr);
   |   ^
include/env.h:138:31: note: each undeclared identifier is reported only
once for each function it appears in
include/env.h:138:37: error: expected ')' before 'addr'
   138 |  return env_set_hex(varname, (ulong)addr);
   | ^~~~
   | )
make[1]: *** [scripts/Makefile.host:114: tools/env/env_flags.o] Error 1
make: *** [Makefile:1778: envtools] Error 2
Bisecting: 3 revisions left to test after this (roughly 2 steps)
...
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[cdbff9fc4002fdd47181088d5abe90e5f2fa1904] env: Move env_get_hex() to
...
9fb625ce05539fe6876a59ce1dcadb76b33c6f6e is the first bad commit
commit 9fb625ce05539fe6876a59ce1dcadb76b33c6f6e
Author: Simon Glass 
Date:   Thu Aug 1 09:46:51 2019 -0600

 env: Move env_set() to env.h

 Move env_set() over to the new header file.

 Acked-by: Joe Hershberger 
 Signed-off-by: Simon Glass 


Would be great to get this building again before 2019.10 release!


I sent the following series to fix this build issue:
 - http://patchwork.ozlabs.org/project/uboot/list/?series=127297

Hope it will be merged soon.

Thanks!

Pierre-Jean




live well,
   vagrant


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



--
Pierre-Jean Texier
Embedded Linux Engineer
https://koncepto.io
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 0/4] env: fix build error for envtools

2019-09-16 Thread Pierre-Jean Texier

Hello Tom,

Le 26/08/2019 à 13:06, Pierre-Jean Texier a écrit :

Here is a set of patches that fixes envtools breakage
introduced after v2019.10-rc2.

This serie also adds envtools to travis CI and gitlab-ci.

This was tested on WaRP7.

Before this serie:
  - https://travis-ci.com/texierp/u-boot/jobs/227669967
After this serie:
  - https://travis-ci.com/texierp/u-boot/jobs/227761236

Pierre-Jean Texier (4):
   fw_env: remove duplicated definitions
   fw_env: fix build error
   env: add missing  header file
   ci: add envtools support

  .gitlab-ci.yml |  7 +++
  .travis.yml|  4 
  include/env.h  |  1 +
  tools/env/fw_env.c | 10 ++
  4 files changed, 14 insertions(+), 8 deletions(-)



Gentle ping for this series:
 - http://patchwork.ozlabs.org/patch/1153103/
 - http://patchwork.ozlabs.org/patch/1153106/
 - http://patchwork.ozlabs.org/patch/1153105/
 - http://patchwork.ozlabs.org/patch/1153104/

With this, envtools compiles again.

Thanks,
Pierre-Jean

--
Pierre-Jean Texier
Embedded Linux Engineer
https://koncepto.io
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 2/4] fw_env: fix build error

2019-08-26 Thread Pierre-Jean Texier
The following error appears:

tools/env/fw_env.c:1149:25: error: lvalue required as unary ‘&’ operand
  rc = write(fd, _REDUND_OBSOLETE, sizeof(ENV_REDUND_OBSOLETE));

Fixes: d3716dd ("env: Rename the redundancy flags")

Signed-off-by: Pierre-Jean Texier 
Tested-by: Joris Offouga 
Tested-by: Heiko Schocher 
Suggested-by: Heiko Schocher 
---
v1 -> v2:
 - fix fw_setenv with flag_obsolete (reported by Heiko Schocher)

 tools/env/fw_env.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index 876bf2b..e2801f5 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -1135,6 +1135,7 @@ static int flash_flag_obsolete(int dev, int fd, off_t 
offset)
 {
int rc;
struct erase_info_user erase;
+   char tmp = ENV_REDUND_OBSOLETE;
 
erase.start = DEVOFFSET(dev);
erase.length = DEVESIZE(dev);
@@ -1146,7 +1147,7 @@ static int flash_flag_obsolete(int dev, int fd, off_t 
offset)
return rc;
}
ioctl(fd, MEMUNLOCK, );
-   rc = write(fd, _REDUND_OBSOLETE, sizeof(ENV_REDUND_OBSOLETE));
+   rc = write(fd, , sizeof(tmp));
ioctl(fd, MEMLOCK, );
if (rc < 0)
perror("Could not set obsolete flag");
-- 
2.7.4

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


[U-Boot] [PATCH v2 3/4] env: add missing header file

2019-08-26 Thread Pierre-Jean Texier
Since commit af95f20 ("env: Create a new file for environment functions"),
a new header file exists.

So, this commit add a missing header file.

Fixes:

include/env.h:158:1: error: unknown type name ‘ulong’; did you mean ‘long’?
 ulong env_get_ulong(const char *name, int base, ulong default_val);
 ^
 long
include/env.h:158:49: error: unknown type name ‘ulong’; did you mean ‘long’?
 ulong env_get_ulong(const char *name, int base, ulong default_val);

Signed-off-by: Pierre-Jean Texier 
Tested-by: Joris Offouga 
Tested-by: Heiko Schocher 
---
v1 -> v2:
 - None

 include/env.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/env.h b/include/env.h
index a74a261..b72239f 100644
--- a/include/env.h
+++ b/include/env.h
@@ -9,6 +9,7 @@
 #ifndef __ENV_H
 #define __ENV_H
 
+#include 
 #include 
 #include 
 
-- 
2.7.4

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


[U-Boot] [PATCH v2 4/4] ci: add envtools support

2019-08-26 Thread Pierre-Jean Texier
This commit add envtools suppport to CI to verify if there
is no build issues.

Signed-off-by: Pierre-Jean Texier 
Acked-by: Heiko Schocher 
---
v1 -> v2:
 - None

 .gitlab-ci.yml | 7 +++
 .travis.yml| 4 
 2 files changed, 11 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 84e79bf..a1c5b4f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -145,6 +145,13 @@ Build tools-only:
   script:
 - make tools-only_config tools-only -j$(nproc)
 
+# Ensure env tools build
+Build envtools:
+  tags: [ 'all' ]
+  stage: testsuites
+  script:
+- make tools-only_config envtools -j$(nproc)
+
 Run binman, buildman, dtoc and patman testsuites:
   tags: [ 'all' ]
   stage: testsuites
diff --git a/.travis.yml b/.travis.yml
index d330dda..6adc754 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -361,6 +361,10 @@ matrix:
 - name: "Build tools-only"
   script:
 - make tools-only_config tools-only -j$(nproc)
+# Ensure env tools build
+- name: "Build envtools"
+  script:
+- make tools-only_config envtools -j$(nproc)
 
 # test/py
 - name: "test/py sandbox"
-- 
2.7.4

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


[U-Boot] [PATCH v2 1/4] fw_env: remove duplicated definitions

2019-08-26 Thread Pierre-Jean Texier
Since commit d3716dd ("env: Rename the redundancy flags"), the
definitions of ENV_REDUND_OBSOLETE & ENV_REDUND_ACTIVE was moved
to env.h.

Fixes:

tools/env/fw_env.c:122:22: error: ‘ENV_REDUND_ACTIVE’ redeclared as different 
kind of symbol
 static unsigned char ENV_REDUND_ACTIVE = 1;
  ^
In file included from tools/env/fw_env.c:13:
include/env.h:63:2: note: previous definition of ‘ENV_REDUND_ACTIVE’ was here
  ENV_REDUND_ACTIVE = 1,
  ^
tools/env/fw_env.c:127:22: error: ‘ENV_REDUND_OBSOLETE’ redeclared as different 
kind of symbol
 static unsigned char ENV_REDUND_OBSOLETE;
  ^~~
In file included from tools/env/fw_env.c:13:
include/env.h:62:2: note: previous definition of ‘ENV_REDUND_OBSOLETE’ was here
  ENV_REDUND_OBSOLETE = 0,

Signed-off-by: Pierre-Jean Texier 
Tested-by: Joris Offouga 
Tested-by: Heiko Schocher 
---
v1 -> v2:
 - None
 
 tools/env/fw_env.c | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index 95c9984..876bf2b 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -119,13 +119,6 @@ static struct environment environment = {
 
 static int have_redund_env;
 
-static unsigned char ENV_REDUND_ACTIVE = 1;
-/*
- * ENV_REDUND_OBSOLETE must be 0 to efficiently set it on NOR flash without
- * erasing
- */
-static unsigned char ENV_REDUND_OBSOLETE;
-
 #define DEFAULT_ENV_INSTANCE_STATIC
 #include 
 
-- 
2.7.4

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


[U-Boot] [PATCH v2 0/4] env: fix build error for envtools

2019-08-26 Thread Pierre-Jean Texier
Here is a set of patches that fixes envtools breakage
introduced after v2019.10-rc2.

This serie also adds envtools to travis CI and gitlab-ci.

This was tested on WaRP7.

Before this serie: 
 - https://travis-ci.com/texierp/u-boot/jobs/227669967
After this serie: 
 - https://travis-ci.com/texierp/u-boot/jobs/227761236

Pierre-Jean Texier (4):
  fw_env: remove duplicated definitions
  fw_env: fix build error
  env: add missing  header file
  ci: add envtools support

 .gitlab-ci.yml |  7 +++
 .travis.yml|  4 
 include/env.h  |  1 +
 tools/env/fw_env.c | 10 ++
 4 files changed, 14 insertions(+), 8 deletions(-)

-- 
2.7.4

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


Re: [U-Boot] [PATCH 2/4] fw_env: fix build error

2019-08-26 Thread Pierre-Jean Texier

Hello Heiko,

Le 26/08/2019 à 10:59, Heiko Schocher a écrit :

Testing deeper on an imx6 based board with Environment in SPI NOR, and
I see:

root@K30RF-5e108e:~# fw_setenv ubifitsz
Could not set obsolete flag: Operation not supported

Also with your patch ... :-(

With follwoing change fw_setenv works again for me:

hs@xmglap:u-boot  [k30rf] $ git diff
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index b8b936f9ea..e2801f595f 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -1135,6 +1135,7 @@ static int flash_flag_obsolete(int dev, int fd, 
off_t offset)

  {
     int rc;
     struct erase_info_user erase;
+   char tmp = ENV_REDUND_OBSOLETE;

     erase.start = DEVOFFSET(dev);
     erase.length = DEVESIZE(dev);
@@ -1146,7 +1147,7 @@ static int flash_flag_obsolete(int dev, int fd, 
off_t offset)

     return rc;
     }
     ioctl(fd, MEMUNLOCK, );
-   rc = write(fd, ENV_REDUND_OBSOLETE, sizeof(ENV_REDUND_OBSOLETE));
+   rc = write(fd, , sizeof(tmp));
     ioctl(fd, MEMLOCK, );
     if (rc < 0)
     perror("Could not set obsolete flag");
hs@xmglap:u-boot  [k30rf] $

May you can try?


It works fine.

Thanks for testing !
I will send a v2 with your suggestion.

BR
Pierre-Jean

--
Pierre-Jean Texier
Embedded Linux Engineer
https://koncepto.io
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 4/4] ci: add envtools support

2019-08-23 Thread Pierre-Jean Texier
This commit add envtools suppport to CI to verify if there
is no build issues.

Signed-off-by: Pierre-Jean Texier 
---
 .gitlab-ci.yml | 7 +++
 .travis.yml| 4 
 2 files changed, 11 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 84e79bf..a1c5b4f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -145,6 +145,13 @@ Build tools-only:
   script:
 - make tools-only_config tools-only -j$(nproc)
 
+# Ensure env tools build
+Build envtools:
+  tags: [ 'all' ]
+  stage: testsuites
+  script:
+- make tools-only_config envtools -j$(nproc)
+
 Run binman, buildman, dtoc and patman testsuites:
   tags: [ 'all' ]
   stage: testsuites
diff --git a/.travis.yml b/.travis.yml
index d330dda..6adc754 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -361,6 +361,10 @@ matrix:
 - name: "Build tools-only"
   script:
 - make tools-only_config tools-only -j$(nproc)
+# Ensure env tools build
+- name: "Build envtools"
+  script:
+- make tools-only_config envtools -j$(nproc)
 
 # test/py
 - name: "test/py sandbox"
-- 
2.7.4

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


[U-Boot] [PATCH 3/4] env: add missing header file

2019-08-23 Thread Pierre-Jean Texier
Since commit af95f20 ("env: Create a new file for environment functions"),
a new header file exists.

So, this commit add a missing header file.

Fixes:

include/env.h:158:1: error: unknown type name ‘ulong’; did you mean ‘long’?
 ulong env_get_ulong(const char *name, int base, ulong default_val);
 ^
 long
include/env.h:158:49: error: unknown type name ‘ulong’; did you mean ‘long’?
 ulong env_get_ulong(const char *name, int base, ulong default_val);

Signed-off-by: Pierre-Jean Texier 
---
 include/env.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/env.h b/include/env.h
index a74a261..b72239f 100644
--- a/include/env.h
+++ b/include/env.h
@@ -9,6 +9,7 @@
 #ifndef __ENV_H
 #define __ENV_H
 
+#include 
 #include 
 #include 
 
-- 
2.7.4

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


[U-Boot] [PATCH 1/4] fw_env: remove duplicated definitions

2019-08-23 Thread Pierre-Jean Texier
Since commit d3716dd ("env: Rename the redundancy flags"), the
definitions of ENV_REDUND_OBSOLETE & ENV_REDUND_ACTIVE was moved
to env.h.

Fixes:

tools/env/fw_env.c:122:22: error: ‘ENV_REDUND_ACTIVE’ redeclared as different 
kind of symbol
 static unsigned char ENV_REDUND_ACTIVE = 1;
  ^
In file included from tools/env/fw_env.c:13:
include/env.h:63:2: note: previous definition of ‘ENV_REDUND_ACTIVE’ was here
  ENV_REDUND_ACTIVE = 1,
  ^
tools/env/fw_env.c:127:22: error: ‘ENV_REDUND_OBSOLETE’ redeclared as different 
kind of symbol
 static unsigned char ENV_REDUND_OBSOLETE;
  ^~~
In file included from tools/env/fw_env.c:13:
include/env.h:62:2: note: previous definition of ‘ENV_REDUND_OBSOLETE’ was here
  ENV_REDUND_OBSOLETE = 0,

Signed-off-by: Pierre-Jean Texier 
---
 tools/env/fw_env.c | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index 95c9984..876bf2b 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -119,13 +119,6 @@ static struct environment environment = {
 
 static int have_redund_env;
 
-static unsigned char ENV_REDUND_ACTIVE = 1;
-/*
- * ENV_REDUND_OBSOLETE must be 0 to efficiently set it on NOR flash without
- * erasing
- */
-static unsigned char ENV_REDUND_OBSOLETE;
-
 #define DEFAULT_ENV_INSTANCE_STATIC
 #include 
 
-- 
2.7.4

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


[U-Boot] [PATCH 2/4] fw_env: fix build error

2019-08-23 Thread Pierre-Jean Texier
The following error appears:

tools/env/fw_env.c:1149:25: error: lvalue required as unary ‘&’ operand
  rc = write(fd, _REDUND_OBSOLETE, sizeof(ENV_REDUND_OBSOLETE));

Fixes: d3716dd ("env: Rename the redundancy flags")

Signed-off-by: Pierre-Jean Texier 
---
 tools/env/fw_env.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index 876bf2b..b8b936f 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -1146,7 +1146,7 @@ static int flash_flag_obsolete(int dev, int fd, off_t 
offset)
return rc;
}
ioctl(fd, MEMUNLOCK, );
-   rc = write(fd, _REDUND_OBSOLETE, sizeof(ENV_REDUND_OBSOLETE));
+   rc = write(fd, ENV_REDUND_OBSOLETE, sizeof(ENV_REDUND_OBSOLETE));
ioctl(fd, MEMLOCK, );
if (rc < 0)
perror("Could not set obsolete flag");
-- 
2.7.4

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


[U-Boot] [PATCH 0/4] env: fix build error for envtools

2019-08-23 Thread Pierre-Jean Texier
Here is a set of patches that fixes envtools breakage
introduced after v2019.10-rc2.

This serie also adds envtools to travis CI and gitlab-ci.

This was tested on WaRP7.

Before this serie: 
 - https://travis-ci.com/texierp/u-boot/jobs/227669967
After this serie: 
 - https://travis-ci.com/texierp/u-boot/jobs/227761236

Pierre-Jean Texier (4):
  fw_env: remove duplicated definitions
  fw_env: fix build error
  env: add missing  header file
  ci: add envtools support

 .gitlab-ci.yml | 7 +++
 .travis.yml| 4 
 include/env.h  | 1 +
 tools/env/fw_env.c | 9 +
 4 files changed, 13 insertions(+), 8 deletions(-)

-- 
2.7.4

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


Re: [U-Boot] [PATCH v2 01/16] stm32mp1: deactivate WATCHDOG in defconfig

2019-07-07 Thread Pierre-Jean Texier


Le 05/07/2019 à 17:20, Patrick Delaunay a écrit :

Deactivate WATCHDOG by default in u-boot to avoid issue to boot kernel
and rootfs without the needed daemon to reload it.

Signed-off-by: Patrick Delaunay 
---

Changes in v2: None

  configs/stm32mp15_basic_defconfig   | 2 --
  configs/stm32mp15_trusted_defconfig | 2 --
  2 files changed, 4 deletions(-)

diff --git a/configs/stm32mp15_basic_defconfig 
b/configs/stm32mp15_basic_defconfig
index 4aa184f..b1fc3a2 100644
--- a/configs/stm32mp15_basic_defconfig
+++ b/configs/stm32mp15_basic_defconfig
@@ -110,5 +110,3 @@ CONFIG_USB_GADGET_MANUFACTURER="STMicroelectronics"
  CONFIG_USB_GADGET_VENDOR_NUM=0x0483
  CONFIG_USB_GADGET_PRODUCT_NUM=0x5720
  CONFIG_USB_GADGET_DWC2_OTG=y
-CONFIG_WDT=y
-CONFIG_WDT_STM32MP=y
diff --git a/configs/stm32mp15_trusted_defconfig 
b/configs/stm32mp15_trusted_defconfig
index 5fe9477..ae9bc76 100644
--- a/configs/stm32mp15_trusted_defconfig
+++ b/configs/stm32mp15_trusted_defconfig
@@ -100,5 +100,3 @@ CONFIG_USB_GADGET_MANUFACTURER="STMicroelectronics"
  CONFIG_USB_GADGET_VENDOR_NUM=0x0483
  CONFIG_USB_GADGET_PRODUCT_NUM=0x5720
  CONFIG_USB_GADGET_DWC2_OTG=y
-CONFIG_WDT=y
-CONFIG_WDT_STM32MP=y



Tested-by: Pierre-Jean Texier 

Regards,
--
Pierre-Jean Texier
Embedded Linux Engineer
https://koncepto.io
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 14/16] stm32mp1: add check for presence of environment in boot device

2019-07-07 Thread Pierre-Jean Texier

Le 05/07/2019 à 17:20, Patrick Delaunay a écrit :

For boot from flash, check presence of default environment to force
save env.

Signed-off-by: Patrick Delaunay 
---

Changes in v2: None

  include/configs/stm32mp1.h | 4 
  1 file changed, 4 insertions(+)

diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h
index 1d385e0..6c74b4b 100644
--- a/include/configs/stm32mp1.h
+++ b/include/configs/stm32mp1.h
@@ -112,6 +112,7 @@
"if test ${boot_device} = serial || test ${boot_device} = usb;" \
"then stm32prog ${boot_device} ${boot_instance}; " \
"else " \
+   "run env_check;" \
"if test ${boot_device} = mmc;" \
"then env set boot_targets \"mmc${boot_instance}\"; fi;" \
"if test ${boot_device} = nand;" \
@@ -143,6 +144,9 @@
"ramdisk_addr_r=0xc440\0" \
"fdt_high=0x\0" \
"initrd_high=0x\0" \
+   "env_default=1\0" \
+   "env_check=if test $env_default -eq 1;"\
+   " then env set env_default 0;env save;fi\0" \
STM32MP_BOOTCMD \
STM32MP_MTDPARTS \
BOOTENV



Tested: stm32mp157a-dk1 (OS Buildroot with ^metadata_csum option for
mke2fs)

STM32MP> env print env_default
env_default=1
STM32MP> run bootcmd
Boot over mmc0!
Saving Environment to EXT4... Journal Scan Completed
Recovery required
Journal Recovery Completed
file found, deleting
update journal finished
File System is consistent
update journal finished
done
OK
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:4...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
125 bytes read in 3 ms (40 KiB/s)
1:  stm32mp15-buildroot
Retrieving file: /boot/zImage
3948320 bytes read in 170 ms (22.1 MiB/s)
append: root=/dev/mmcblk0p4 rootwait
Retrieving file: /boot/stm32mp157a-dk1.dtb
38698 bytes read in 5 ms (7.4 MiB/s)
...

So,

Tested-by: Pierre-Jean Texier 

Regards,
--
Pierre-Jean Texier
Embedded Linux Engineer
https://koncepto.io
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 16/16] ARM: dts: stm32mp1: sync device tree with v5.2-rc4

2019-07-07 Thread Pierre-Jean Texier

Hi Patrick,

Le 05/07/2019 à 17:20, Patrick Delaunay a écrit :

Synchronize device tree with v5.2-rc4 label and
update the associated u-boot dtsi.

Signed-off-by: Patrick Delaunay 
---

Changes in v2:
- missing alignment on ethernet@5800a000
- set ethernet0 phy-mode to "rgmii-id" for dk1
   (needed modification not yet upstreamed)

  arch/arm/dts/stm32mp15-ddr.dtsi  |   2 +-
  arch/arm/dts/stm32mp157-pinctrl.dtsi | 270 ++-
  arch/arm/dts/stm32mp157-u-boot.dtsi  |  60 ---
  arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi |   4 -
  arch/arm/dts/stm32mp157a-dk1.dts |  32 ++--
  arch/arm/dts/stm32mp157c-dk2.dts |   1 +
  arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi |  15 +-
  arch/arm/dts/stm32mp157c-ed1.dts | 205 +--
  arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi |   3 -
  arch/arm/dts/stm32mp157c-ev1.dts |  12 +-
  arch/arm/dts/stm32mp157c.dtsi| 215 +---
  11 files changed, 541 insertions(+), 278 deletions(-)

diff --git a/arch/arm/dts/stm32mp15-ddr.dtsi b/arch/arm/dts/stm32mp15-ddr.dtsi
index 4172c02..0164e34 100644
--- a/arch/arm/dts/stm32mp15-ddr.dtsi
+++ b/arch/arm/dts/stm32mp15-ddr.dtsi
@@ -5,7 +5,7 @@
  
  / {

soc {
-   ddr: ddr@0x5A003000{
+   ddr: ddr@5A003000{
u-boot,dm-pre-reloc;
  
  			compatible = "st,stm32mp1-ddr";

diff --git a/arch/arm/dts/stm32mp157-pinctrl.dtsi 
b/arch/arm/dts/stm32mp157-pinctrl.dtsi
index 4c424c4..9bae850 100644
--- a/arch/arm/dts/stm32mp157-pinctrl.dtsi
+++ b/arch/arm/dts/stm32mp157-pinctrl.dtsi
@@ -14,6 +14,7 @@
ranges = <0 0x50002000 0xa400>;
interrupt-parent = <>;
st,syscfg = < 0x60 0xff>;
+   hwlocks = < 0>;
pins-are-numbered;
  
  			gpioa: gpio@50002000 {

@@ -164,6 +165,27 @@
};
};
  
+			cec_pins_sleep_a: cec-sleep-0 {

+   pins {
+   pinmux = ; /* HDMI_CEC */
+   };
+   };
+
+   cec_pins_b: cec-1 {
+   pins {
+   pinmux = ;
+   bias-disable;
+   drive-open-drain;
+   slew-rate = <0>;
+   };
+   };
+
+   cec_pins_sleep_b: cec-sleep-1 {
+   pins {
+   pinmux = ; /* HDMI_CEC */
+   };
+   };
+
ethernet0_rgmii_pins_a: rgmii-0 {
pins1 {
pinmux = , 
/* ETH_RGMII_CLK125 */
@@ -269,7 +291,14 @@
};
};
  
-			i2c1_pins_b: i2c1-1 {

+   i2c1_pins_sleep_a: i2c1-1 {
+   pins {
+   pinmux = , /* I2C1_SCL */
+; /* I2C1_SDA */
+   };
+   };
+
+   i2c1_pins_b: i2c1-2 {
pins {
pinmux = , 
/* I2C1_SCL */
 ; 
/* I2C1_SDA */
@@ -289,7 +318,14 @@
};
};
  
-			i2c2_pins_b: i2c2-1 {

+   i2c2_pins_sleep_a: i2c2-1 {
+   pins {
+   pinmux = , /* I2C2_SCL */
+; /* I2C2_SDA */
+   };
+   };
+
+   i2c2_pins_b: i2c2-2 {
pins {
pinmux = , 
/* I2C2_SCL */
 ; 
/* I2C2_SDA */
@@ -309,6 +345,152 @@
};
};
  
+			i2c5_pins_sleep_a: i2c5-1 {

+   pins {
+   pinmux = , /* I2C5_SCL */
+; /* I2C5_SDA */
+
+   };
+   };
+
+   ltdc_pins_a: ltdc-a-0 {
+   pins {
+   pinmux = , 
/* LCD_CLK */
+, 
/* LCD_HSYNC */
+, 
/* LCD_VSYNC */
+, 
/* LCD_DE */
+, 
/* LCD_R0 */
+

Re: [U-Boot] [PATCH 3/7] warp7: include: configs: Differentiate bootscript address from loadaddr

2019-05-23 Thread Pierre-Jean Texier

Hi Bryan,

Le 20/05/2019 à 10:33, Bryan O'Donoghue a écrit :



On 15/05/2019 20:13, Pierre-Jean Texier wrote:
Regarding your question, it seems that is now the standard on many 
platforms [2].
In fact, instead of keeping a custom environment, it is better to use 
a more
generic approach by switching to disto config (with boot.scr, 
extlinux, and so on).


For sure, we can customized the CONFIG_BOOTCOMMAND variable in patch.


Right.

This smells like a bigger change to me then, since we have to account 
for how we transition current users from their u-boot environment to 
distroboot.


It sounds to me like a series of patches around this one topic.

So, I think it is worthwhile exploring that set of changes but, I do 
think we should do it separately to this set :)


Indeed, it seems you're right.
I'll send this later, means once your patches are integrated ;).
I am convinced that it's better to work on your series first.

Just a quick remark, can you share more informations
about the setup ? so I can test your series on my side ;)

Pierre-Jean



---
bod


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


Re: [U-Boot] [PATCH 3/7] warp7: include: configs: Differentiate bootscript address from loadaddr

2019-05-15 Thread Pierre-Jean Texier


Le 15/05/2019 à 10:23, Bryan O'Donoghue a écrit :



On 14/05/2019 21:27, Pierre-Jean Texier wrote:


should this apply in isolation ?
Not necessarily, on my side everything working well on-top of master, 
for example:


Hit any key to stop autoboot:  0
=> run bootcmd_mmc0
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr


So do you need a boot.scr for this patch to work, how will that affect 
current users who rely on the u-boot env only ?


In fact, by using the Generic Distro Concept, we can also use the 
extlinux file, as explained in[1].

Example on WaRP7 :

=> run bootcmd_mmc0
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
132 bytes read in 1 ms (128.9 KiB/s)
1:    linux
Retrieving file: /zImage
8118520 bytes read in 116 ms (66.7 MiB/s)
append: root=PARTUUID= rootwait rw console=ttymxc0,115200
Retrieving file: /imx7s-warp.dtb
26889 bytes read in 4 ms (6.4 MiB/s)
Kernel image @ 0x8080 [ 0x00 - 0x7be0f8 ]
## Flattened Device Tree blob at 8300
   Booting using the fdt blob at 0x8300
   Using Device Tree in place at 8300, end 83009908


Regarding your question, it seems that is now the standard on many 
platforms [2].
In fact, instead of keeping a custom environment, it is better to use a 
more
generic approach by switching to disto config (with boot.scr, extlinux, 
and so on).


For sure, we can customized the CONFIG_BOOTCOMMAND variable in patch.


[1] http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.distro
[2] 
https://github.com/u-boot/u-boot/search?q=BOOT_TARGET_DEVICES%28func%29_q=BOOT_TARGET_DEVICES%28func%29


Thanks

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


Re: [U-Boot] [PATCH 3/7] warp7: include: configs: Differentiate bootscript address from loadaddr

2019-05-14 Thread Pierre-Jean Texier

Hi Bryan,

Le 14/05/2019 à 00:13, Bryan O'Donoghue a écrit :



On 09/05/2019 16:32, Bryan O'Donoghue wrote:



On 08/05/2019 20:33, Pierre-Jean Texier wrote:

Hi Bryan,

Le 08/05/2019 à 20:14, Bryan O'Donoghue a écrit :
Reusing the loadaddr to load the boot script breaks some of the 
logic we
want to have around the bootscript/FIT load addresses. Making a 
dedicated
bootscript address allows us to differentiate the bootscript load 
address
from the Linux Kernel or OPTEE load address, thus ensuring that no 
matter

what the load sequence the bootscript and Kernel/OPTEE binary load
addresses do not conflict.

Signed-off-by: Bryan O'Donoghue 
---
  include/configs/warp7.h | 7 ---
  1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 95955fd626..0c63050833 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -50,6 +50,7 @@
  "script=boot.scr\0" \
  "bootscr_fitimage_name=bootscr\0" \
  "script_signed=boot.scr.imx-signed\0" \
+    "bootscriptaddr=0x8320\0" \
  "image=zImage\0" \
  "console=ttymxc0\0" \
  "ethact=usb_ether\0" \
@@ -70,16 +71,16 @@
  "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} 
${filesize} 0;\0" \

  "do_bootscript_hab=" \
  "if test ${hab_enabled} -eq 1; then " \
-    "setexpr hab_ivt_addr ${loadaddr} - ${ivt_offset}; " \
+    "setexpr hab_ivt_addr ${bootscriptaddr} - 
${ivt_offset}; " \

  "setenv script ${script_signed}; " \
  "load mmc ${mmcdev}:${mmcpart} ${hab_ivt_addr} 
${script}; " \

  "run warp7_auth_or_fail; " \
  "run bootscript; "\
  "fi;\0" \
  "loadbootscript=" \
-    "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+    "load mmc ${mmcdev}:${mmcpart} ${bootscriptaddr} 
${script};\0" \

  "bootscript=echo Running bootscript from mmc ...; " \
-    "source\0" \
+    BOOT_SCR_STRING \
  "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} 
${image}\0" \
  "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} 
${fdt_file}\0" \

  "mmcboot=echo Booting from mmc ...; " \


Instead of implementing a new variable (bootscriptaddr), I think 
(IMHO) it's time to migrate


to distroboot for the WaRP7 (like pico imx7 for instance >

In fact, in this specific case, this allows to use the common 
scriptaddr[1] variable.
FYI, this is a task I am currently working on [2] (work in 
progress). Maybe we could integrate this migration into this series ?


Sure.

Let me give it a test later tonight/tomorrow


Hi Pierre,

I've applied your patch on-top of of a 3 day old master

* 60277e4bcc - (HEAD) warp7: add distroboot support (27 hours ago)
* 4ca7700d2c - imx: Use a convenient default value for 
SYS_MALLOC_F_LEN (27 hours ago)

* 48372a5af6 - Remove whitelist entry for CONFIG_CRC32 (3 days ago)
* 4ad2c8953d - Remove #define CONFIG_CRC32 (3 days ago)
* 661bbc50d3 - mtd: ubi: Remove select for non existent option (3 days 
ago)
* 2b841dba5c - cmd: ubifs: Remove select for non-existent option (3 
days ago)

* b8de00c671 - Remove whitelist entry for CONFIG_GPIO (3 days ago)
* 26680b9f3a - sysreset: select DM_GPIO instead of GPIO (3 days ago)
*   927a37df9f - Merge branch '2019-05-09-master-imports' (3 days ago)

should this apply in isolation ?
Not necessarily, on my side everything working well on-top of master, 
for example:


Hit any key to stop autoboot:  0
=> run bootcmd_mmc0
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
247 bytes read in 1 ms (241.2 KiB/s)
## Executing script at 8080
8923088 bytes read in 131 ms (65 MiB/s)
26889 bytes read in 5 ms (5.1 MiB/s)
Kernel image @ 0x8080 [ 0x00 - 0x8827d0 ]
## Flattened Device Tree blob at 8300
   Booting using the fdt blob at 0x8300
   Using Device Tree in place at 8300, end 83009908

Starting kernel ...

[    0.00] Booting Linux on physical CPU 0x0



I get a dead-loop on USB CDC ethernet...

=> reset
resetting ...


U-Boot 2019.07-rc1-00457-g60277e4bcc (May 13 2019 - 23:11:24 +0100)

CPU:   Freescale i.MX7S rev1.2 800 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 47C
Reset cause: POR
Model: Warp i.MX7 Board
Board: WARP7 in secure mode OPTEE DRAM 0x9d00-0xa000
DRAM:  464 MiB
PMIC: PFUZE3000 DEV_ID=0x30 REV_ID=0x11
MMC:   FSL_SDHC: 1, FSL_SDHC: 0
Loading Environment from MMC... *** Warning - bad CRC, using default 
environment


In:    serial@3086
Out:   serial@3086
Err:   serial@3086
SEC0: RNG instantiated
Net:   usb_ether
Warning: usb_ether (eth0) using random MAC address - b6:5e:3c:03:d8:8

Re: [U-Boot] [PATCH 3/7] warp7: include: configs: Differentiate bootscript address from loadaddr

2019-05-08 Thread Pierre-Jean Texier

Hi Bryan,

Le 08/05/2019 à 20:14, Bryan O'Donoghue a écrit :

Reusing the loadaddr to load the boot script breaks some of the logic we
want to have around the bootscript/FIT load addresses. Making a dedicated
bootscript address allows us to differentiate the bootscript load address
from the Linux Kernel or OPTEE load address, thus ensuring that no matter
what the load sequence the bootscript and Kernel/OPTEE binary load
addresses do not conflict.

Signed-off-by: Bryan O'Donoghue 
---
  include/configs/warp7.h | 7 ---
  1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 95955fd626..0c63050833 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -50,6 +50,7 @@
"script=boot.scr\0" \
"bootscr_fitimage_name=bootscr\0" \
"script_signed=boot.scr.imx-signed\0" \
+   "bootscriptaddr=0x8320\0" \
"image=zImage\0" \
"console=ttymxc0\0" \
"ethact=usb_ether\0" \
@@ -70,16 +71,16 @@
"warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 
0;\0" \
"do_bootscript_hab=" \
"if test ${hab_enabled} -eq 1; then " \
-   "setexpr hab_ivt_addr ${loadaddr} - ${ivt_offset}; " \
+   "setexpr hab_ivt_addr ${bootscriptaddr} - ${ivt_offset}; 
" \
"setenv script ${script_signed}; " \
"load mmc ${mmcdev}:${mmcpart} ${hab_ivt_addr} ${script}; 
" \
"run warp7_auth_or_fail; " \
"run bootscript; "\
"fi;\0" \
"loadbootscript=" \
-   "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+   "load mmc ${mmcdev}:${mmcpart} ${bootscriptaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
-   "source\0" \
+   BOOT_SCR_STRING \
"loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
"loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
"mmcboot=echo Booting from mmc ...; " \


Instead of implementing a new variable (bootscriptaddr), I think (IMHO) 
it's time to migrate


to distroboot for the WaRP7 (like pico imx7 for instance).


In fact, in this specific case, this allows to use the common 
scriptaddr[1] variable.
FYI, this is a task I am currently working on [2] (work in progress). 
Maybe we could integrate this migration into this series ?


[1] 
http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.distro;h=ab6e6f4e74be1407001add427fcabab6253a81fc;hb=HEAD#l256
[2] 
https://github.com/texierp/u-boot/commit/a141f9bfe379bad8ae6864aa25b51f35d2cfd9fd



Thanks!


BR

Pierre-Jean

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


[U-Boot] [PATCH] pico-imx7d: remove unused 'script' variable

2019-05-07 Thread Pierre-Jean Texier
Since the pico-pi uses the distroboot,
this commit remove the 'script' variable (cf boot_scripts).

Signed-off-by: Pierre-Jean Texier 
---
 include/configs/pico-imx7d.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
index 365a598..a6838b3 100644
--- a/include/configs/pico-imx7d.h
+++ b/include/configs/pico-imx7d.h
@@ -61,7 +61,6 @@
 #define CONFIG_SYS_MMC_IMG_LOAD_PART   1
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
-   "script=boot.scr\0" \
"image=zImage\0" \
"splashpos=m,m\0" \
"console=ttymxc4\0" \
-- 
2.7.4

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


Re: [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN

2019-05-03 Thread Pierre-Jean Texier

Hi Fabio,

Le 03/05/2019 à 19:05, Fabio Estevam a écrit :

Commit 3a7c45f6a772 ("simple-bus: add DM_FLAG_PRE_RELOC flag to
simple-bus driver") causes some i.MX boards that were converted
to DM, such as warp7, to fail to boot.

As explained by Lukas Auer:

"With the patch, U-Boot probes the drivers for devices under simple-bus
device tree nodes in the pre-relocation device model. The default value
of CONFIG_SYS_MALLOC_F_LEN (0x400) leaves U-Boot with not enough memory to
do this, causing it to hang."

Fix this problem by providing a convenient default value for
CONFIG_SYS_MALLOC_F_LEN.

Reported-by: Pierre-Jean Texier 
Suggested-by: Lukas Auer 
Signed-off-by: Fabio Estevam 
---
Changes since v1:
- Move the default setting to the main Kconfig and make it depend
on i.MX

  Kconfig | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/Kconfig b/Kconfig
index 7a5491bd67..fd4ff42c17 100644
--- a/Kconfig
+++ b/Kconfig
@@ -138,6 +138,8 @@ config SYS_MALLOC_F_LEN
depends on SYS_MALLOC_F
default 0x1000 if AM33XX
default 0x2800 if SANDBOX
+   default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \
+  ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5)
default 0x400
help
  Before relocation, memory is very limited on many platforms. Still,



Tested-by: Pierre-Jean Texier 


Thanks

Pierre-Jean

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


Re: [U-Boot] WaRP7 nok on master

2019-05-02 Thread Pierre-Jean Texier

Hi Lucas,

Le 02/05/2019 à 12:21, Auer, Lukas a écrit :

Hi Stefano,

On Thu, 2019-05-02 at 10:55 +0200, Stefano Babic wrote:

Hi Piere, Lukasz,

On 01/05/19 20:49, Pierre-Jean Texier wrote:

Hi Fabio, Stefano,

Just FYI, I just tested the U-Boot master branch (with u-boot-imx merges).
And I have some problems when the WaRP7 boot-up.
In fact, no output...

However, on u-boot-imx, everything works well (tags/u-boot-imx-20190426).

After some manipulation with git bisect, it appears that the problem
comes from commit [1].
So, with a git revert 3a7c45f6a7725808e2e82908be4bc90d4d78e737,
everything works again.

Without this revert, the WaRP7 is not
functional (also the pico-pi i.MX7 if DM_SERIAL is implemented, tested
by Joris in CC)

This is painful - Lukasz, can you comment this ? Your patch is small and
it seems to fix just qemu, it is difficult to understand why it has side
effects on real SOCs like i.MX.


I was able to reproduce the issue on my side. With the patch, U-Boot
probes the drivers for devices under simple-bus device tree nodes in
the pre-relocation device model. The default value of
CONFIG_SYS_MALLOC_LEN (0x400) leaves U-Boot with not enough memory to
do this, causing it to hang. If it is increased, for example to 0x1000,
everything works again.

Let me know, how you want to fix this. If you want, I can send a patch
to increase CONFIG_SYS_MALLOC_LEN for the i.MX parts.



Indeed, everything works again with 0x1000 for CONFIG_SYS_MALLOC_LEN.

Thanks


Pierre-Jean




Thanks,
Lukas


[1]
https://github.com/trini/u-boot/commit/3a7c45f6a7725808e2e82908be4bc90d4d78e737


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


[U-Boot] WaRP7 nok on master

2019-05-01 Thread Pierre-Jean Texier

Hi Fabio, Stefano,

Just FYI, I just tested the U-Boot master branch (with u-boot-imx merges).
And I have some problems when the WaRP7 boot-up.
In fact, no output...

However, on u-boot-imx, everything works well (tags/u-boot-imx-20190426).

After some manipulation with git bisect, it appears that the problem 
comes from commit [1].
So, with a git revert 3a7c45f6a7725808e2e82908be4bc90d4d78e737, 
everything works again.


Without this revert, the WaRP7 is not
functional (also the pico-pi i.MX7 if DM_SERIAL is implemented, tested 
by Joris in CC).




Thanks

BR
/Pierre-Jean

[1] 
https://github.com/trini/u-boot/commit/3a7c45f6a7725808e2e82908be4bc90d4d78e737


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


[U-Boot] [PATCH v2 2/2] warp7: Switch to DM USB

2019-04-19 Thread Pierre-Jean Texier
This commit switches to DM USB for warp7 and warp7_bl33 defconfigs.

Signed-off-by: Pierre-Jean Texier 
Signed-off-by: Joris Offouga 
---

Changes in v2:
- Split patch
- Removed unused header file 

 arch/arm/dts/imx7s-warp.dts  | 1 +
 board/warp7/warp7.c  | 6 --
 configs/warp7_bl33_defconfig | 1 +
 configs/warp7_defconfig  | 1 +
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts
index 4d87348..db5ef67 100644
--- a/arch/arm/dts/imx7s-warp.dts
+++ b/arch/arm/dts/imx7s-warp.dts
@@ -19,6 +19,7 @@
 
aliases {
mmc0 = 
+   usb0 = 
};
 
chosen {
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 2882dc9..134a6c9 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -14,7 +14,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -128,11 +127,6 @@ int checkboard(void)
return 0;
 }
 
-int board_usb_phy_mode(int port)
-{
-   return USB_INIT_DEVICE;
-}
-
 int board_late_init(void)
 {
struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
index d34f76b..300dc38 100644
--- a/configs/warp7_bl33_defconfig
+++ b/configs/warp7_bl33_defconfig
@@ -41,6 +41,7 @@ CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_MXC_USB_OTG_HACTIVE=y
 CONFIG_USB_GADGET=y
diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index ae424ab..cabddad 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -51,6 +51,7 @@ CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_OPTEE=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_MXC_USB_OTG_HACTIVE=y
 CONFIG_USB_GADGET=y
-- 
2.7.4

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


[U-Boot] [PATCH v2 1/2] warp7: Switch to DM Serial

2019-04-19 Thread Pierre-Jean Texier
This commit switches to DM SERIAL for warp7 and warp7_bl33 defconfigs.

Signed-off-by: Pierre-Jean Texier 
Signed-off-by: Joris Offouga 
---

Changes in v2:
- Split patch
- Removed CONFIG_MXC_UART_BASE from config file

 arch/arm/dts/imx7s-warp.dts  | 4 
 configs/warp7_bl33_defconfig | 2 ++
 configs/warp7_defconfig  | 2 ++
 include/configs/warp7.h  | 2 --
 4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts
index d28b7ec..4d87348 100644
--- a/arch/arm/dts/imx7s-warp.dts
+++ b/arch/arm/dts/imx7s-warp.dts
@@ -21,6 +21,10 @@
mmc0 = 
};
 
+   chosen {
+   stdout-path = 
+   };
+
gpio-keys {
compatible = "gpio-keys";
pinctrl-0 = <_gpio>;
diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
index 6eaf152..d34f76b 100644
--- a/configs/warp7_bl33_defconfig
+++ b/configs/warp7_bl33_defconfig
@@ -38,6 +38,8 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_MXC_USB_OTG_HACTIVE=y
diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 28aa06f..ae424ab 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -47,6 +47,8 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
 CONFIG_OPTEE=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 043f286..2bbf691 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -24,8 +24,6 @@
 #endif
 #endif
 
-#define CONFIG_MXC_UART_BASE   UART1_IPS_BASE_ADDR
-
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN  (35 * SZ_1M)
 
-- 
2.7.4

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


[U-Boot] [PATCH v2 0/2] Convert WaRP7 to DM_USB and DM_SERIAL

2019-04-19 Thread Pierre-Jean Texier
This series convert the WaRP7 to the following DM:
-CONFIG_DM_USB
-CONFIG_DM_SERIAL

Change in v2: 
- Now split in two distinct patches (DM_USB & DM_SERIAL)
 
Pierre-Jean Texier (2):
  warp7: Switch to DM Serial
  warp7: Switch to DM USB

 arch/arm/dts/imx7s-warp.dts  | 5 +
 board/warp7/warp7.c  | 6 --
 configs/warp7_bl33_defconfig | 3 +++
 configs/warp7_defconfig  | 3 +++
 include/configs/warp7.h  | 2 --
 5 files changed, 11 insertions(+), 8 deletions(-)

-- 
2.7.4

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


[U-Boot] [PATCH] warp7: defconfig: Switch to DM for USB and SERIAL

2019-04-13 Thread Pierre-Jean Texier
This commit switches to DM USB and SERIAL for warp7 and warp7_bl33 defconfigs.

Signed-off-by: Pierre-Jean Texier 
Signed-off-by: Joris Offouga 
---
 arch/arm/dts/imx7s-warp.dts  | 5 +
 board/warp7/warp7.c  | 5 -
 configs/warp7_bl33_defconfig | 2 ++
 configs/warp7_defconfig  | 2 ++
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts
index d28b7ec..db5ef67 100644
--- a/arch/arm/dts/imx7s-warp.dts
+++ b/arch/arm/dts/imx7s-warp.dts
@@ -19,6 +19,11 @@
 
aliases {
mmc0 = 
+   usb0 = 
+   };
+
+   chosen {
+   stdout-path = 
};
 
gpio-keys {
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 2882dc9..797e09c 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -128,11 +128,6 @@ int checkboard(void)
return 0;
 }
 
-int board_usb_phy_mode(int port)
-{
-   return USB_INIT_DEVICE;
-}
-
 int board_late_init(void)
 {
struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
index 6eaf152..4308c64 100644
--- a/configs/warp7_bl33_defconfig
+++ b/configs/warp7_bl33_defconfig
@@ -38,7 +38,9 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_SERIAL=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_MXC_USB_OTG_HACTIVE=y
 CONFIG_USB_GADGET=y
diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 28aa06f..3f7863b 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -47,8 +47,10 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_SERIAL=y
 CONFIG_OPTEE=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_MXC_USB_OTG_HACTIVE=y
 CONFIG_USB_GADGET=y
-- 
2.7.4

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


[U-Boot] [PATCH] warp7: Fix dfu_alt_info setting after DM conversion

2019-04-12 Thread Pierre-Jean Texier
After DM conversion, U-Boot is larger than 512 KiB, so we need to increase
the "size" of the dfu_alt_info setting.

Signed-off-by: Pierre-Jean Texier 
---
 include/configs/warp7.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 043f286..4947597 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -39,7 +39,7 @@
 #define CONFIG_SERIAL_TAG
 
 #define CONFIG_DFU_ENV_SETTINGS \
-   "dfu_alt_info=boot raw 0x2 0x400 mmcpart 1\0" \
+   "dfu_alt_info=boot raw 0x2 0x1000 mmcpart 1\0" \
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_DFU_ENV_SETTINGS \
-- 
2.7.4

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


[U-Boot] [PATCH] warp7: configs: add CONFIG_FIT option

2018-09-29 Thread Pierre-Jean Texier
This enable FIT image support.

Signed-off-by: Pierre-Jean Texier 
---
 configs/warp7_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 15a6673..919d484 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -8,6 +8,8 @@ CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
 CONFIG_IMX_RDC=y
 CONFIG_IMX_BOOTAUX=y
 CONFIG_NR_DRAM_BANKS=1
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/warp7/imximage.cfg"
 CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_BOOTD is not set
-- 
2.7.4

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


[U-Boot] [PATCH] warp7: configs: add CONFIG_FIT option

2018-09-29 Thread Pierre-Jean Texier
This enable FIT image support.

Signed-off-by: Pierre-Jean Texier 
---
 configs/warp7_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 15a6673..919d484 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -8,6 +8,8 @@ CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
 CONFIG_IMX_RDC=y
 CONFIG_IMX_BOOTAUX=y
 CONFIG_NR_DRAM_BANKS=1
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/warp7/imximage.cfg"
 CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_BOOTD is not set
-- 
2.7.4

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


[U-Boot] [PATCH] doc: FIT image: fix typo

2018-08-18 Thread Pierre-Jean Texier
Fix typo in beaglebone verified boot documentation.

Signed-off-by: Pierre-Jean Texier 
---
 doc/uImage.FIT/beaglebone_vboot.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/uImage.FIT/beaglebone_vboot.txt 
b/doc/uImage.FIT/beaglebone_vboot.txt
index f1862c2..685ec1f 100644
--- a/doc/uImage.FIT/beaglebone_vboot.txt
+++ b/doc/uImage.FIT/beaglebone_vboot.txt
@@ -462,7 +462,7 @@ you sign.
cd $UBOOT
make O=b/am335x_boneblack_vboot EXT_DTB=${WORK}/am335x-boneblack-pubkey.dtb
 
-Here we are overrriding the normal device tree file with our one, which
+Here we are overriding the normal device tree file with our one, which
 contains the public key.
 
 Now you have a special U-Boot image with the public key. It can verify can
-- 
2.7.4

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


[U-Boot] [PATCH v3 2/2] warp7: configs: enable CONFIG_CMD_FS_GENERIC

2018-03-31 Thread Pierre-Jean TEXIER
This enable generic file system commands (load, ls).

Signed-off-by: Pierre-Jean TEXIER <texier@gmail.com>
---
Changes for v3:
- drop 'warp7_secure_defconfig'

 configs/warp7_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 29c4512..3856918 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DFU_MMC=y
 CONFIG_USB=y
-- 
2.7.4

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


[U-Boot] [PATCH v3 1/2] warp7: include/configs: use generic fs commands in CONFIG_EXTRA_ENV_SETTINGS

2018-03-31 Thread Pierre-Jean TEXIER
use the generic filesystem command 'load' rather
than 'fatload' to avoid per-fs specific commands.

Signed-off-by: Pierre-Jean TEXIER <texier@gmail.com>
---
Changes for v3:
- None

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

diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index fe96988..82dc629 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -45,11 +45,11 @@
"mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=PARTUUID=${uuid} rootwait rw\0" \
"loadbootscript=" \
-   "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+   "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
-   "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
-   "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
+   "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
+   "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run finduuid; " \
"run mmcargs; " \
-- 
2.7.4

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


[U-Boot] [PATCH v2 2/2] warp7: include/configs: use generic fs commands in CONFIG_EXTRA_ENV_SETTINGS

2018-03-28 Thread Pierre-Jean TEXIER
use the generic filesystem command 'load' rather
than 'fatload' to avoid per-fs specific commands.

Signed-off-by: Pierre-Jean TEXIER <texier@gmail.com>
---
Changes for v2:
- apply modications into warp7.h
- replace fatload command in CONFIG_EXTRA_ENV_SETTINGS (prefer 'load')

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

diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index fe96988..82dc629 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -45,11 +45,11 @@
"mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=PARTUUID=${uuid} rootwait rw\0" \
"loadbootscript=" \
-   "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+   "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
-   "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
-   "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
+   "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
+   "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run finduuid; " \
"run mmcargs; " \
-- 
2.7.4

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


[U-Boot] [PATCH v2 1/2] warp7: configs: enable CONFIG_CMD_FS_GENERIC

2018-03-28 Thread Pierre-Jean TEXIER
This enable generic file system commands (load, ls).

Signed-off-by: Pierre-Jean TEXIER <texier@gmail.com>
---
Changes for v2:
- None

 configs/warp7_defconfig| 1 +
 configs/warp7_secure_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 29c4512..3856918 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DFU_MMC=y
 CONFIG_USB=y
diff --git a/configs/warp7_secure_defconfig b/configs/warp7_secure_defconfig
index 7310855..e894578 100644
--- a/configs/warp7_secure_defconfig
+++ b/configs/warp7_secure_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
 CONFIG_DFU_MMC=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
-- 
2.7.4

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


Re: [U-Boot] [PATCH] warp7: configs: enable CONFIG_CMD_FS_GENERIC

2018-03-28 Thread Pierre-Jean Texier

Hi Fabio


Le 28/03/2018 à 03:02, Fabio Estevam a écrit :

Hi Pierre-Jean,

On Tue, Mar 27, 2018 at 4:50 PM, Pierre-Jean TEXIER
<texier@gmail.com> wrote:

This enable generic file system commands (load, ls).

Signed-off-by: Pierre-Jean TEXIER <texier@gmail.com>
---
  configs/warp7_defconfig| 1 +
  configs/warp7_secure_defconfig | 1 +
  2 files changed, 2 insertions(+)

diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 29c4512..3856918 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_EXT2=y
  CONFIG_CMD_EXT4=y
  CONFIG_CMD_EXT4_WRITE=y
  CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y

It is OK to make this change, but please also change


Ok thanks !


include/configs/warp.h so that is uses 'load' instead of 'fatload'.


No problem, I will submit a patch for this part.



Also, please run ./scripts/get_maintainer.pl so that you do not miss
to Cc the board maintainer and also Stefano Babic.


Indeed, sorry for that, this is an oversight.



Thanks


Thanks

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


[U-Boot] [PATCH] warp7: configs: enable CONFIG_CMD_FS_GENERIC

2018-03-27 Thread Pierre-Jean TEXIER
This enable generic file system commands (load, ls).

Signed-off-by: Pierre-Jean TEXIER <texier@gmail.com>
---
 configs/warp7_defconfig| 1 +
 configs/warp7_secure_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 29c4512..3856918 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DFU_MMC=y
 CONFIG_USB=y
diff --git a/configs/warp7_secure_defconfig b/configs/warp7_secure_defconfig
index 7310855..e894578 100644
--- a/configs/warp7_secure_defconfig
+++ b/configs/warp7_secure_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
 CONFIG_DFU_MMC=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
-- 
2.7.4

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