RE: [PATCH] arm: dts: socfpga: cyclone5: Update i2c-scl-falling-time-ns

2020-06-08 Thread Tan, Ley Foon
> -Original Message- > From: Marek Vasut > Sent: Friday, June 5, 2020 8:52 PM > To: Tan, Ley Foon ; u-boot@lists.denx.de > Cc: Ley Foon Tan ; See, Chin Liang > ; Simon Goldschmidt > ; Ang, Chee Hong > > Subject: Re: [PATCH] arm: dts: socfpga: cyclone5: Update i2c-scl-falling- > time-ns

Re: [PATCH v2 07/10] gpio: dw: Return output value when direction is out

2020-06-08 Thread Sean Anderson
On 6/7/20 9:26 PM, Sean Anderson wrote: > dm_gpio_ops.get_value can be called when the gpio is either input or > output. The current dw code always returns the input value, which is > invalid if the direction is set to out. > > Signed-off-by: Sean Anderson > --- > This patch was previously submit

[PATCH 7/8] efi_loader: signature: rework for intermediate certificates support

2020-06-08 Thread AKASHI Takahiro
In this commit, efi_signature_verify(with_sigdb) will be re-implemented using pcks7_verify_one() in order to support certificates chain, where the signer's certificate will be signed by an intermediate CA (certificate authority) and the latter's certificate will also be signed by another CA and so

[PATCH 8/8] test/py: efi_secboot: add test for intermediate certificates

2020-06-08 Thread AKASHI Takahiro
In this test case, an image may have a signature with additional intermediate certificates. A chain of trust will be followed and all the certificates in the middle of chain must be verified before loading. Signed-off-by: AKASHI Takahiro --- test/py/tests/test_efi_secboot/conftest.py| 138 ++

[PATCH 6/8] lib: crypto: export and enhance pkcs7_verify_one()

2020-06-08 Thread AKASHI Takahiro
The function, pkcs7_verify_one(), will be utilized to rework signature verification logic aiming to support intermediate certificates in "chain of trust." To do that, its function interface is expanded, adding an extra argument which is expected to return the last certificate in trusted chain. The

[PATCH 4/8] lib: crypto: import pkcs7_verify.c from linux

2020-06-08 Thread AKASHI Takahiro
The file, pkcs7_verify.c, will now be imported from linux code and modified to fit into U-Boot environment. In particular, pkcs7_verify_one() function will be used in a later patch to rework signature verification logic aiming to support intermediate certificates in "chain of trust." Signed-off-b

[PATCH 2/8] lib: crypto: add public_key_verify_signature()

2020-06-08 Thread AKASHI Takahiro
This function will be called from x509_check_for_self_signed() and pkcs7_verify_one(), which will be imported from linux in a later patch. While it does exist in linux code and has a similar functionality of rsa_verify(), it calls further linux-specific interfaces inside. That could lead to more f

[PATCH 3/8] lib: crypto: enable x509_check_for_self_signed()

2020-06-08 Thread AKASHI Takahiro
When the file, x509_public_key.c, was imported from linux code in commit b4adf627d5b7 ("lib: crypto: add x509 parser"), x509_check_for_self_signed() was commented out for simplicity. Now it need be enabled in order to make pkcs7_verify_one(), which will be imported in a later patch, functional

[PATCH 1/8] lib: rsa: export rsa_verify_with_pkey()

2020-06-08 Thread AKASHI Takahiro
This function will be used to implement public_key_verify_signature() in a later patch. rsa_verify() is not suitable here because calculation of message digest is not necessary. Signed-off-by: AKASHI Takahiro --- include/u-boot/rsa.h | 3 +++ lib/rsa/rsa-verify.c | 8 2 files changed, 7

[PATCH 5/8] lib: crypto: add pkcs7_digest()

2020-06-08 Thread AKASHI Takahiro
This function was nullified when the file, pkcs7_verify.c, was imported because it calls further linux-specific interfaces inside, hence that could lead to more files being imported from linux. We need this function in pkcs7_verify_one() and so simply re-implement it here instead of re-using the c

[PATCH 0/8] efi_loader: secure boot: support intermediate certificates in signature

2020-06-08 Thread AKASHI Takahiro
Summary === under the current implementation of secure boot merged in v2020.07-rc1, UEFI subsystem verifies a signature using certificates that are coming from signature dtabase, i.e. "db." In real world, an image is signed by a signer, but its certificate can also be signed by another CA and,

[PATCH v2 17/17] test/py: efi_secboot: add a test for verifying with digest of signed image

2020-06-08 Thread AKASHI Takahiro
Signature database (db or dbx) may have not only certificates that contain a public key for RSA decryption, but also digests of signed images. In this test case, if database has an image's digest (EFI_CERT_SHA256_GUID) and if the value matches to a hash value calculated from image's binary, authen

[PATCH v2 15/17] test/py: efi_secboot: add a test against certificate revocation

2020-06-08 Thread AKASHI Takahiro
Revocation database (dbx) may have not only certificates, but also message digests of certificates with revocation time (EFI_CERT_X509_SHA256_GUILD). In this test case, if the database has such a digest and if the value matches to a certificate that created a given image's signature, authenticatio

[PATCH v2 16/17] test/py: efi_secboot: add a test for multiple signatures

2020-06-08 Thread AKASHI Takahiro
In this test case, an image is signed multiple times with different keys. If any of signatures contained is not verified, the whole authentication check should fail. Signed-off-by: AKASHI Takahiro --- test/py/tests/test_efi_secboot/conftest.py| 7 +++ test/py/tests/test_efi_secboot/test_sig

[PATCH v2 14/17] test/py: efi_secboot: split "signed image" test case-1 into two cases

2020-06-08 Thread AKASHI Takahiro
Split the existing test case-1 into case1 and a new case-2: case-1 for non-SecureBoot mode; case-2 for SecureBoot mode. In addition, one corner case is added to case-2; a image is signed but a corresponding certificate is not yet installed in "db." Signed-off-by: AKASHI Takahiro --- test/py/tes

[PATCH v2 13/17] test/py: efi_secboot: fix test case 1g of test_authvar

2020-06-08 Thread AKASHI Takahiro
In the test case (1g) of test_authvar, "db" is mistakenly used, and it ends up being the exact same as (1f). So correct it as "dbx" test case. Signed-off-by: AKASHI Takahiro --- test/py/tests/test_efi_secboot/test_authvar.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) dif

[PATCH v2 10/17] efi_loader: image_loader: verification for all signatures should pass

2020-06-08 Thread AKASHI Takahiro
A signed image may have multiple signatures in - each WIN_CERTIFICATE in authenticode, and/or - each SignerInfo in pkcs7 SignedData (of WIN_CERTIFICATE) In the initial implementation of efi_image_authenticate(), the criteria of verification check for multiple signatures case is a bit ambiguous

[PATCH v2 11/17] efi_loader: image_loader: add digest-based verification for signed image

2020-06-08 Thread AKASHI Takahiro
In case that a type of certificate in "db" or "dbx" is EFI_CERT_X509_SHA256_GUID, it is actually not a certificate which contains a public key for RSA decryption, but a digest of image to be loaded. If the value matches to a value calculated from a given binary image, it is granted for loading. Wi

[PATCH v2 12/17] test/py: efi_secboot: remove all "re.search"

2020-06-08 Thread AKASHI Takahiro
Currently, we don't use any regular expression in matching outputs from U-Boot. Since its use is just redundant, we can remove all. Signed-off-by: AKASHI Takahiro --- .../py/tests/test_efi_secboot/test_authvar.py | 73 +-- test/py/tests/test_efi_secboot/test_signed.py | 34 --

[PATCH v2 09/17] efi_loader: signature: make efi_hash_regions more generic

2020-06-08 Thread AKASHI Takahiro
There are a couple of occurrences of hash calculations in which a new efi_hash_regions will be commonly used. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_signature.c | 44 +- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/lib/efi_loader/

[PATCH v2 08/17] efi_loader: signature: fix a size check against revocation list

2020-06-08 Thread AKASHI Takahiro
Since the size check against an entry in efi_search_siglist() is incorrect, this function will never find out a to-be-matched certificate and its associated revocation time in the signature list. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_signature.c | 5 +++-- 1 file changed, 3 inser

[PATCH v2 06/17] efi_loader: image_loader: add a check against certificate type of authenticode

2020-06-08 Thread AKASHI Takahiro
UEFI specification requires that we shall support three type of certificates of authenticode in PE image: WIN_CERT_TYPE_EFI_GUID with the guid, EFI_CERT_TYPE_PCKS7_GUID WIN_CERT_TYPE_PKCS_SIGNED_DATA WIN_CERT_TYPE_EFI_PKCS1_15 As EDK2 does, we will support the first two that are pkcs7 Signed

[PATCH v2 07/17] efi_loader: image_loader: retrieve authenticode only if it exists

2020-06-08 Thread AKASHI Takahiro
Since the certificate table, which is indexed by IMAGE_DIRECTORY_ENTRY_SECURITY and contains authenticode in PE image, doesn't always exist, we should make sure that we will retrieve its pointer only if it exists. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_image_loader.c | 29

[PATCH v2 05/17] efi_loader: image_loader: replace debug to EFI_PRINT

2020-06-08 Thread AKASHI Takahiro
Just for style consistency, replace all the uses of debug() to EFI_PRINT() in efi_image_loader.c. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_image_loader.c | 64 --- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/lib/efi_loader/efi_image_lo

[PATCH v2 04/17] efi_loader: variable: replace debug to EFI_PRINT

2020-06-08 Thread AKASHI Takahiro
Just for style consistency, replace all the uses of debug() to EFI_PRINT in efi_variable.c. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_variable.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_l

[PATCH v2 03/17] efi_loader: signature: replace debug to EFI_PRINT

2020-06-08 Thread AKASHI Takahiro
Just for style consistency, replace all the uses of debug to EFI_PRINT in efi_signature.c Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_signature.c | 121 + 1 file changed, 62 insertions(+), 59 deletions(-) diff --git a/lib/efi_loader/efi_signature.c b/li

[PATCH v2 02/17] Revert "test: stabilize test_efi_secboot"

2020-06-08 Thread AKASHI Takahiro
This reverts commit 5827c2545849441dd60467565aac11964259972f. Signed-off-by: AKASHI Takahiro --- test/py/tests/test_efi_secboot/test_authvar.py | 8 test/py/tests/test_efi_secboot/test_signed.py | 4 ++-- test/py/tests/test_efi_secboot/test_unsigned.py | 6 +++--- 3 files changed, 9

[PATCH v2 00/17] efi_loader: rework/improve UEFI secure boot code

2020-06-08 Thread AKASHI Takahiro
Summary === I'm currently working on reworking UEFI secure boot, aiming to add "intermediate certificates" support. In this effort, I found a couple of issues that should immediately be fixed or useful improvements even without intermediate certificates support. Each commit in this patch serie

[PATCH v2 01/17] efi_loader: change efi objects initialization order

2020-06-08 Thread AKASHI Takahiro
The simplest solution to revert the commit b32ac16f9a32 ("test/py: fix test_efi_secboot/conftest.py") is to move efi_console_register() forward before efi_disk_register(). Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_setup.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-)

Re: [PATCH] riscv: sbi: Add newline to error message

2020-06-08 Thread Bin Meng
On Sun, Jun 7, 2020 at 3:26 AM Sean Anderson wrote: > > Signed-off-by: Sean Anderson > > --- > > common/spl/spl_opensbi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Bin Meng

Re: [PATCH] nvme: Invalidate dcache before submitting admin cmd

2020-06-08 Thread Bin Meng
Hi André, On Mon, Jun 8, 2020 at 9:52 PM André Przywara wrote: > > On 07/06/2020 12:22, Jagan Teki wrote: > > Hi, > > (CC: ing Mark) > > Without looking to deep, I think invalidating the cache might be the > right thing to do, but the rationale or at least the wording of it seems > somehow flawed

RE: [EXT] [PATCH v2 1/1] imx: rom api: fix image offset computation

2020-06-08 Thread Ye Li
Hi Sébastien, > -Original Message- > From: U-Boot On Behalf Of > sba...@denx.de > Sent: 2020年6月9日 1:22 > To: Sébastien Szymanski ; u- > b...@lists.denx.de > Subject: [EXT] [PATCH v2 1/1] imx: rom api: fix image offset computation > > Caution: EXT Email > > > When not booting from FlexSP

Re: [BUG] ut lib lib_rsa_verify_valid crashes on qemu_arm if RSA_VERIFY_WITH_PKEY=y

2020-06-08 Thread Heinrich Schuchardt
Am June 9, 2020 1:42:14 AM UTC schrieb AKASHI Takahiro : >Heinrich, > >On Mon, Jun 08, 2020 at 11:08:53PM +0200, Heinrich Schuchardt wrote: >> Hello Takahiro, >> >> when trying to execute command >> >> ut lib lib_rsa_verify_valid >> >> on qemu_arm_defconfig with CONFIG_UNIT_TEST=y and >> CONFIG

[PATCH 2/2] riscv: fu540: dts: Correct reg size of otp and dmc nodes

2020-06-08 Thread Bin Meng
From: Bin Meng Signed-off-by: Bin Meng --- arch/riscv/dts/fu540-c000-u-boot.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/dts/fu540-c000-u-boot.dtsi b/arch/riscv/dts/fu540-c000-u-boot.dtsi index 0d3f710..35c153d 100644 --- a/arch/riscv/dts/fu540-c000-

[PATCH 1/2] riscv: fu540: dts: Remove the unnecessary space in the cpu2_intc node

2020-06-08 Thread Bin Meng
From: Bin Meng Signed-off-by: Bin Meng --- arch/riscv/dts/fu540-c000-u-boot.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/dts/fu540-c000-u-boot.dtsi b/arch/riscv/dts/fu540-c000-u-boot.dtsi index 9bba554..0d3f710 100644 --- a/arch/riscv/dts/fu540-c000-u-bo

Re: [PATCH 3/6] env: Fix invalid env handling in env_init()

2020-06-08 Thread Marek Vasut
On 6/9/20 12:57 AM, Tom Rini wrote: > On Mon, Jun 08, 2020 at 11:45:18PM +0200, Marek Vasut wrote: >> On 6/6/20 6:24 PM, Tom Rini wrote: >>> On Sat, Jun 06, 2020 at 04:54:52PM +0200, Marek Vasut wrote: On 6/5/20 11:11 PM, Tom Rini wrote: > On Fri, Jun 05, 2020 at 10:47:24PM +0200, Marek Va

Re: [BUG] ut lib lib_rsa_verify_valid crashes on qemu_arm if RSA_VERIFY_WITH_PKEY=y

2020-06-08 Thread AKASHI Takahiro
Heinrich, On Mon, Jun 08, 2020 at 11:08:53PM +0200, Heinrich Schuchardt wrote: > Hello Takahiro, > > when trying to execute command > > ut lib lib_rsa_verify_valid > > on qemu_arm_defconfig with CONFIG_UNIT_TEST=y and > CONFIG_RSA_VERIFY_WITH_PKEY=y it crashes in > > free((void *)prop->modulus

RE: [PATCH v2 07/10] gpio: dw: Return output value when direction is out

2020-06-08 Thread Tan, Ley Foon
> -Original Message- > From: Sean Anderson > Sent: Monday, June 8, 2020 9:27 AM > To: u-boot@lists.denx.de > Cc: Tom Rini ; Bin Meng ; > Rick Chen ; Simon Glass ; > Sean Anderson ; Anatolij Gustschin ; > Tan, Ley Foon ; Marek Vasut ; > Simon Goldschmidt > Subject: [PATCH v2 07/10] gpio

RE: [PATCH v2 05/10] gpio: dw: Fix warnings about casting int to pointer

2020-06-08 Thread Tan, Ley Foon
> -Original Message- > From: Sean Anderson > Sent: Monday, June 8, 2020 9:27 AM > To: u-boot@lists.denx.de > Cc: Tom Rini ; Bin Meng ; > Rick Chen ; Simon Glass ; > Sean Anderson ; Anatolij Gustschin ; > Tan, Ley Foon ; Marek Vasut ; > Simon Goldschmidt > Subject: [PATCH v2 05/10] gpio

Re: [PATCH] cmd: Correct the 'md.q' command

2020-06-08 Thread Tom Rini
On Sun, Jun 07, 2020 at 08:33:00PM -0600, Simon Glass wrote: > This displays incorrect data at present due to a missing header file > in display_options. Fix it. > > Fixes: 09140113108 ("command: Remove the cmd_tbl_t typedef") > > Signed-off-by: Simon Glass Applied to u-boot/master, thanks! -

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

2020-06-08 Thread Tom Rini
Hey all, It's release day and I've tagged v2020.07-rc4. We continue to move along at a good pace. But at this point, we need to take in just bug fixes and Kconfig migrations. To help with any sort of contention on this, I'm also opening up -next at this point. Once again, for a changelog, git

Re: [PATCH 3/6] env: Fix invalid env handling in env_init()

2020-06-08 Thread Tom Rini
On Mon, Jun 08, 2020 at 11:45:18PM +0200, Marek Vasut wrote: > On 6/6/20 6:24 PM, Tom Rini wrote: > > On Sat, Jun 06, 2020 at 04:54:52PM +0200, Marek Vasut wrote: > >> On 6/5/20 11:11 PM, Tom Rini wrote: > >>> On Fri, Jun 05, 2020 at 10:47:24PM +0200, Marek Vasut wrote: > On 6/5/20 9:07 PM, To

[PATCH 1/3] rockchip: Pinebook Pro: enable rng to provide an entropy source

2020-06-08 Thread Peter Robinson
Enable the rng so UEFI can provide entropy for KASLR Signed-off-by: Peter Robinson --- arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 4 arch/arm/dts/rk3399-rockpro64-u-boot.dtsi| 4 configs/pinebook-pro-rk3399_defconfig| 2 ++ 3 files changed, 10 insertions(+) diff --git

[PATCH 3/3] rockchip: Pinebook Pro: Fix SPI flash and store env on it

2020-06-08 Thread Peter Robinson
Some minor fixes for SPI flash on the Pinebook Pro and also default to saving environment to the SPI flash as it's guaranteed to be on board. Signed-off-by: Peter Robinson --- arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 6 +- configs/pinebook-pro-rk3399_defconfig| 3 +++ include/c

[PATCH 2/3] rockchip: Pinebook Pro: Fix USB and the USB attached keyboard

2020-06-08 Thread Peter Robinson
The built in keyboard on the Pinebook Pro is attached via USB so fix this up to ensure USB works as expected. Signed-off-by: Peter Robinson --- configs/pinebook-pro-rk3399_defconfig | 5 + include/configs/pinebook-pro-rk3399.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/configs/p

Re: [PATCH 3/6] env: Fix invalid env handling in env_init()

2020-06-08 Thread Marek Vasut
On 6/6/20 6:24 PM, Tom Rini wrote: > On Sat, Jun 06, 2020 at 04:54:52PM +0200, Marek Vasut wrote: >> On 6/5/20 11:11 PM, Tom Rini wrote: >>> On Fri, Jun 05, 2020 at 10:47:24PM +0200, Marek Vasut wrote: On 6/5/20 9:07 PM, Tom Rini wrote: > On Wed, Jun 03, 2020 at 02:01:08AM +0200, Marek Vas

[BUG] ut lib lib_rsa_verify_valid crashes on qemu_arm if RSA_VERIFY_WITH_PKEY=y

2020-06-08 Thread Heinrich Schuchardt
Hello Takahiro, when trying to execute command ut lib lib_rsa_verify_valid on qemu_arm_defconfig with CONFIG_UNIT_TEST=y and CONFIG_RSA_VERIFY_WITH_PKEY=y it crashes in free((void *)prop->modulus) called from rsa_free_key_prop() called from rsa_verify_key() called from rsa_verify_with_pkey().

Re: [PATCH] Revert "lib: Improve _parse_integer_fixup_radix base 16 detection"

2020-06-08 Thread Tom Rini
On Mon, Jun 08, 2020 at 01:05:21PM -0400, Sean Anderson wrote: > On 6/8/20 2:24 AM, Michal Simek wrote: > > It is in u-boot mainline from February. Then we had to fix it in April. > > Do you have a link/commit hash for said fix? > > > In the middle of this I have seen IIC one patchset which impro

[PATCH 10/15] Allow building .rom files for non-x86 boards

2020-06-08 Thread Simon Glass
Some non-x86 devices can use SPI flash to boot and need to produce images of a fixed size to program the flash. Add a way to handle this for non-x86 boards. Signed-off-by: Simon Glass --- Makefile | 13 + 1 file changed, 13 insertions(+) diff --git a/Makefile b/Makefile index d463

[PATCH 14/15] rockchip: Enable building a SPI ROM image on jerry

2020-06-08 Thread Simon Glass
Add a simple binman config and enable CONFIG_HAS_ROM so that U-Boot produces a ROM for jerry. Change the binman image definition to support multiple images, since it may be used to build both u-boot-rockchip.bin and u-boot.rom Signed-off-by: Simon Glass --- arch/arm/dts/rk3288-u-boot.dtsi

[PATCH 15/15] rockchip: Enable building a SPI ROM image on bob

2020-06-08 Thread Simon Glass
Add a simple binman config and enable CONFIG_HAS_ROM so that U-Boot produces a ROM for bob. Signed-off-by: Simon Glass --- arch/arm/dts/rk3399-gru-u-boot.dtsi | 4 arch/arm/dts/rk3399-gru.dtsi | 2 +- arch/arm/dts/rk3399-u-boot.dtsi | 27 +++ arch

[PATCH 11/15] rockchip: jerry: Add serial support

2020-06-08 Thread Simon Glass
This option allows the serial console to work correctly. Add it. Signed-off-by: Simon Glass --- configs/chromebook_jerry_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig index 443e3cdace..7f772b828f 100644 ---

[PATCH 13/15] rockchip: Allow including rockchip dtsi on 32-bit machines

2020-06-08 Thread Simon Glass
At present this file supports only 64-bit machines. Add an #ifdef so that it can be included without problems on 32-bit machines also. Signed-off-by: Simon Glass --- arch/arm/dts/rockchip-u-boot.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch

[PATCH 12/15] rockchip: bob: Support SPI-flash booting

2020-06-08 Thread Simon Glass
Update the config for chromebook_bob to support booting from SPI flash. The existing SPL size is too small since ATF is needed, so double it. Signed-off-by: Simon Glass --- configs/chromebook_bob_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configs/chromebook

[PATCH 07/15] binman: Adjust pylibfdt for incremental build

2020-06-08 Thread Simon Glass
If the pylibfdt shared-object file is detected, then Python assumes that the libfdt.py file exists also. Sometimes when an incremental build aborts, the shared-object file is built but the libfdt.py is not. The only way out at this point is to use 'make mkproper', or similar. Fix this by removing

[PATCH 09/15] rockchip: Allow Bob to use SPI boot

2020-06-08 Thread Simon Glass
Bob is a Chromebook and can boot from SPI flash. Add it to the condition check for this. Signed-off-by: Simon Glass --- arch/arm/mach-rockchip/spl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index cddf4fd3d5

[PATCH 08/15] x86: rockchip: Change how selection of ROMs works

2020-06-08 Thread Simon Glass
Most x86 boards build a u-boot.rom which is programmed into SPI flash. But this is not unique to x86. For example some rockchip boards can also boot from SPI flash. Also, at least on x86, binary blobs are sadly quite common. It is not possible to build a functional image without them, and U-Boot n

[PATCH 06/15] binman: Fix a few typos in the entry docs

2020-06-08 Thread Simon Glass
Some typos have been fixed in the code but the entry docs were not regenerated. Fix this. Signed-off-by: Simon Glass --- tools/binman/README.entries | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/binman/README.entries b/tools/binman/README.entries index 4f2c48fdc2

[PATCH 05/15] binman: Add support for calling mkimage

2020-06-08 Thread Simon Glass
As a first step to integrating mkimage into binman, add a new entry type that feeds data into mkimage for processing and incorporates that output into the image. Signed-off-by: Simon Glass --- tools/binman/README.entries | 23 tools/binman/etype/_testing.py| 5 +++ tools

[PATCH 02/15] .gitignore: Ignore Python 3 cache directories

2020-06-08 Thread Simon Glass
These can appear when moving between branches that have different tools in the tree. Ignore them. Signed-off-by: Simon Glass --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 2e1c8bf2bf..e66aa864da 100644 --- a/.gitignore +++ b/.gitignore @@ -92

[PATCH 03/15] binman: cbfs: Fix IFWI typo

2020-06-08 Thread Simon Glass
This comment references the wrong thing. Fix it. Signed-off-by: Simon Glass --- tools/binman/etype/cbfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/binman/etype/cbfs.py b/tools/binman/etype/cbfs.py index e9aed8310c..744a32fa0c 100644 --- a/tools/binman/etype/cbf

[PATCH 01/15] dm: core Fix long line in device_bind_common()

2020-06-08 Thread Simon Glass
Fix an over-length line in this function. Signed-off-by: Simon Glass --- drivers/core/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/core/device.c b/drivers/core/device.c index a7408d9c76..2e3d555ea4 100644 --- a/drivers/core/device.c +++ b/drivers/core/d

[PATCH 04/15] binman: Correct the search patch for pylibfdt

2020-06-08 Thread Simon Glass
Now that binman uses tools/ as its base directory for importing modules, the path to the pylibfdt build by U-Boot is incorrect. Fix it. Signed-off-by: Simon Glass --- tools/binman/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/binman/main.py b/tools/binman/mai

[PATCH 00/15] rockchip: Support building ROM files automatically

2020-06-08 Thread Simon Glass
Rockchip-based Chromebooks support booting from SPI flash. It is annoying to have to manually build the SPI image when the SD image is built automatically. This feature is already available for x86 devices, so the existing mechanism is reused. Briefly, this allows a BUILD_ROM environment variable

Re: pull request of u-boot-mpc85xx for v2020.07

2020-06-08 Thread Tom Rini
On Mon, Jun 08, 2020 at 07:32:47AM +, Priyanka Jain wrote: > Dear Tom, > Please find my pull-request for u-boot-mpc85xx > https://travis-ci.org/github/p-priyanka-jain/u-boot/builds/694639674 > > Summary > DM_ETH support for P2041RDB, T1024RDB, P5040DS, P3041DS, P4080DS, bug fixes > Add TBI Ph

Re: Pull request: u-boot-rockchip-20200607

2020-06-08 Thread Tom Rini
On Mon, Jun 08, 2020 at 03:23:33PM +0800, Kever Yang wrote: > Hi Tom, > > Please pull the rockchip updates/fixes: > - revive rk3399 puma board to adapt mainline dts; > - Fix rk3399-evb stdout path; > - Enable PCIe for rk3399: Rockpro64, firefly, pinebookpro; > - Add rk3328 Rock-pi-e board; > - En

Re: [PATCH] image: Add support for ZSTD decompression

2020-06-08 Thread Robert Marko
On Wed, May 20, 2020 at 2:35 PM Tom Rini wrote: > > On Wed, May 20, 2020 at 01:38:01PM +0200, Robert Marko wrote: > > > Tom, > > I have tried various things but CONFIG_IS_ENABLED won't work inside of > > switch case. > > It works fine outside of if though. > > OK, thanks, I'll poke things more to

[PATCH v3 5/5] roc-rk3399-pc: Set LED only during POR and pwr_key=y

2020-06-08 Thread Jagan Teki
ROC-RK3399-PC has specific set of configurations for on-board led setup. Due to easiness for user to know the state of the board roc-rk339-pc board code will setup the low power led on/off, and waiting for user to press power key and then glow full power led. All this needs to happen only during

[PATCH v3 3/5] roc-rk3399-pc: Move leds setup in SPL

2020-06-08 Thread Jagan Teki
roc-rk3399-pc has some specific requirements to support LEDS, environment. board detection and etc prior to U-Boot proper. So as of now SPL would be a better stage for these custom board requirements to support unlike TPL. Adding few of these custom requirements like LEDS in TPL would require extr

[PATCH v3 4/5] rockchip: Separate the reset cause from display cpuinfo

2020-06-08 Thread Jagan Teki
reset cause is a generic functionality based on the soc cru registers in rockchip. This can be used for printing the cause of reset in cpuinfo or some other place where reset cause is needed.  Other than cpuinfo, reset cause can also be using during bootcount for checking the specific reset cause

[PATCH v3 2/5] rk3399: spl: Print SPL banner after relocation

2020-06-08 Thread Jagan Teki
Usually printing the SPL banner varies between architecture or board codes. - Some would print before relocation at the end board_init_f   for making sure all initialization prior to this would happen   properly. if at all there is a requirement for serial init,   that happens properly since it pri

[PATCH v3 0/5] roc-rk3399-pc: Custom SPL init

2020-06-08 Thread Jagan Teki
This series supports custom initialization code required for roc-rk3399-pc board on SPL stage. I have marked it as v3, since we have tried this before on this series[1]. Now this series is well mature code handling to add custom spl_board_init code parts. roc-rk3399-pc would require custom le

[PATCH v3 1/5] rk3399: spl: Add rk_spl_board_init as __weak

2020-06-08 Thread Jagan Teki
Current spl_board_init is mostly specific to puma-rk3399 target and in other words it cannot be required or useful for other rk3399 boards. Some boards require their custom initialization to be part of spl_board_init like roc-rk3399-pc require leds setup, environments. So, this patch handles all

[PATCH v4 4/4] doc: rockchip: Document SPI flash program steps

2020-06-08 Thread Jagan Teki
Document SPI flash program steps for rockchip platforms. Suggested-by: Hugh Cole-Baker Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- Changes for v4: - none doc/board/rockchip/rockchip.rst | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/do

[PATCH v4 2/4] roc-rk3399-pc: Mark default env from SPI

2020-06-08 Thread Jagan Teki
Mark the default U-Boot environment as SPI flash since this is an on board flash device. Updated env offset, size in contrast with default since the U-Boot proper has starting from 384K. Signed-off-by: Jagan Teki --- Changes for v4: - adjust env offset, size configs/roc-pc-mezzanine-rk3399_def

[PATCH v4 1/4] Makefile: Drop to handle rkspi image type

2020-06-08 Thread Jagan Teki
On rockchip platforms, SPI boot image creation is not straightforward like MMC boot image creation where former requires to specify tpl, spl in multimage format in mkimage, and later simply do a concatenate mkimaged-tpl with spl. On this note, let drop rkspi image type creation via kbuild and let

[PATCH v4 3/4] roc-rk3399-pc: Add SPI boot

2020-06-08 Thread Jagan Teki
U-Boot TPL 2020.07-rc3-00090-gd4e919f927-dirty (Jun 01 2020 - 23:45:53) Channel 0: LPDDR4, 50MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB Channel 1: LPDDR4, 50MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB 256B stride 256B stride lpddr4_set_rate: ch

[PATCH v4 0/4] rockchip: rk3399: Add SPI boot

2020-06-08 Thread Jagan Teki
Now, nvme scan seems stable with environment. This series v4 version for SPI boot support on rk3399. Changes for v4: - adjust env offset, size changes for v3: - SPI env offset, size changes based on roc-rk3399-pc Changes for v2: - same defconfig to support both MMC, SPI boot - add spi flash progr

Re: [PATCH v2 0/2] gpio: Add a managed API

2020-06-08 Thread Pratyush Yadav
Hi Simon, On 01/06/20 08:45AM, Simon Glass wrote: > Hi Pratyush, > > On Mon, 1 Jun 2020 at 05:22, Pratyush Yadav wrote: > > > > On 31/05/20 08:08AM, Simon Glass wrote: > > > Hi Pratyush, > > > > > > On Fri, 29 May 2020 at 15:39, Pratyush Yadav wrote: > > > > > > > > Hi, > > > > > > > > This is

Re: [PATCH] test_sleep.py: make sleep time and margin configurable

2020-06-08 Thread Stephen Warren
On 6/8/20 11:12 AM, Simon Glass wrote: > Hi Stephen, > > On Mon, 8 Jun 2020 at 10:43, Stephen Warren wrote: >> >> On 6/7/20 7:45 AM, Simon Glass wrote: >>> On Thu, 4 Jun 2020 at 09:24, Heiko Schocher wrote: make the sleep time and the margin configurable. Signed-off-by: Heiko

[PATCH] ARM: imx: ddr: Add missing PHY reset

2020-06-08 Thread sbabic
> The iMX7D RM 9.2.4.9.3 Power removal flow Table 9-11. Re-enabling power > explicitly says both the DDR controller and the PHY must be reset in the > correct sequence. Currently the code only resets the controller. This > leads to a misbehavior where the system brings the DRAM up after reboot, > b

[PATCH 1/5] imx8mm_evk: Select the watchdog driver

2020-06-08 Thread sbabic
> Currently the watchdog driver is not selected, which causes the following > warnings in both SPL and U-Boot proper: > U-Boot SPL 2020.07-rc1-00387-g67887903af (May 07 2020 - 23:49:27 -0300) > Normal Boot > WDT: Started without servicing (60s timeout) > Trying to boot from MMC1 > U-Boot 2020.07-

[PATCH] imx: Kconfig: enable IMX_BOOTAUX for i.MX8M

2020-06-08 Thread sbabic
> i.MX8M could use imx bootaux to boot m4/m7 core, so let's add it > to the dependency list. > Signed-off-by: Peng Fan Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH,

[PATCH 3/5] imx8mm_beacon: Select the watchdog driver

2020-06-08 Thread sbabic
> Currently watchdog driver is not selected, which causes system to reboot > after staying 60s in the U-Boot prompt. > Fix this problem by enabling CONFIG_WATCHDOG so that watchdog can be > properly serviced. > Signed-off-by: Fabio Estevam > Reviewed-by: Adam Ford Applied to u-boot-imx, master,

[PATCH 1/2] ARM: imx: m53menlo: Do not fail boot on invalid splash screen

2020-06-08 Thread sbabic
> None of these splash screen loading errors are so critical as to > justify complete failure to boot, so just print error message as > needed and return 0, the boot can very likely continue without > the splash. > Fix a couple of missing free(dst) instances as well. > Signed-off-by: Marek Vasut >

[PATCH v3 2/5] imx8mp_evk: spl: drop timer_init

2020-06-08 Thread sbabic
> From: Peng Fan > timer_init has been invoked in arch_cpu_init, no need to invoke > it again in board code. > Signed-off-by: Peng Fan > Signed-off-by: Fabio Estevam Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic --

[PATCH v3 5/5] imx: imx8mp_evk: fix boot issue

2020-06-08 Thread sbabic
> From: Peng Fan > The u-boot-spl.bin pad with ddr firmware conflicts with the > CONFIG_MALLOC_F_ADDR area, the ddr firmware will be overwritten > by malloc in SPL stage and cause ddr initialization not able > to finish. So update the related addresses to fix the issue. > Reported-by: Fabio Esteva

Re: [PATCH v1 00/15] add basic driver support for broadcom NS3 soc

2020-06-08 Thread Rayagonda Kokatanur
On Mon, Jun 8, 2020 at 10:43 PM Simon Glass wrote: > > Hi Rayagonda, > > On Mon, 8 Jun 2020 at 11:03, Rayagonda Kokatanur > wrote: > > > > Hi Simon, > > > > On Thu, Jun 4, 2020 at 8:30 AM Simon Glass wrote: > > > > > > Hi Rayagonda, > > > > > > On Wed, 3 Jun 2020 at 03:10, Rayagonda Kokatanur >

[PATCH 4/5] imx8mp_evk: Select the watchdog driver

2020-06-08 Thread sbabic
> Currently watchdog driver is not selected, which causes system to reboot > after staying 60s in the U-Boot prompt. > Fix this problem by enabling CONFIG_WATCHDOG so that watchdog can be > properly serviced. > Signed-off-by: Fabio Estevam Applied to u-boot-imx, master, thanks ! Best regards, St

[PATCH 2/5] imx8mn_ddr4_evk: Select the watchdog driver

2020-06-08 Thread sbabic
> Currently watchdog driver is not selected, which causes system to reboot > after staying 60s in the U-Boot prompt. > Fix this problem by enabling CONFIG_WATCHDOG so that watchdog can be > properly serviced. > Signed-off-by: Fabio Estevam Applied to u-boot-imx, master, thanks ! Best regards, St

[PATCH] imx8mp_evk: Add a README file

2020-06-08 Thread sbabic
> Add a README file explaining the U-Boot build and SD card flash procedures. > Signed-off-by: Fabio Estevam Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing

[PATCH v3 1/5] imx8mp_evk: spl: drop useless code

2020-06-08 Thread sbabic
> From: Peng Fan > Drop useless getting ccm device, there is no need to explicted do this > in board code, and we not enable SPL CLK currently. > Signed-off-by: Peng Fan > Signed-off-by: Fabio Estevam Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- =

[PATCH v3 4/5] imx8mp_evk: spl: no need the code since spl framework could do that

2020-06-08 Thread sbabic
> From: Peng Fan > We no need invoke the code, since spl framework could help > us do that. > Signed-off-by: Peng Fan > Signed-off-by: Fabio Estevam Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- = DEN

imx: move ATF to the back of the FIT to fix loading over yModem

2020-06-08 Thread sbabic
> With yModem the FIT Image is only supplied once, so we can only > seek forward in the yModem supplied image and never backwards. > With the recent changes to the SPL mechanism, including loading > U-Boot first, FDT after, then the loadables, we must also reorder > the FIT image script to make sur

[PATCH 2/2] ARM: dts: imx: m53menlo: Convert to DM_ETH

2020-06-08 Thread sbabic
> Convert the board to DM_ETH instead of legacy networking. This requires > a minor addition to the DT to satisfy the requirement for specifying a > PHY node. No functional change from board user perspective. > Signed-off-by: Marek Vasut > Cc: Fabio Estevam > Cc: NXP i.MX U-Boot Team > Cc: Peng

[PATCH] imx: Update MTD partitions layout for display5 (i.MX6Q) board

2020-06-08 Thread sbabic
> This change updates the MTD partition layout on SPI-NOR memory for display5 > board. > Signed-off-by: Lukasz Majewski Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH,

[PATCH] ARM: dts: imxrt1050: indent lcdif node correctly

2020-06-08 Thread sbabic
> Accidentally submitted a patch with indentation not correct, let's fix it > by indenting wrong lines. > Signed-off-by: Giulio Benetti > Acked-by: Peng Fan Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- ==

[PATCH] power: pmic: Add SPL Kconfig entry for PFUZE100

2020-06-08 Thread sbabic
> Add Kconfig entry for the PFUZE PMIC, SPL variant. > Signed-off-by: Marek Vasut > Cc: Fabio Estevam > Cc: Jaehoon Chung > Cc: Peng Fan > Cc: Stefano Babic > Reviewed-by: Jaehoon Chung Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- =

[PATCH v3 3/5] imx8mp_evk: spl: use spl_early_init

2020-06-08 Thread sbabic
> From: Peng Fan > Use spl_early_init to replace spl_init, spl_init will be invoked > in board_init_r, we only need use spl_early_init to setup malloc > and scan early dt. > Signed-off-by: Peng Fan > Signed-off-by: Fabio Estevam Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babi

[PATCH v2 1/1] imx: rom api: fix image offset computation

2020-06-08 Thread sbabic
> When not booting from FlexSPI, the offset computation is: > offset = image_offset + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512 - > 0x8000; > When booting from SD card or eMMC user partition, image_offset is > 0x8000. It is useless to add and remove 0x8000. > When booting from other device, im

  1   2   >