Re: [PATCH v5 3/4] drivers: tee: sandbox: add rpc test ta emulation

2021-01-20 Thread Etienne Carriere
Hi Igor, On Wed, 20 Jan 2021 at 18:56, Igor Opaniuk wrote: > > From: Igor Opaniuk > > This adds support for RPC test trusted application emulation, which > permits to test reverse RPC calls to TEE supplicant. Currently it covers > requests to the I2C bus from TEE. > > Signed-off-by: Igor Opaniuk

Re: [PATCH v2 12/12] smbios: Allow a few values to come from sysinfo

2021-01-20 Thread Bin Meng
On Thu, Jan 21, 2021 at 10:07 AM Simon Glass wrote: > > While static configuration is useful it cannot cover every case. Sometimes > board revisions are encoded in resistor straps and must be read at > runtime. > > The easiest way to provide this information is via sysinfo, since the > board can t

Re: [PATCH v2 11/12] x86: coral: Add sysinfo ops

2021-01-20 Thread Bin Meng
Hi Simon, On Thu, Jan 21, 2021 at 10:07 AM Simon Glass wrote: > > These ops are missing at present which is not permitted. Add an empty > operation struct. > > Signed-off-by: Simon Glass > --- > > Changes in v2: > - Add new patch to fix crash on coral > > board/google/chromebook_coral/coral.c |

Re: [PATCH v2 10/12] sysinfo: Move #ifdef so that operations are always defined

2021-01-20 Thread Bin Meng
On Thu, Jan 21, 2021 at 10:07 AM Simon Glass wrote: > > At present the struct is not available unless SYSINFO is enabled. This is > annoying since code it is not possible to use compile-time checks like > CONFIG_IS_ENABLED(SYSINFO) with this header. > > Fix it by moving the #ifdef. > > Signed-off-

Re: [PATCH v2 09/12] smbios: Add more options for the BIOS version string

2021-01-20 Thread Bin Meng
On Thu, Jan 21, 2021 at 10:07 AM Simon Glass wrote: > > At present the version string is obtained from PLAIN_VERSION. Some boards > may want to configure this using the device tree, since the build system > can more easily insert things there after U-Boot itself is built. Add this > option to the

Re: [PATCH] smcc: fix sign bit expansion

2021-01-20 Thread Jens Wiklander
On Tue, Jan 05, 2021 at 08:03:11PM +, Volodymyr Babchuk wrote: > Signed ARM_SMCCC_FAST_CALL value is shifted to 31'st bit. Then, it is expanded > to 64 bit value, which results in 1s in higher 32 bits. > > This causes corrupted values in 64-bit SMC IDs and issues in buggy handlers of > 32-bit

Re: [PATCH v2 07/12] smbios: Drop the eos parameter

2021-01-20 Thread Bin Meng
Hi Simon, On Thu, Jan 21, 2021 at 10:07 AM Simon Glass wrote: > > We can store this in the context and avoid passing it to each function. > This makes it easier to follow and will also allow keeping track of the > end of the string table (in future patches). > > Add an 'eos' field to the context

Re: [PATCH v2 08/12] smbios: Track the end of the string table

2021-01-20 Thread Bin Meng
On Thu, Jan 21, 2021 at 10:07 AM Simon Glass wrote: > > Add a new member to the context struct which tracks the end of the string > table. This allows us to avoid recalculating this at the end. > > Signed-off-by: Simon Glass > --- > > (no changes since v1) > > lib/smbios.c | 32 +++--

Re: [PATCH v2 06/12] smbios: Use a struct to keep track of context

2021-01-20 Thread Bin Meng
On Thu, Jan 21, 2021 at 10:07 AM Simon Glass wrote: > > At present we pass the ofnode to each function. We also pass the 'eos' > pointer for adding new strings. We don't track the current end of the > string table, so have smbios_string_table_len() to find that. > > The code can be made more effic

Re: [PATCH v2 05/12] smbios: Set BIOS release version

2021-01-20 Thread Bin Meng
On Thu, Jan 21, 2021 at 10:07 AM Simon Glass wrote: > > We may as well include the U-Boot release information in the type-0 table > since it is designed for that purpose. > > U-Boot uses release versions based on the year and month. The year cannot > fit in a byte, so drop the century. > > Signed-

Re: [PATCH v2 04/12] smbios: Use char consistently for the eos member

2021-01-20 Thread Bin Meng
On Thu, Jan 21, 2021 at 10:07 AM Simon Glass wrote: > > At present a few of the structs use u8 instead of char. This is a string, > so char is better. Update them. > > Signed-off-by: Simon Glass > Reviewed-by: Christian Gmeiner > --- > > (no changes since v1) > > include/smbios.h | 4 ++-- > 1

Re: [PATCH v2 03/12] smbios: Move smbios_write_type to the C file

2021-01-20 Thread Bin Meng
On Thu, Jan 21, 2021 at 10:07 AM Simon Glass wrote: > > This type is not used outside the smbios.c file so there is no need for it > to be in the header file. Move it. > > Signed-off-by: Simon Glass > Reviewed-by: Christian Gmeiner > --- > > (no changes since v1) > > include/smbios.h | 10 -

Re: [PATCH v2 02/12] Makefile: Provide numeric versions

2021-01-20 Thread Bin Meng
On Thu, Jan 21, 2021 at 10:06 AM Simon Glass wrote: > > For SMBIOS we want to store the numeric version numbers in the tables. It > does not make sense to parse the strings. Instead, add new #defines with > the version and patchlevel. > > Signed-off-by: Simon Glass > --- > > (no changes since v1)

Re: [PATCH v2 01/12] README: Add doumentation for version information

2021-01-20 Thread Bin Meng
Hi Simon, On Thu, Jan 21, 2021 at 10:06 AM Simon Glass wrote: > > There are quite a few available version options in U-Boot. Add a list of > the available Makefile variables and #defines, along with examples. > > Signed-off-by: Simon Glass > --- > > (no changes since v1) > > README | 84 +++

Re: [PATCH 1/1] cmd: CMD_ACPI depends on ACPIGEN

2021-01-20 Thread Bin Meng
On Thu, Jan 21, 2021 at 11:13 AM Bin Meng wrote: > > On Thu, Jan 21, 2021 at 4:38 AM Heinrich Schuchardt > wrote: > > > > Trying to compile qemu-x86_64_defconfig with CONFIG_CMD_ACPI=y and > > CONFIG_ACPIGEN=n fails with > > > > ld.bfd: cmd/built-in.o: in function `do_acpi_items': > > cmd/acpi.c

Re: [PATCH 12/12] x86: coral: Show memory config and SKU ID on startup

2021-01-20 Thread Bin Meng
On Sun, Jan 17, 2021 at 5:54 AM Simon Glass wrote: > > Provide the model information through sysinfo so that it shows up on > boot. For memconfig 4 pins are provided, for 16 combinations. For SKU > ID there are two options: > >- two pins provided in a ternary arrangement, for 9 combinations. >

Re: [PATCH 11/12] sysinfo: Allow showing model info from sysinfo

2021-01-20 Thread Bin Meng
On Sun, Jan 17, 2021 at 5:54 AM Simon Glass wrote: > > Some boards may want to show the SKU ID or other information obtained at > runtime. Allow this to come from sysinfo. The board can then provide a > sysinfo driver to provide it. > > Signed-off-by: Simon Glass > --- > > common/board_info.c |

Re: [PATCH 10/12] x86: tpl: Show next stage being booted

2021-01-20 Thread Bin Meng
On Sun, Jan 17, 2021 at 5:54 AM Simon Glass wrote: > > Enhance the debugging to show the next stage being booted as well as a > dump of the start of the image. > > Signed-off-by: Simon Glass > --- > > arch/x86/lib/tpl.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > Reviewed-by

Re: [PATCH 09/12] x86: spl: Clear BSS unconditionally

2021-01-20 Thread Bin Meng
On Sun, Jan 17, 2021 at 5:54 AM Simon Glass wrote: > > This should be done even if not using TPL, since BSS may be in use or > boards that only use SPL. Fix it. > > Signed-off-by: Simon Glass > --- > > arch/x86/lib/spl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Bin

Re: [PATCH 08/12] x86: zimage: Improve command-line debug handling

2021-01-20 Thread Bin Meng
On Sun, Jan 17, 2021 at 5:54 AM Simon Glass wrote: > > At present if the command line is very long it is truncated by the > printf() statement, which works within a limited buffer. Use puts() > instead. Also show better debugging with the command-line setup > fails. > > Signed-off-by: Simon Glass

Re: [PATCH 07/12] x86: zimage: Allow dumping the image from outside the module

2021-01-20 Thread Bin Meng
On Sun, Jan 17, 2021 at 5:54 AM Simon Glass wrote: > > At present it is possible to dump an image within the zimage command, but > it is also useful to be able to dump it from elsewhere, for example in a > loader that has special handling for the different zimage stages. > > Export this feature as

Re: [PATCH 06/12] x86: Update Chromium OS GNVS names

2021-01-20 Thread Bin Meng
On Sun, Jan 17, 2021 at 5:54 AM Simon Glass wrote: > > The Global Non-Voltatile Storage struct has some fields with particular typo: Volatile > meanings. Rename these to make things easier to follow. Also add a few > more boot flags. > > GNVS should not be confused with GNVQ (Going Nowhere Very

Re: [PATCH 05/12] x86: spl: Make moving BSS conditional

2021-01-20 Thread Bin Meng
On Sun, Jan 17, 2021 at 5:54 AM Simon Glass wrote: > > At present BSS is always placed in SDRAM. If a separate BSS is not in use > this means that BSS doesn't work as expected. Make the setting conditional > on the SEPARATE_BSS option. > > Signed-off-by: Simon Glass > --- > > arch/x86/cpu/u-boot

Re: [PATCH 04/12] x86: Make sure the SPL image ends on a suitable boundary

2021-01-20 Thread Bin Meng
Hi Simon, On Sun, Jan 17, 2021 at 5:54 AM Simon Glass wrote: > > The part of U-Boot that actually ends up in u-boot-nodtb.bin is not built > with any particular alignment. It ends at the start of the BSS section. > The BSS section selects its own alignment, which may larger. I don't see start of

Re: [PATCH v2 01/21] mmc: sdhci: Add helper functions for UHS modes

2021-01-20 Thread Jaehoon Chung
Hi Aswath, On 1/21/21 1:13 PM, Aswath Govindraju wrote: > Hi Jaehoon, > > On 21/01/21 4:26 am, Jaehoon Chung wrote: >> Hi Aswath, >> >> On 1/19/21 9:35 PM, Aswath Govindraju wrote: >>> Hi Jaehoon, >>> >>> On 05/11/20 4:03 am, Jaehoon Chung wrote: On 11/5/20 4:05 AM, Faiz Abbas wrote: > J

Re: [PATCH v2 01/21] mmc: sdhci: Add helper functions for UHS modes

2021-01-20 Thread Aswath Govindraju
Hi Jaehoon, On 21/01/21 4:26 am, Jaehoon Chung wrote: > Hi Aswath, > > On 1/19/21 9:35 PM, Aswath Govindraju wrote: >> Hi Jaehoon, >> >> On 05/11/20 4:03 am, Jaehoon Chung wrote: >>> On 11/5/20 4:05 AM, Faiz Abbas wrote: Jaehoon, On 21/10/20 5:08 pm, Jaehoon Chung wrote: > Hi F

Re: Contributor meeting notes 19-Jan-21

2021-01-20 Thread Simon Glass
Hi Michal, On Wed, 20 Jan 2021 at 08:50, Michal Simek wrote: > > > > On 1/20/21 4:44 PM, Simon Glass wrote: > > Hi Michal, > > > > On Wed, 20 Jan 2021 at 00:46, Michal Simek wrote: > >> > >> Hi, > >> > >> On 1/19/21 7:54 PM, Simon Glass wrote: > >>> Hi, > >>> > >>> Thank you for attending! > >>>

Re: Contributor meeting notes 19-Jan-21

2021-01-20 Thread Jaehoon Chung
Hi, On 1/21/21 12:26 PM, Simon Glass wrote: > Hi Sean & Jaehoon, > > On Wed, 20 Jan 2021 at 16:25, Sean Anderson wrote: >> >> On 1/20/21 6:18 PM, Jaehoon Chung wrote: >>> Hi, >>> >>> On 1/20/21 3:54 AM, Simon Glass wrote: Hi, Thank you for attending! Full notes at [1] >>

Re: [PATCH v2 2/2] pci: Add Rockchip dwc based PCIe controller driver

2021-01-20 Thread Kever Yang
On 2021/1/15 下午6:01, Shawn Lin wrote: Add Rockchip dwc based PCIe controller driver for rk356x platform. Driver support Gen3 by operating as a Root complex. Signed-off-by: Shawn Lin Reviewed-by: Kever Yang Thanks, - Kever --- Changes in v2: - reorder the header file - add more commen

Re: [PATCH v2 1/2] phy: rockchip: Add Rockchip Synopsys PCIe 3.0 PHY

2021-01-20 Thread Kever Yang
On 2021/1/15 下午6:01, Shawn Lin wrote: Add the Rockchip Synopsys based PCIe 3.0 PHY driver as part of Generic PHY framework. Signed-off-by: Shawn Lin Reviewed-by: Simon Glass Reviewed-by: Kever Yang Thanks, - Kever --- Changes in v2: - reoder header file - add comment drivers/phy/r

Re: [PATCH v2] rockchip: rk3328: Add support for FriendlyARM NanoPi R2S

2021-01-20 Thread Kever Yang
On 2021/1/7 上午7:06, David Bauer wrote: This adds support for the NanoPi R2S from FriendlyArm. Rockchip RK3328 SoC 1GB DDR4 RAM Gigabit Ethernet (WAN) Gigabit Ethernet (USB3) (LAN) USB 2.0 Host Port MicroSD slot Reset button WAN - LAN - SYS LED Signed-off-by: David Bauer Reviewed-by: Kever

RE: [PATCH 1/1] cmd/riscv/sbi: support System Reset Extension

2021-01-20 Thread Pragnesh Patel
>-Original Message- >From: Heinrich Schuchardt >Sent: 18 January 2021 02:57 >To: Rick Chen >Cc: Atish Patra ; Bin Meng ; >Pragnesh Patel ; u-boot@lists.denx.de; Heinrich >Schuchardt >Subject: [PATCH 1/1] cmd/riscv/sbi: support System Reset Extension > >[External Email] Do not click links

Re: [PATCH] rockchip: pinebook-pro: fix SPI flash detection

2021-01-20 Thread Kever Yang
On 2021/1/8 下午6:34, Marcin Juszkiewicz wrote: Copy changes done to rockpro64 in commit c180e2939d3ccb43f89565d6660a0d6f912712b6 ("rockchip: rockpro64: fix boot from SPI flash on spi1") Remove the spi0 alias, set the default bus for SPI flash to 1, and enable support for numbered aliases in SPL

Re: arm: rk3399: add support nanopi r4s

2021-01-20 Thread Kever Yang
Hi Xiaobo,     Please add commit message for this patch, eg. you can introduce this board.     Does this board support by mainline kernel? If yes, please share the commit number in the commit message. Thanks, - Kever On 2021/1/19 下午9:30, alex tian wrote: From e4f4c74b1f0e2bb7205a7b083f

Re: Boot failure triggered by USB on rockpro64-rk3399 and pinebook-pro-rk3399

2021-01-20 Thread Kever Yang
Hi Vagrant,     Do you know which version is the last version that works in this case?     The firmware is from eMMC and it's wired for USB to affect the boot process. Thanks, - Kever On 2021/1/21 上午8:08, Vagrant Cascadian wrote: It seems rockpro64-rk3399 and pinebook-pro-rk3399 fail to bo

Re: [PATCH 01/12] x86: acpi_gpe: Update driver name to match devicetree

2021-01-20 Thread Bin Meng
On Thu, Jan 21, 2021 at 11:26 AM Simon Glass wrote: > > Hi Bin, > > On Wed, 20 Jan 2021 at 20:19, Bin Meng wrote: > > > > Hi Simon, > > > > On Sun, Jan 17, 2021 at 5:54 AM Simon Glass wrote: > > > > > > Use a driver name in line with the compatible string so that of-platdata > > > can use this d

Re: [PATCH 03/12] x86: apl: Enhance debugging in the SPL loader

2021-01-20 Thread Bin Meng
On Sun, Jan 17, 2021 at 5:54 AM Simon Glass wrote: > > Move to log_debug() and make use of the new SPL function to find the > text base. > > Signed-off-by: Simon Glass > --- > > arch/x86/cpu/apollolake/spl.c | 12 +++- > 1 file changed, 7 insertions(+), 5 deletions(-) > Reviewed-by: Bin

Re: [PATCH 01/12] x86: acpi_gpe: Update driver name to match devicetree

2021-01-20 Thread Simon Glass
Hi Bin, On Wed, 20 Jan 2021 at 20:19, Bin Meng wrote: > > Hi Simon, > > On Sun, Jan 17, 2021 at 5:54 AM Simon Glass wrote: > > > > Use a driver name in line with the compatible string so that of-platdata > > can use this driver. > > > > Signed-off-by: Simon Glass > > --- > > > > arch/x86/cpu/a

Re: Contributor meeting notes 19-Jan-21

2021-01-20 Thread Simon Glass
Hi Sean & Jaehoon, On Wed, 20 Jan 2021 at 16:25, Sean Anderson wrote: > > On 1/20/21 6:18 PM, Jaehoon Chung wrote: > > Hi, > > > > On 1/20/21 3:54 AM, Simon Glass wrote: > >> Hi, > >> > >> Thank you for attending! > >> > >> Full notes at [1] > >> > >> Tuesday 19 January 2021 > >> > >> Present: Da

Re: [PATCH 1/1] cmd: change suppress newline in echo command

2021-01-20 Thread Simon Glass
Hi Heinrich, On Wed, 20 Jan 2021 at 09:43, Heinrich Schuchardt wrote: > > By default the echo command emits its arguments followed by a line feed. > > If any of the arguments contains the sub-string "\c", the line feed is > suppressed. > > This does not match shells used in Linux and BSD where th

Re: [PATCH 02/12] x86: spl: Add a function to find the text base

2021-01-20 Thread Bin Meng
On Sun, Jan 17, 2021 at 5:54 AM Simon Glass wrote: > > It is useful to know the TEXT_BASE value for the image being loaded in > TPL/SPL. Add a new spl_get_image_text_base() function to handle this. > > Make use of this in the x86 SPL handler, instead of having the logic > there. > > Signed-off-by:

Re: [PATCH 01/12] x86: acpi_gpe: Update driver name to match devicetree

2021-01-20 Thread Bin Meng
Hi Simon, On Sun, Jan 17, 2021 at 5:54 AM Simon Glass wrote: > > Use a driver name in line with the compatible string so that of-platdata > can use this driver. > > Signed-off-by: Simon Glass > --- > > arch/x86/cpu/acpi_gpe.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > dif

Re: [PATCH 1/1] cmd: CMD_ACPI depends on ACPIGEN

2021-01-20 Thread Bin Meng
On Thu, Jan 21, 2021 at 4:38 AM Heinrich Schuchardt wrote: > > Trying to compile qemu-x86_64_defconfig with CONFIG_CMD_ACPI=y and > CONFIG_ACPIGEN=n fails with > > ld.bfd: cmd/built-in.o: in function `do_acpi_items': > cmd/acpi.c:162: undefined reference to `acpi_dump_items' > > Add the missing co

[PATCH v2 09/11] tpm: Add TPM2 support for read/write values

2021-01-20 Thread Simon Glass
Implement this API function for TPM2. Signed-off-by: Simon Glass --- (no changes since v1) include/tpm-common.h | 3 ++ include/tpm-v2.h | 38 lib/tpm-v2.c | 84 lib/tpm_api.c| 4 +-- 4 files changed, 127 i

[PATCH v2 08/11] tpm: Add an implementation of define_space

2021-01-20 Thread Simon Glass
Add support for this so that the TPM can be set up for use with Chromium OS verified boot. Signed-off-by: Simon Glass --- (no changes since v1) include/tpm-v2.h | 18 ++ lib/tpm-v2.c | 44 2 files changed, 62 insertions(+) diff

[PATCH v2 11/11] tpm: Allow disabling platform hierarchy with TPM2

2021-01-20 Thread Simon Glass
With TPM2 we don't actually lock the TPM once verified boot is finished. Instead we disable the platform hierarchy which serves the same purpose. Add an implementation of this so we can safely boot into the kernel. Signed-off-by: Simon Glass --- Changes in v2: - Add definition of TPM2_RC_NV_DEFI

[PATCH v2 10/11] tpm: Add TPM2 support for write_lock

2021-01-20 Thread Simon Glass
Implement this API function for TPM2. Signed-off-by: Simon Glass --- (no changes since v1) include/tpm-v2.h | 12 lib/tpm-v2.c | 23 +++ lib/tpm_api.c| 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/include/tpm-v2.h b/include/tpm-

[PATCH v2 07/11] tpm: Reduce duplication in a few functions

2021-01-20 Thread Simon Glass
Update tpm2_clear() and tpm2_pcr_extend() so that the command size is not repeated twice. Add a small comment to the latter. Signed-off-by: Simon Glass --- Changes in v2: - Add comments for the offset value lib/tpm-v2.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff

[PATCH v2 05/11] tpm: Switch TPMv1 over to use the new API

2021-01-20 Thread Simon Glass
Take over the plain 'tpm_...' functions for use by the new TPM API. Rename all the TPMv1 functions so they are called from the API. Update the TPMv1 functions so that they are called from the API. Change existing users to use the tpm1_ prefix so they don't need to go through the API, which might i

[PATCH v2 06/11] tpm: Add a basic API implementation for TPMv2

2021-01-20 Thread Simon Glass
Add support for TPMv2 versions of API functions. So far this is not complete as the standard is quite large, but it implements everything currently available for TPMv2 in U-Boot. Signed-off-by: Simon Glass --- (no changes since v1) lib/tpm_api.c | 84 +++

[PATCH v2 04/11] tpm: Add an API that can support v1.2 and v2

2021-01-20 Thread Simon Glass
There are two different TPM standards. U-Boot supports both but each has its own set of functions. We really need a single TPM API that can call one or the other. This is not always possible as there are some differences between the two standards, but it is mostly possible. Add an API to handle th

[PATCH v2 03/11] tpm: Add debugging of request in tpm_sendrecv_command()

2021-01-20 Thread Simon Glass
The response is shown but not the request. Update the code to show both if debugging is enabled. Signed-off-by: Simon Glass --- (no changes since v1) lib/tpm-common.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/tpm-common.c b/lib/tpm-common.c index e4af8

[PATCH v2 02/11] tpm: Use logging in the uclass

2021-01-20 Thread Simon Glass
Update this to use log_debug() instead of the old debug(). Signed-off-by: Simon Glass --- (no changes since v1) drivers/tpm/tpm-uclass.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/tpm/tpm-uclass.c b/drivers/tpm/tpm-uclass.c index beb0fa3f93c..35774a6289

[PATCH v2 01/11] tpm: Don't include cr50 in TPL/SPL

2021-01-20 Thread Simon Glass
At present the security chip is not used in these U-Boot phases. Update the Makefile to exclude it. Fix a few logging statements while we are here. Signed-off-by: Simon Glass --- (no changes since v1) drivers/tpm/Makefile | 2 +- drivers/tpm/cr50_i2c.c | 4 ++-- 2 files changed, 3 insertion

[PATCH v2 00/11] tpm: Support using TPM1 and TPM2 from a single API

2021-01-20 Thread Simon Glass
At present if an application wants to be written so it can work with both TPMv1.2 and TPM2 it must use two different APIs. This is inconvenient since it requires adding code to deal with the mismatch between the two. It would be better to have a common API that all boards could share. This series

Re: [PATCH v4 01/23] mips: dts: switch to board defines for dtb for mtmips

2021-01-20 Thread Weijie Gao
On Wed, 2021-01-20 at 16:51 +0100, Daniel Schwierzeck wrote: > Hi Weijie, > > Am Dienstag, den 19.01.2021, 08:58 +0800 schrieb Weijie Gao: > > > > > > > > Hi Daniel, > > > > > > > > Gentle ping > > > > > > > > I'm just curious when can the patch series be merged into u-boot/master? > > > > > >

[PATCH v2 15/15] gpio: Add a way to read 3-way strapping pins

2021-01-20 Thread Simon Glass
Using the internal vs. external pull resistors it is possible to get 27 different combinations from 3 strapping pins. Add an implementation of this. This involves updating the sandbox GPIO driver to model external and (weaker) internal pull resistors. The get_value() method now takes account of wh

[PATCH v2 14/15] gpio: sandbox: Track whether a GPIO is driven

2021-01-20 Thread Simon Glass
Add a new flag to keep track of whether sandbox is driving the pin, or whether it is expecting an input signal. If it is driving, then the value of the pin is the value being driven (0 or 1). If not driving, then we consider the value 0, since we don't currently handle things like pull-ups yet. Si

[PATCH v2 10/15] dm: gpio: Add a way to update flags

2021-01-20 Thread Simon Glass
It is convenient to be able to adjust some of the flags for a GPIO while leaving others alone. Add a function for this. Update dm_gpio_set_dir_flags() to make use of this. Also update dm_gpio_set_value() to use this also, since this allows the open-drain / open-source features to be implemented d

[PATCH v2 13/15] gpio: x86: Drop the deprecated methods in intel_gpio

2021-01-20 Thread Simon Glass
We don't need to implement direction_input() and direction_output() anymore. Drop them and use update_flags() instead. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/include/asm/intel_pinctrl_defs.h | 5 ++ drivers/gpio/intel_gpio.c | 72 ---

[PATCH v2 12/15] gpio: Use an 'ops' variable everywhere

2021-01-20 Thread Simon Glass
Update this driver to use the common method of putting the driver operations in an 'ops' variable install of calling gpio_get_ops() repeatedly. Make it const since operations do not change. Signed-off-by: Simon Glass --- (no changes since v1) drivers/gpio/gpio-uclass.c | 25 ++-

[PATCH v2 11/15] gpio: Replace direction_input() and direction_output()

2021-01-20 Thread Simon Glass
The new update_flags() method is more flexible since it allows the driver to see the full flags all at once. Use that in preference to these two functions. Add comments to that effect. Signed-off-by: Simon Glass --- (no changes since v1) drivers/gpio/gpio-uclass.c | 15 ++- include

[PATCH v2 09/15] gpio: sandbox: Make sandbox_gpio_set_flags() set all flags

2021-01-20 Thread Simon Glass
Allow this function to see all flags, including the internal sandbox ones. This allows the tests to fully control the behaviour of the driver. To make this work, move the setting of GPIOD_EXT_HIGH -to where the flags are updated via driver model, rather than the sandbox 'back door'. Signed-off-by

[PATCH v2 06/15] gpio: sandbox: Rename GPIO dir_flags to flags

2021-01-20 Thread Simon Glass
Adjust the terminology in this driver to reflect that fact that all flags are handled, not just direction flags. Create a new access function to get the full GPIO state, not just the direction flags. Drop the static invalid_dir_flags since we can rely on a segfault if something is wrong. Signed-o

[PATCH v2 08/15] gpio: sandbox: Fully separate pin value from output value

2021-01-20 Thread Simon Glass
At present we have the concept of a pin's external value. This is what is used when getting the value of a pin. But we still set the GPIOD_IS_OUT_ACTIVE flag when changing the value. This is not actually correct, since if the pin changes from output to input, the external value need not change. Adj

[PATCH v2 07/15] gpio: sandbox: Use a separate flag for the value

2021-01-20 Thread Simon Glass
At present with the sandbox GPIO driver it is not possible to change the value of GPIOD_IS_OUT_ACTIVE unless the GPIO is an output. This makes it hard to test changing the flags since we need to be aware of the internal workings of the driver. The feature is designed to aid testing. Split this fe

[PATCH v2 05/15] gpio: Drop dm_gpio_set_dir()

2021-01-20 Thread Simon Glass
This function is not used. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/gpio/gpio-uclass.c | 11 --- include/asm-generic/gpio.h | 11 --- 2 files changed, 22 deletions(-) diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c index 87254b

[PATCH v2 03/15] dm: gpio: Rename get_dir_flags() method to get_flags()

2021-01-20 Thread Simon Glass
It is more useful to be able to read all the flags, not just the direction ones. In fact this is what the STM32 driver does. Update the method name to reflect this. Tweak the docs a little and use 'flagsp' as the return argument, as is common in driver model, to indicate it returns a value. Signe

[PATCH v2 04/15] gpio: Rename dm_gpio_get_dir_flags() to dm_gpio_get_flags()

2021-01-20 Thread Simon Glass
This function can be used to get any flags, not just direction flags. Rename it to avoid confusion. Signed-off-by: Simon Glass Reviewed-by: Pratyush Yadav --- (no changes since v1) drivers/gpio/gpio-uclass.c | 2 +- include/asm-generic/gpio.h | 6 +++--- test/dm/gpio.c | 12 +++

[PATCH v2 02/15] dm: gpio: Rename set_dir_flags() method to update_flags()

2021-01-20 Thread Simon Glass
The current method is a misnomer since it is also used (e.g. by stm32) to update pull settings and open source/open drain. Rename it and expand the documentation to cover a few more details. Signed-off-by: Simon Glass Reviewed-by: Pratyush Yadav --- Changes in v2: - Use set_flags() instead of

[PATCH v2 01/15] gpio: Disable functions not used with of-platdata

2021-01-20 Thread Simon Glass
These functions use devicetree and cannot wprl with of-platdata, which has no runtime devicetree. If they are used, the current linker error is confusing, since it talks about missing functions in the bowels of driver model. Avoid compiling these functions at all with of-platdata, so that a strai

[PATCH v2 00/15] gpio: Update and simplify the uclass API

2021-01-20 Thread Simon Glass
At present the GPIO uclass mirrors what was in U-Boot before driver model. It works well in most cases but is becoming cumbersome with things like pull-up/down and drive strength. In those cases it is easier for the driver to deal with all the flags at one, rather than piece by piece. In fact the

[PATCH v2 3/6] log: Add return-checking macros for 0 being success

2021-01-20 Thread Simon Glass
The existing log_ret() and log_msg_ret() macros consider an error to be less than zero. But some function may return a positive number to indicate a different kind of failure. Add macros to check for that also. Signed-off-by: Simon Glass --- (no changes since v1) doc/develop/logging.rst | 15 +

[PATCH v2 6/6] log: Convert log values to printf() if not enabled

2021-01-20 Thread Simon Glass
At present if logging not enabled, log_info() becomes a nop. But we want log output at the 'info' level to be akin to printf(). Update the macro to pass the output straight to printf() in this case. This mimics the behaviour for the log_...() macros like log_debug() and log_info(), so we can drop

[PATCH v2 5/6] tpm: Don't select LOG

2021-01-20 Thread Simon Glass
We don't need to enable logging to run this command since the output will still appear. Drop the 'select'. Signed-off-by: Simon Glass --- (no changes since v1) cmd/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 0625ee4050f..7097cc1a145 100644 --- a/c

[PATCH v2 4/6] sandbox: log: Avoid build error with !CONFIG_LOG

2021-01-20 Thread Simon Glass
The pr_cont_test.c test requires CONFIG_LOG since it directly accesses fields in global_data that require it. Move the test into the CONFIG_LOG condition to avoid build errors. Enable CONFIG_LOG on sandbox (not sandbox_spl, etc.) so that we still run this test. This requires resyncing of the confi

[PATCH v2 2/6] log: Handle line continuation

2021-01-20 Thread Simon Glass
When multiple log() calls are used which don't end in newline, the log prefix is prepended multiple times in the same line. This makes the output look strange. Fix this by detecting when the previous log record did not end in newline. In that case, setting a flag. Drop the unused BUFFSIZE in the

[PATCH v2 1/6] log: Set up a flag byte for log records

2021-01-20 Thread Simon Glass
At present only a single flag (force_debug) is used in log records. Before adding more, convert this into a bitfield, so more can be added without using more space. To avoid expanding the log_record struct itself (which some drivers may wish to store in memory) reduce the line-number field to 16 b

[PATCH v2 0/6] log: Allow multiple lines and conversion to printf()

2021-01-20 Thread Simon Glass
At present when logging is not enabled, all log() calls become nops. This does not seem right, since if the log level is high enough then there should be some sort of message. So in that case, this series updates it to print the message if the log level is above LOGL_INFO. This mimics the behaviou

Re: [PATCH v2] sysboot: add zboot support to boot x86 Linux kernel image

2021-01-20 Thread Bin Meng
On Sat, Dec 26, 2020 at 5:25 AM Kory Maincent wrote: > > Add "zboot" command to the list of supported boot in the label_boot function. > > Signed-off-by: Kory Maincent > --- > > Change since v1: > - Modify comment > > cmd/pxe_utils.c | 4 > include/command.h | 2 ++ > 2 files changed, 6

Re: [PATCH v3 0/7] mtd: spi-nor: Add support for Cypress s25hl-t/s25hs-t

2021-01-20 Thread Kuwano Takahiro
Hi Jagan, On 11/4/2020 5:10 PM, tkuw584...@gmail.com wrote: > From: Takahiro Kuwano > > The S25HL-T/S25HS-T family is the Cypress Semper Flash with Quad SPI. > The datasheet can be found in https://community.cypress.com/docs/DOC-15165 > Tested on Xilinx Zynq-7000 FPGA board. > > Takahiro Kuwano

[PATCH v2 05/12] smbios: Set BIOS release version

2021-01-20 Thread Simon Glass
We may as well include the U-Boot release information in the type-0 table since it is designed for that purpose. U-Boot uses release versions based on the year and month. The year cannot fit in a byte, so drop the century. Signed-off-by: Simon Glass --- Changes in v2: - Add a comment about drop

Re: [scan-ad...@coverity.com: New Defects reported by Coverity Scan for Das U-Boot]

2021-01-20 Thread AKASHI Takahiro
Tom, Regarding EFI capsule update, On Wed, Jan 20, 2021 at 09:43:57PM +0100, Heinrich Schuchardt wrote: > On 1/20/21 8:04 PM, Tom Rini wrote: > > CC: Takahiro > > > I decided to run Coverity part-way through the merge window this time > > and here's what's been found so far. > > > > - Forw

[PATCH v2 10/12] sysinfo: Move #ifdef so that operations are always defined

2021-01-20 Thread Simon Glass
At present the struct is not available unless SYSINFO is enabled. This is annoying since code it is not possible to use compile-time checks like CONFIG_IS_ENABLED(SYSINFO) with this header. Fix it by moving the #ifdef. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to fix sysinfo

[PATCH v2 12/12] smbios: Allow a few values to come from sysinfo

2021-01-20 Thread Simon Glass
While static configuration is useful it cannot cover every case. Sometimes board revisions are encoded in resistor straps and must be read at runtime. The easiest way to provide this information is via sysinfo, since the board can then provide a driver to read whatever is needed. Add some standar

[PATCH v2 11/12] x86: coral: Add sysinfo ops

2021-01-20 Thread Simon Glass
These ops are missing at present which is not permitted. Add an empty operation struct. Signed-off-by: Simon Glass --- Changes in v2: - Add new patch to fix crash on coral board/google/chromebook_coral/coral.c | 5 + 1 file changed, 5 insertions(+) diff --git a/board/google/chromebook_cor

[PATCH v2 09/12] smbios: Add more options for the BIOS version string

2021-01-20 Thread Simon Glass
At present the version string is obtained from PLAIN_VERSION. Some boards may want to configure this using the device tree, since the build system can more easily insert things there after U-Boot itself is built. Add this option to the code. Also in some cases the version needs to be generated pro

[PATCH v2 08/12] smbios: Track the end of the string table

2021-01-20 Thread Simon Glass
Add a new member to the context struct which tracks the end of the string table. This allows us to avoid recalculating this at the end. Signed-off-by: Simon Glass --- (no changes since v1) lib/smbios.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) di

[PATCH v2 07/12] smbios: Drop the eos parameter

2021-01-20 Thread Simon Glass
We can store this in the context and avoid passing it to each function. This makes it easier to follow and will also allow keeping track of the end of the string table (in future patches). Add an 'eos' field to the context and create a function to set it up. Signed-off-by: Simon Glass --- (no c

[PATCH v2 06/12] smbios: Use a struct to keep track of context

2021-01-20 Thread Simon Glass
At present we pass the ofnode to each function. We also pass the 'eos' pointer for adding new strings. We don't track the current end of the string table, so have smbios_string_table_len() to find that. The code can be made more efficient if it keeps information in a context struct. This also make

[PATCH v2 04/12] smbios: Use char consistently for the eos member

2021-01-20 Thread Simon Glass
At present a few of the structs use u8 instead of char. This is a string, so char is better. Update them. Signed-off-by: Simon Glass Reviewed-by: Christian Gmeiner --- (no changes since v1) include/smbios.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/smbios

[PATCH v2 03/12] smbios: Move smbios_write_type to the C file

2021-01-20 Thread Simon Glass
This type is not used outside the smbios.c file so there is no need for it to be in the header file. Move it. Signed-off-by: Simon Glass Reviewed-by: Christian Gmeiner --- (no changes since v1) include/smbios.h | 10 -- lib/smbios.c | 10 ++ 2 files changed, 10 insertions(

[PATCH v2 02/12] Makefile: Provide numeric versions

2021-01-20 Thread Simon Glass
For SMBIOS we want to store the numeric version numbers in the tables. It does not make sense to parse the strings. Instead, add new #defines with the version and patchlevel. Signed-off-by: Simon Glass --- (no changes since v1) Makefile | 4 README | 8 2 files changed, 12 inse

[PATCH v2 01/12] README: Add doumentation for version information

2021-01-20 Thread Simon Glass
There are quite a few available version options in U-Boot. Add a list of the available Makefile variables and #defines, along with examples. Signed-off-by: Simon Glass --- (no changes since v1) README | 84 ++ 1 file changed, 84 insertion

[PATCH v2 00/12] smbios: Enhancements for more flexibility

2021-01-20 Thread Simon Glass
This series includes various patches to allow more flexibility as to where the data for SMBIOS tables comes from: - introduces some standard sysinfo options as a source, e.g. to read strapping pins to determine the board revision - allows the U-Boot version number to be included - allows the ve

Re: [PATCH 1/1] cmd: CMD_ACPI depends on ACPIGEN

2021-01-20 Thread Heinrich Schuchardt
Am 20. Januar 2021 21:47:45 MEZ schrieb Andy Shevchenko : >On Wed, Jan 20, 2021 at 10:46:23PM +0200, Andy Shevchenko wrote: >> On Wed, Jan 20, 2021 at 09:37:56PM +0100, Heinrich Schuchardt wrote: >> > Trying to compile qemu-x86_64_defconfig with CONFIG_CMD_ACPI=y and >> > CONFIG_ACPIGEN=n fails wi

Boot failure triggered by USB on rockpro64-rk3399 and pinebook-pro-rk3399

2021-01-20 Thread Vagrant Cascadian
It seems rockpro64-rk3399 and pinebook-pro-rk3399 fail to boot when usb is started. It hangs indefinitely at: ## Flattened Device Tree blob at 01f0 Booting using the fdt blob at 0x1f0 I have observed this also using 2020.10 on rockpro64-rk3399, though on pinebook-pro-rk3399 usb doe

[PATCH 1/1] fs: fat: structure for name and extension

2021-01-20 Thread Heinrich Schuchardt
The short name and extension of FAT files are stored in adjacent fields of the directory entry. For some operations like calculating a checksum or copying both fields it is preferable to treat both as one structure. Change the definition of the directory entry structure to include a structure comp

Re: Contributor meeting notes 19-Jan-21

2021-01-20 Thread Sean Anderson
On 1/20/21 6:18 PM, Jaehoon Chung wrote: Hi, On 1/20/21 3:54 AM, Simon Glass wrote: Hi, Thank you for attending! Full notes at [1] Tuesday 19 January 2021 Present: Daniel Schwierzeck, Heinrich Schuchardt, Michal Simek, Sean Anderson, Simon Glass, Walter Lozano Notes: [all] Introductions [a

Re: Contributor meeting notes 19-Jan-21

2021-01-20 Thread Jaehoon Chung
Hi, On 1/20/21 3:54 AM, Simon Glass wrote: > Hi, > > Thank you for attending! > > Full notes at [1] > > Tuesday 19 January 2021 > > Present: Daniel Schwierzeck, Heinrich Schuchardt, Michal Simek, Sean > Anderson, Simon Glass, Walter Lozano > > Notes: > [all] Introductions > [all] Timing of ca

  1   2   >