[PATCH 1/2] riscv: sifive: fu540: enable all cache ways from U-Boot proper

2020-05-28 Thread Pragnesh Patel
Add L2 cache node to enable all cache ways from U-Boot proper. Signed-off-by: Pragnesh Patel Reviewed-by: Bin Meng --- arch/riscv/cpu/fu540/Makefile | 1 + arch/riscv/cpu/fu540/cache.c | 53 +++ arch/riscv/dts/fu540-c000-u-boot.dtsi | 4 ++ arc

[PATCH 0/2] Enable all cache ways and Enable SiFive PWM driver

2020-05-28 Thread Pragnesh Patel
Patch 1: enable all cache ways from U-Boot proper This patch enables all cache ways from U-Boot proper, earlier this was done by FSBL. (https://github.com/sifive/freedom-u540-c000-bootloader/blob/master/fsbl/main.c#L428) L2 cache is of 2 MB (16 cache ways) and 1 cache way is of 128 KB. FSBL is lo

[PATCH 2/2] riscv: sifive: fu540: Enable SiFive PWM driver

2020-05-28 Thread Pragnesh Patel
This patch enables SiFive PWM driver for the SiFive Unleashed board. Signed-off-by: Pragnesh Patel --- board/sifive/fu540/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/sifive/fu540/Kconfig b/board/sifive/fu540/Kconfig index 86193d7668..683668d059 100644 --- a/board/sifive/f

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

2020-05-28 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 12/13] test/py: efi_secboot: add a test for multiple signatures

2020-05-28 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| 3 ++ test/py/tests/test_efi_secboot/test_sign

[PATCH 11/13] test/py: efi_secboot: add a test against certificate revocation

2020-05-28 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 09/13] test/py: efi_secboot: fix test case 1g of test_authvar

2020-05-28 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 08/13] test/py: efi_secboot: remove all "re.search"

2020-05-28 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 10/13] test/py: efi_secboot: split "signed image" test case-1 into two cases

2020-05-28 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 06/13] efi_loader: image_loader: verification for all signatures should pass

2020-05-28 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 07/13] efi_loader: image_loader: add digest-based verification for signed image

2020-05-28 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 05/13] efi_loader: signature: make efi_hash_regions more generic

2020-05-28 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 03/13] efi_loader: image_loader: retrieve authenticode only if it exists

2020-05-28 Thread AKASHI Takahiro
Since 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 04/13] efi_loader: signature: fix a size check against revocation list

2020-05-28 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 signature list. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_signature.c | 5 +++-- 1 file changed, 3 insertion

[PATCH 02/13] efi_loader: image_loader: add a check against certificate type of authenticode

2020-05-28 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 01/13] efi_loader: signature: move efi_guid_cert_type_pkcs7 to efi_signature.c

2020-05-28 Thread AKASHI Takahiro
The global variable, efi_guid_cert_type_pkcs7, will also be used in efi_image_loader.c in a succeeding patch so as to correctly handle a signature type of authenticode in signed image. Meanwhile, it is currently defined in efi_variable.c. Once some secure storage solution for UEFI variables is int

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

2020-05-28 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

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

2020-05-28 Thread Sébastien Szymanski
Hi, On 5/8/20 11:59 AM, Patrick Wildt wrote: > 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 a

[PATCH v13 18/19] configs: fu540: Add config options for U-Boot SPL

2020-05-28 Thread Pragnesh Patel
With sifive_fu540_defconfig: User can use FSBL or u-boot-spl.bin anyone at a time. For FSBL, fsbl->fw_payload.bin (opensbi + U-Boot) For u-boot-spl.bin, u-boot-spl.bin->FIT image (opensbi + U-Boot proper + dtb) U-Boot SPL will be loaded by ZSBL from SD card (replace fsbl.bin with u-boot-spl.bin

[PATCH v13 17/19] sifive: fu540: Add U-Boot proper sector start

2020-05-28 Thread Pragnesh Patel
From: Jagan Teki Add U-Boot proper sector start offset for SiFive FU540. This value is based on the partition layout supported by SiFive FU540. u-boot.itb need to write on this specific offset so-that the SPL will retrieve it from here and load. Signed-off-by: Jagan Teki Reviewed-by: Bin Meng

[PATCH v13 19/19] doc: sifive: fu540: Add description for OpenSBI generic platform

2020-05-28 Thread Pragnesh Patel
OpenSBI generic platform support provides platform specific functionality based on the FDT passed by previous booting stage. Depends on OpenSBI commit: platform: Add generic FDT based platform support (sha1: f1aa9e54e6ae70aeac638d5b75093520f65d) Signed-off-by: Pragnesh Patel Reviewed-by: Bin

[PATCH v13 16/19] sifive: fu540: Add sample SD gpt partition layout

2020-05-28 Thread Pragnesh Patel
From: Jagan Teki This is a sample GPT partition layout for SD card, right now three important partitions are added to make the system bootable. partition layout: PartStart LBA End LBA Name Attributes Type GUID Partition GUID 1 0x0022 0x00

[PATCH v13 15/19] riscv: sifive: fu540: add SPL configuration

2020-05-28 Thread Pragnesh Patel
Add a support for SPL which will boot from L2 LIM (0x0800_) and then SPL will boot U-Boot FIT image (OpenSBI FW_DYNAMIC + u-boot.bin) from MMC boot devices. SPL related code is leveraged from FSBL (https://github.com/sifive/freedom-u540-c000-bootloader.git) Signed-off-by: Pragnesh Patel Revi

[PATCH v13 12/19] riscv: sifive: dts: fu540: set ethernet clock rate

2020-05-28 Thread Pragnesh Patel
Set ethernet clock rate to 125 Mhz so that it will work with 1000Mbps, Earlier this is done by FSBL. With this change We can remove the ethernet clock rate code from FSBL. Signed-off-by: Pragnesh Patel --- arch/riscv/dts/fu540-c000-u-boot.dtsi | 5 + 1 file changed, 5 insertions(+) diff --g

[PATCH v13 10/19] clk: sifive: fu540-prci: Add ddr clock initialization

2020-05-28 Thread Pragnesh Patel
Release ddr clock reset once clock is initialized Signed-off-by: Pragnesh Patel Reviewed-by: Bin Meng Tested-by: Bin Meng Reviewed-by: Jagan Teki Tested-by: Jagan Teki --- drivers/clk/sifive/fu540-prci.c | 51 + 1 file changed, 45 insertions(+), 6 deletions(-)

[PATCH v13 14/19] riscv: cpu: fu540: Add support for cpu fu540

2020-05-28 Thread Pragnesh Patel
Add SiFive fu540 cpu to support RISC-V arch Signed-off-by: Pragnesh Patel Reviewed-by: Bin Meng Tested-by: Bin Meng Reviewed-by: Jagan Teki Tested-by: Jagan Teki --- arch/riscv/Kconfig | 1 + arch/riscv/cpu/fu540/Kconfig | 15 ++ arch/riscv/cpu/fu54

[PATCH v13 11/19] clk: sifive: fu540-prci: Release ethernet clock reset

2020-05-28 Thread Pragnesh Patel
U-Boot ethernet works with FSBL flow where releasing ethernet clock reset is part of FSBL itself but with the SPL, We need to release ethernet clock reset explicitly for U-Boot proper. With this change Release ethernet clock reset code in FSBL might not be needed or unaffected. Signed-off-by: Prag

[PATCH v13 13/19] riscv: dts: sifive: Sync hifive-unleashed-a00 dts from linux

2020-05-28 Thread Pragnesh Patel
This sync has changes required to use GPIO in U-Boot and U-Boot SPL. Sync dts from linux v5.7-rc2 commit: "riscv: dts: Add GPIO reboot method to HiFive Unleashed DTS file" (sha1: 0a91330b2af9f71cd483f92774182b58f6d9) Signed-off-by: Pragnesh Patel Reviewed-by: Bin Meng Reviewed-by: Jagan Tek

[PATCH v13 09/19] clk: sifive: fu540-prci: Add clock enable and disable ops

2020-05-28 Thread Pragnesh Patel
Added clock enable and disable functions in prci ops Signed-off-by: Pragnesh Patel Reviewed-by: Bin Meng Tested-by: Bin Meng Acked-by: Jagan Teki Tested-by: Jagan Teki --- drivers/clk/sifive/fu540-prci.c | 108 1 file changed, 96 insertions(+), 12 deletions(-

[PATCH v13 07/19] sifive: dts: fu540: Add DDR controller and phy register settings

2020-05-28 Thread Pragnesh Patel
Add DDR controller and phy register settings, taken from fsbl (https://github.com/sifive/freedom-u540-c000-bootloader.git) Signed-off-by: Pragnesh Patel Tested-by: Bin Meng Reviewed-by: Jagan Teki Tested-by: Jagan Teki --- .../dts/fu540-hifive-unleashed-a00-ddr.dtsi | 1489 +

[PATCH v13 06/19] sifive: fu540: add ddr driver

2020-05-28 Thread Pragnesh Patel
Add driver for fu540 to support ddr initialization in SPL. This driver is based on FSBL (https://github.com/sifive/freedom-u540-c000-bootloader.git) Signed-off-by: Pragnesh Patel Tested-by: Bin Meng --- board/sifive/fu540/Kconfig | 2 + drivers/ram/Kconfig| 1 + drivers/ram/

[PATCH v13 08/19] riscv: sifive: dts: fu540: add U-Boot dmc node

2020-05-28 Thread Pragnesh Patel
Add dmc node to enable ddr driver. dmc is used to initialize the memory controller. Signed-off-by: Pragnesh Patel Reviewed-by: Bin Meng Tested-by: Bin Meng Reviewed-by: Jagan Teki Tested-by: Jagan Teki --- arch/riscv/dts/fu540-c000-u-boot.dtsi | 9 + 1 file changed, 9 insertions(+)

[PATCH v13 05/19] riscv: sifive: dts: fu540: Add board -u-boot.dtsi files

2020-05-28 Thread Pragnesh Patel
Devicetree files in FU540 platform is synced from Linux, like other platforms does. Apart from these U-Boot in FU540 would also require some U-Boot specific node like clint. So, create board specific -u-boot.dtsi files. This would help of maintain U-Boot specific changes separately without touchin

[PATCH v13 04/19] lib: Makefile: build crc7.c when CONFIG_MMC_SPI

2020-05-28 Thread Pragnesh Patel
When build U-Boot SPL, meet an issue of undefined reference to 'crc7' for drivers/mmc/mmc_spi.c, so let's compile crc7.c when CONFIG_MMC_SPI selected. Signed-off-by: Pragnesh Patel Reviewed-by: Heinrich Schuchardt Reviewed-by: Bin Meng Acked-by: Jagan Teki --- lib/Makefile | 2 +- 1 file chan

[PATCH v13 02/19] riscv: sifive: fu540: Use OTP DM driver for serial environment variable

2020-05-28 Thread Pragnesh Patel
Use the OTP DM driver to set the serial environment variable. Signed-off-by: Pragnesh Patel Reviewed-by: Bin Meng Tested-by: Bin Meng Reviewed-by: Jagan Teki Tested-by: Jagan Teki --- arch/riscv/dts/fu540-c000-u-boot.dtsi | 14 +++ .../dts/hifive-unleashed-a00-u-boot.dtsi | 2

[PATCH v13 03/19] riscv: Add _image_binary_end for SPL

2020-05-28 Thread Pragnesh Patel
For SPL_SEPARATE_BSS, Device tree will be put at _image_binary_end Signed-off-by: Pragnesh Patel Reviewed-by: Anup Patel Reviewed-by: Jagan Teki Reviewed-by: Bin Meng Tested-by: Bin Meng Tested-by: Jagan Teki --- arch/riscv/cpu/u-boot-spl.lds | 1 + 1 file changed, 1 insertion(+) diff --gi

[PATCH v13 01/19] misc: add driver for the SiFive otp controller

2020-05-28 Thread Pragnesh Patel
Added a misc driver to handle OTP memory in SiFive SoCs. Signed-off-by: Pragnesh Patel Reviewed-by: Bin Meng Tested-by: Bin Meng Reviewed-by: Jagan Teki Tested-by: Jagan Teki --- drivers/misc/Kconfig | 7 + drivers/misc/Makefile | 1 + drivers/misc/sifive-otp.c | 275 +++

[PATCH v13 00/19] RISC-V SiFive FU540 support SPL

2020-05-28 Thread Pragnesh Patel
This series add support for SPL to FU540. U-Boot SPL can boot from L2 LIM (0x0800_) and jump to OpenSBI(FW_DYNAMIC firmware) and U-Boot proper from MMC devices. This series is also available here [1] for testing [1] https://github.com/pragnesh26992/u-boot/tree/spl How to test this patch: 1) G

RE: [PATCH v2 2/4] riscv: dts: hifive-unleashed-a00: add cpu aliases

2020-05-28 Thread Pragnesh Patel
>-Original Message- >From: Sagar Kadam >Sent: 26 May 2020 22:39 >To: u-boot@lists.denx.de; r...@andestech.com; lu...@denx.de >Cc: ja...@amarulasolutions.com; bmeng...@gmail.com; Pragnesh Patel >; sean...@gmail.com; Sagar Kadam > >Subject: [PATCH v2 2/4] riscv: dts: hifive-unleashed-a00: ad

Re: [PATCH] Add support for SHA384 and SHA512

2020-05-28 Thread Reuben Dowle
> Two general comments. First, please use CONFIG_IS_ENABLED() to test for > the new symbols so that we won't have any growth in SPL if we have one > of these enabled in the main binary but NOT SPL. It is not clear to me how I should be using CONFIG_IS_ENABLED(). I have copied the pattern of macro

Re: [PATCH 1/5] dm: core: Fix devfdt_get_addr_ptr return value

2020-05-28 Thread Simon Glass
Hi Sean, On Thu, 28 May 2020 at 13:29, Sean Anderson wrote: > > On 5/28/20 10:32 AM, Simon Glass wrote: > > On Wed, 27 May 2020 at 00:45, Ovidiu Panait > > wrote: > >> > >> According to the description of devfdt_get_addr_ptr, this function should > >> return NULL on failure, but currently it r

Re: [PATCH] serial: Add missing Kconfig dependencies for debug consoles

2020-05-28 Thread Simon Glass
On Thu, 28 May 2020 at 04:05, Michal Simek wrote: > > Debug console is the part of serial driver in the same file. It means to be > able to enable debug console you also need to enable driver itself. > That's why add all dependecies and list only debug consoles which are > enabled based on driver

Re: Failsafe booting to alternate linux image/fs

2020-05-28 Thread Brendan Simon (eTRIX)
I came across the "Boot Count Limit" feature in the U-Boot wiki, and it looks like it will do exactly what I want. https://www.denx.de/wiki/view/DULG/UBootBootCountLimit However, it also states that the "feature is available only for MPC8xx, MPC82xx and MPC5200 Power Architecture® processors

Re: [PATCH 08/24] arm: Remove configs/P1020MBG-PC_36BIT_SDCARD_defconfig board

2020-05-28 Thread Tom Rini
On Thu, May 28, 2020 at 02:32:39PM -0600, Simon Glass wrote: > Hi, > > On Thu, 28 May 2020 at 14:15, Tom Rini wrote: > > > > On Thu, May 28, 2020 at 07:07:14AM +, Priyanka Jain wrote: > > > >-Original Message- > > > >From: U-Boot On Behalf Of Jagan Teki > > > >Sent: Wednesday, May 27

Re: [PATCH 16/24] arm: Remove configs/T2080QDS_NAND_defconfig board

2020-05-28 Thread Tom Rini
On Thu, May 28, 2020 at 07:14:02AM +, Priyanka Jain wrote: > >-Original Message- > >From: U-Boot On Behalf Of Jagan Teki > >Sent: Wednesday, May 27, 2020 10:17 PM > >To: Simon Glass ; Tom Rini > >Cc: u-boot@lists.denx.de; linux-amar...@amarulasolutions.com; Jagan Teki > > > >Subject:

Re: [PATCH 14/24] arm: Remove configs/T1040D4RDB_NAND_defconfig board

2020-05-28 Thread Tom Rini
On Thu, May 28, 2020 at 07:11:55AM +, Priyanka Jain wrote: > >-Original Message- > >From: U-Boot On Behalf Of Jagan Teki > >Sent: Wednesday, May 27, 2020 10:17 PM > >To: Simon Glass ; Tom Rini > >Cc: u-boot@lists.denx.de; linux-amar...@amarulasolutions.com; Jagan Teki > > > >Subject:

Re: [PATCH 11/24] arm: Remove configs/P3041DS_NAND_SECURE_BOOT_defconfig board

2020-05-28 Thread Tom Rini
On Thu, May 28, 2020 at 07:09:35AM +, Priyanka Jain wrote: > >-Original Message- > >From: U-Boot On Behalf Of Jagan Teki > >Sent: Wednesday, May 27, 2020 10:17 PM > >To: Simon Glass ; Tom Rini > >Cc: u-boot@lists.denx.de; linux-amar...@amarulasolutions.com; Jagan Teki > > > >Subject:

Re: [PATCH 08/24] arm: Remove configs/P1020MBG-PC_36BIT_SDCARD_defconfig board

2020-05-28 Thread Simon Glass
Hi, On Thu, 28 May 2020 at 14:15, Tom Rini wrote: > > On Thu, May 28, 2020 at 07:07:14AM +, Priyanka Jain wrote: > > >-Original Message- > > >From: U-Boot On Behalf Of Jagan Teki > > >Sent: Wednesday, May 27, 2020 10:17 PM > > >To: Simon Glass ; Tom Rini > > >Cc: u-boot@lists.denx.d

Re: [PATCH 12/24] arm: Remove configs/T1023RDB_NAND_defconfig board

2020-05-28 Thread Tom Rini
On Thu, May 28, 2020 at 07:08:14AM +, Priyanka Jain wrote: > >-Original Message- > >From: U-Boot On Behalf Of Jagan Teki > >Sent: Wednesday, May 27, 2020 10:17 PM > >To: Simon Glass ; Tom Rini > >Cc: u-boot@lists.denx.de; linux-amar...@amarulasolutions.com; Jagan Teki > > > >Subject:

Re: [PATCH 08/24] arm: Remove configs/P1020MBG-PC_36BIT_SDCARD_defconfig board

2020-05-28 Thread Tom Rini
On Thu, May 28, 2020 at 07:07:14AM +, Priyanka Jain wrote: > >-Original Message- > >From: U-Boot On Behalf Of Jagan Teki > >Sent: Wednesday, May 27, 2020 10:17 PM > >To: Simon Glass ; Tom Rini > >Cc: u-boot@lists.denx.de; linux-amar...@amarulasolutions.com; Jagan Teki > > > >Subject:

Re: [PATCH 07/24] arm: Remove configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig board

2020-05-28 Thread Tom Rini
On Thu, May 28, 2020 at 07:05:38AM +, Priyanka Jain wrote: > >-Original Message- > >From: U-Boot On Behalf Of Jagan Teki > >Sent: Wednesday, May 27, 2020 10:17 PM > >To: Simon Glass ; Tom Rini > >Cc: u-boot@lists.denx.de; linux-amar...@amarulasolutions.com; Jagan Teki > > > >Subject:

[PATCH v2] spl: allow board_spl_fit_post_load() to fail

2020-05-28 Thread Patrick Wildt
On i.MX platforms board_spl_fit_post_load() can check the loaded SPL image for authenticity using its HAB engine. U-Boot's SPL mechanism allows booting images from other sources as well, but in the current setup the SPL would just hang if it encounters an image that does not pass scrutiny. Allowi

[PATCH] rockchip: rockpro64: Set cooling levels for pwm-fan

2020-05-28 Thread Kurt Miller
The cooling levels are tuned to the fan that comes with the rockpro64 NAS case. A gpu_thermal zone was not added because having two active cooling maps control one physical fan causes them to compete for the fan speed which results in erratic fan behavior. Signed-off-by: Kurt Miller --- arch/ar

Re: [PATCH 1/5] dm: core: Fix devfdt_get_addr_ptr return value

2020-05-28 Thread Sean Anderson
On 5/28/20 10:32 AM, Simon Glass wrote: > On Wed, 27 May 2020 at 00:45, Ovidiu Panait > wrote: >> >> According to the description of devfdt_get_addr_ptr, this function should >> return NULL on failure, but currently it returns (void *)FDT_ADDR_T_NONE. >> >> This is also a problem because there ar

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

2020-05-28 Thread Patrick Wildt
Ping? On Fri, May 08, 2020 at 11:59:47AM +0200, Patrick Wildt wrote: > 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

Re: [PATCH] pci: Make Rockchip PCIe voltage regulators optional

2020-05-28 Thread Kurt Miller
On Sun, 2020-05-24 at 22:32 +0200, Mark Kettenis wrote: > The vpcie*-supply properties are optional and these are absent on > boards like the ROCKPro64 and Firefly RK3399 where the voltage is > supplied by always-on regulators that are already enabled upon > boot.  Make these regulators optional an

Re: [PATCH v2 2/2] rockchip: Enable PCIe and NVMe on ROCKPro64

2020-05-28 Thread Kurt Miller
On Mon, 2020-05-25 at 11:00 +0200, Mark Kettenis wrote: > Enable CONFIG_PCI and CONFIG_NVME and related configs for the > ROCKPro64 board. > > Signed-off-by: Mark Kettenis Tested by: Kurt Miller Model: Pine64 RockPro64 v2.1 => pci Scanning PCI devices on bus 0 BusDevFun  VendorId   DeviceId  

Re: [PATCH 1/4] efi_loader: aarch64: align runtime section to 64kb

2020-05-28 Thread Heinrich Schuchardt
On 5/14/20 8:27 PM, Heinrich Schuchardt wrote: > On 5/14/20 2:38 PM, Michael Walle wrote: >> Commit 7a82c3051c8f ("efi_loader: Align runtime section to 64kb") >> already aligned the memory region to 64kb, but it does not align the >> actual efi runtime code. Thus it is likely, that efi_add_memory_m

Re: Cannot boot firefly-rk3399: mmc block read error

2020-05-28 Thread Jagan Teki
On Thu, May 28, 2020 at 8:28 PM Simon Glass wrote: > > Hi, > > I get an error in SPL. Any ideas? > > ellesmere:~/u$ dd if=/tmp/b/firefly-rk3399/idbloader.img of=/dev/sdb seek=64 > 265+1 records in > 265+1 records out > 135987 bytes (136 kB, 133 KiB) copied, 0.0233712 s, 5.8 MB/s > ellesmere:~/u$ d

Re: Cannot boot firefly-rk3399: mmc block read error

2020-05-28 Thread Mark Kettenis
> From: Simon Glass > Date: Thu, 28 May 2020 08:58:16 -0600 > > Hi, > > I get an error in SPL. Any ideas? > > ellesmere:~/u$ dd if=/tmp/b/firefly-rk3399/idbloader.img of=/dev/sdb seek=64 > 265+1 records in > 265+1 records out > 135987 bytes (136 kB, 133 KiB) copied, 0.0233712 s, 5.8 MB/s > elle

Re: [PATCH v2] apalis_imx6: fix video stdout in default environment

2020-05-28 Thread Igor Opaniuk
Hi Anatolij, On Tue, May 26, 2020 at 11:52 PM Anatolij Gustschin wrote: > > After migration to DM 'vga' name is not longer supported, > change it to 'vidconsole' in the default environment. > > Signed-off-by: Anatolij Gustschin > Cc: Igor Opaniuk > --- > Changes in v2: > - fix build error > >

Re: [PATCH v2] colibri_imx6: fix video stdout in default environment

2020-05-28 Thread Igor Opaniuk
Hi Anatolij, On Tue, May 26, 2020 at 11:54 PM Anatolij Gustschin wrote: > > After migration to DM 'vga' name is not longer supported, > change it to 'vidconsole' in the default environment. > > Signed-off-by: Anatolij Gustschin > Cc: Igor Opaniuk > --- > Changes in v2: > - fix build error > >

[PATCH] tools: fw_env: Fix warning when reading too little

2020-05-28 Thread Harald Seiler
When using CONFIG_ENV_IS_IN_FAT and the config-file specifies a size larger than what U-Boot wrote into the env-file, a confusing error message is shown: $ fw_printenv Read error on /boot/uboot.env: Success Fix this by showing a different error message when read returns too little data.

Cannot boot firefly-rk3399: mmc block read error

2020-05-28 Thread Simon Glass
Hi, I get an error in SPL. Any ideas? ellesmere:~/u$ dd if=/tmp/b/firefly-rk3399/idbloader.img of=/dev/sdb seek=64 265+1 records in 265+1 records out 135987 bytes (136 kB, 133 KiB) copied, 0.0233712 s, 5.8 MB/s ellesmere:~/u$ dd if=/tmp/b/firefly-rk3399/u-boot.itb of=/dev/sdb seek=16384 ... U-B

Re: [PATCH 1/5] dm: core: Fix devfdt_get_addr_ptr return value

2020-05-28 Thread Simon Glass
On Wed, 27 May 2020 at 00:45, Ovidiu Panait wrote: > > According to the description of devfdt_get_addr_ptr, this function should > return NULL on failure, but currently it returns (void *)FDT_ADDR_T_NONE. > > This is also a problem because there are two definitions for > dev_read_addr_ptr, dependi

Re: [PATCH v6 13/16] driver: usb: drop legacy rockchip xhci driver

2020-05-28 Thread Heiko Stuebner
Am Dienstag, 26. Mai 2020, 05:34:32 CEST schrieb Frank Wang: > We have changed to use dwc3 generic driver for usb3.0 host, so the > legacy Rockchip's xHCI driver is not needed, and drop it. > > Signed-off-by: Frank Wang > Reviewed-by: Jagan Teki > Reviewed-by: Kever Yang this needs to be adapt

[PATCH] dm: test: Add a test for dm_test_dev_read_addr_ptr()

2020-05-28 Thread Simon Glass
Check the behaviour of this function. Hopefully this is start of a complete test suite for the dev_read...() functions. Signed-off-by: Simon Glass --- Due to the nature of the test harness, this tests all cases: 1. CONFIG_OF_LIVE and livetree in use (normal sandbox test, gd->of_root is set) 2. C

[PATCH] arm: dts: meson-gxl: fix USB gadget by adding missing nodes for U-Boot

2020-05-28 Thread Neil Armstrong
The khadas-vim, khadas-vim2, libretech-ac & libretech-*-pc boards were missing DT tweak to enable USB gadget. Add them to their -u-boot.dtsi files and include the right gxl-u-boot.dtsi. Fixes: a19e8a0f03 ("arm: dts: meson-gxl: Add USB Gadget nodes for U-Boot") Reported-by: Jerome Brunet Signed-of

Re: [PATCH v2 19/35] acpi: Support writing Device Properties objects via _DSD

2020-05-28 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - > Betreff: [PATCH v2 19/35] acpi: Support writing Device Properties objects via > _DSD > > More complex device properties can be provided to drivers via a > device-specific data (_DSD) object. > > To create this we need to build it up in a separate d

Re: ICH SPI write seems broken

2020-05-28 Thread Simon Glass
Hi Bin, On Thu, 28 May 2020 at 03:26, Bin Meng wrote: > > Hi Simon, > > When testing, I see "saveenv" does not work on Intel minnowmax. Do you > have any ideas? > > U-Boot 2020.07-rc3-00034-g0fd5234 (May 28 2020 - 15:34:45 +0800) > > CPU: Intel(R) Atom(TM) CPU E3825 @ 1.33GHz > DRAM: 2 GiB >

Re: [PATCH v2 11/23] pandora: Drop omap3 pandora

2020-05-28 Thread Gražvydas Ignotas
I'm not aware of any remaining mainline u-boot users of this device (also asked around a bit on IRC), so: Acked-by: Grazvydas Ignotas Gražvydas On Wed, May 27, 2020 at 3:57 PM Jagan Teki wrote: > OF_CONTROL, DM_SPI and other driver model migration deadlines > are expired for this board. > > D

Failsafe booting to alternate linux image/fs

2020-05-28 Thread Brendan Simon (eTRIX)
Hi, Before I embark on my own implementation of a failsafe bootloading process from my embedded system (Xilinx Zynq board booting from SD Card), I thought I'd quickly ask the experts if there are any standard implementations in u-boot. The current u-boot being used is from 2015.  It probably need

Failsafe booting to alternate linux image/fs

2020-05-28 Thread Brendan Simon (eTRIX)
Hi, Before I embark on my own implementation of a failsafe bootloading process from my embedded system (Xilinx Zynq board booting from SD Card), I thought I'd quickly ask the experts if there are any standard implementations in u-boot. The current u-boot being used is from 2015.  It probably need

Re: [PATCH 5/5] ARM: dts: stm32: Disable SDR104 mode on AV96

2020-05-28 Thread Marek Vasut
On 5/28/20 9:43 AM, Patrick DELAUNAY wrote: > Hi :qrekm Hi, >> From: Marek Vasut >> Sent: mercredi 27 mai 2020 19:48 >> >> On 5/27/20 3:45 PM, Patrick DELAUNAY wrote: >>> Hi Marek, >> >> Hi, >> From: Marek Vasut Sent: mardi 26 mai 2020 04:30 Disable SDR104 mode until we know

[PATCH] serial: Add missing Kconfig dependencies for debug consoles

2020-05-28 Thread Michal Simek
Debug console is the part of serial driver in the same file. It means to be able to enable debug console you also need to enable driver itself. That's why add all dependecies and list only debug consoles which are enabled based on driver selection to avoid compilation error when user asks for certa

Re: [PATCH v2 18/35] acpi: Support writing a UUID

2020-05-28 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - > Betreff: [PATCH v2 18/35] acpi: Support writing a UUID > > ACPI supports writing a UUID in a special format. Add a function to handle > this. > > Signed-off-by: Simon Glass > --- > > Changes in v2: None > Changes in v1: None > > include/acpi/acp

Re: [PATCH 00/24] spi: dm-conversion (part2)

2020-05-28 Thread Jagan Teki
On Thu, May 28, 2020 at 3:14 PM Priyanka Jain wrote: > > >-Original Message- > >From: U-Boot On Behalf Of Jagan Teki > >Sent: Wednesday, May 27, 2020 10:17 PM > >To: Simon Glass ; Tom Rini > >Cc: u-boot@lists.denx.de; linux-amar...@amarulasolutions.com; Jagan Teki > > > >Subject: [PATCH

Re: [PATCH v2 17/35] acpi: Support writing a name

2020-05-28 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - >Betreff: [PATCH v2 17/35] acpi: Support writing a name > >ACPI supports storing names which are made up of multiple path >components. >Several special cases are supported. Add a function to emit a name. > >Signed-off-by: Simon Glass >--- > >Changes in

Re: [PATCH 00/24] spi: dm-conversion (part2)

2020-05-28 Thread Jagan Teki
Hi Bin, On Thu, May 28, 2020 at 6:26 AM Bin Meng wrote: > > Hi Jagan, > > On Thu, May 28, 2020 at 12:47 AM Jagan Teki > wrote: > > > > I believe some boards can directly enable DM_SPI if it has > > OF_CONTROL enabled already, so now it's the last call for > > board maintainers to take care of t

Re: [PATCH v2 15/35] acpi: Support writing an integer

2020-05-28 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - >Betreff: [PATCH v2 15/35] acpi: Support writing an integer > >ACPI supports storing integers in various ways. Add a function to >handle >this. > >Signed-off-by: Simon Glass >--- > >Changes in v2: None >Changes in v1: None > > include/acpi/acpigen.h |

RE: [PATCH 00/24] spi: dm-conversion (part2)

2020-05-28 Thread Priyanka Jain
>-Original Message- >From: U-Boot On Behalf Of Jagan Teki >Sent: Wednesday, May 27, 2020 10:17 PM >To: Simon Glass ; Tom Rini >Cc: u-boot@lists.denx.de; linux-amar...@amarulasolutions.com; Jagan Teki > >Subject: [PATCH 00/24] spi: dm-conversion (part2) > >I believe some boards can directl

Antwort: [PATCH v2 16/35] acpi: Support writing a string

2020-05-28 Thread Wolfgang Wallner
Hi Simon, -"Simon Glass" schrieb: - >Betreff: [PATCH v2 16/35] acpi: Support writing a string > >ACPI supports storing a simple nul-terminated string. Add support for >this. > >Signed-off-by: Simon Glass >--- > >Changes in v2: None >Changes in v1: None > > include/acpi/acpigen.h | 10 +++

Re: [U-Boot] [PATCH 0/2] misc: i2c_eeprom: add paritioning and size query

2020-05-28 Thread Michal Simek
On 28. 05. 20 11:27, Michal Simek wrote: > HI Robert and Heiko, > > po 28. 10. 2019 v 19:32 odesílatel Robert Beckett > napsal: >> >> Add ability to specify paritions for eeprom in device tree, and >> query eeprom device sizes. Each partition creates a child device, >> allowing board code to fi

Re: [PATCH v7 3/8] i2c: i2c-cortina: added CAxxxx I2C support

2020-05-28 Thread Heiko Schocher
Hello Alex, Am 14.05.2020 um 22:11 schrieb Alex Nemirovsky: From: Arthur Li Add I2C controller support for Cortina Access CA SoCs Signed-off-by: Arthur Li Signed-off-by: Alex Nemirovsky CC: Heiko Schocher CA_I2C: DT binding for I2C controller DT binding document for Cortina I2C drive

Re: [U-Boot] [PATCH 0/2] misc: i2c_eeprom: add paritioning and size query

2020-05-28 Thread Michal Simek
HI Robert and Heiko, po 28. 10. 2019 v 19:32 odesílatel Robert Beckett napsal: > > Add ability to specify paritions for eeprom in device tree, and query > eeprom device sizes. > Each partition creates a child device, allowing board code to > find the eeprom parition by name. > > > Robert Beckett

ICH SPI write seems broken

2020-05-28 Thread Bin Meng
Hi Simon, When testing, I see "saveenv" does not work on Intel minnowmax. Do you have any ideas? U-Boot 2020.07-rc3-00034-g0fd5234 (May 28 2020 - 15:34:45 +0800) CPU: Intel(R) Atom(TM) CPU E3825 @ 1.33GHz DRAM: 2 GiB MMC: pci_mmc: 0, pci_mmc: 1, pci_mmc: 2 Loading Environment from SPI Fla

RE: [PATCH] spi: cadence_spi: Add octal and quad write support

2020-05-28 Thread Tan, Ley Foon
> -Original Message- > From: Pratyush Yadav > Sent: Thursday, May 28, 2020 5:17 PM > To: Tan, Ley Foon > Cc: u-boot@lists.denx.de; Jagan Teki ; Ley > Foon Tan ; Vignesh Raghavendra > ; See, Chin Liang ; Simon > Goldschmidt ; Ang, Chee Hong > > Subject: Re: [PATCH] spi: cadence_spi: Ad

Re: [PATCH 1/5] dm: core: Fix devfdt_get_addr_ptr return value

2020-05-28 Thread Cédric Le Goater
On 5/27/20 8:41 AM, Ovidiu Panait wrote: > According to the description of devfdt_get_addr_ptr, this function > should return NULL on failure, but currently it returns (void > *)FDT_ADDR_T_NONE. > > This is also a problem because there are two definitions for > dev_read_addr_ptr, depending on CON

Re: [PATCH v1 1/3] x86: acpi: Create buffers outside of the methods

2020-05-28 Thread Andy Shevchenko
On Thu, May 28, 2020 at 03:07:34PM +0800, Bin Meng wrote: > On Thu, May 28, 2020 at 2:58 PM Bin Meng wrote: > > On Wed, May 27, 2020 at 1:16 AM Andy Shevchenko > > wrote: > > > > > > Create buffers outside of the methods as ACPICA 20200214 complains about > > > this: > > > > > > Remark 2

[PATCH v2 2/4] x86: tangier: acpi: Replace _ADR() by _UID() in description of PCI host bridge

2020-05-28 Thread Andy Shevchenko
PCI Firmware specification requires _UID() and doesn't require _ADR() to be set. Replace latter by former. Reported-by: Bin Meng Signed-off-by: Andy Shevchenko --- v2: no changes arch/x86/include/asm/arch-tangier/acpi/southcluster.asl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v2 4/4] x86: tangier: acpi: Drop _HID() where enumerated by _ADR()

2020-05-28 Thread Andy Shevchenko
ACPICA complains that either _HID() or _ADR() should be used. For General Purpose DMA we may not drop the _ADR() because the device is enumerated by PCI. Thus, simple drop _HID(). Reported-by: Bin Meng Signed-off-by: Andy Shevchenko --- v2: no changes arch/x86/include/asm/arch-tangier/acpi/sout

[PATCH v2 1/4] x86: tangier: acpi: Create buffers outside of the methods

2020-05-28 Thread Andy Shevchenko
Create buffers outside of the methods as ACPICA 20200214 complains about this: Remark 2173 - Creation of named objects within a method is highly inefficient, use globals or method local variables instead Reported-by: Bin Meng Signed-off-by: Andy Shevchenko --- v2: rebase

Re: [PATCH] spi: cadence_spi: Add octal and quad write support

2020-05-28 Thread Pratyush Yadav
On 28/05/20 06:54AM, Tan, Ley Foon wrote: > > > > -Original Message- > > From: Pratyush Yadav > > Sent: Wednesday, May 27, 2020 9:07 PM > > To: Tan, Ley Foon > > Cc: u-boot@lists.denx.de; Jagan Teki ; Ley > > Foon Tan ; Vignesh Raghavendra > > ; See, Chin Liang ; Simon > > Goldschmidt ;

[PATCH v2 3/4] x86: tangier: acpi: Drop _ADR() where _HID() is present

2020-05-28 Thread Andy Shevchenko
ACPICA complains that either _HID() or _ADR() should be used. Drop _ADR() where _HID() is present. Reported-by: Bin Meng Signed-off-by: Andy Shevchenko --- v2: no changes arch/x86/include/asm/arch-tangier/acpi/southcluster.asl | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/include/

RE: [PATCH v2 4/4] riscv: cpu: check and append L1 cache to cpu features

2020-05-28 Thread Sagar Kadam
Hi Pragnesh, > -Original Message- > From: Pragnesh Patel > Sent: Wednesday, May 27, 2020 8:10 PM > To: Sagar Kadam ; u-boot@lists.denx.de; > r...@andestech.com; lu...@denx.de > Cc: ja...@amarulasolutions.com; bmeng...@gmail.com; > sean...@gmail.com > Subject: RE: [PATCH v2 4/4] riscv: cpu

RE: [PATCH v2 1/4] fu540: prci: add request and free clock handlers

2020-05-28 Thread Sagar Kadam
Hi Pragnesh, > -Original Message- > From: Pragnesh Patel > Sent: Wednesday, May 27, 2020 7:41 PM > To: Sagar Kadam ; u-boot@lists.denx.de; > r...@andestech.com; lu...@denx.de > Cc: ja...@amarulasolutions.com; bmeng...@gmail.com; > sean...@gmail.com > Subject: RE: [PATCH v2 1/4] fu540: prc

Re: [PATCH 2/2] riscv: Enable CONFIG_OF_BOARD_FIXUP by default

2020-05-28 Thread Bin Meng
Hi Rick, On Thu, May 28, 2020 at 4:24 PM Bin Meng wrote: > > Hi Rick, > > On Thu, May 28, 2020 at 4:17 PM Rick Chen wrote: > > > > Hi Bin > > > > > From: Bin Meng [mailto:bmeng...@gmail.com] > > > Sent: Wednesday, May 20, 2020 3:40 PM > > > To: Rick Jian-Zhi Chen(陳建志); U-Boot Mailing List > > >

[PATCH v2 3/3] riscv: Enable CONFIG_OF_BOARD_FIXUP by default

2020-05-28 Thread Bin Meng
From: Bin Meng Starting from OpenSBI v0.7, the SBI firmware inserts/fixes up the reserved memory node for PMP protected memory regions. All RISC-V boards needs to copy the reserved memory node from the device tree provided by the firmware to the device tree used by U-Boot. Turn on CONFIG_OF_BOAR

[PATCH v2 2/3] riscv: Expand the DT size before copy reserved memory node

2020-05-28 Thread Bin Meng
From: Bin Meng The FDT blob might not have sufficient space to hold a copy of reserved memory node. Expand it before the copy. Reported-by: Rick Chen Signed-off-by: Bin Meng --- arch/riscv/lib/fdt_fixup.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/riscv/lib/fdt_fixup.c b/

[PATCH v2 1/3] riscv: Avoid the reserved memory fixup if src and dst point to the same place

2020-05-28 Thread Bin Meng
From: Bin Meng The copy of reserved memory node from source dtb to destination dtb can be avoided if they point to the same place. This is useful when OF_PRIOR_STAGE is used. Signed-off-by: Bin Meng Reviewed-by: Rick Chen --- arch/riscv/lib/fdt_fixup.c | 12 1 file changed, 8 in

  1   2   >