[v2 6/6] configs: socfpga: Add defconfig for Agilex with VAB support

2021-01-07 Thread Siew Chin Lim
Booting Agilex with Vendor Authorized Boot. Signed-off-by: Siew Chin Lim --- v2 --- - Renamed CONFIG_SECURE_VAB_AUTH to CONFIG_SOCFPGA_SECURE_VAB_AUTH - Add BOOTCOMMAND macro in defconfig --- .../{socfpga_agilex_atf_defconfig => socfpga_agilex_vab_defconfig} | 5 +++-- 1 file changed, 3

Re: [PATCH v2 00/34] Sama7g5 Evaluation Kit support

2021-01-07 Thread Eugen.Hristev
On 05.12.2020 12:02, Eugen Hristev wrote: > Hello, > > This series adds support for sama7g5 SoC DT and the sama7g5ek board. > I kept the original incremental development for this board, with each > commit's author and designated change, for traceability and for easier > reviewing. > > The series

Re: [PATCH] arm: at91: configs: Enable CONFIG_SYS_NAND_USE_FLASH_BBT on all boards

2021-01-07 Thread Eugen.Hristev
On 26.11.2020 14:16, Alexander Dahl wrote: > Hello, > > Am Donnerstag, 26. November 2020, 09:21:35 CET schrieb Eugen Hristev: >> From: Nicolas Ferre >> >> As highlighted by Stefan in the commit e074d0f79b2e ("arm: at91: >> gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT") >>

[PATCH V3] net: dwc_eth_qos: Pad descriptors to cacheline size

2021-01-07 Thread Marek Vasut
The DWMAC4 IP has the possibility to skip up to 7 AXI bus width size words after the descriptor. Use this to pad the descriptors to cacheline size and remove the need for noncached memory altogether. Moreover, this lets Tegra use the generic cache flush / invalidate operations. Signed-off-by:

Re: [PATCH v4 0/3] tools/sunxi: Use mkimage for SPL generation

2021-01-07 Thread Samuel Holland
On 1/6/21 3:24 AM, Andre Przywara wrote: > Hi, > > a small update fixing the strncpy bug and addressing too long DT names > properly. Thanks to Samuel for pointing this out. > == > > So far creating a bootable SPL image for Allwinner based boards uses > the mksunxiboot tool. Most

Re: [PATCH 01/17] sunxi: Add support for AXP305 PMIC

2021-01-07 Thread André Przywara
On 06/01/2021 23:33, Jaehoon Chung wrote: > On 1/6/21 7:11 PM, André Przywara wrote: >> On 05/01/2021 22:36, Jaehoon Chung wrote: >> >> Hi, >> >> thanks for having a look! >> >>> Hi Jernej >>> >>> On 1/3/21 6:26 PM, Jernej Skrabec wrote: This PMIC can be found on H616 boards and it's very

[v2 3/6] arm: socfpga: cmd: Support 'vab' command

2021-01-07 Thread Siew Chin Lim
Support 'vab' command to perform vendor authentication. Command format: vab addr len Authorize 'len' bytes starting at 'addr' via vendor public key Signed-off-by: Siew Chin Lim --- arch/arm/mach-socfpga/Makefile | 1 + arch/arm/mach-socfpga/vab.c| 37 +

[v2 2/6] arm: socfpga: soc64: Support Vendor Authorized Boot (VAB)

2021-01-07 Thread Siew Chin Lim
Vendor Authorized Boot is a security feature for authenticating the images such as U-Boot, ARM trusted Firmware, Linux kernel, device tree blob and etc loaded from FIT. After those images are loaded from FIT, the VAB certificate and signature block appended at the end of each image are sent to

[v2 0/6] Add Vendor Authorized Boot (VAB) support

2021-01-07 Thread Siew Chin Lim
This is the 2nd version of patchset to add Vendor Authorized Boot (VAB) support for Intel Agilex SoC device. Vendor Authorized Boot is a security feature for authenticating the images such as U-Boot, ARM trusted Firmware, Linux kernel, device tree blob and etc loaded from FIT. After those images

[v2 1/6] arm: socfpga: Move Stratix10 and Agilex to use TARGET_SOCFPGA_SOC64

2021-01-07 Thread Siew Chin Lim
Create common macro TARGET_SOCFPGA_SOC64 for Stratix10 and Agilex. Signed-off-by: Siew Chin Lim --- v2 --- - This is new patch in 2nd version of VAB series. This is code clean up without functional change. --- arch/arm/Kconfig| 6 +++---

[v2 5/6] configs: socfpga: soc64: Move CONFIG_BOOTCOMMAND to defconfig

2021-01-07 Thread Siew Chin Lim
CONFIG_BOOTCOMMAND have been moved to Kconfig.boot. This patch move the CONFIG_BOOTCOMMAND macro from socfpga_soc64_common.h to *_defconfig file for both Stratix 10 and Agilex. Signed-off-by: Siew Chin Lim --- v2 --- - This is new patch in 2nd version of VAB series. This is code clean up

[v2 4/6] arm: socfpga: dts: soc64: Update filename in binman node of FIT image with VAB support

2021-01-07 Thread Siew Chin Lim
FIT image of Vendor Authentication Coot (VAB) contains signed images. Signed-off-by: Siew Chin Lim --- arch/arm/dts/socfpga_soc64_fit-u-boot.dtsi | 22 ++ 1 file changed, 22 insertions(+) diff --git a/arch/arm/dts/socfpga_soc64_fit-u-boot.dtsi

[PATCH 3/4] pinctrl: at91-pio4: convert to dev_read_prop

2021-01-07 Thread Eugen Hristev
Use dev_read_prop instead of using the fdt_read_property which reads from the GD struct's fdt. This way the node is accessed via the device config instead of the global struct, which makes code more portable and GD independent. Signed-off-by: Eugen Hristev ---

[PATCH 2/4] dt-bindings: pinctrl: at91-pio4: add property for drive strength

2021-01-07 Thread Eugen Hristev
Add drive strength property which is equivalent with the one in Linux Signed-off-by: Eugen Hristev --- doc/device-tree-bindings/pinctrl/atmel,at91-pio4-pinctrl.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/device-tree-bindings/pinctrl/atmel,at91-pio4-pinctrl.txt

[PATCH 1/4] dt-bindings: pinctrl: at91-pio4: update license to SPDX style

2021-01-07 Thread Eugen Hristev
Update license header to SPDX style Signed-off-by: Eugen Hristev --- include/dt-bindings/pinctrl/at91.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/dt-bindings/pinctrl/at91.h b/include/dt-bindings/pinctrl/at91.h index 616f5ce400..5afb1863c3 100644 ---

[PATCH 4/4] pinctrl: at91-pio4: implement drive strength support

2021-01-07 Thread Eugen Hristev
Implement drive strength support, by preserving the same bindings as in Linux. Signed-off-by: Eugen Hristev --- arch/arm/mach-at91/include/mach/atmel_pio4.h | 1 + drivers/pinctrl/pinctrl-at91-pio4.c | 8 include/dt-bindings/pinctrl/at91.h | 4 3 files changed,

Re: [PATCH 2/9] test: dm: Add test for fastboot mmc partition naming

2021-01-07 Thread Simon Glass
On Thu, 31 Dec 2020 at 15:49, Sean Anderson wrote: > > This test verifies the mapping between fastboot partitions and partitions > as understood by U-Boot. It also tests the creation of GPT partitions, > though that is not the primary goal. > > Signed-off-by: Sean Anderson > --- > >

Re: [PATCH 5/9] part: Support string block devices in part_get_info_by_dev_and_name

2021-01-07 Thread Simon Glass
On Thu, 31 Dec 2020 at 15:49, Sean Anderson wrote: > > This adds support for things like "#partname" and "0.1#partname". The block > device parsing is done like in blk_get_device_part_str. > > Signed-off-by: Sean Anderson > --- > > disk/part.c | 32 +--- > 1 file

Re: [BUG] doc/develop/logging.rst

2021-01-07 Thread Simon Glass
Hi Heinrich, On Thu, 31 Dec 2020 at 17:07, Heinrich Schuchardt wrote: > > Hello Simon, > > I am trying to port the updated Sphinx build system from the Linux > kernel to U-Boot so that we can use Sphinx 3. > > With Sphinx 3 I get an error because the same C elements are described > twice: > >

Re: [PATCH 3/9] part: Give several functions more useful return values

2021-01-07 Thread Simon Glass
On Thu, 31 Dec 2020 at 15:49, Sean Anderson wrote: > > Several functions in disk/part.c just return -1 on error. This makes them > return different errnos for different failures. This helps callers > differentiate between failures, even if they cannot read stdout. > > Signed-off-by: Sean Anderson

Re: [PATCH 7/9] fastboot: Move part_get_info_by_name_or_alias after raw_part_get_info_by_name

2021-01-07 Thread Simon Glass
On Thu, 31 Dec 2020 at 15:49, Sean Anderson wrote: > > This makes the next commit more readable by doing the move now. > > Signed-off-by: Sean Anderson > --- > > drivers/fastboot/fb_mmc.c | 44 +++ > 1 file changed, 22 insertions(+), 22 deletions(-)

Re: [PATCH v4 3/3] sunxi: Use mkimage for SPL boot image generation

2021-01-07 Thread Simon Glass
On Wed, 6 Jan 2021 at 02:25, Andre Przywara wrote: > > Switch the SPL boot image generation from using mksunxiboot to the new > sunxi_egon format of mkimage. > > Verified to create identical results for all 152 Allwinner boards. > > Signed-off-by: Andre Przywara > --- > scripts/Makefile.spl | 8

Re: [v2 4/6] arm: socfpga: dts: soc64: Update filename in binman node of FIT image with VAB support

2021-01-07 Thread Simon Glass
On Thu, 7 Jan 2021 at 03:03, Siew Chin Lim wrote: > > FIT image of Vendor Authentication Coot (VAB) contains signed images. > > Signed-off-by: Siew Chin Lim > --- > arch/arm/dts/socfpga_soc64_fit-u-boot.dtsi | 22 ++ > 1 file changed, 22 insertions(+) > I'm not quite sure

Re: [v2 3/6] arm: socfpga: cmd: Support 'vab' command

2021-01-07 Thread Simon Glass
On Thu, 7 Jan 2021 at 03:03, Siew Chin Lim wrote: > > Support 'vab' command to perform vendor authentication. > > Command format: vab addr len > Authorize 'len' bytes starting at 'addr' via vendor public key > > Signed-off-by: Siew Chin Lim > --- > arch/arm/mach-socfpga/Makefile | 1 + >

Re: [PATCH 2/3] pci: Make auto-config code a little more robust

2021-01-07 Thread Simon Glass
On Sun, 3 Jan 2021 at 15:05, Phil Sutter wrote: > > On my DS414, some PCI devices return odd values when probing BAR sizes. > An obvious case is all-ones response, the Linux driver > (drivers/pci/probe.c) catches those explicitly and a comment explains > that either bit 0 or bit 1 must be clear

Re: [PATCH 1/9] mmc: sandbox: Add support for writing

2021-01-07 Thread Simon Glass
On Thu, 31 Dec 2020 at 15:49, Sean Anderson wrote: > > This adds support writing to the sandbox mmc backed by an in-memory buffer. > The unit test has been updated to test reading, writing, and erasing. I'm > not sure what MMC erase to; I picked 0, but if it's 0xFF then that can be > easily

RE: [v2 4/6] arm: socfpga: dts: soc64: Update filename in binman node of FIT image with VAB support

2021-01-07 Thread Lim, Elly Siew Chin
Hi Simon, > -Original Message- > From: Simon Glass > Sent: Thursday, January 7, 2021 8:37 PM > To: Lim, Elly Siew Chin > Cc: U-Boot Mailing List ; Marek Vasut > ; Tan, Ley Foon ; See, Chin Liang > ; Simon Goldschmidt > ; Chee, Tien Fong > ; Westergreen, Dalon > ; Gan, Yau Wai >

Re: [PATCH RFC v2 2/5] lib/rsa: Make fdt_add_bignum() available outside of RSA code

2021-01-07 Thread Simon Glass
Hi Alexandru, On Wed, 30 Dec 2020 at 14:00, Alexandru Gagniuc wrote: > > fdt_add_bignum() is useful for algorithms other than just RSA. To > allow its use for ECDSA, move it to a common file under lib/. > > The new file is suffixed with '-libcrypto' because it has a direct > dependency on

Re: [PATCH] doc/sandbox: improve formatting of command line options

2021-01-07 Thread Simon Glass
On Wed, 30 Dec 2020 at 10:10, Heinrich Schuchardt wrote: > > Show the command line options in bold. > > Signed-off-by: Heinrich Schuchardt > --- > doc/arch/sandbox.rst | 28 ++-- > 1 file changed, 14 insertions(+), 14 deletions(-) > Reviewed-by: Simon Glass

Re: [PATCH RFC v2 3/5] lib: Add support for ECDSA image signing

2021-01-07 Thread Simon Glass
Hi Alexandru, On Wed, 30 Dec 2020 at 14:00, Alexandru Gagniuc wrote: > > mkimage supports rsa2048, and rsa4096 signatures. With newer silicon > now supporting hardware-accelerated ECDSA, it makes sense to expand > signing support to elliptic curves. > > Implement host-side ECDSA signing and

Re: [PATCH RFC v2 5/5] test/py: ecdsa: Add test for mkimage ECDSA signing

2021-01-07 Thread Simon Glass
Hi Alexandru, On Wed, 30 Dec 2020 at 14:00, Alexandru Gagniuc wrote: > > Add a test to make sure that the ECDSA signatures generated by > mkimage can be verified successfully. pyCryptodomex was chosen as the > crypto library because it integrates much better with python code. > Using openssl

Re: [PATCH 1/1] fs/fat: implement fsuuid command

2021-01-07 Thread Simon Glass
On Wed, 30 Dec 2020 at 16:53, Heinrich Schuchardt wrote: > > The FAT file system does not have a UUID but a 4 byte volume ID. > Let the fsuuid command show it in - format. > > Signed-off-by: Heinrich Schuchardt > --- > fs/fat/fat.c | 18 ++ > fs/fs.c | 2 +- >

Re: [PATCH] drivers: tee: i2c trampoline driver

2021-01-07 Thread Simon Glass
Hi Jorge, On Wed, 6 Jan 2021 at 10:23, Jorge Ramirez-Ortiz, Foundries wrote: > > On 29/12/20, Simon Glass wrote: > > Hi Jorge, > > > > On Tue, 29 Dec 2020 at 01:30, Jorge Ramirez-Ortiz, Foundries > > wrote: > > > > > > On 28/12/20, Simon Glass wrote: > > > > Hi Jorge, > > > > > > > > On Mon, 21

Re: [PATCH 4/9] part: Support getting whole disk from part_get_info_by_dev_and_name_or_num

2021-01-07 Thread Simon Glass
On Thu, 31 Dec 2020 at 15:49, Sean Anderson wrote: > > This adds an option to part_get_info_by_dev_and_name_or_num to allow > callers to specify whether whole-disk partitions are fine. > > Signed-off-by: Sean Anderson > --- > > cmd/ab_select.c | 3 ++- > disk/part.c | 5 +++-- >

Re: [PATCH 6/9] fastboot: Remove mmcpart argument from raw_part_get_info_by_name

2021-01-07 Thread Simon Glass
On Thu, 31 Dec 2020 at 15:49, Sean Anderson wrote: > > The only thing mmcpart was used for was to pass to blk_dselect_hwpart. > This calls blk_dselect_hwpart directly from raw_part_get_info_by_name. The > error handling is dropped, but it is reintroduced in the next commit > (albeit less

Re: [PATCH 1/1] doc: man-page base command

2021-01-07 Thread Simon Glass
On Thu, 31 Dec 2020 at 07:46, Heinrich Schuchardt wrote: > > Provide a description of the base command. > > Signed-off-by: Heinrich Schuchardt > --- > doc/usage/base.rst | 23 +++ > doc/usage/index.rst | 1 + > 2 files changed, 24 insertions(+) > create mode 100644

Re: [PATCH RFC v2 4/5] doc: signature.txt: Document devicetree format for ECDSA keys

2021-01-07 Thread Simon Glass
On Wed, 30 Dec 2020 at 14:00, Alexandru Gagniuc wrote: > > Signed-off-by: Alexandru Gagniuc > --- > doc/uImage.FIT/signature.txt | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) Reviewed-by: Simon Glass

Re: [PATCH V3] dm: core: Add late driver remove option

2021-01-07 Thread Simon Glass
Hi Marek, On Thu, 7 Jan 2021 at 05:42, Marek Vasut wrote: > > On 12/10/20 6:44 PM, Simon Glass wrote: > > [...] > > > Note also the semantics of what is going on here. The idea of the > > existing OS_PREPARE and ACTIVE_DMA flags is that the default for > > device_remove() is to

[PATCH 2/2] arm64: zynqmp: Enable seps and related video configs

2021-01-07 Thread Michal Simek
Enable this driver to get build and probe for our platform. Signed-off-by: Michal Simek --- configs/xilinx_zynqmp_virt_defconfig | 10 ++ 1 file changed, 10 insertions(+) diff --git a/configs/xilinx_zynqmp_virt_defconfig b/configs/xilinx_zynqmp_virt_defconfig index

[PATCH 1/2] video: seps525: Align driver with latest treewide changes

2021-01-07 Thread Michal Simek
Some structures/functions have been renamed which are not reflected in this driver. Commit 8a8d24bdf174 ("dm: treewide: Rename ..._platdata variables to just ..._plat"), commit c69cda25c9b5 ("dm: treewide: Rename dev_get_platdata() to dev_get_plat()"), commit caa4daa2ae3d ("dm: treewide: Rename

Re: [PATCH v3 2/2] sunxi: Add support for Tanix TX6

2021-01-07 Thread André Przywara
On 06/01/2021 17:02, Jernej Skrabec wrote: > This commit adds support for Tanix TX6 TV box, based on H6. It's low end > H6 board, with 3 GiB of RAM, eMMC, fast ethernet, USB, IR and other > peripherals. > > DT file is taken from Linux 5.11-rc1 release. > > Signed-off-by: Jernej Skrabec

Re: [PATCH 1/1] doc: update Kernel documentation build system

2021-01-07 Thread Simon Glass
On Thu, 31 Dec 2020 at 17:21, Heinrich Schuchardt wrote: > > Update the docomentation build system according to Linux v5.11-rc1. > > With this patch we can build the HTML documentation using either of > Sphinx 2 and Sphinx 3. > > Signed-off-by: Heinrich Schuchardt > --- > Except for

Re: [PATCH 4/5] log: convert pr_*() to logging

2021-01-07 Thread Simon Glass
Hi Heinrich, On Mon, 4 Jan 2021 at 00:03, Heinrich Schuchardt wrote: > > In drivers we use a family of printing functions including pr_err() and > pr_cont(). CONFIG_LOGLEVEL is used to control which of these lead to output > via printf(). > > Our logging functions allow finer grained control of

Re: [PATCH 2/5] log: make debug_cond() function like

2021-01-07 Thread Simon Glass
On Mon, 4 Jan 2021 at 00:03, Heinrich Schuchardt wrote: > > Change debug_cond() such that it can be used instead of a function like > debug(). > > Signed-off-by: Heinrich Schuchardt > --- > include/log.h | 17 - > 1 file changed, 8 insertions(+), 9 deletions(-) > Reviewed-by:

Re: [PATCH 1/1] mtd: misplaced log.h and dm/devres.h

2021-01-07 Thread Simon Glass
On Sun, 3 Jan 2021 at 08:10, Heinrich Schuchardt wrote: > > log.h and dm/devres.h are U-Boot includes. So placing them > behind #ifndef __UBOOT__ does not make any sense. > > Fixes: f7ae49fc4f36 ("common: Drop log.h from common header") > Fixes: 61b29b826838 ("dm: core: Require users of devres to

Re: [PATCH 9/9] fastboot: Document alternate partition names

2021-01-07 Thread Simon Glass
On Thu, 31 Dec 2020 at 15:49, Sean Anderson wrote: > > This documents the new partition names added in the previous commit. > > Signed-off-by: Sean Anderson > --- > > doc/android/fastboot.rst | 28 > 1 file changed, 28 insertions(+) > Reviewed-by: Simon Glass

Re: [PATCH 8/9] fastboot: Allow u-boot-style partitions

2021-01-07 Thread Simon Glass
On Mon, 4 Jan 2021 at 09:53, Sean Anderson wrote: > > > > On 12/31/20 5:48 PM, Sean Anderson wrote: > > This adds support for partitions of the form "dev.hwpart:part" and > > "dev#partname". This allows one to flash to eMMC boot partitions without > > having to use

Re: [PATCH RFC v2 1/5] lib: Rename rsa-checksum.c to hash-checksum.c

2021-01-07 Thread Simon Glass
Hi Alexandru, On Wed, 30 Dec 2020 at 14:00, Alexandru Gagniuc wrote: > > rsa-checksum.c sontains the hash_calculate() implementations. Despite > the "rsa-" file prefix, this function is useful for other algorithms. > > To prevent confusion, move this file to lib/crypto, and rename it to >

Re: [PATCH V3] dm: core: Add late driver remove option

2021-01-07 Thread Marek Vasut
On 12/10/20 6:44 PM, Simon Glass wrote: [...] Note also the semantics of what is going on here. The idea of the existing OS_PREPARE and ACTIVE_DMA flags is that the default for device_remove() is to remove everything, but if you provide a flag then it just removes those things. Your flag is

Re: [PATCH] lib: cosmetic update of CONFIG_LIB_ELF description

2021-01-07 Thread Simon Glass
On Mon, 4 Jan 2021 at 07:33, Patrick Delaunay wrote: > > Change 2 typo error in CONFIG_LIB_ELF description: > - Supoort => Support > - fir => for > > Signed-off-by: Patrick Delaunay > --- > > lib/Kconfig | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Simon Glass

Re: [PATCH v4 2/3] tools: mkimage: Add Allwinner eGON support

2021-01-07 Thread Simon Glass
On Wed, 6 Jan 2021 at 02:25, Andre Przywara wrote: > > So far we used the separate mksunxiboot tool for generating a bootable > image for Allwinner SPLs, probably just for historical reasons. > > Use the mkimage framework to generate a so called eGON image the > Allwinner BROM expects. > The new

Re: [PATCH v4 3/3] sunxi: Use mkimage for SPL boot image generation

2021-01-07 Thread André Przywara
On 07/01/2021 12:36, Simon Glass wrote: Hi Simon, thanks for the review! > On Wed, 6 Jan 2021 at 02:25, Andre Przywara wrote: >> >> Switch the SPL boot image generation from using mksunxiboot to the new >> sunxi_egon format of mkimage. >> >> Verified to create identical results for all 152

Re: [GIT PULL] TI changes for v2021.04 next

2021-01-07 Thread Tom Rini
On Thu, Jan 07, 2021 at 11:20:41AM +0530, Lokesh Vutla wrote: > Hi Tom, > Please find the PR for next branch targeted for v2021.04 release. > Details about the PR are updated in the tag message. > > Gitlab build report: > https://gitlab.denx.de/u-boot/custodians/u-boot-ti/-/pipelines/5778

Re: [PATCH 4/9] part: Support getting whole disk from part_get_info_by_dev_and_name_or_num

2021-01-07 Thread Sean Anderson
On 1/7/21 7:35 AM, Simon Glass wrote: > On Thu, 31 Dec 2020 at 15:49, Sean Anderson wrote: >> >> This adds an option to part_get_info_by_dev_and_name_or_num to allow >> callers to specify whether whole-disk partitions are fine. >> >> Signed-off-by: Sean Anderson >> --- >> >>

Re: [PATCH 1/1] sandbox: keep time offset when resetting

2021-01-07 Thread Simon Glass
Hi Heinrich, On Wed, 30 Dec 2020 at 10:07, Heinrich Schuchardt wrote: > > The UEFI Self Certification Test (SCT) checks the SetTime() service with > the following steps: > > * set date > * reset > * check date matches > > To be compliant the sandbox should keep the offset to the host RTC during

Re: [PATCH] net: eth-uclass: Change uclass driver name to ethernet

2021-01-07 Thread Simon Glass
Hi David, On Wed, 6 Jan 2021 at 20:56, David Wu wrote: > > dev_read_alias_seq() used uc_drv->name compared to alias > stem string, Ethernet's alias stem uses "ethernet", which > does not match the eth-uclass driver name "eth", can not > get the correct index of ethernet alias namer. So it seems

Re: [PATCH 1/5] ram: k3-j721e: rename BIT_MASK()

2021-01-07 Thread Simon Glass
On Mon, 4 Jan 2021 at 00:03, Heinrich Schuchardt wrote: > > The macro BIT_MASK is already defined in include/linux/bitops.h. To avoid > name collisions rename BIT_MASK() in drivers/ram/k3-j721e/lpddr4_private.h > to LPDDR4_BIT_MASK(). > > Remove superfluous parantheses. > Remove superfluous

Re: [PATCH 5/5] test: unit test for pr_err(), pr_cont()

2021-01-07 Thread Simon Glass
On Mon, 4 Jan 2021 at 00:03, Heinrich Schuchardt wrote: > > Provide a unit test for printing via pr_err() and pr_cont(). > > Signed-off-by: Heinrich Schuchardt > --- > test/log/Makefile | 1 + > test/log/pr_cont_test.c | 45 + > 2 files changed, 46

Re: [v2 2/6] arm: socfpga: soc64: Support Vendor Authorized Boot (VAB)

2021-01-07 Thread Simon Glass
On Thu, 7 Jan 2021 at 03:03, Siew Chin Lim wrote: > > Vendor Authorized Boot is a security feature for authenticating > the images such as U-Boot, ARM trusted Firmware, Linux kernel, > device tree blob and etc loaded from FIT. After those images are > loaded from FIT, the VAB certificate and

Re: [PATCH 3/5] log: provide missing macros

2021-01-07 Thread Simon Glass
On Mon, 4 Jan 2021 at 00:03, Heinrich Schuchardt wrote: > > With commit d094a0734cee ("log: allow for message continuation") we have > defined a special log level and category for message continuation. Let's > have a macro for using these. > > If logging is enabled log_cont() will create a

Re: [PATCH v3 1/2] ARM: dts: sunxi: h6: Update DT files

2021-01-07 Thread André Przywara
On 06/01/2021 17:02, Jernej Skrabec wrote: > Updated H6 DT files are based on Linux 5.11-rc1 release. > > Signed-off-by: Jernej Skrabec Reviewed-by: Andre Przywara Two things to note: - This relies on the U-Boot patch to sun8i-emac to recognise rgmii-id and friends, otherwise Ethernet won't

Re: [PATCH 5/9] part: Support string block devices in part_get_info_by_dev_and_name

2021-01-07 Thread Sean Anderson
On 1/7/21 7:35 AM, Simon Glass wrote: On Thu, 31 Dec 2020 at 15:49, Sean Anderson wrote: This adds support for things like "#partname" and "0.1#partname". The block device parsing is done like in blk_get_device_part_str. Signed-off-by: Sean Anderson --- disk/part.c | 32

Re: [PATCH v2] cmd: mmc: add mmcboot command

2021-01-07 Thread Ravik Hasija
> I think that it's not good about building disk.c by default when CONFIG_CMD_MMC is enabled. Agree, its not an optimal solution. However, we chose to do it this way because: - It causes minimal change to the size of binary (~200 bytes). - To be consistent with upstream code where it is built

Re: [PATCH RFC v2 3/5] lib: Add support for ECDSA image signing

2021-01-07 Thread Alex G.
On 1/7/21 11:29 AM, Simon Glass wrote: Hi Alex, On Thu, 7 Jan 2021 at 09:27, Alex G. wrote: On 1/7/21 6:35 AM, Simon Glass wrote: Hi Alexandru, Hi Simon, (pun alert!) A lot of your comments have to do with comments. I use comments as a tool to add something of value to code. When the

Re: [PATCH RFC v2 3/5] lib: Add support for ECDSA image signing

2021-01-07 Thread Alex G.
On 1/7/21 11:25 AM, Tom Rini wrote: On Thu, Jan 07, 2021 at 10:27:50AM -0600, Alex G. wrote: On 1/7/21 6:35 AM, Simon Glass wrote: Hi Alexandru, Hi Simon, (pun alert!) A lot of your comments have to do with comments. I use comments as a tool to add something of value to code. When the

[PATCH v3 1/6] lib: Rename rsa-checksum.c to hash-checksum.c

2021-01-07 Thread Alexandru Gagniuc
rsa-checksum.c sontains the hash_calculate() implementations. Despite the "rsa-" file prefix, this function is useful for other algorithms. To prevent confusion, move this file to lib/crypto, and rename it to hash-checksum.c, to give it a more "generic" feel. Signed-off-by: Alexandru Gagniuc

[PATCH v3 2/6] lib/rsa: Make fdt_add_bignum() available outside of RSA code

2021-01-07 Thread Alexandru Gagniuc
fdt_add_bignum() is useful for algorithms other than just RSA. To allow its use for ECDSA, move it to a common file under lib/. The new file is suffixed with '-libcrypto' because it has a direct dependency on openssl. This is due to the use of the "BIGNUM *" type. Signed-off-by: Alexandru

[PATCH v3 5/6] test/py: Add pycryptodomex to list of required pakages

2021-01-07 Thread Alexandru Gagniuc
We wish to use pycryptodomex to verify code paths involving ECDSA signatures. Add it to requirements.txt so that they get picked up automatically .gitlab and .azure tasks Signed-off-by: Alexandru Gagniuc --- test/py/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v3 0/6] Add support for ECDSA image signing (with test)

2021-01-07 Thread Alexandru Gagniuc
## Purpose and intent The ROM code on the STM32MP requires an ECDSA-signed FSBL. Maintaining verified boot through FIT images would require switching to an RSA key after SPL. This would be stupid, so this series is focused on enabling ECDSA signing. The use case that I am focused on is signing

[PATCH v3 4/6] doc: signature.txt: Document devicetree format for ECDSA keys

2021-01-07 Thread Alexandru Gagniuc
Signed-off-by: Alexandru Gagniuc --- doc/uImage.FIT/signature.txt | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/uImage.FIT/signature.txt b/doc/uImage.FIT/signature.txt index a3455889ed..0139295d33 100644 --- a/doc/uImage.FIT/signature.txt +++

Re: [PATCH v5 3/3] arm64: dts: sun50i: Add support for Orange Pi 3

2021-01-07 Thread André Przywara
On 03/01/2021 18:36, Jernej Skrabec wrote: > From: Andre Heider Hi, > dts file is taken from Linux 5.11-rc1 tag. > > The Bluetooth controller of this device ships with a default address, > use the new CONFIG_FIXUP_BDADDR option to fix it up. > > Signed-off-by: Andre Heider > Acked-by: Maxime

[PATCH v3 6/6] test/py: ecdsa: Add test for mkimage ECDSA signing

2021-01-07 Thread Alexandru Gagniuc
Add a test to make sure that the ECDSA signatures generated by mkimage can be verified successfully. pyCryptodomex was chosen as the crypto library because it integrates much better with python code. Using openssl would have been unnecessarily painful. Signed-off-by: Alexandru Gagniuc ---

[PATCH v3 3/6] lib: Add support for ECDSA image signing

2021-01-07 Thread Alexandru Gagniuc
mkimage supports rsa2048, and rsa4096 signatures. With newer silicon now supporting hardware-accelerated ECDSA, it makes sense to expand signing support to elliptic curves. Implement host-side ECDSA signing and verification with libcrypto. Device-side implementation of signature verification is

Re: [PATCH v5 2/3] arm: sunxi: add a config option to fixup a Bluetooth address

2021-01-07 Thread André Przywara
On 03/01/2021 18:36, Jernej Skrabec wrote: Hi, > From: Andre Heider > > Some Bluetooth controllers, like the BCM4345C5 of the Orange Pi 3, > ship with the controller default address. > > Add a config option to fix it up so it can function properly. > > Signed-off-by: Andre Heider >

Re: [PATCH v5 1/3] sunxi: board: extract creating a unique sid into a helper function

2021-01-07 Thread André Przywara
On 03/01/2021 18:36, Jernej Skrabec wrote: > From: Andre Heider > > Refactor setup_environment() so we can use the created sid for a > Bluetooth address too. > > Signed-off-by: Andre Heider > Acked-by: Maxime Ripard > [rebased] > Signed-off-by: Jernej Skrabec Confirmed to be indeed just

[PATCH 4/4] board: sl28: add SATA support

2021-01-07 Thread Michael Walle
Enable SATA support. Although not supported by the usual SATA pins on the SMARC baseboard connector, SATA mode is supported on a PCIe lane. This way one can use a mSATA card in a Mini PCI slot. We need to invert the received data because in this mode the polarity of the SerDes lane is swapped.

[PATCH 1/4] board: sl28: move ethernet aliases to variant specific dtsi

2021-01-07 Thread Michael Walle
The variants differ in their network configuration. Move the first two network aliases to the proper variant device tree includes. This is in prepartion for variant 1 and 2 support which has a different network port mapping. The network aliases for the two internal ports will stay in the common

[PATCH 0/4] board: sl28: new variants and SATA support

2021-01-07 Thread Michael Walle
Add support for the last two remaining board variants and add SATA support. This is intended for the next branch. Michael Walle (4): board: sl28: move ethernet aliases to variant specific dtsi board: sl28: add network variant 1 support board: sl28: add network variant 2 support board:

[PATCH 2/4] board: sl28: add network variant 1 support

2021-01-07 Thread Michael Walle
This variant has one network port connected via RGMII and doesn't have any TSN capabilities out-of-the-box. Instead it has all four SerDes lanes available for customer use. Signed-off-by: Michael Walle --- arch/arm/dts/Makefile | 1 +

[PATCH 3/4] board: sl28: add network variant 2 support

2021-01-07 Thread Michael Walle
Although this variant has two external network ports, they are not (yet) supported by the bootloader because they are connected via an internal network switch. Otherwise its the same as the other variants. Signed-off-by: Michael Walle --- arch/arm/dts/Makefile | 1 +

Re: [RFC] mmc: fsl_esdhc_imx: Use esdhc_soc_data flags to set host caps

2021-01-07 Thread Adam Ford
On Wed, Jan 6, 2021 at 7:06 PM Tim Harvey wrote: > > On Tue, Jan 5, 2021 at 2:20 PM Adam Ford wrote: > > > > On Tue, Jan 5, 2021 at 4:07 PM Jaehoon Chung wrote: > > > > > > Hi Adam, > > > > > +CC: Tim Harvey, > > > > > On 12/31/20 2:39 AM, Adam Ford wrote: > > > > The Linux driver automatically

[PATCH] board: mediatek: disable watchdog on BananaPi R2

2021-01-07 Thread matthias . bgg
From: Matthias Brugger Watchdog timeout comes in before we are able to load the kernel and reset the watchdog. Disable the watchdog late in the boot process to be able to boot the board. Signed-off-by: Matthias Brugger --- board/mediatek/mt7623/mt7623_rfb.c | 8

Re: [PATCH 22/26] dm: core: Access device ofnode through functions

2021-01-07 Thread Simon Glass
Hi Patrick, On Mon, 4 Jan 2021 at 06:02, Patrick DELAUNAY wrote: > > Hi Simon, > > > On 12/19/20 6:40 PM, Simon Glass wrote: > > At present ofnode is present in the device even if it is never used. With > > of-platdata this field is not used, so can be removed. In preparation for > > this,

Re: [PATCH] board: phytec: imx8mp: Add PHYTEC phyCORE-i.MX8MP support

2021-01-07 Thread Stefano Babic
Hi Theresa, On 16.12.20 10:51, Teresa Remmet wrote: > Add initial support PHYTEC phyCORE-i.MX8MP SOM. > > Supported features: > - 2GB LPDDR4 RAM > - eMMC > - external SD > - debug UART2 > - watchdog > > Signed-off-by: Teresa Remmet > --- > arch/arm/dts/Makefile

[PATCH v2 2/9] test: dm: Add test for fastboot mmc partition naming

2021-01-07 Thread Sean Anderson
This test verifies the mapping between fastboot partitions and partitions as understood by U-Boot. It also tests the creation of GPT partitions, though that is not the primary goal. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v1) configs/sandbox64_defconfig |

[PATCH v2 1/9] mmc: sandbox: Add support for writing

2021-01-07 Thread Sean Anderson
This adds support writing to the sandbox mmc backed by an in-memory buffer. The unit test has been updated to test reading, writing, and erasing. I'm not sure what MMCs erase to; I picked 0, but if it's 0xFF then that can be easily changed. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass

[PATCH v2 3/9] part: Give several functions more useful return values

2021-01-07 Thread Sean Anderson
Several functions in disk/part.c just return -1 on error. This makes them return different errnos for different failures. This helps callers differentiate between failures, even if they cannot read stdout. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v1)

[PATCH v2 0/9] fastboot: Add better support for specifying partitions

2021-01-07 Thread Sean Anderson
This series adds support for flashing eMMC boot partitions, and for flashing whole partitions. Specifically, it does this by using the existing U-Boot naming scheme to specify partitions, and not by adding new KConfig options. I have added tests for partition naming, but not for the whole flash

[PATCH v2 8/9] fastboot: Allow u-boot-style partitions

2021-01-07 Thread Sean Anderson
This adds support for partitions of the form "dev.hwpart:part" and "dev#partname". This allows one to flash to eMMC boot partitions without having to use CONFIG_FASTBOOT_MMC_BOOT1_SUPPORT. It also allows one to flash to an entire device without needing CONFIG_FASTBOOT_MMC_USER_NAME. Lastly, one

[PATCH v2 6/9] fastboot: Remove mmcpart argument from raw_part_get_info_by_name

2021-01-07 Thread Sean Anderson
The only thing mmcpart was used for was to pass to blk_dselect_hwpart. This calls blk_dselect_hwpart directly from raw_part_get_info_by_name. The error handling is dropped, but it is reintroduced in the next commit (albeit less specificly). Signed-off-by: Sean Anderson Reviewed-by: Simon Glass

[PATCH v2 9/9] fastboot: Partition specification

2021-01-07 Thread Sean Anderson
This documents the way U-Boot understands partitions specifications. This also updates the fastboot documentation for the changes in the previous commit. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - Move partition documentation under doc/usage

[PATCH v2 4/9] part: Support getting whole disk from part_get_info_by_dev_and_name_or_num

2021-01-07 Thread Sean Anderson
This adds an option to part_get_info_by_dev_and_name_or_num to allow callers to specify whether whole-disk partitions are fine. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v1) cmd/ab_select.c | 3 ++- disk/part.c | 5 +++-- include/part.h | 6 +- 3

[PATCH v2 5/9] part: Support string block devices in part_get_info_by_dev_and_name

2021-01-07 Thread Sean Anderson
This adds support for things like "#partname" and "0.1#partname". The block device parsing is done like in blk_get_device_part_str. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- Changes in v2: - Update documentation disk/part.c | 41 ++--- 1

[PATCH v2 7/9] fastboot: Move part_get_info_by_name_or_alias after raw_part_get_info_by_name

2021-01-07 Thread Sean Anderson
This makes the next commit more readable by doing the move now. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v1) drivers/fastboot/fb_mmc.c | 44 +++ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git

Re: [PATCH RFC v2 3/5] lib: Add support for ECDSA image signing

2021-01-07 Thread Tom Rini
On Thu, Jan 07, 2021 at 10:27:50AM -0600, Alex G. wrote: > On 1/7/21 6:35 AM, Simon Glass wrote: > > Hi Alexandru, > > Hi Simon, > > (pun alert!) A lot of your comments have to do with comments. I use comments > as a tool to add something of value to code. When the code is > self-documenting,

Re: [PATCH RFC v2 3/5] lib: Add support for ECDSA image signing

2021-01-07 Thread Simon Glass
Hi Alex, On Thu, 7 Jan 2021 at 09:27, Alex G. wrote: > > On 1/7/21 6:35 AM, Simon Glass wrote: > > Hi Alexandru, > > Hi Simon, > > (pun alert!) A lot of your comments have to do with comments. I use > comments as a tool to add something of value to code. When the code is > self-documenting,

Re: [PATCH RFC v2 5/5] test/py: ecdsa: Add test for mkimage ECDSA signing

2021-01-07 Thread Simon Glass
Hi Alex, On Thu, 7 Jan 2021 at 09:44, Alex G. wrote: > > > > On 1/7/21 6:35 AM, Simon Glass wrote: > > Hi Alexandru, > > > > On Wed, 30 Dec 2020 at 14:00, Alexandru Gagniuc > > wrote: > >> > >> Add a test to make sure that the ECDSA signatures generated by > >> mkimage can be verified

RE: [v2 4/6] arm: socfpga: dts: soc64: Update filename in binman node of FIT image with VAB support

2021-01-07 Thread Lim, Elly Siew Chin
Hi Simon, > -Original Message- > From: Simon Glass > Sent: Friday, January 8, 2021 12:22 AM > To: Lim, Elly Siew Chin > Cc: U-Boot Mailing List ; Marek Vasut > ; Tan, Ley Foon ; See, Chin Liang > ; Simon Goldschmidt > ; Chee, Tien Fong > ; Westergreen, Dalon > ; Gan, Yau Wai > Subject:

RE: [v2 2/6] arm: socfpga: soc64: Support Vendor Authorized Boot (VAB)

2021-01-07 Thread Lim, Elly Siew Chin
Hi Simon, > -Original Message- > From: Simon Glass > Sent: Thursday, January 7, 2021 8:36 PM > To: Lim, Elly Siew Chin > Cc: U-Boot Mailing List ; Marek Vasut > ; Tan, Ley Foon ; See, Chin Liang > ; Simon Goldschmidt > ; Chee, Tien Fong > ; Westergreen, Dalon > ; Gan, Yau Wai >

[RFC PATCH v4 2/8] nand: brcmnand: Don't use -EPROBE_DEFER

2021-01-07 Thread Simon Glass
This has no useful meaning in U-Boot and will never be returned. We want to reserve this flag for internal driver model use. Drop the code. Signed-off-by: Simon Glass --- (no changes since v1) drivers/mtd/nand/raw/brcmnand/brcmnand.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-)

  1   2   >