Re: [PATCH] efi_loader: add some description about UEFI secure boot

2020-02-24 Thread Heinrich Schuchardt
On 2/7/20 6:14 AM, AKASHI Takahiro wrote: A small text in docs/uefi/uefi.rst was added to explain how we can configure and utilise UEFI secure boot feature on U-Boot. Signed-off-by: AKASHI Takahiro --- doc/uefi/uefi.rst | 77 +++ 1 file changed,

[PATCH] dm: make uclass_find_first_device() return error when no defice is found

2020-02-24 Thread Masahiro Yamada
uclass_find_first_device() succeeds even if it cannot find any device. So, the caller must check the return code and also *devp is not NULL. Returning -ENODEV will be sensible in this case. Signed-off-by: Masahiro Yamada --- If this patch is acceptable, I want to fold this into my pull request

Re: [PATCH v5 07/16] efi_loader: image_loader: support image authentication

2020-02-24 Thread AKASHI Takahiro
On Tue, Feb 25, 2020 at 07:40:01AM +0100, Heinrich Schuchardt wrote: > On 2/25/20 6:25 AM, AKASHI Takahiro wrote: > > On Mon, Feb 24, 2020 at 07:29:17PM +0100, Heinrich Schuchardt wrote: > > > On 1/28/20 9:25 AM, AKASHI Takahiro wrote: > > > > With this commit, image validation can be enforced, as

Re: [PATCH v5 04/16] efi_loader: variable: support variable authentication

2020-02-24 Thread Heinrich Schuchardt
On 1/28/20 9:25 AM, AKASHI Takahiro wrote: With this commit, EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS is supported for authenticated variables and the system secure state will transfer between setup mode and user mode as UEFI specification section 32.3 describes. Internally,

Re: [PATCH v5 07/16] efi_loader: image_loader: support image authentication

2020-02-24 Thread Heinrich Schuchardt
On 1/28/20 9:25 AM, AKASHI Takahiro wrote: With this commit, image validation can be enforced, as UEFI specification section 32.5 describes, if CONFIG_EFI_SECURE_BOOT is enabled. Currently we support * authentication based on db and dbx, so dbx-validated image will always be rejected. *

Re: [PATCH v5 07/16] efi_loader: image_loader: support image authentication

2020-02-24 Thread Heinrich Schuchardt
On 2/25/20 6:25 AM, AKASHI Takahiro wrote: On Mon, Feb 24, 2020 at 07:29:17PM +0100, Heinrich Schuchardt wrote: On 1/28/20 9:25 AM, AKASHI Takahiro wrote: With this commit, image validation can be enforced, as UEFI specification section 32.5 describes, if CONFIG_EFI_SECURE_BOOT is enabled.

Re: [PATCH v5 07/16] efi_loader: image_loader: support image authentication

2020-02-24 Thread AKASHI Takahiro
On Mon, Feb 24, 2020 at 07:29:17PM +0100, Heinrich Schuchardt wrote: > On 1/28/20 9:25 AM, AKASHI Takahiro wrote: > > With this commit, image validation can be enforced, as UEFI specification > > section 32.5 describes, if CONFIG_EFI_SECURE_BOOT is enabled. > > > > Currently we support > > *

Re: [PATCH v5 00/16] efi_loader: add secure boot support

2020-02-24 Thread AKASHI Takahiro
On Sun, Feb 23, 2020 at 12:53:16PM +0100, Heinrich Schuchardt wrote: > On 1/28/20 9:25 AM, AKASHI Takahiro wrote: > > # Documentation for UEFI secure boot on U-Boot will be submitted in > > # a separate patch in near future. > > > > One of major missing features in current UEFI implementation is

Re: [PATCH v5 16/16] travis: add packages for UEFI secure boot test

2020-02-24 Thread AKASHI Takahiro
On Sun, Feb 23, 2020 at 12:46:22PM +0100, Heinrich Schuchardt wrote: > On 1/28/20 9:25 AM, AKASHI Takahiro wrote: > > Pytest for UEFI secure boot will use several host commands. > > In particular, Test setup relies on efitools, whose version must be v1.5.2 > > or later. So fetch a new version of

[PATCH 2/2] video: meson: Use reserving memory function without kernel linear mapping

2020-02-24 Thread Michael Trimarchi
Memory reserved for the simple framebuffer should not be used and part of memory linear mapping. See https://patchwork.kernel.org/patch/10486131/ for more detailed background information and discussion. Signed-off-by: Michael Trimarchi --- Changes RFC -> v1: - Fix compilation issue on

[PATCH 1/2] common: fdt: Add a function for reserving memory without kernel linear mapping

2020-02-24 Thread Michael Trimarchi
The intent is to reserve memory _and_ prevent it from being included in the kernel's linear map. For thos reason it is also necessary to include the 'no-map' property for this reserved-mem node. >From Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt: no-map (optional) -

[PATCH 0/2] Update reserved memory for simple framebuffer

2020-02-24 Thread Michael Trimarchi
Reserved memory for simple frame buffer should be created in a different way: + aliases { + display0 = + }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + display_reserved:

Re: [PATCH v5 04/16] efi_loader: variable: support variable authentication

2020-02-24 Thread AKASHI Takahiro
On Sun, Feb 23, 2020 at 12:20:16PM +0100, Heinrich Schuchardt wrote: > On 1/28/20 9:25 AM, AKASHI Takahiro wrote: > > With this commit, EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS > > is supported for authenticated variables and the system secure state > > will transfer between setup mode

Re: [PATCH v5 01/16] efi_loader: add CONFIG_EFI_SECURE_BOOT config option

2020-02-24 Thread AKASHI Takahiro
On Sun, Feb 23, 2020 at 11:56:09AM +0100, Heinrich Schuchardt wrote: > On 1/28/20 9:25 AM, AKASHI Takahiro wrote: > > Under this configuration, UEFI secure boot support will be added > > in later patches. > > > > Signed-off-by: AKASHI Takahiro > > This patch should be after all the patches that

Re: [PATCH v7 0/7] rsa: extend rsa_verify() for UEFI secure boot

2020-02-24 Thread AKASHI Takahiro
On Fri, Feb 21, 2020 at 12:18:41PM -0500, Tom Rini wrote: > On Fri, Feb 21, 2020 at 03:12:54PM +0900, AKASHI Takahiro wrote: > > > # This patch set is a prerequisite for UEFI secure boot. > > > > The current rsa_verify() requires five parameters for a RSA public key > > for efficiency while RSA,

Re: [PATCH v2] env: ti: boot: Fix Android boot on AM57x EVM

2020-02-24 Thread Lokesh Vutla
On 21/02/20 8:05 PM, Sam Protsenko wrote: > When applying DTBO on top of DTB (with "fdt apply" command) on AM57x EVM > board, there is not enough memory reserved in RAM for DTB blob. Hence, > DTBO can't be merged in DTB. It leads to inability to boot Android with > next error message: > >

Re: [RFC PATCH 0/1] Add boot hartid to a Device tree

2020-02-24 Thread Atish Patra
On Mon, Feb 24, 2020 at 3:35 PM Ard Biesheuvel wrote: > > On Tue, 25 Feb 2020 at 00:22, Heinrich Schuchardt wrote: > > > > On 2/24/20 11:19 PM, Atish Patra wrote: > > > The RISC-V booting protocol requires the hart id to be present in "a0" > > > register. This is not a problem for bootm/booti

Re: [RFC PATCH 1/1] riscv: Add boot hartid to Device tree

2020-02-24 Thread Ard Biesheuvel
On Mon, 24 Feb 2020 at 23:20, Atish Patra wrote: > > Linux booting protocol mandates that register "a0" contains the hartid. > However, U-boot can not pass the hartid via a0 during EFI boot without > breaking the UEFI specification. > It is not about breaking or violating the UEFI specification.

Re: [RFC PATCH 0/1] Add boot hartid to a Device tree

2020-02-24 Thread Ard Biesheuvel
On Tue, 25 Feb 2020 at 00:22, Heinrich Schuchardt wrote: > > On 2/24/20 11:19 PM, Atish Patra wrote: > > The RISC-V booting protocol requires the hart id to be present in "a0" > > register. This is not a problem for bootm/booti commands as they directly > > jump to Linux kernel. However, bootefi

Re: [RFC PATCH 0/1] Add boot hartid to a Device tree

2020-02-24 Thread Heinrich Schuchardt
On 2/24/20 11:19 PM, Atish Patra wrote: The RISC-V booting protocol requires the hart id to be present in "a0" register. This is not a problem for bootm/booti commands as they directly jump to Linux kernel. However, bootefi jumps to a EFI boot stub code in Linux kernel which acts a loader and

[PATCH 1/1] drivers/rng: add Amlogic hardware RNG driver

2020-02-24 Thread Heinrich Schuchardt
Add support for the hardware random number generator of Amlogic SOCs. Signed-off-by: Heinrich Schuchardt --- drivers/rng/Kconfig | 8 +++ drivers/rng/Makefile| 1 + drivers/rng/meson-rng.c | 120 3 files changed, 129 insertions(+) create

[RFC PATCH 1/1] riscv: Add boot hartid to Device tree

2020-02-24 Thread Atish Patra
Linux booting protocol mandates that register "a0" contains the hartid. However, U-boot can not pass the hartid via a0 during EFI boot without breaking the UEFI specification. Add a DT node under chosen node to indicate the boot hartid. EFI stub in Linux kernel will parse this node and pass it to

[RFC PATCH 0/1] Add boot hartid to a Device tree

2020-02-24 Thread Atish Patra
The RISC-V booting protocol requires the hart id to be present in "a0" register. This is not a problem for bootm/booti commands as they directly jump to Linux kernel. However, bootefi jumps to a EFI boot stub code in Linux kernel which acts a loader and jumps to real Linux after terminating the

Re: [PATCH v2] env: ti: boot: Fix Android boot on AM57x EVM

2020-02-24 Thread Eugeniu Rosca
On Fri, Feb 21, 2020 at 04:35:21PM +0200, Sam Protsenko wrote: > When applying DTBO on top of DTB (with "fdt apply" command) on AM57x EVM > board, there is not enough memory reserved in RAM for DTB blob. Hence, > DTBO can't be merged in DTB. It leads to inability to boot Android with > next error

[PATCH] net: phy: marvell: Unify 88E151x series phy_driver

2020-02-24 Thread Clemens Gruber
The PHY models of the Marvell 88E151x series are not reliably distinguishable by their uid / PHY identifiers. The 88E1510, 88E1512, 88E1514 and 88E1518 all have the same OUI and model number and bits 3:0 in the PHY Identifier 2 (Page 0, Reg 3) are described as HW revision number, but both 88E1510

Re: [PATCH 2/7] mx31pdk: Move CONFIG_SPL_LDSCRIPT to defconfig

2020-02-24 Thread Magnus Lilja
On Mon, 24 Feb 2020 at 19:05, Tom Rini wrote: > As there is only one mx31pdk config file and with upcoming updates to > the Kconfig parsing logic, rather than have an entry in > board/freescale/mx31pdk/Kconfig, move this single setting to the > defconfig file. > > Cc: Magnus Lilja >

Re: [PATCH 0/3] mediatek: pwm: add pwm driver for MediaTek SoCs

2020-02-24 Thread Frank Wunderlich
tested pwm on bananapi r64 (with LED on gpio pins 9 as GND + 11 as pwm) with commands BPI-R64> pwm 0 config 10 5 BPI-R64> pwm 0 enable also no boot-problem after last Patch (removed my temporary workaround) Tested-by: Frank Wunderlich only a small typo in last patches subject

Re: [PATCH v5 07/16] efi_loader: image_loader: support image authentication

2020-02-24 Thread Heinrich Schuchardt
On 1/28/20 9:25 AM, AKASHI Takahiro wrote: With this commit, image validation can be enforced, as UEFI specification section 32.5 describes, if CONFIG_EFI_SECURE_BOOT is enabled. Currently we support * authentication based on db and dbx, so dbx-validated image will always be rejected. *

[PATCH 7/7] kconfig / kbuild: re-sync with Linux 4.18

2020-02-24 Thread Tom Rini
Align Kconfig and Kbuild logic to Linux 4.18 release with minimal impact on files outside of this scope. Our previous Kconfig sync was done by commit e91610da7c8a ("kconfig: re-sync with Linux 4.17-rc4"). A very small number of changes upstream since our sync with v4.17-rc4 that exist in the

[PATCH 6/7] scripts/dtc: Update to upstream version v1.4.6-21-g84e414b0b5bc

2020-02-24 Thread Tom Rini
From: Rob Herring This adds the following commits from upstream: 84e414b0b5bc tests: Add a test case for the omit-if-no-ref keyword 4038fd90056e dtc: add ability to make nodes conditional on them being referenced e1f139ea4900 checks: drop warning for missing PCI bridge bus-range f4eba68d89ee

[PATCH 5/7] Azure / GitLab / Travis: Add Kconfig unit tests to a job

2020-02-24 Thread Tom Rini
The Kconfig language provides a unit test that can be run. As these require pytest to be installed and run very quickly, bundle them in to an existing CI job. Signed-off-by: Tom Rini --- .azure-pipelines.yml | 5 +++-- .gitlab-ci.yml | 7 --- .travis.yml | 3 ++- 3 files

[PATCH 3/7] Kconfig: Escape variables to make in default strings

2020-02-24 Thread Tom Rini
We have some variables that need to include a variable to pass to make to evaluate later, typically ARCH and BOARDDIR, to find a file to use. The way we're doing this today isn't correct but works. With an update to Kconfig we will need to escape these properly, so do so. Cc: Masahiro Yamada

[PATCH 4/7] Kconfig: Remove redundant variable sets

2020-02-24 Thread Tom Rini
In a few places we have Kconfig entries that set SPL_LDSCRIPT to what is the default value anyways. Drop these. Cc: Michal Simek Cc: Rick Chen Cc: Philippe Reynes Cc: Eric Jarrige Signed-off-by: Tom Rini --- arch/microblaze/Kconfig | 3 --- arch/riscv/Kconfig | 3 ---

[PATCH 2/7] mx31pdk: Move CONFIG_SPL_LDSCRIPT to defconfig

2020-02-24 Thread Tom Rini
As there is only one mx31pdk config file and with upcoming updates to the Kconfig parsing logic, rather than have an entry in board/freescale/mx31pdk/Kconfig, move this single setting to the defconfig file. Cc: Magnus Lilja Signed-off-by: Tom Rini --- board/freescale/mx31pdk/Kconfig | 3 ---

[PATCH 1/7] misc: Add more -I$(objtree)/$(obj) lines

2020-02-24 Thread Tom Rini
We have a few more places where we depend at build time on generated files being found within the compiler search path. Add appropriate -I lines in these places. Signed-off-by: Tom Rini --- cmd/Makefile| 2 ++ lib/Makefile| 1 + lib/crypto/Makefile | 4 3 files changed, 7

RE: [PATCH v4 01/14] misc: add driver for the SiFive otp controller

2020-02-24 Thread Patrick DELAUNAY
Hi, > From: U-Boot On Behalf Of Pragnesh Patel > Sent: lundi 24 février 2020 09:33 > > Added a misc driver to handle OTP memory in SiFive SoCs. > > Signed-off-by: Pragnesh Patel > --- > drivers/misc/Kconfig | 7 ++ > drivers/misc/Makefile | 1 + > drivers/misc/sifive-otp.c | 241

RE: [PATCH v4 02/14] riscv: sifive: fu540: Use OTP DM driver for serial environment variable

2020-02-24 Thread Patrick DELAUNAY
Hi, Just a warning as I had the same issue with 8729b1ae2cbd ("misc: Update read() and write() methods to return bytes xfered") > From: U-Boot On Behalf Of Pragnesh Patel > Sent: lundi 24 février 2020 09:33 > > Use the OTP DM driver to set the serial environment variable. > > Signed-off-by:

[PATCHv2 1/4] kbuild: fixdep: Resync this with v4.17

2020-02-24 Thread Tom Rini
The previous kbuild resync of e91610da7c8a ("kconfig: re-sync with Linux 4.17-rc4") accidentally did not sync the fixdep program. This commit brings fixdep in line with the rest of that previous resync. This includes all of the following Linux kernel commits: fbfa9be9904e kbuild: move

[PATCHv2 4/4] scripts/Makefile.lib: Re-add -Wno-simple_bus_reg to DTC_FLAGS

2020-02-24 Thread Tom Rini
This exists in Linux Kernel with commit 70523a3ce5ff so put it in the list of DTC_FLAGS that mirror Linux as we will catch up there. Signed-off-by: Tom Rini --- scripts/Makefile.lib | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index

[PATCHv2 3/4] scripts/Makefile.lib: Restore PCI related warnings to DTC_FLAGS

2020-02-24 Thread Tom Rini
While we are working on correcting usage related to the pci_bridge and pci_device_bus_num warnings, disable these flags for now. Signed-off-by: Tom Rini --- scripts/Makefile.lib | 4 1 file changed, 4 insertions(+) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index

[PATCHv2 2/4] kbuild: Re-sync DTC flag logic with v4.17

2020-02-24 Thread Tom Rini
The way that we have been handling additional DTC warning flags hasn't matched the way the Linux Kernel does. Resync this logic with v4.17. Signed-off-by: Tom Rini --- scripts/Makefile.extrawarn | 21 - scripts/Makefile.lib | 16 2 files changed, 16

[PATCH 1/1] README: replace reference to boards.cfg

2020-02-24 Thread Heinrich Schuchardt
boards.cfg is not delivered with the U-Boot source. So it is preferable to look at configs/*_defconfig to identify available deconfigs. Fix a typo. Signed-off-by: Heinrich Schuchardt --- README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index

[PATCH] spl.h: make self-contained

2020-02-24 Thread Masahiro Yamada
The static inline function spl_phase needs . Some functions take pointers to struct blk_desc or image_header. Add forward declarations. Signed-off-by: Masahiro Yamada --- include/spl.h | 4 1 file changed, 4 insertions(+) diff --git a/include/spl.h b/include/spl.h index

[PATCH] debug_uart.h: make self-contained

2020-02-24 Thread Masahiro Yamada
'uint' is not a primitive type. You need to include or otherwise change it to (unsigned int). Signed-off-by: Masahiro Yamada --- include/debug_uart.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/debug_uart.h b/include/debug_uart.h index

[PATCH] mmc: make self-contained

2020-02-24 Thread Masahiro Yamada
This header uses bd_t without including its definition. Change it to (struct bd_info), and add the forward declaration to specify it as a structure. Signed-off-by: Masahiro Yamada --- include/mmc.h | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/mmc.h

[PATCH] asm-generic/u-boot.h: make self-contained

2020-02-24 Thread Masahiro Yamada
This header uses 'phys_addr_t' and 'ulong'. Include the definitions. Signed-off-by: Masahiro Yamada --- include/asm-generic/u-boot.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/asm-generic/u-boot.h b/include/asm-generic/u-boot.h index eee84f49bb..d0fd24446f 100644 ---

[PATCH] global_data.h: make self-contained

2020-02-24 Thread Masahiro Yamada
The compiler never knows what 'bd_t' is without including . By changing it to (struct bd_info), the compiler learns it is struct. Signed-off-by: Masahiro Yamada --- Maybe, we should replace 'bd_t' with 'struct bd_info' globally by using coccinelle or something. Linux coding style

RE: [PATCH 1/1] stm32mp1: rng: remove superfluous assignment

2020-02-24 Thread Patrick DELAUNAY
Hi, > From: U-Boot On Behalf Of Heinrich Schuchardt > Sent: dimanche 16 février 2020 10:11 > > We should not assign a value that is overwritten before use. > > Signed-off-by: Heinrich Schuchardt > --- > drivers/rng/stm32mp1_rng.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Aw: [U-Boot 1/1] eth: mtk-eth: add mt7531 switch support in mediatek eth driver

2020-02-24 Thread Frank Wunderlich
Hi Tested this Patch on bananapi-r64 and bananapi-r2, on both loading kernel/fdt from tftp. Tested-by: Frank Wunderlich regards Frank

[PATCH] Azure / GitLab: Update Docker image

2020-02-24 Thread Tom Rini
Bring in a newer Docker image to build on that has everything required for running 'make htmldocs'. Signed-off-by: Tom Rini --- .azure-pipelines.yml | 2 +- .gitlab-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml

Re: [U-Boot] [PATCH] usb: ehci-mx5: Fix bus enumeration for DM case

2020-02-24 Thread Lukasz Majewski
Hi Marek, > On Thu, 20 Jun 2019 22:53:58 +0200 > Marek Vasut wrote: > > > It is likely that the DM conversion of EHCI iMX5 driver was a > > derivative of EHCI VF, however the conversion is incomplete and is > > missing the bind workaround, which updates dev->seq number. Without > > this, all

Re: spi_flash_read issue

2020-02-24 Thread dvo
Hello Fabio, It's IMX6UL. I didn't know why I had that strange issue. With you suggestion, I switched to the latest version from the mainline U-Boot and it solved the issue. Thank you, Dan -- Sent from: http://u-boot.10912.n7.nabble.com/

Re: [PATCH v3 15/21] reset: add driver for generic reset controllers

2020-02-24 Thread Andre Przywara
On Sat, 25 Jan 2020 17:52:57 +0530 Amit Singh Tomar wrote: Hi, > The simplest and most generic form of a reset controller just exposes > multiple MMIO registers, where each bit toggles a separate reset line. > Add a generic driver to describe this kind of reset controller. > > This is used on

Re: [PATCH 3/5] env/fat.c: remove private CMD_SAVEENV logic

2020-02-24 Thread Rasmus Villemoes
On 21/02/2020 17.19, Tom Rini wrote: > On Fri, Feb 21, 2020 at 05:14:14PM +0100, Wolfgang Denk wrote: >> Dear Rasmus, >> >> In message <5265fdd5-3992-4e5f-3235-5586b3b77...@prevas.dk> you wrote: >>> >>> So without the fat.c patch, CONFIG_SPL_SAVEENV is effectively ignored. >> >> OK, but what about

Re: [PATCH v3 09/21] arm: dts: Use consistent name "CLK_ETHERNET" for the Ethernet clock binding

2020-02-24 Thread Manivannan Sadhasivam
On Mon, Feb 24, 2020 at 02:37:22PM +, Andre Przywara wrote: > On Sun, 23 Feb 2020 23:08:25 +0530 > Manivannan Sadhasivam wrote: > > Hi Amit, > > > On Sat, Jan 25, 2020 at 05:52:51PM +0530, Amit Singh Tomar wrote: > > > Right now, Clock bindings for ethernet uses different names(even in

Re: [PATCH v3 09/21] arm: dts: Use consistent name "CLK_ETHERNET" for the Ethernet clock binding

2020-02-24 Thread Andre Przywara
On Sun, 23 Feb 2020 23:08:25 +0530 Manivannan Sadhasivam wrote: Hi Amit, > On Sat, Jan 25, 2020 at 05:52:51PM +0530, Amit Singh Tomar wrote: > > Right now, Clock bindings for ethernet uses different names(even in Linux) > > CLK_ETH_MAC for S900 and CLK_ETHERNET for S700, It causes compilation

[PATCH] spi: cadence-qspi: Move ref clock calculation to probe

2020-02-24 Thread Pratyush Yadav
"assigned-clock-parents" and "assigned-clock-rates" DT properties take effect only after ofdata_to_platdata() when clk_set_defaults() is called in device_probe(). Therefore clk get rate() would return a wrong value in ofdata_to_platdata() when compared with probe. Hence it needs to be moved to

[PATCH 1/3] clk: imx6: Add definition for IMX6QDL_CLK_ENET clock

2020-02-24 Thread Lukasz Majewski
After commit 673f6597321d ("net: fec_mxc: support i.MX8M with CLK_CCF") all NXP boards, which are not IMX8 and in the same time are supporting CCF need to provide IMX6QDL_CLK_ENET. This change defines the missing clock in i.MX6Q's CCF. Signed-off-by: Lukasz Majewski ---

[PATCH 2/3] clk: imx: Add support for pllv3 enet clock

2020-02-24 Thread Lukasz Majewski
This code has been ported from Linux kernel v5.5.5 (tag) and has been adjusted to U-Boot's DM. It adds support for correct recognition of IMX_PLLV3_ENET flag in the clk-pllv3.c driver. Signed-off-by: Lukasz Majewski --- drivers/clk/imx/clk-pllv3.c | 25 + 1 file

Re: [PATCH 1/2] Makefile: Add environment variable DEVICE_TREE to header

2020-02-24 Thread Tom Rini
On Tue, Feb 18, 2020 at 05:02:36PM +0100, Michal Simek wrote: > Users have option to overwrite default device tree > (CONFIG_DEFAULT_DEVICE_TREE) via environment variable DEVICE_TREE. > > Feature has been added long time ago by commit 74de8c9a1672 > ("dts/Makefile: Build the user specified dts")

[PATCH 0/3] clk: Fix ETH initialization on i.MX6Q boards using CCF

2020-02-24 Thread Lukasz Majewski
This short patch series fixes boards, which after the commit 673f6597321d ("net: fec_mxc: support i.MX8M with CLK_CCF") were required to support in CCF 'ipg' (i.e. IMX6QDL_CLK_ENET) and 'ptp' (i.e. IMX6QDL_CLK_ENET_REF) clocks during ETH initialization. Lack of those clocks supported in CCF

[PATCH 3/3] clk: imx6: Add definition for IMX6QDL_CLK_ENET_REF clock

2020-02-24 Thread Lukasz Majewski
After commit 673f6597321d ("net: fec_mxc: support i.MX8M with CLK_CCF") all NXP boards, which are not IMX8 and in the same time are supporting CCF need to provide PTP clock. On the i.MX6Q this clock is provided with IMX6QDL_CLK_ENET_REF in the Linux kernel's CCF. Code in this change models the

Re: [U-Boot] Sharing a hardware lab

2020-02-24 Thread Harald Seiler
Hello Simon, On Sun, 2020-02-23 at 19:34 -0700, Simon Glass wrote: > Hi Heiko, > > Thanks for the hints! I pushed your things here: > > https://github.com/sglass68/tbot/tree/simon > > Then I try: > tbot -l kea.py -b pcduino3.py uboot_build > > and get an error: > > tbot starting ... > type

Re: [PATCH v2] env: ti: boot: Fix Android boot on AM57x EVM

2020-02-24 Thread Sam Protsenko
Hi Lokesh, On Fri, Feb 21, 2020 at 4:35 PM Sam Protsenko wrote: > > When applying DTBO on top of DTB (with "fdt apply" command) on AM57x EVM > board, there is not enough memory reserved in RAM for DTB blob. Hence, > DTBO can't be merged in DTB. It leads to inability to boot Android with > next

Re: U-Boot Logo showing incorrect colors with eLCDIF

2020-02-24 Thread Anatolij Gustschin
Hi Fabio, On Mon, 24 Feb 2020 09:38:04 -0300 Fabio Estevam feste...@gmail.com wrote: > Hi Anatolij, > > On Wed, Feb 5, 2020 at 2:45 PM Fabio Estevam wrote: > > > > Hi Anatolij, > > > > On Wed, Feb 5, 2020 at 2:00 PM Anatolij Gustschin wrote: > > > > > I tried to extend the BMP code to fix

Re: U-Boot Logo showing incorrect colors with eLCDIF

2020-02-24 Thread Fabio Estevam
Hi Anatolij, On Wed, Feb 5, 2020 at 2:45 PM Fabio Estevam wrote: > > Hi Anatolij, > > On Wed, Feb 5, 2020 at 2:00 PM Anatolij Gustschin wrote: > > > I tried to extend the BMP code to fix this, but my testing with > > sandbox SDL end of last week has shown incorrect colors in 24bpp > > mode, and

Re: [PATCH] watchdog: Handle timer wrap around

2020-02-24 Thread Stefan Roese
On 24.02.20 01:20, Chris Packham wrote: On some platforms/architectures the value from get_timer() can wrap. This is particularly problematic when long-running code needs to measure a time difference as is the case with watchdog_reset() which tries to avoid tickling the watchdog too frequently.

RE: [PATCH v1 2/2] cpu: clk: riscv: populate proper CPU core clk frequency

2020-02-24 Thread Sagar Kadam
Hello Sean, > -Original Message- > From: Sean Anderson > Sent: Friday, February 21, 2020 11:48 AM > To: Sagar Kadam ; Bin Meng > > Cc: U-Boot Mailing List ; Lukasz Majewski > ; Anup Patel ; Paul Walmsley ( > Sifive) ; Vincent Chen > > Subject: Re: [PATCH v1 2/2] cpu: clk: riscv:

RE: [PATCH v1 1/2] fu540: prci: add request and free clock handlers

2020-02-24 Thread Sagar Kadam
Hi Sean, > -Original Message- > From: Sean Anderson > Sent: Friday, February 21, 2020 11:53 AM > To: Sagar Kadam ; u-boot@lists.denx.de > Cc: lu...@denx.de; bmeng...@gmail.com; anup.pa...@wdc.com; Paul > Walmsley ( Sifive) ; Vincent Chen > > Subject: Re: [PATCH v1 1/2] fu540: prci: add

[PATCH] spi: nxp-fspi: Add 1us delay to make controller ready for next transaction

2020-02-24 Thread Kuldeep Singh
Board gets reset when performing burst read/write operations. On the other hand, no such behaviour is observed on small size operations. In Linux, readl_poll_timeout API already add delay of 1us which is skipped in U-boot. Since, NXP Flexspi U-boot driver is a ported version of Linux driver and

RE: [PATCH v2 11/21] arm: socfpga: Secure register access for clock manager (SoC 64bits)

2020-02-24 Thread Ang, Chee Hong
Ang, Chee Hong mailto:chee.hong@intel.com>> schrieb am Sa., 22. Feb. 2020, 06:30: > From: Chee Hong Ang mailto:chee.hong@intel.com>> > > Allow clock manager driver to access the System Manager's Boot Scratch > Register 0 in non-secure mode (EL2) on SoC 64bits platform. > > Signed-off-by:

[PATCH v2] arm: imx6: configure NoC on i.MX6DQP

2020-02-24 Thread Bernhard Messerklinger
The i.MX6DP and i.MX6QP incorporate NoC interconnect logic which needs to be configured in order to use external DDR memory. This patch enables the SPL to configure the necessary registers in accordance with the NXP engineering bulletin EB828. Signed-off-by: Bernhard Messerklinger --- This

[PATCH] arm: imx6: configure NoC on i.MX6DQP

2020-02-24 Thread Bernhard Messerklinger
The i.MX6DP and i.MX6QP incorporate NoC interconnect logic which needs to be configured in order to use external DDR memory. This patch enables the SPL to configure the necessary registers in accordance with the NXP engineering bulletin EB828. Signed-off-by: Bernhard Messerklinger --- This

Re: [PATCH v2 11/21] arm: socfpga: Secure register access for clock manager (SoC 64bits)

2020-02-24 Thread Simon Goldschmidt
Ang, Chee Hong schrieb am Mo., 24. Feb. 2020, 10:12: > > > > > *From:* Ang, Chee Hong > *Sent:* Saturday, February 22, 2020 6:00 PM > *To:* Simon Goldschmidt > *Cc:* U-Boot Mailing List ; Marek Vasut < > ma...@denx.de>; See, Chin Liang ; Tan, Ley Foon > ; Westergreen, Dalon ; > Gong, Richard >

RE: [PATCH v2 13/21] arm: socfpga: Secure register access for reading PLL frequency

2020-02-24 Thread Ang, Chee Hong
> > > On 2/22/20 11:05 AM, Ang, Chee Hong wrote: > > > >>> From: Chee Hong Ang > > > >>> > > > >>> Allow reading external oscillator and FPGA clock's frequency > > > >>> from System Manager's Boot Scratch Register 1 and Boot Scratch > > > >>> Register > > > >>> 2 in non-secure mode (EL2) on SoC

RE: [PATCH v2 11/21] arm: socfpga: Secure register access for clock manager (SoC 64bits)

2020-02-24 Thread Ang, Chee Hong
From: Ang, Chee Hong Sent: Saturday, February 22, 2020 6:00 PM To: Simon Goldschmidt Cc: U-Boot Mailing List ; Marek Vasut ; See, Chin Liang ; Tan, Ley Foon ; Westergreen, Dalon ; Gong, Richard Subject: RE: [PATCH v2 11/21] arm: socfpga: Secure register access for clock manager (SoC

[PATCH v4 14/14] doc: update FU540 RISC-V documentation

2020-02-24 Thread Pragnesh Patel
Add descriptions about U-Boot SPL feature and how to build and run. Signed-off-by: Pragnesh Patel --- doc/board/sifive/fu540.rst | 409 ++--- 1 file changed, 385 insertions(+), 24 deletions(-) diff --git a/doc/board/sifive/fu540.rst b/doc/board/sifive/fu540.rst

[PATCH v4 13/14] sifive: fix palmer's email address

2020-02-24 Thread Pragnesh Patel
Fix Palmer's email address Signed-off-by: Pragnesh Patel --- board/sifive/fu540/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/sifive/fu540/MAINTAINERS b/board/sifive/fu540/MAINTAINERS index 702d803ad8..9bae3d3db7 100644 ---

[PATCH v4 12/14] riscv: sifive: fu540: enable all cache ways from u-boot proper

2020-02-24 Thread Pragnesh Patel
Enable all cache ways from u-boot proper. Signed-off-by: Pragnesh Patel --- board/sifive/fu540/Makefile | 1 + board/sifive/fu540/cache.c | 20 board/sifive/fu540/cache.h | 13 + board/sifive/fu540/fu540.c | 6 -- 4 files changed, 38 insertions(+), 2

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

2020-02-24 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 --- arch/riscv/dts/fu540-c000-u-boot.dtsi |7 + arch/riscv/dts/fu540-sdram-lpddr4.dtsi| 1489 +

[PATCH v4 09/14] clk: sifive: fu540-prci: Add clock initialization for SPL

2020-02-24 Thread Pragnesh Patel
Set corepll, ddrpll and ethernet PLL for u-boot-spl Signed-off-by: Pragnesh Patel --- drivers/clk/sifive/fu540-prci.c | 94 + 1 file changed, 94 insertions(+) diff --git a/drivers/clk/sifive/fu540-prci.c b/drivers/clk/sifive/fu540-prci.c index

[PATCH v4 10/14] riscv: sifive: fu540: add SPL configuration

2020-02-24 Thread Pragnesh Patel
Add a support for SPL which will boot from L2 LIM (0x0800_) and then boot U-boot FIT image including OpenSBI FW_DYNAMIC firmware and U-Boot proper images from 1st partition of MMC boot devices. SPL related code is leverage from FSBL (https://github.com/sifive/freedom-u540-c000-bootloader.git)

[PATCH v4 11/14] configs: fu540: Add config options for U-boot SPL

2020-02-24 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+dtb) U-Boot SPL will be loaded by ZSBL from SD card (replace fsbl.bin with u-boot-spl.bin) and runs in

[PATCH v4 03/14] riscv: Add _image_binary_end for SPL

2020-02-24 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 --- arch/riscv/cpu/u-boot-spl.lds | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/cpu/u-boot-spl.lds b/arch/riscv/cpu/u-boot-spl.lds

[PATCH v4 06/14] sifive: fu540: add ddr driver

2020-02-24 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 --- drivers/ram/Kconfig | 7 + drivers/ram/Makefile | 2 + drivers/ram/sifive/Kconfig

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

2020-02-24 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

[PATCH v4 08/14] clk: sifive: fu540-prci: Add clock enable and disable ops

2020-02-24 Thread Pragnesh Patel
Added clock enable and disable functions in prci ops Signed-off-by: Pragnesh Patel --- drivers/clk/sifive/fu540-prci.c | 75 +++-- 1 file changed, 72 insertions(+), 3 deletions(-) diff --git a/drivers/clk/sifive/fu540-prci.c b/drivers/clk/sifive/fu540-prci.c index

[PATCH v4 04/14] lib: Makefile: build crc7.c when CONFIG_MMC_SPI

2020-02-24 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 --- common/spl/Kconfig | 7 +++ lib/Makefile | 1 + 2 files changed, 8 insertions(+) diff --git

[PATCH v4 01/14] misc: add driver for the SiFive otp controller

2020-02-24 Thread Pragnesh Patel
Added a misc driver to handle OTP memory in SiFive SoCs. Signed-off-by: Pragnesh Patel --- drivers/misc/Kconfig | 7 ++ drivers/misc/Makefile | 1 + drivers/misc/sifive-otp.c | 241 ++ 3 files changed, 249 insertions(+) create mode 100644

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

2020-02-24 Thread Pragnesh Patel
Use the OTP DM driver to set the serial environment variable. Signed-off-by: Pragnesh Patel --- arch/riscv/dts/fu540-c000-u-boot.dtsi | 14 +++ .../dts/hifive-unleashed-a00-u-boot.dtsi | 6 + board/sifive/fu540/Kconfig| 2 + board/sifive/fu540/fu540.c

[PATCH v4 00/14] RISC-V SiFive FU540 support SPL

2020-02-24 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. How to test this patch: 1) Go to OpenSBI-dir : make PLATFORM=sifive/fu540 O=build_dir I=install_dir FW_DYNAMIC=y install 2) cp