[RESEND PATCH v6 06/17] efi_loader: add efi_create_indexed_name()

2020-10-28 Thread AKASHI Takahiro
This function will be used from several places in UEFI subsystem to generate some specific form of utf-16 variable name. For example, L"Capsule0001" Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 3 +++ lib/efi_loader/efi_setup.c | 30 ++ 2 files

[RESEND PATCH v6 04/17] dfu: export dfu_list

2020-10-28 Thread AKASHI Takahiro
This variable will be utilized to enumerate all dfu entities for UEFI capsule firmware update in a later commit. Signed-off-by: AKASHI Takahiro --- drivers/dfu/dfu.c | 2 +- include/dfu.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dfu/dfu.c

[RESEND PATCH v6 00/17] efi_loader: add capsule update support

2020-10-28 Thread AKASHI Takahiro
# # This is a reminder. Nothing changed, but rebasing. # Summary === 'UpdateCapsule' is one of runtime services defined in UEFI specification and its aim is to allow a caller (OS) to pass information to the firmware, i.e. U-Boot. This is mostly used to update firmware binary on devices by

[RESEND PATCH v6 11/17] efi_loader: add firmware management protocol for FIT image

2020-10-28 Thread AKASHI Takahiro
In this commit, a very simple firmware management protocol driver is implemented. It will take a common FIT image firmware in a capsule file and apply the data using dfu backend storage drivers via update_fit() interface. So "dfu_alt_info" variable should be properly set to specify a device and

[RESEND PATCH v6 10/17] efi_loader: capsule: support firmware update

2020-10-28 Thread AKASHI Takahiro
A capsule tagged with the guid, EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID, is handled as a firmware update object. What efi_update_capsule() basically does is to load any firmware management protocol (or fmp) drivers contained in a capsule, find out an appropriate fmp driver and then invoke its

[RESEND PATCH v6 12/17] dfu: add dfu_write_by_alt()

2020-10-28 Thread AKASHI Takahiro
This function is a variant of dfu_write_by_name() and takes a DFU alt setting number for dfu configuration. It will be utilised to implement UEFI capsule management protocol for raw image in a later commit. Signed-off-by: AKASHI Takahiro --- drivers/dfu/dfu_alt.c | 47

[RESEND PATCH v6 13/17] efi_loader: add firmware management protocol for raw image

2020-10-28 Thread AKASHI Takahiro
In this commit, a very simple firmware management protocol driver is implemented. It will take a binary image in a capsule file and apply the data using dfu backend storage drivers via dfu_write_by_alt() interface. So "dfu_alt_info" variable should be properly set to specify a device and location

[RESEND PATCH v6 14/17] cmd: add "efidebug capsule" command

2020-10-28 Thread AKASHI Takahiro
"efidebug capsule" is more or less a debugging utility. efidebug capsule update: invoke UpdateCapsule against data on memory efidebug capsule show: show a capsule header efidebug capsule result: dump a capsule result variable Signed-off-by: AKASHI Takahiro --- cmd/efidebug.c | 235

[RESEND PATCH v6 16/17] test/py: efi_capsule: test for FIT image capsule

2020-10-28 Thread AKASHI Takahiro
The test can run on sandbox build and it attempts to execute a firmware update via a capsule-on-disk, using a FIT image capsule, CONFIG_EFI_CAPSULE_FIT. To run this test successfully, you need configure U-Boot specifically; See test_capsule_firmware.py for requirements, and hence it won't run on

[RESEND PATCH v6 05/17] efi_loader: add option to initialise EFI subsystem early

2020-10-28 Thread AKASHI Takahiro
If this option, CONFIG_EFI_SETUP_EARLY, is enabled, the initialisation of UEFI subsystem will be done as part of U-Boot initialisation. Please note that this option won't be enabled explicitly by users, instead, should be enabled implicitly by other configuration options. Specifically, this

[RESEND PATCH v6 09/17] efi_loader: capsule: add memory range capsule definitions

2020-10-28 Thread AKASHI Takahiro
Memory range capsule gives us a way to notify that some memory regions should be left untouched across the next reset. See UEFI specification, section 8.5.3. Since how we should handle this kind of capsule is totally up to the system, no implementation will be added in this commit.

[PATCH v7 00/17] efi_loader: add capsule update support

2020-10-28 Thread AKASHI Takahiro
Summary === 'UpdateCapsule' is one of runtime services defined in UEFI specification and its aim is to allow a caller (OS) to pass information to the firmware, i.e. U-Boot. This is mostly used to update firmware binary on devices by instructions from OS. While 'UpdateCapsule' is a runtime

[PATCH v7 01/17] dfu: rename dfu_tftp_write() to dfu_write_by_name()

2020-10-28 Thread AKASHI Takahiro
This function is essentially independent from tftp, and will also be utilised in implementing UEFI capsule update in a later commit. So just give it a more generic name. In addition, a new configuration option, CONFIG_DFU_WRITE_ALT, was introduced so that the file will be compiled with different

[PATCH v7 05/17] efi_loader: add option to initialise EFI subsystem early

2020-10-28 Thread AKASHI Takahiro
If this option, CONFIG_EFI_SETUP_EARLY, is enabled, the initialisation of UEFI subsystem will be done as part of U-Boot initialisation. Please note that this option won't be enabled explicitly by users, instead, should be enabled implicitly by other configuration options. Specifically, this

[PATCH v7 03/17] common: update: add a generic interface for FIT image

2020-10-28 Thread AKASHI Takahiro
The main purpose of this patch is to separate a generic interface for updating firmware using DFU drivers from "auto-update" via tftp. This function will also be used in implementing UEFI capsule update in a later commit. Signed-off-by: AKASHI Takahiro --- common/Kconfig | 15 ++

[PATCH v7 02/17] dfu: modify an argument type for an address

2020-10-28 Thread AKASHI Takahiro
The range of an addressable pointer can go beyond 'integer'. So change the argument type to a void pointer. Signed-off-by: AKASHI Takahiro Reviewed-by: Heinrich Schuchardt --- common/update.c | 3 ++- drivers/dfu/dfu_alt.c | 6 +++--- include/dfu.h | 4 ++-- 3 files changed, 7

Re: [PATCH v1 2/9] pca9450a: fix i2c address

2020-10-28 Thread Jaehoon Chung
On 10/28/20 6:58 PM, Igor Opaniuk wrote: > From: Max Krummenacher > > The I2C address is 0x25, not 0x35. This according to the datasheet and > tests with a PCA9450A. > > Signed-off-by: Max Krummenacher Reviewed-by: Jaehoon Chung Best Regards, Jaehoon Chung > --- > >

Re: [PATCH v1 3/9] power: pmic: add SPL_DM_PMIC_PCA9450 symbol to Kconfig

2020-10-28 Thread Jaehoon Chung
On 10/28/20 6:58 PM, Igor Opaniuk wrote: > From: Igor Opaniuk > > Add SPL_DM_PMIC_PCA9450 symbol to Kconfig. > > Signed-off-by: Igor Opaniuk Reviewed-by: Jaehoon Chung Best Regards, Jaehoon Chung > --- > > drivers/power/pmic/Kconfig | 7 +++ > 1 file changed, 7 insertions(+) > >

[PATCH 1/1] efi_loader: fix DisconnectController() for sole child

2020-10-28 Thread Heinrich Schuchardt
If ChildHandle indicates the sole child of the driver, disconnect the driver. This fixes the test results for UEFI SCT 2.6 A sub-tests 5.1.3.12.43, 5.1.3.12.44, 5.1.3.12.45. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_boottime.c | 19 +++ 1 file changed, 11

Re: [PATCH 0/6] Allwinner V3/S3 support + PineCube support

2020-10-28 Thread Jagan Teki
On Mon, Oct 26, 2020 at 7:46 PM Icenowy Zheng wrote: > > This patchset tries to add support for Allwinner V3/S3 and Pine64 > PineCube to U-Boot. > > First 3 patches adds support for Allwinner V3/S3 to U-Boot by expanding > the code of V3s and add compatible strings to individual drivers. > > Then

Re: [PATCH v4 00/13] riscv: Add SPI support for Kendryte K210

2020-10-28 Thread Jagan Teki
On Mon, Oct 26, 2020 at 12:54 AM Sean Anderson wrote: > > On 10/24/20 10:58 AM, Jagan Teki wrote: > > On Sat, Oct 24, 2020 at 12:14 AM Jagan Teki > > wrote: > >> > >> On Sat, Oct 17, 2020 at 4:28 AM Sean Anderson wrote: > >>> > >>> This series adds support for SPI on the Kendryte K210. This

Re: [PATCH v4 6/7] cmd: Add a mux command

2020-10-28 Thread Tom Rini
On Fri, Oct 16, 2020 at 04:16:35PM +0530, Pratyush Yadav wrote: > This command lets the user list, select, and deselect mux controllers > introduced with the mux framework on the fly. It has 3 subcommands: > list, select, and deselect. > > List: Lists all the mux present on the system. The muxes

Re: [PATCH v2 8/8] sunxi: a64: Add a defconfig for the PinePhone

2020-10-28 Thread Jagan Teki
On Sat, Oct 24, 2020 at 8:52 PM Samuel Holland wrote: > > The PinePhone is a smartphone produced by Pine64, with an A64 SoC, > 2 or 3 GiB LPDDR3 RAM, 16 or 32 GiB eMMC, 720x1440 MIPI-DSI panel, > and Quectel EG25-G modem. > > There are two main board revisions: 1.1 for early adopters, and 1.2 >

Re: [PATCH v4 7/7] test: mux-cmd: Add tests for the 'mux' command

2020-10-28 Thread Tom Rini
On Fri, Oct 16, 2020 at 04:16:36PM +0530, Pratyush Yadav wrote: > Tests tests run the three mux subcommands: list, select, and deselect, > and verify that the commands do what we expect. > > Signed-off-by: Pratyush Yadav > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom

Re: [PATCH v4 5/7] test: Add tests for the multiplexer framework

2020-10-28 Thread Tom Rini
On Fri, Oct 16, 2020 at 04:16:34PM +0530, Pratyush Yadav wrote: > From: Jean-Jacques Hiblot > > Provide tests to check the behavior of the multiplexer framework. > > Two sets of tests are added. One is using an emulated multiplexer driver > that can be used to test basic functionality like

Re: [PATCH v4 3/7] drivers: mux: mmio-based syscon mux controller

2020-10-28 Thread Tom Rini
On Fri, Oct 16, 2020 at 04:16:32PM +0530, Pratyush Yadav wrote: > From: Jean-Jacques Hiblot > > This adds a driver for mmio-based syscon multiplexers controlled by > bitfields in a syscon register range. > This is heavily based on the linux mmio-mux driver. > > Signed-off-by: Jean-Jacques

Re: [PATCH v4 4/7] Kconfig: Increase the pre-relocation memory

2020-10-28 Thread Tom Rini
On Fri, Oct 16, 2020 at 04:16:33PM +0530, Pratyush Yadav wrote: > The memory is close to full and adding a syscon node in test.dts makes > it go over the limit and makes malloc() fail on startup. > > Signed-off-by: Pratyush Yadav > Reviewed-by: Simon Glass Applied to u-boot/master, thanks!

Re: [PATCH v4 2/7] dm: board: complete the initialization of the muxes in initr_dm()

2020-10-28 Thread Tom Rini
On Fri, Oct 16, 2020 at 04:16:31PM +0530, Pratyush Yadav wrote: > From: Jean-Jacques Hiblot > > This will probe the multiplexer devices that have a "u-boot,mux-autoprobe" > property. As a consequence they will be put in their idle state. > > Signed-off-by: Jean-Jacques Hiblot > Reviewed-by:

Re: [PATCH v4 1/7] drivers: Add a new framework for multiplexer devices

2020-10-28 Thread Tom Rini
On Fri, Oct 16, 2020 at 04:16:30PM +0530, Pratyush Yadav wrote: > From: Jean-Jacques Hiblot > > Add a new subsystem that handles multiplexer controllers. The API is the > same as in Linux. > > Signed-off-by: Jean-Jacques Hiblot > Reviewed-by: Simon Glass > Signed-off-by: Pratyush Yadav

Re: [PATCH 6/6] sunxi: add PineCube board

2020-10-28 Thread Jagan Teki
On Mon, Oct 26, 2020 at 7:51 PM Icenowy Zheng wrote: > > PineCube is an IP camera development kit released by Pine64. > > It comes with the following compoents: > > - A mainboard with Sochip S3 SoC, a 16MByte SPI Flash, AXP209 PMIC, > a power-only microUSB connector, a USB Type-A connector, a

<    1   2