Re: [PATCH 3/3] mmc: fsl_esdhc_imx: correct the actual card clock

2022-07-22 Thread Tim Harvey
On Fri, Feb 11, 2022 at 3:48 AM wrote: > > From: Haibo Chen > > The original code logic can not show the correct card clock, and also > has one risk when the div is 0. Because there is div -=1 before. > > So move the operation before div -=1, and also involve ddr_pre_div > to get the correct valu

Re: [PATCH] sunxi-mmc: increase stabilization delay from 1ms to 20ms

2022-07-22 Thread Da Xue
On Fri, Jul 22, 2022 at 1:56 PM Jernej Škrabec wrote: > > Dne petek, 22. julij 2022 ob 18:55:14 CEST je Andre Przywara napisal(a): > > On 21/07/2022 23:08, Da Xue wrote: > > > > Hi, > > > > > Some users experienced problems booting u-boot from SPL hanging here: > > > > > > Trying to boot from MMC1

Re: [PATCH] fastboot: release usb_gadget on reboot commands

2022-07-22 Thread Marek Vasut
On 7/21/22 15:59, Mattijs Korpershoek wrote: [...] diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 8ba55aab9f8f..a00d1ca571d1 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -420,7 +420,8 @@ static int fastboot_tx_write_

Re: [PATCH 01/17] Convert CONFIG_FSL_FIXED_MMC_LOCATION et al to Kconfig

2022-07-22 Thread Tom Rini
On Fri, Jul 22, 2022 at 01:05:38PM -0700, Tim Harvey wrote: > On Fri, Jul 22, 2022 at 12:06 PM Tom Rini wrote: > > > > On Fri, Jul 22, 2022 at 11:01:52AM -0700, Tim Harvey wrote: > > > On Mon, Jun 20, 2022 at 5:08 AM Tom Rini wrote: > > > > > > > > This converts the following to Kconfig: > > > >

Re: [PATCH 01/17] Convert CONFIG_FSL_FIXED_MMC_LOCATION et al to Kconfig

2022-07-22 Thread Tim Harvey
On Fri, Jul 22, 2022 at 12:06 PM Tom Rini wrote: > > On Fri, Jul 22, 2022 at 11:01:52AM -0700, Tim Harvey wrote: > > On Mon, Jun 20, 2022 at 5:08 AM Tom Rini wrote: > > > > > > This converts the following to Kconfig: > > >CONFIG_FSL_FIXED_MMC_LOCATION > > >CONFIG_ESDHC_HC_BLK_ADDR > > > >

Re: [PATCH 01/17] Convert CONFIG_FSL_FIXED_MMC_LOCATION et al to Kconfig

2022-07-22 Thread Tom Rini
On Fri, Jul 22, 2022 at 11:01:52AM -0700, Tim Harvey wrote: > On Mon, Jun 20, 2022 at 5:08 AM Tom Rini wrote: > > > > This converts the following to Kconfig: > >CONFIG_FSL_FIXED_MMC_LOCATION > >CONFIG_ESDHC_HC_BLK_ADDR > > > > Signed-off-by: Tom Rini [snip] > Tom, > > I'm not sure this p

Pull request for efi-2022-10-rc1-2

2022-07-22 Thread Heinrich Schuchardt
Dear Tom, The following changes since commit 26f6f7fb5c0651d65afdee6d8ed36063606179a8: Merge branch '2022-07-14-migrate-wiki-to-sphinx' (2022-07-14 18:43:51 -0400) are available in the Git repository at: https://source.denx.de/u-boot/custodians/u-boot-efi.git tags/efi-2022-10-rc1-2 fo

Re: [PATCH 01/17] Convert CONFIG_FSL_FIXED_MMC_LOCATION et al to Kconfig

2022-07-22 Thread Tim Harvey
On Mon, Jun 20, 2022 at 5:08 AM Tom Rini wrote: > > This converts the following to Kconfig: >CONFIG_FSL_FIXED_MMC_LOCATION >CONFIG_ESDHC_HC_BLK_ADDR > > Signed-off-by: Tom Rini > --- > arch/powerpc/include/asm/config_mpc85xx.h | 3 --- > boot/Kconfig | 13

Re: [PATCH] sunxi-mmc: increase stabilization delay from 1ms to 20ms

2022-07-22 Thread Jernej Škrabec
Dne petek, 22. julij 2022 ob 18:55:14 CEST je Andre Przywara napisal(a): > On 21/07/2022 23:08, Da Xue wrote: > > Hi, > > > Some users experienced problems booting u-boot from SPL hanging here: > > > > Trying to boot from MMC1 or Trying to boot from MMC2 > > > > This seems to occur with both Mi

[PATCH 5/5] fwu: DeveloperBox: add support for FWU

2022-07-22 Thread jassisinghbrar
From: Jassi Brar Add code to support FWU_MULTI_BANK_UPDATE. The platform does not have gpt-partition storage for Banks and MetaData, rather it used SPI-NOR backed mtd regions for the purpose. Signed-off-by: Masami Hiramatsu Signed-off-by: Jassi Brar --- board/socionext/developerbox/Makefile

[PATCH 4/5] dt: fwu: developerbox: enable fwu banks and mdata regions

2022-07-22 Thread jassisinghbrar
From: Jassi Brar specify Bank-0/1 and fwu metadata mtd regions. Signed-off-by: Masami Hiramatsu Signed-off-by: Jassi Brar --- .../synquacer-sc2a11-developerbox-u-boot.dtsi | 22 ++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/arch/arm/dts/synquacer-sc2a11-dev

[PATCH 3/5] FWU: mtd: Add helper functions for accessing FWU metadata

2022-07-22 Thread jassisinghbrar
From: Sughosh Ganu Add helper functions needed for accessing the FWU metadata which contains information on the updatable images. Signed-off-by: Sughosh Ganu Signed-off-by: Jassi Brar --- lib/fwu_updates/Makefile | 1 + lib/fwu_updates/fwu_mtd.c | 173 ++

[PATCH 2/5] FWU: Add FWU metadata access driver for MTD storage regions

2022-07-22 Thread jassisinghbrar
From: Sughosh Ganu In the FWU Multi Bank Update feature, the information about the updatable images is stored as part of the metadata, on a separate region. Add a driver for reading from and writing to the metadata when the updatable images and the metadata are stored on a raw MTD region. Signed

[PATCH 1/5] dt/bindings: Add bindings for FWU Metadata mtd storage

2022-07-22 Thread jassisinghbrar
From: Sughosh Ganu Add bindings needed for accessing the FWU metadata regions. These include the compatible string which point to the access method, the actual device which stores the FWU metadata and the offsets for both metadata regions. The current patch adds basic bindings needed for accessi

[PATCH 0/5] FWU: Add support for mtd backed feature on DeveloperBox

2022-07-22 Thread jassisinghbrar
From: Jassi Brar The mtd and synquacer (developerbox) support was dropped from v6[1] This patchset re-introduces the support over last v7[2] submission of the patchset. All the comments on this code over v5 submission have been addressed. Moving forward a changelog will be maintained. [1] ht

[PATCH 0/5] FWU: Add support for mtd backed feature on DeveloperBox

2022-07-22 Thread jassisinghbrar
From: Jassi Brar The mtd and synquacer (developerbox) support was dropped from v6[1] This patchset re-introduces the support over last v7[2] submission of the patchset. All the comments on this code over v5 submission have been addressed. Moving forward a changelog will be maintained. [1] ht

[PATCH] Revert "power: pmic: rk8xx: Support sysreset shutdown method"

2022-07-22 Thread Chris Morgan
From: Chris Morgan This reverts commit ad607512f5757f4485968efd5bcf2c0245a8a235. It was found during extensive testing that this causes problems on certain boards. I was able to test this patch on a second device (an Anbernic RG353) and it resulted in similar failures. Signed-off-by: Chris Morg

Re: [PATCH v4 00/14] Port manufacturer specific initialization

2022-07-22 Thread Michael Nazzareno Trimarchi
Hi Dario On Fri, Jul 22, 2022 at 6:11 PM Dario Binacchi wrote: > > In preparation of re-sync of mtd stack, we opt to move the current stack > slowly in order to have a more easy sync and test. We would like to > prepare uboot to support no-jedec and no-onfi compliant nand so we need > to clean up

Re: [PATCH v5 19/23] FWU: synquacer: Add FWU Multi bank update support for DeveloperBox

2022-07-22 Thread Jassi Brar
On Fri, Jul 22, 2022 at 3:37 AM Ilias Apalodimas wrote: > > Hi Jassi > > On Wed, 20 Jul 2022 at 17:30, Jassi Brar wrote: > > > > On Wed, Jul 20, 2022 at 2:54 AM Ilias Apalodimas > > wrote: > > > > > > Hi Jassi, > > > > > > On Tue, 19 Jul 2022 at 18:27, Jassi Brar > > > wrote: > > > > > > > > O

Re: [PATCH] sunxi-mmc: increase stabilization delay from 1ms to 20ms

2022-07-22 Thread Andre Przywara
On 21/07/2022 23:08, Da Xue wrote: Hi, Some users experienced problems booting u-boot from SPL hanging here: Trying to boot from MMC1 or Trying to boot from MMC2 This seems to occur with both MicroSD and eMMC modules on ALL-H3-CC. Increasing the delay after mmc reset fixes these boot problems

[PATCH v4 12/14] mtd: nand: Move Macronix specific initialization in nand_macronix.c

2022-07-22 Thread Dario Binacchi
From: Michael Trimarchi Upstream linux commit 3b5206f4be9b65. Move Macronix specific initialization logic into nand_macronix.c. This is part of the "separate vendor specific code from core" cleanup process. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- (no changes since

[PATCH v4 11/14] mtd: nand: Move AMD/Spansion specific init/detection logic in nand_amd.c

2022-07-22 Thread Dario Binacchi
From: Michael Trimarchi Upstream linux commit 229204da53b31d. Move AMD/Spansion specific initialization/detection logic into nand_amd.c. This is part of the "separate vendor specific code from core" cleanup process. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- (no chang

[PATCH v4 10/14] mtd: nand: Move Micron specific init logic in nand_micron.c

2022-07-22 Thread Dario Binacchi
From: Michael Trimarchi Upstream linux commit 10d4e75c36f6c1. Move Micron specific initialization logic into nand_micron.c. This is part of the "separate vendor specific code from core" cleanup process. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- (no changes since v3)

[PATCH v4 09/14] mtd: nand: Move Toshiba specific init/detection logic in nand_toshiba.c

2022-07-22 Thread Dario Binacchi
From: Michael Trimarchi Upstream linux commit 9b2d61f80b060c. Move Toshiba specific initialization and detection logic into nand_toshiba.c. This is part of the "separate vendor specific code from core" cleanup process. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- (no ch

[PATCH v4 14/14] mtd: decommission the NAND museum

2022-07-22 Thread Dario Binacchi
From: Michael Trimarchi Upstream linux commit f7025a43a9da26. The MTD subsystem has its own small museum of ancient NANDs in a form of the CONFIG_MTD_NAND_MUSEUM_IDS configuration option. The museum contains stone age NANDs with 256 bytes pages, as well as iron age NANDs with 512 bytes per page

[PATCH v4 13/14] mtd: nand: toshiba: Retrieve ECC requirements from extended ID

2022-07-22 Thread Dario Binacchi
From: Michael Trimarchi Upstream linux commit fb3bff5b407e58. This patch enables support to read the ECC strength and size from the NAND flash using Toshiba Memory SLC NAND extended-ID. This patch is based on the information of the 6th ID byte of the Toshiba Memory SLC NAND. Signed-off-by: Mich

[PATCH v4 08/14] mtd: nand: Move Hynix specific init/detection logic in nand_hynix.c

2022-07-22 Thread Dario Binacchi
From: Michael Trimarchi Upstream linux commit 01389b6bd2f4f7. Move Hynix specific initialization and detection logic into nand_hynix.c. This is part of the "separate vendor specific code from core" cleanup process. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- (no change

[PATCH v4 07/14] mtd: nand: Move Samsung specific init/detection logic in nand_samsung.c

2022-07-22 Thread Dario Binacchi
From: Michael Trimarchi Upstream linux commit c51d0ac59f2420. Move Samsung specific initialization and detection logic into nand_samsung.c. This is part of the "separate vendor specific code from core" cleanup process. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- (no ch

[PATCH v4 02/14] mtd: nand: Store nand ID in struct nand_chip

2022-07-22 Thread Dario Binacchi
From: Michael Trimarchi Upstream linux commit 7f501f0a72036d. Store the NAND ID in struct nand_chip to avoid passing id_data and id_len as function parameters. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- (no changes since v3) Changes in v3: - Use commit sha1 with 13 d

[PATCH v4 06/14] mtd: nand: Export symbol nand_decode_ext_id

2022-07-22 Thread Dario Binacchi
From: Michael Trimarchi In preparation of moving specific nand support that are not jedec or onfi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/mtd/nand/raw/nand_base.c | 3 ++- include/linux/mtd/rawnand.h | 3 +++ 2 files changed, 5 i

[PATCH v4 05/14] mtd: nand: Fix MediaTek MT7621 SoC build

2022-07-22 Thread Dario Binacchi
From: Michael Trimarchi nand_get_flash_type was reworked in commit 1ca6f9483e9ab5. This change break the Mediatek MT721. Fix it adjust the function call parameters +include/linux/mtd/rawnand.h:32:62: note: expected 'struct nand_chip *' but argument is of type 'struct mtd_info *' + 32 | struct

[PATCH v4 04/14] mtd: nand: Get rid of mtd variable in function calls

2022-07-22 Thread Dario Binacchi
From: Michael Trimarchi chip points to mtd. Passing chip is enough to have a reference to mtd when is necessary Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- (no changes since v3) Changes in v3: - Fix code style warnings raised by patman. drivers/mtd/nand/raw/nand_base

[PATCH v4 03/14] mtd: nand: Add manufacturer specific initialization/detection steps

2022-07-22 Thread Dario Binacchi
From: Michael Trimarchi Upstream linux commit abbe26d144ec22. A lot of NANDs are implementing generic features in a non-generic way, or are providing advanced auto-detection logic where the NAND ID bytes meaning changes with the NAND generation. Providing this vendor specific initialization ste

[PATCH v4 01/14] mtd: nand: Get rid of busw parameter

2022-07-22 Thread Dario Binacchi
From: Michael Trimarchi Upstream linux commit 29a198a1592d83. Auto-detection functions are passed a busw parameter to retrieve the actual NAND bus width and eventually set the correct value in chip->options. Rework the nand_get_flash_type() function to get rid of this extra parameter and let det

[PATCH v4 00/14] Port manufacturer specific initialization

2022-07-22 Thread Dario Binacchi
In preparation of re-sync of mtd stack, we opt to move the current stack slowly in order to have a more easy sync and test. We would like to prepare uboot to support no-jedec and no-onfi compliant nand so we need to clean up a bit the code we have now and upstream some of the support. In this serie

Re: [PATCH v7 06/13] FWU: stm32mp1: Add helper functions for accessing FWU metadata

2022-07-22 Thread Sughosh Ganu
On Fri, 22 Jul 2022 at 09:09, Jassi Brar wrote: > > On Thu, 14 Jul 2022 at 13:40, Sughosh Ganu wrote: > > > > Add helper functions needed for accessing the FWU metadata which > > contains information on the updatable images. These functions have > > been added for the STM32MP157C-DK2 board which

[PATCH 12/12] rockchip: puma-rk3399: migrate to u-boot-rockchip-spi.bin

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz Now that a single binary containing TPL/SPL correctly formatted for SPI flashes and U-Boot proper, can be generated by binman, let's do it. Also update the documentation to tell the user to use this newly generated file instead of manually generating and flashing the binarie

[PATCH 11/12] rockchip: lion-rk3368: migrate to u-boot-rockchip.bin

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz Now that the offset for u-boot.itb in the u-boot-rockchip.bin matches the one required for Lion, let's tell users to use it instead of flashing the TPL/SPL and U-Boot proper separately. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- Depends on follwing patch series:

[PATCH 10/12] rockchip: puma-rk3399: migrate to u-boot-rockchip.bin

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz Now that the offset for u-boot.itb in the u-boot-rockchip.bin matches the one required for Puma, let's tell users to use it instead of flashing the TPL/SPL and U-Boot proper separately. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- Depends on follwing patch series:

[PATCH 07/12] rockchip: puma-rk3399: load environment from same medium as one used to load U-Boot proper

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz Chances are when one boots U-Boot proper from a given storage medium, they want the same medium to be used to load and store the environment. This basically allows to have completely separate U-Boot (TPL/SPL/U-Boot proper/environment) per storage medium which is convenient w

[PATCH 09/12] rockchip: puma-rk3399: migrate to TPL

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz Depending on the toolchain used to compile the SPL for Puma RK3399-Q7 module, the board does not boot because the resulting binary is too big to fit in SRAM. Let's add a TPL so that there's no need to fiddle with or hack the defconfig to have a working bootloader. This foll

[PATCH 08/12] rockchip: puma-rk3399: remove useless CONFIG_SYS_SPI_U_BOOT_OFFS

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz The SPL payload offset when booting from SPI defaults to CONFIG_SYS_SPI_U_BOOT_OFFS but can be overridden by u-boot,spl-payload-offset. The Device Tree for Puma Haikou has this property so there's no need to have this one option in the defconfig, especially since they are not

[PATCH 06/12] rockchip: puma-rk3399: allow loading environment from SPI-NOR flash

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz There's a SPI-NOR flash available from which SPL and U-Boot proper can be booted, it makes sense to also allow this medium to store U-Boot environment so let's enable it. The Device Tree advertises a max frequency of 50MHz so let's set the config option appropriately. Cc: Q

[PATCH 05/12] rockchip: puma-rk3399: load environment from same MMC as used for loading U-Boot proper

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz Automatically detect which MMC device (SD-Card or eMMC) was used to load U-Boot proper and load the environment from that MMC device instead of a hardcoded one. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- Depends on https://lore.kernel.org/u-boot/20220715151552.9

[PATCH 04/12] rockchip: puma-rk3399: remove unused default ENV_OFFSET for SPI flashes

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz CONFIG_ENV_OFFSET is set in the defconfig to a different value already so this isn't used. Let's remove it as to not confuse users. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- board/theobroma-systems/puma_rk3399/Kconfig | 3 --- 1 file changed, 3 deletions(-) di

[PATCH 03/12] rockchip: puma-rk3399: allow non-SD-Card-loaded SPL to load U-Boot proper from SD-Card

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz Trying to load U-Boot proper from SPL when SPL was not loaded from SD-Card is currently not working because the SDMMC pins aren't muxed correctly. It is assumed the BootROM is doing this for us when booting from SD-Card hence why it's not needed when booting TPL/SPL from SD-C

[PATCH 02/12] rockchip: puma-rk3399: use gpio-hog instead of fixed-regulator for enabling eMMC/SPI-NOR

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz On Haikou devkit, it is possible to disable eMMC and SPI-NOR to force booting from SD card or USB via rkdeveloptool by toggling a switch. This switch needs to be overridden in software to be able to access eMMC and SPI-NOR once the device has booted from SD Card. Puma SoM can

[PATCH 01/12] rockchip: puma-rk3399: fix boot_targets swap depending on U-Boot proper load medium

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz distroboot should try first on the same MMC medium as the one the SPL loaded U-Boot proper from. This was the case when the introducing commit was merged because the default order was eMMC first and then SD card. The check was therefore made only on whether we booted from SD

[PATCH 00/12] Puma RK3399 migration to TPL and numerous fixes

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz Puma RK3399 SoM struggled for a few releases already to boot because the SPL was too big. Therefore, let's migrate to TPL like most RK3399-boards already did a few releases ago. This also fixes numerous issues around fallback booting (U-Boot proper corrupted on the storage m

[PATCH v8 8/8] test: rng: Add a UT testcase for the rng command

2022-07-22 Thread Sughosh Ganu
The 'rng' command dumps a number of random bytes on the console. Add a set of tests for the 'rng' command. The test function performs basic sanity testing of the command. Since a unit test is being added for the command, enable it by default in the sandbox platforms. Signed-off-by: Sughosh Ganu

[PATCH v8 7/8] doc: rng: Add documentation for the rng command

2022-07-22 Thread Sughosh Ganu
Add a usage document for the 'rng' u-boot command. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewed-by: Simon Glass --- Changes since V7: None doc/usage/cmd/rng.rst | 26 ++ doc/usage/index.rst | 1 + 2 files changed, 27 insertions(+) create mode

[PATCH v8 6/8] cmd: rng: Use a statically allocated array for random bytes

2022-07-22 Thread Sughosh Ganu
Use a statically allocated buffer on stack instead of using malloc for reading the random bytes. Using a local array is faster than allocating heap memory on every initiation of the command. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewed-by: Simon Glass --- Changes since V7:

[PATCH v8 5/8] cmd: rng: Add support for selecting RNG device

2022-07-22 Thread Sughosh Ganu
The 'rng' u-boot command is used for printing a select number of random bytes on the console. Currently, the RNG device from which the random bytes are read is fixed. However, a platform can have multiple RNG devices, one example being qemu, which has a virtio RNG device and the RNG pseudo device t

[PATCH v8 4/8] tpm: Add the RNG child device

2022-07-22 Thread Sughosh Ganu
The TPM device comes with the random number generator(RNG) functionality which is built into the TPM device. Add logic to add the RNG child device in the TPM uclass post probe callback. The RNG device can then be used to pass a set of random bytes to the linux kernel, need for address space random

[PATCH v8 3/8] tpm: rng: Add driver model interface for TPM RNG device

2022-07-22 Thread Sughosh Ganu
The TPM device has a builtin random number generator(RNG) functionality. Expose the RNG functions of the TPM device to the driver model so that they can be used by the EFI_RNG_PROTOCOL if the protocol is installed. Also change the function arguments and return type of the random number functions t

[PATCH v8 2/8] efi_loader: initialize the RNG protocol after the TCC2

2022-07-22 Thread Sughosh Ganu
From: Ilias Apalodimas Due to U-Boot's lazy binding the RNG presented by the TCG is not available until the EFI_TCG2 protocol has been initialized. Since the TPM has a built-in RNG device we can use for the OS randomization, move the RNG protocol installation after the TCG. Signed-off-by: Ilias

[PATCH v8 1/8] tpm: Export the TPM-version functions

2022-07-22 Thread Sughosh Ganu
From: Simon Glass These functions should really be available outside the TPM code, so that other callers can find out which version the TPM is. Rename them to have a tpm_ prefix() and add them to the header file. Signed-off-by: Simon Glass Reviewed-by: Ilias Apalodimas --- Changes since V7: No

[PATCH v8 0/8] tpm: rng: Move TPM RNG functionality to driver model

2022-07-22 Thread Sughosh Ganu
The TPM device provides the random number generator(RNG) functionality, whereby sending a command to the TPM device results in the TPM device responding with random bytes. There was a discussion on the mailing list earlier[1], where it was explained that platforms with a TPM device can install t

Re: [PATCH v2 0/4] Deduplicate dhelectronics board files

2022-07-22 Thread Marek Vasut
On 7/22/22 10:26, Philip Oberfichtner wrote: This series unifies common MAC address code for imx6, imx8 and stm32 based boards by DH. It is thought of as a starting point for more deduplication in the future. Entire series Reviewed-by: Marek Vasut

[PATCH] video: dw_mipi_dsi: fix vsync active vs back porch

2022-07-22 Thread John Keeping
The wrong fields are pulled out of the timings here so the values programmed into the DSI_VID_VSA_LINES and DSI_VID_VBP_LINES registers are swapped. Use the right fields so that the correct values are programmed. Fixes: d4f7ea83fc ("video: add MIPI DSI host controller bridge") Signed-off-by: John

[PATCH v12 13/13] fpga: zynqmp: support loading encrypted bitfiles

2022-07-22 Thread Oleksandr Suvorov
From: Adrian Fiergolski Add supporting new compatible string "u-boot,zynqmp-fpga-enc" to handle loading encrypted bitfiles. This feature requires encrypted FSBL, as according to UG1085: "The CSU automatically locks out the AES key, stored in either BBRAM or eFUSEs, as a key source to the AES en

[PATCH v12 12/13] fpga: zynqmp: support loading authenticated images

2022-07-22 Thread Oleksandr Suvorov
Add supporting new compatible string "u-boot,zynqmp-fpga-ddrauth" to handle loading authenticated images (DDR). Based on solution by Jorge Ramirez-Ortiz Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti --- (no changes since v11) Changes in v11: - Fix treating an incoming FPGA image

[PATCH v12 09/13] fpga: xilinx: pass compatible flags to load() callback

2022-07-22 Thread Oleksandr Suvorov
These flags may be used to check whether an FPGA driver is able to load a particular FPGA bitstream image. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti Tested-by: Adrian Fiergolski --- (no changes since v1) drivers/fpga/spartan2.c | 2 +- drivers/fpga/spartan3.c | 2 +- driver

[PATCH v12 11/13] fpga: zynqmp: add bitstream compatible checking

2022-07-22 Thread Oleksandr Suvorov
Check whether the FPGA ZynqMP driver supports the given bitstream image type. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti Tested-by: Adrian Fiergolski --- Changes in v12: - exclude all secure-related code if FPGA_LOAD_SECURE is disabled Changes in v10: - fix grammar drivers/

[PATCH v12 10/13] fpga: zynqmp: reduce zynqmppl_load() code

2022-07-22 Thread Oleksandr Suvorov
Reduce the function code by calling xilinx_pm_request() once only. Use the same variable bsize_req to store either bstream size in bytes or an address of bstream size according to a type required by the firmware version. Remove obsolete debug(). Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo

[PATCH v12 08/13] spl: fit: pass real compatible flags to fpga_load()

2022-07-22 Thread Oleksandr Suvorov
Convert taken FPGA image "compatible" string to a binary compatible flag and pass it to an FPGA driver. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti Tested-by: Adrian Fiergolski --- Changes in v12: - convert "compatible" to flags only if FPGA_LOAD_SECURE enabled; Changes in v10

[PATCH v12 07/13] fpga: add fpga_compatible2flag

2022-07-22 Thread Oleksandr Suvorov
Add a "compatible" string to binary flag converter, which uses a callback str2flag() of given FPGA driver if available. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti Tested-by: Adrian Fiergolski --- Changes in v12: - define the function only if FPGA_LOAD_SECURE enabled; Changes

[PATCH v12 06/13] fpga: pass compatible flags to fpga_load()

2022-07-22 Thread Oleksandr Suvorov
These flags may be used to check whether an FPGA driver is able to load a particular FPGA bitstream image. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti Tested-by: Adrian Fiergolski --- (no changes since v1) boot/image-board.c| 4 ++-- cmd/fpga.c| 8 co

[PATCH v12 05/13] fpga: xilinx: pass compatible flags to xilinx_load()

2022-07-22 Thread Oleksandr Suvorov
This flag is used to check whether a Xilinx FPGA driver is able to load a particular FPGA bitstream image. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti Tested-by: Adrian Fiergolski --- (no changes since v1) drivers/fpga/fpga.c | 2 +- drivers/fpga/xilinx.c | 2 +- include/xi

[PATCH v12 04/13] fpga: zynqmp: add str2flags call

2022-07-22 Thread Oleksandr Suvorov
Add a call to convert FPGA "compatible" string to a binary flag. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti Tested-by: Adrian Fiergolski --- (no changes since v1) drivers/fpga/zynqmppl.c | 11 ++- include/xilinx.h| 3 +++ 2 files changed, 13 insertions(+), 1

[PATCH v12 03/13] fpga: xilinx: add bitstream flags to driver desc

2022-07-22 Thread Oleksandr Suvorov
Store a set of supported bitstream types in xilinx_desc structure. It will be used to determine whether an FPGA image is able to be loaded with a given driver. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti Tested-by: Adrian Fiergolski --- (no changes since v10) Changes in v10: -

[PATCH v12 02/13] fpga: xilinx: add missed identifier names

2022-07-22 Thread Oleksandr Suvorov
Function definition arguments should also have identifier names. Add missed ones to struct xilinx_fpga_op callbacks, unifying code. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti Tested-by: Adrian Fiergolski --- (no changes since v1) include/xilinx.h | 10 ++ 1 file chan

[PATCH v12 01/13] fpga: add option for loading FPGA secure bitstreams

2022-07-22 Thread Oleksandr Suvorov
It allows using this feature without enabling the "fpga loads" command. Signed-off-by: Oleksandr Suvorov Co-developed-by: Adrian Fiergolski Signed-off-by: Adrian Fiergolski Tested-by: Ricardo Salveti Tested-by: Adrian Fiergolski --- (no changes since v1) cmd/Kconfig | 3 ++- d

[PATCH v12 00/13] fpga: zynqmp: Adding support of loading authenticated images

2022-07-22 Thread Oleksandr Suvorov
This patchset introduces support for the authenticated and encrypted FPGA images on ZynqMP boards, besides that introducing common way to pass the compatible property to any fpga driver. It bases on the initial work by Jorge Ramirez-Ortiz https://patchwork.ozlabs.org/project/uboot/patch/2021101

Re: [PATCH 01/19] video: Renname vbe.h to vesa.h

2022-07-22 Thread Bin Meng
Hi Simon, On Fri, Jul 22, 2022 at 5:00 PM Simon Glass wrote: > > Hi Bin, > > On Wed, 20 Jul 2022 at 19:25, Bin Meng wrote: > > > > Hi Simon, > > > > On Thu, Jul 21, 2022 at 1:00 AM Simon Glass wrote: > > > > > > We want to use VBE to mean Verfiied Boot for Embedded in U-Boot. Rename > > > > typ

[PATCH v2 7/7] rockchip: add u-boot-rockchip-spi.bin image for booting from SPI-NOR flash

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz This new image is similar to u-boot-rockchip.bin except that it's destined to be flashed on SPI-NOR flashes. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- arch/arm/dts/rockchip-u-boot.dtsi | 29 + 1 file changed, 29 insertions(+) diff -

[PATCH v2 6/7] binman: add support for skipping file concatenation for mkimage

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz Some image types handled by mkimage require the datafiles to be passed independently (-d data1:data2) for specific handling of each. A concatenation of datafiles prior to passing them to mkimage wouldn't work. That is the case for rkspi for example which requires page alignm

[PATCH v2 5/7] rockchip: allow to build SPI images even without HAS_ROM option

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz This prepares for the creation of a u-boot-rockchip-spi.bin image similar to u-boot-rockchip.bin to the exception it's destined for SPI-NOR flashes instead of MMC storage medium. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- arch/arm/dts/rk3288-u-boot.dtsi | 2 +-

[PATCH v2 4/7] rockchip: simplify binman image dependencies addition to INPUTS

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz By factoring SPL check in the first condition, this makes the checks a bit less convoluted and more readable. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- Makefile | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile ind

[PATCH v2 3/7] rockchip: remove unneeded CONFIG_SPL_PAD_TO

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz Since binman takes care of setting the appropriate offset for the SPL payload, there's no need to use this variable anymore. Moreover, it is technically incorrect since the padding is different depending on whether the first stage bootloader is for a SPI flash or MMC storage

[PATCH v2 2/7] rockchip: generate u-boot-rockchip.bin with binman for ARM64 boards

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz This allows to build u-boot-rockchip.bin binary with binman for Rockchip ARM64 boards instead of the legacy Makefile way. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- Makefile | 28 ++-- arch/arm/Kconfig

[PATCH v2 1/7] rockchip: generate idbloader.img content for u-boot-rockchip.bin with binman for ARM

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz idbloader.img content - currently created by way of Makefile - can be created by binman directly. So let's do that for Rockchip ARM platforms. Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- Makefile | 2 +- arch/arm/dts/rockchip-u-boot.dts

[PATCH v2 0/7] migrate u-boot-rockchip.bin to binman and generate an image for SPI

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz This migrates the generation of u-boot-rockchip.bin from Makefile to binman completely. There is therefore no idbloader.img anymore as it is created on the fly by binman. This also adds support for generating the same kind of image than u-boot-rockchip.bin but for SPI flashe

[PATCH v2 2/2] rockchip: rk3399: remove duplicate call to regulators_enable_boot_on

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz An earlier commit makes the common SPL code call regulators_enable_boot_on and regulators_enable_boot_off before iterating over possible boot media for U-Boot proper. There is therefore no need to do this in the rk3399-specific code, so let's remove it. Cc: Quentin Schulz T

[PATCH v2 1/2] spl: enable regulator-boot-on and disable regulator-force-boot-off

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz This makes sure regulators that need to be turned on or off at boot are turned on or off in the SPL. This may be required for the SPL to do some operations, such as finding possible loading media for U-Boot proper. Cc: Quentin Schulz Tested-by: Xavier Drudis Ferran Signed

[PATCH v3 2/2] rockchip: rk3399: fix incorrect ifdef check on SPL_GPIO

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz The check to perform is on CONFIG_SPL_GPIO and not SPL_GPIO. Because this was never compiled in, it missed an include of cru.h that was not detected before. Let's include it too. Also switch to IS_ENABLED in-code check as it is the preferred inclusion/exclusion mechanism. F

[PATCH v3 1/2] rockchip: rk3399: fix incorrect ifdef check on SPL_DM_REGULATOR

2022-07-22 Thread Quentin Schulz
From: Quentin Schulz The check to perform is on CONFIG_SPL_DM_REGULATOR and not SPL_DM_REGULATOR. Also switch to in-code check instead of ifdefs. Fixes: 07586ee4322a ("rockchip: rk3399: Support common spl_board_init") Cc: Quentin Schulz Signed-off-by: Quentin Schulz --- v2: - use IS_ENABLED

Re: [PATCH v7 3/7] tpm: Add the RNG child device

2022-07-22 Thread Ilias Apalodimas
Hi Simon, On Fri, 22 Jul 2022 at 12:00, Simon Glass wrote: > > Hi Sughosh, > > On Wed, 20 Jul 2022 at 06:30, Sughosh Ganu wrote: > > > > The TPM device comes with the random number generator(RNG) > > functionality which is built into the TPM device. Add logic to add the > > RNG child device in t

Re: [PATCH] tools: mkimage: don't use deprecated openssl funcs

2022-07-22 Thread Simon Glass
Hi Michal, On Thu, 21 Jul 2022 at 11:14, Michal Vasilek wrote: > > RSA_get0_* functions are not available in LibreSSL and deprecated in > OpenSSL. This fixes build with LibreSSL and removes deprecation warnings > with OpenSSL 3 > > Signed-off-by: Michal Vasilek > --- > tools/sunxi_toc0.c | 28 +

Re: [PATCH 01/19] video: Renname vbe.h to vesa.h

2022-07-22 Thread Simon Glass
Hi Bin, On Wed, 20 Jul 2022 at 19:25, Bin Meng wrote: > > Hi Simon, > > On Thu, Jul 21, 2022 at 1:00 AM Simon Glass wrote: > > > > We want to use VBE to mean Verfiied Boot for Embedded in U-Boot. Rename > > typo: Verified > > Is there a doc link to describe the Verified Boot for Embedded ? Just

Re: [bug] uboot 2022.07 hangs on rpi 2 with attached usb storage

2022-07-22 Thread Simon Glass
Hi Jan, On Mon, 18 Jul 2022 at 11:48, Jan Palus wrote: > > u-boot 2022.07 boots fine without any USB devices attached to > RaspberryPi 2 however it hangs early on if external USB drive is > connected, right after: > >Request Sense returned 02 04 01 > > git bisect indicates first commit to cau

Re: Reading GPIOs with DM_GPIO before device tree is loaded

2022-07-22 Thread Simon Glass
Hi Hugo, On Thu, 21 Jul 2022 at 11:14, Hugo Villeneuve wrote: > > On Wed, 20 Jul 2022 09:01:01 -0600 > Simon Glass wrote: > > > Hi Hugo, > > > > On Wed, 20 Jul 2022 at 04:54, Hugo Villeneuve wrote: > > > > > > Hi, > > > in board_early_init_f(), i call a custom function get_som_revision() to >

Re: [PATCH 10/19] buildman: Incorporate the genboardscfg.py tool

2022-07-22 Thread Simon Glass
Hi Tom, On Wed, 20 Jul 2022 at 11:16, Tom Rini wrote: > > On Wed, Jul 20, 2022 at 09:01:04AM -0600, Simon Glass wrote: > > Hi Tom, > > > > On Mon, 18 Jul 2022 at 06:11, Tom Rini wrote: > > > > > > On Thu, Jul 14, 2022 at 04:21:57AM -0600, Simon Glass wrote: > > > > Hi Tom, > > > > > > > > On Wed

Re: [PATCH v7 3/7] tpm: Add the RNG child device

2022-07-22 Thread Simon Glass
Hi Sughosh, On Wed, 20 Jul 2022 at 06:30, Sughosh Ganu wrote: > > The TPM device comes with the random number generator(RNG) > functionality which is built into the TPM device. Add logic to add the > RNG child device in the TPM uclass post probe callback. > > The RNG device can then be used to pa

Re: [PATCH v2] drivers: xen: unmap Enlighten page before jumping to Linux

2022-07-22 Thread Dmytro Firsov
On 21.07.22 18:11, Oleksandr wrote: > > On 19.07.22 17:55, Dmytro Firsov wrote: > > Hello Dmytro > > > First of all, thanks for fixing this issue. > > Patch looks good, just a nit below. > Hello Oleksandr, >> +    reservation.domid = DOMID_SELF; >> +    reservation.extent_order = 0; >> +    reserva

[PATCH v2 5/5] arm64: versal: Enable power domain driver and its dependencies

2022-07-22 Thread Ashok Reddy Soma
Enable power domain driver to configure pmufw config object and request node for all the IP's that are enabled in DT. This driver depends on mailbox and IPI driver, hence enable them as well. Add ARCH_VERSAL in the depends on of mailbox Kconfig to compile for Versal platforms. Signed-off-by: Asho

[PATCH v2 4/5] mailbox: zynqmp: Move struct zynqmp_ipi_msg from sys_proto.h

2022-07-22 Thread Ashok Reddy Soma
Mailbox driver might be need for Versal and other future platforms. To remove the dependency, move struct zynqmp_ipi_msg to zynqmp_firmware.h so that mailbox driver compiles for other platforms easily. Signed-off-by: Ashok Reddy Soma --- (no changes since v1) arch/arm/mach-zynqmp/include/mach/

[PATCH v2 3/5] arm64: zynqmp: Enable power domain driver

2022-07-22 Thread Ashok Reddy Soma
Enable power domain driver to configure pmufw config object and request node for all the IP's that are enabled in DT. Signed-off-by: Ashok Reddy Soma --- (no changes since v1) configs/xilinx_zynqmp_virt_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/xilinx_zynqmp_virt_

[PATCH v2 2/5] firmware: zynqmp: Load config overlay for core0 to pmufw

2022-07-22 Thread Ashok Reddy Soma
Try loading pmufw config overlay for core0, if it doesn't return any error it means pmufw is accepting nodes for other IP's. Otherwise dont try to load config object for any other IP, just return from zynqmp_pmufw_node function. Signed-off-by: Ashok Reddy Soma --- Changes in v2: - Move static v

[PATCH v2 1/5] firmware: zynqmp: Change prototype of zynqmp_pmufw_load_config_object()

2022-07-22 Thread Ashok Reddy Soma
zynqmp_pmufw_load_config_object() has some error cases and it is better to return those errors. Change prototype of this function to return errors. Signed-off-by: Ashok Reddy Soma --- (no changes since v1) drivers/firmware/firmware-zynqmp.c | 8 +--- include/zynqmp_firmware.h | 2

  1   2   >