[PATCH] imx6: aristainetos: sync defconfig with 2020.10

2020-07-07 Thread Heiko Schocher
as patch gpio: search for gpio label if gpio is not found through bank name is now in mainline, but functionality is disabled, we need to enable CONFIG_DM_GPIO_LOOKUP_LABEL for the aristainetos boards. Signed-off-by: Heiko Schocher --- I did not trigger a travis build as this patch only

Re: [PATCH 6/6] mmc_spi: generate R1b response for erase and stop transmission command

2020-07-07 Thread Bin Meng
On Mon, Jun 29, 2020 at 5:48 PM Pragnesh Patel wrote: > > As per the SD physical layer specification version 7.10, erase > command (CMD38) and stop transmission command (CMD12) will generate > R1b response. > > R1b = R1 + busy signal > > A non-zero value after the R1 response indicates card is

Re: [PATCH 5/6] mmc: mmc_spi: Generate R1 response for erase block start and end address

2020-07-07 Thread Bin Meng
On Mon, Jun 29, 2020 at 5:48 PM Pragnesh Patel wrote: > > Erase block start address (CMD32) and erase block end address (CMD33) > command will generate R1 response for mmc SPI mode. > > R1 response is 1 byte long for mmc SPI, so assign 1 byte as a response > for this commands. > > Signed-off-by:

Re: [PATCH 2/6] mmc: mmc_spi: generate R1 response for different mmc SPI commands

2020-07-07 Thread Bin Meng
On Mon, Jun 29, 2020 at 5:48 PM Pragnesh Patel wrote: > > R1 response is 1 byte long for mmc SPI commands as per the updated > physical layer specification version 7.10. > > So correct the resp and resp_size for existing commands > > Signed-off-by: Pragnesh Patel > --- > drivers/mmc/mmc_spi.c |

Re: [PATCH 3/6] mmc: read ssr for SD spi

2020-07-07 Thread Bin Meng
On Mon, Jun 29, 2020 at 5:48 PM Pragnesh Patel wrote: > > The content of ssr is useful only for erase operations. > This saves erase time. > > Signed-off-by: Pragnesh Patel > Reviewed-by: Bin Meng > --- > drivers/mmc/mmc.c | 5 + > drivers/mmc/mmc_spi.c | 1 + > 2 files changed, 6

Re: [PATCH 1/6] mmc: mmc_spi: correct the while condition

2020-07-07 Thread Bin Meng
On Mon, Jun 29, 2020 at 5:48 PM Pragnesh Patel wrote: > > When variable i will become 0, while(i--) loop breaks but variable i will > again decrement to -1 because of i-- and that's why below condition > "if (!i && (r != resp_match_value)" will never execute, So doing "i--" > inside of while()

Re: [PATCH 4/6] mmc: mmc_spi: Read R2 response for send status command - CMD13

2020-07-07 Thread Bin Meng
On Mon, Jun 29, 2020 at 5:48 PM Pragnesh Patel wrote: > > Send status command (CMD13) will send R1 response under SD mode > but R2 response under SPI mode. > > R2 response is 2 bytes long, so read 2 bytes for mmc SPI mode > > Signed-off-by: Pragnesh Patel > --- > drivers/mmc/mmc_spi.c | 11

Re: [PATCH v9 1/2] i2c: i2c-cortina: added CAxxxx I2C support

2020-07-07 Thread Alex Nemirovsky
Ok with us. Thanks > On Jul 7, 2020, at 9:21 PM, Heiko Schocher wrote: > > Hello Alex, Arthur, > >> Am 06.07.2020 um 11:22 schrieb Heiko Schocher: >> Hello Alex, Arthur, >>> Am 01.06.2020 um 21:56 schrieb Alex Nemirovsky: >>> From: Arthur Li >>> >>> Add I2C controller support for Cortina

[PATCH v3 13/13] test/py: efi_secboot: add a test for verifying with digest of signed image

2020-07-07 Thread AKASHI Takahiro
Signature database (db or dbx) may have not only certificates that contain a public key for RSA decryption, but also digests of signed images. In this test case, if database has an image's digest (EFI_CERT_SHA256_GUID) and if the value matches to a hash value calculated from image's binary,

[PATCH] Revert "riscv: Clean up IPI initialization code"

2020-07-07 Thread Bin Meng
From: Bin Meng This reverts commit 40686c394e533fec765fe237936e353c84e73fff. Commit 40686c394e53 ("riscv: Clean up IPI initialization code") caused U-Boot failed to boot on SiFive HiFive Unleashed board. The codes inside arch_cpu_init_dm() may call U-Boot timer APIs before the call to

[PATCH v3 09/13] test/py: efi_secboot: more fixes against pylint

2020-07-07 Thread AKASHI Takahiro
More fixes against pylint warnings that autopep8 didn't handle in the previous commit. Signed-off-by: AKASHI Takahiro --- test/py/tests/test_efi_secboot/conftest.py| 11 +-- .../py/tests/test_efi_secboot/test_authvar.py | 91 +-- test/py/tests/test_efi_secboot/test_signed.py

[PATCH v3 08/13] test/py: efi_secboot: apply autopep8

2020-07-07 Thread AKASHI Takahiro
Python's autopep8 can automatically correct some of warnings from pylint and rewrite the code in a pretty print format. So just do it. Signed-off-by: AKASHI Takahiro Suggested-by: Heinrich Schuchardt --- test/py/tests/test_efi_secboot/conftest.py| 74 ++-

[PATCH v3 10/13] test/py: efi_secboot: split "signed image" test case-1 into two cases

2020-07-07 Thread AKASHI Takahiro
Split the existing test case-1 into case1 and a new case-2: case-1 for non-SecureBoot mode; case-2 for SecureBoot mode. In addition, one corner case is added to case-2; a image is signed but a corresponding certificate is not yet installed in "db." Signed-off-by: AKASHI Takahiro ---

[PATCH v3 12/13] test/py: efi_secboot: add a test for multiple signatures

2020-07-07 Thread AKASHI Takahiro
In this test case, an image is signed multiple times with different keys. If any of signatures contained is not verified, the whole authentication check should fail. Signed-off-by: AKASHI Takahiro --- test/py/tests/test_efi_secboot/conftest.py| 9 +++-

[PATCH v3 11/13] test/py: efi_secboot: add a test against certificate revocation

2020-07-07 Thread AKASHI Takahiro
Revocation database (dbx) may have not only certificates, but also message digests of certificates with revocation time (EFI_CERT_X509_SHA256_GUILD). In this test case, if the database has such a digest and if the value matches to a certificate that created a given image's signature,

[PATCH v3 07/13] efi_loader: image_loader: add digest-based verification for signed image

2020-07-07 Thread AKASHI Takahiro
In case that a type of certificate in "db" or "dbx" is EFI_CERT_X509_SHA256_GUID, it is actually not a certificate which contains a public key for RSA decryption, but a digest of image to be loaded. If the value matches to a value calculated from a given binary image, it is granted for loading.

[PATCH v3 04/13] efi_loader: signature: fix a size check against revocation list

2020-07-07 Thread AKASHI Takahiro
Since the size check against an entry in efi_search_siglist() is incorrect, this function will never find out a to-be-matched certificate and its associated revocation time in the signature list. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_signature.c | 5 +++-- 1 file changed, 3

[PATCH v3 03/13] efi_loader: image_loader: retrieve authenticode only if it exists

2020-07-07 Thread AKASHI Takahiro
Since the certificate table, which is indexed by IMAGE_DIRECTORY_ENTRY_SECURITY and contains authenticode in PE image, doesn't always exist, we should make sure that we will retrieve its pointer only if it exists. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_image_loader.c | 29

[PATCH v3 05/13] efi_loader: signature: make efi_hash_regions more generic

2020-07-07 Thread AKASHI Takahiro
There are a couple of occurrences of hash calculations in which a new efi_hash_regions will be commonly used. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_signature.c | 46 +- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git

[PATCH v3 06/13] efi_loader: image_loader: verification for all signatures should pass

2020-07-07 Thread AKASHI Takahiro
A signed image may have multiple signatures in - each WIN_CERTIFICATE in authenticode, and/or - each SignerInfo in pkcs7 SignedData (of WIN_CERTIFICATE) In the initial implementation of efi_image_authenticate(), the criteria of verification check for multiple signatures case is a bit

[PATCH v3 02/13] efi_loader: image_loader: add a check against certificate type of authenticode

2020-07-07 Thread AKASHI Takahiro
UEFI specification requires that we shall support three type of certificates of authenticode in PE image: WIN_CERT_TYPE_EFI_GUID with the guid, EFI_CERT_TYPE_PCKS7_GUID WIN_CERT_TYPE_PKCS_SIGNED_DATA WIN_CERT_TYPE_EFI_PKCS1_15 As EDK2 does, we will support the first two that are pkcs7

[PATCH v3 00/13] efi_loader: rework/improve UEFI secure boot code

2020-07-07 Thread AKASHI Takahiro
Summary === I'm currently working on reworking UEFI secure boot, aiming to add "intermediate certificates" support. In this effort, I found a couple of issues that should immediately be fixed or useful improvements even without intermediate certificates support. Each commit in this patch

[PATCH v3 01/13] lib/crypto, efi_loader: avoid multiple inclusions of header files

2020-07-07 Thread AKASHI Takahiro
By adding extra symbols, we can now avoid including x509_parser and pkcs7_parser.h files multiple times. Signed-off-by: AKASHI Takahiro Suggested-by: Heinrich Schuchardt --- lib/efi_loader/efi_image_loader.c | 1 + lib/efi_loader/efi_signature.c| 1 + 2 files changed, 2 insertions(+) diff

Re: U-boot Designware SPI driver issue

2020-07-07 Thread Sean Anderson
On 6/24/20 4:37 AM, Yakov Shmulevich wrote: > Hello, > > We develop the system that based on MIPS that includes Synopsys SPI with > NACRONIX SPI flash connected to it. > For U-boot we are using version 2019.04-rc4. > I want to save environment on SPI flash. For this I enabled the DesignWare >

RE: [PATCH 0/4] Move eSDHC adapter card code to board files

2020-07-07 Thread Y.b. Lu
CC Xiaobo, Jiafei > -Original Message- > From: Y.b. Lu > Sent: Monday, July 6, 2020 10:47 AM > To: u-boot@lists.denx.de; Priyanka Jain ; Peng Fan > > Subject: RE: [PATCH 0/4] Move eSDHC adapter card code to board files > > Hi Priyanka, > > Any comments on this patch-set? > Thanks a

Re: [PATCH v2 2/2] pwm: Add PWM driver for SiFive SoC

2020-07-07 Thread Heiko Schocher
Hello Yash, Am 23.04.2020 um 13:27 schrieb Yash Shah: Adds a PWM driver for PWM chip present in SiFive's HiFive Unleashed SoC This driver is simple port of Linux pwm sifive driver from Linux v5.6 commit: 9e37a53eb051 ("pwm: sifive: Add a driver for SiFive SoC PWM") Signed-off-by: Yash Shah

Re: [PATCH v2 1/2] pwm: Add DT documentation for SiFive PWM Controller

2020-07-07 Thread Heiko Schocher
Hello Yash, Am 23.04.2020 um 13:27 schrieb Yash Shah: DT documentation for PWM controller added from Linux v5.6 commit: daa78cc3408e ("pwm: sifive: Add DT documentation for SiFive PWM Controller") Signed-off-by: Yash Shah --- doc/device-tree-bindings/pwm/pwm-sifive.txt | 31

Re: [PATCH 1/2] test/py: efi_secboot: apply autopep8

2020-07-07 Thread AKASHI Takahiro
On Mon, Jul 06, 2020 at 12:45:54PM +0200, Heinrich Schuchardt wrote: > On 16.06.20 01:16, AKASHI Takahiro wrote: > > Python's autopep8 can automatically correct some of warnings from pylint > > and rewrite the code in a pretty print format. So just do it. > > > > Signed-off-by: AKASHI Takahiro >

Re: [PATCH v9 1/2] i2c: i2c-cortina: added CAxxxx I2C support

2020-07-07 Thread Heiko Schocher
Hello Alex, Arthur, Am 06.07.2020 um 11:22 schrieb Heiko Schocher: Hello Alex, Arthur, Am 01.06.2020 um 21:56 schrieb Alex Nemirovsky: From: Arthur Li Add I2C controller support for Cortina Access CA SoCs Signed-off-by: Arthur Li Signed-off-by: Alex Nemirovsky CC: Heiko Schocher

Re: [PATCH 2/2] test/py: efi_secboot: more fixes against pylint

2020-07-07 Thread AKASHI Takahiro
On Mon, Jul 06, 2020 at 12:59:16PM +0200, Heinrich Schuchardt wrote: > On 16.06.20 01:16, AKASHI Takahiro wrote: > > More fixes against pylint warnings that autopep8 didn't handle > > in the previous commit. > > > > Signed-off-by: AKASHI Takahiro > > This patch has to be rebased: This patch

Re: [PATCH v1 02/43] binman: Refactor binman_entry_find() to allow other nodes

2020-07-07 Thread Bin Meng
+Tom, On Wed, Jul 8, 2020 at 10:23 AM Simon Glass wrote: > > Hi Bin, > > On Mon, 29 Jun 2020 at 20:33, Bin Meng wrote: > > > > Hi Simon, > > > > On Mon, Jun 15, 2020 at 11:57 AM Simon Glass wrote: > > > > > > At present we can only read from a top-level binman node entry. Refactor > > > this

[PATCH v2 42/44] x86: acpi: Correct the version of the MADT

2020-07-07 Thread Simon Glass
Currently U-Boot implements version 2 but reports version 4. Correct it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner --- Changes in v2: - Use ACPI_MADT_REV_ACPI_3_0 instead of the open-coded value arch/x86/lib/acpi_table.c | 2 +- 1 file changed, 1

[PATCH v2 43/44] x86: Rename board_final_cleanup() to board_final_init()

2020-07-07 Thread Simon Glass
This function sounds like something that is called when U-Boot is about to jump to Linux. In fact it is an init function. Rename it to reduce confusion. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner --- (no changes since v1) arch/x86/cpu/coreboot/coreboot.c

[PATCH v2 40/44] x86: Update the comment about booting for FSP2

2020-07-07 Thread Simon Glass
The comment here applies only to FSP1, so update it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner --- (no changes since v1) arch/x86/cpu/start.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S index

[PATCH v2 44/44] acpi: Enable ACPI table generation by default on x86

2020-07-07 Thread Simon Glass
This should ideally be used by all x86 boards in U-Boot. Enable it by default. If some boards don't use it, the cost is small. Signed-off-by: Simon Glass --- Changes in v2: - Don't enable this for qemu arch/Kconfig | 1 + drivers/core/Kconfig | 2 +- 2 files changed, 2 insertions(+),

[PATCH v2 41/44] x86: Drop setup_pcat_compatibility()

2020-07-07 Thread Simon Glass
This function does not exist anymore. Drop it from the header file. Signed-off-by: Simon Glass --- Changes in v2: - Remove the function from zimage.c also arch/x86/include/asm/u-boot-x86.h | 2 -- arch/x86/lib/zimage.c | 10 -- 2 files changed, 12 deletions(-) diff --git

[PATCH v2 39/44] x86: mp: Allow use of mp_run_on_cpus() without MP

2020-07-07 Thread Simon Glass
At present if MP is not enabled (e.g. booting from coreboot) the 'mtrr' command does not work correctly. It is not easy to make it work for all CPUs, since coreboot has halted them and we would need to start them up again, but it is easy enough to make them work on the boot CPU. Update the code

[PATCH v2 38/44] x86: Store the coreboot table address in global_data

2020-07-07 Thread Simon Glass
At present this information is used to locate and parse the tables but is not stored. Store it so that we can display it to the user, e.g. with the 'bdinfo' command. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/cpu/coreboot/tables.c | 8 +++-

[PATCH v2 35/44] x86: Add debugging to table writing

2020-07-07 Thread Simon Glass
Writing tables is currently pretty opaque. Add a bit of debugging to the process so we can see what tables are written and where they start/end in memory. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner --- (no changes since v1) arch/x86/lib/tables.c | 38

[PATCH v2 36/44] x86: apl: Set the correct boot mode in the FSP-M code

2020-07-07 Thread Simon Glass
If there is MRC information we should run FSP-M with a different boot_mode flag since it is supposed to do a 'fast path' through the memory init. Fix this. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v2: - Add a new commit to handle the boot_mode fix

[PATCH v2 37/44] x86: apl: Adjust FSP-M code to avoid hard-coded address

2020-07-07 Thread Simon Glass
Update this code to calculate the address to use, rather than hard-coding it. Obtain the requested stack size from the FSP. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v2: - Split out the boot_mode change into a separate patch arch/x86/cpu/apollolake/fsp_m.c | 3

Re: [PATCH v1 34/43] x86: apl: Fix save/restore of ITSS priorities

2020-07-07 Thread Simon Glass
Hi Bin, On Tue, 30 Jun 2020 at 02:27, Bin Meng wrote: > > Hi Simon, > > On Mon, Jun 15, 2020 at 11:58 AM Simon Glass wrote: > > > > The FSP-S changes the ITSS priorities. The code that tries to save it > > before running FSP-S and restore it afterwards does not work as U-Boot > > relocates in

[PATCH v2 33/44] x86: irq: Support flags for acpi_gpe

2020-07-07 Thread Simon Glass
This binding currently has a flags cell but it is not used. Make use of it to create ACPI tables for interrupts. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner --- (no changes since v1) arch/x86/cpu/acpi_gpe.c | 26 +++

[PATCH v2 28/44] i2c: designware_i2c: Support ACPI table generation

2020-07-07 Thread Simon Glass
Update the PCI driver to generate ACPI information so that Linux has the full information about each I2C bus. Signed-off-by: Simon Glass Reviewed-by: Heiko Schocher --- Changes in v2: - Add a few blank lines - Drop dead code behind if (0) Changes in v1: - Capitalise ACPI_OPS_PTR

[PATCH v2 31/44] x86: apl: Hide the p2sb on exit from U-Boot

2020-07-07 Thread Simon Glass
This confuses Linux's PCI probing so needs to be hidden when booting Linux. Add a remove() method to handle this. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner Tested-by: Wolfgang Wallner --- (no changes since v1) arch/x86/cpu/intel_common/p2sb.c | 13

[PATCH v2 32/44] pmc: Move common registers to the header file

2020-07-07 Thread Simon Glass
These registers need to be accesses from ACPI code, so move them to the header file. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) drivers/power/acpi_pmc/acpi-pmc-uclass.c | 9 - include/power/acpi_pmc.h | 14 ++ 2

[PATCH v2 34/44] x86: apl: Fix save/restore of ITSS priorities

2020-07-07 Thread Simon Glass
The FSP-S changes the ITSS priorities. The code that tries to save it before running FSP-S and restore it afterwards does not work as U-Boot relocates in between the save and restore. This means that the driver data saved before relocation is lost and the new driver just sees zeroes. Fix this by

[PATCH v2 27/44] i2c: Add log_ret() on error

2020-07-07 Thread Simon Glass
Add a few of these calls to make it easier to see where an error occurs, if CONFIG_LOG_ERROR_RETURN is enabled. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner Reviewed-by: Heiko Schocher --- (no changes since v1) drivers/i2c/i2c-uclass.c | 4 ++-- 1 file

[PATCH v2 30/44] x86: apl: Support set_hide() in p2sb driver

2020-07-07 Thread Simon Glass
Add support for this new method in the driver and in the fsp-s setup. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner Tested-by: Wolfgang Wallner --- Changes in v2: - Move .ops change from the next patch arch/x86/cpu/apollolake/fsp_s.c | 26

Re: [PATCH v1 15/43] sound: Add an ACPI driver for Dialog Semicondutor da7219

2020-07-07 Thread Simon Glass
Hi Bin, On Tue, 30 Jun 2020 at 00:06, Bin Meng wrote: > > Hi Simon, > > On Mon, Jun 15, 2020 at 11:57 AM Simon Glass wrote: > > > > This chip is used on coral and we need to generate ACPI tables for sound > > to make it work. Add a driver that does just this (i.e. at present does > > not

[PATCH v2 29/44] p2sb: Add a method to hide the bus

2020-07-07 Thread Simon Glass
The P2SB bus needs to be hidden in some cases so that it does not get auto-configured by Linux. Add a method for this. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner Tested-by: Wolfgang Wallner --- (no changes since v1) drivers/misc/p2sb-uclass.c | 10

[PATCH v2 26/44] i2c: designware_i2c: Add a little more debugging

2020-07-07 Thread Simon Glass
Add debugging for a few more values and also use log to show return values when something goes wrong. This makes it easier to see the root cause. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner Reviewed-by: Heiko Schocher --- (no changes since v1) Changes in

[PATCH v2 25/44] x86: gpio: Add support for obtaining ACPI info for a GPIO

2020-07-07 Thread Simon Glass
Implement the method that converts a GPIO into the form used by ACPI, so that GPIOs can be added to ACPI tables. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Use acpi_get_path() to get device path drivers/gpio/intel_gpio.c | 34 ++ 1

[PATCH v2 24/44] x86: apl: Use memory-mapped access for VBT

2020-07-07 Thread Simon Glass
Use the new binman memory-mapping function to access the VBT, to simplify the code. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- (no changes since v1) arch/x86/cpu/apollolake/fsp_s.c | 19 +-- arch/x86/lib/fsp2/fsp_silicon_init.c | 1 + 2 files changed, 6

[PATCH v2 21/44] x86: pinctrl: Set up itss in the probe() method

2020-07-07 Thread Simon Glass
At present the itss is probed in the ofdata_to_platdata() method. This is incorrect since itss is a child of p2sb which itself needs to probe the pinctrl device. This means that p2sb is effectively not probed when the itss is probed, so we get the wrong register address from p2sb. Fix this by

[PATCH v2 23/44] x86: Add error checking for csrt table generation

2020-07-07 Thread Simon Glass
Generation of this table can fail, so update the function to return an error code. Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Add new patch to add error checking for csrt table generation

[PATCH v2 22/44] x86: pinctrl: Drop the acpi_path member

2020-07-07 Thread Simon Glass
This is in the device tree now, so drop the unnecessary field here. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v2: - Fix the commit subject to mention dropping acpi_path, not acpi_name arch/x86/include/asm/intel_pinctrl.h | 2 --

[PATCH v2 17/44] sound: Add an ACPI driver for Maxim MAX98357ac

2020-07-07 Thread Simon Glass
This chip is used on coral and we need to generate ACPI tables for sound to make it work. Add a driver that does just this (i.e. at present does not actually support playing sound). Signed-off-by: Simon Glass --- Changes in v2: Add a comment about only x86 boards supporting NHLT Changes in v1:

[PATCH v2 18/44] x86: pinctrl: Add a way to get the pinctrl reg address

2020-07-07 Thread Simon Glass
At present we can query the offset of a pinctrl register within the p2sb. For ACPI we need to get the actual address of the register. Add a function to handle this and rename the old one to more accurately reflect its purpose. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by:

[PATCH v2 19/44] x86: pinctrl: Update comment for intel_pinctrl_get_pad()

2020-07-07 Thread Simon Glass
Add information about what is returned on error. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/include/asm/intel_pinctrl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/intel_pinctrl.h b/arch/x86/include/asm/intel_pinctrl.h index

[PATCH v2 16/44] sound: Add an ACPI driver for Dialog Semicondutor da7219

2020-07-07 Thread Simon Glass
This chip is used on coral and we need to generate ACPI tables for sound to make it work. Add a driver that does just this (i.e. at present does not actually support playing sound). Signed-off-by: Simon Glass --- Changes in v2: Add a comment about only x86 boards supporting NHLT Changes in v1:

[PATCH v2 20/44] x86: pinctrl: Add multi-ACPI control

2020-07-07 Thread Simon Glass
Add a Kconfig to control whether pinctrl is represented as a single ACPI device or as multiple devices. In the latter case (the default) we should return the pin number relative to the pinctrl device. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner --- Changes

[PATCH v2 11/44] acpi: mmc: Generate ACPI info for the PCI SD Card

2020-07-07 Thread Simon Glass
Write required information into the SSDT to describe the SD card card-detect pin. Since the required GPIO properties are not present in the device-tree binding, set them manually for now. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) Changes in v1: -

[PATCH v2 15/44] x86: Add support for building up an NHLT structure

2020-07-07 Thread Simon Glass
The Intel Non-High-Definition-Audio Link Table (NHLT) table describes the audio codecs and connections in a system. Various devices can contribute information to produce the table. Add functions to allow adding to the structure that is eventually written to the ACPI tables. Also add the

[PATCH v2 10/44] acpi: Support generation of a generic register

2020-07-07 Thread Simon Glass
Allow writing out a generic register. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner --- (no changes since v1) include/acpi/acpi_device.h | 1 + include/acpi/acpigen.h | 28 +++ lib/acpi/acpigen.c | 71

[PATCH v2 13/44] acpi: Support generation of a device

2020-07-07 Thread Simon Glass
Allow writing an ACPI device to the generated ACPI code. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner --- (no changes since v1) include/acpi/acpigen.h | 9 + lib/acpi/acpigen.c | 7 +++ test/dm/acpigen.c | 27

[PATCH v2 12/44] x86: Add bindings for NHLT

2020-07-07 Thread Simon Glass
Add devicetree bindings for the Intel Non-High-Definition-Audio Link Table (NHLT). Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v2: - Add a comment pointing to the PCI spec include/dt-bindings/sound/nhlt.h | 24 1 file changed, 24

[PATCH v2 14/44] acpi: Support writing named values

2020-07-07 Thread Simon Glass
Allow writing named integers and strings to the generated ACPI code. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner --- (no changes since v1) include/acpi/acpigen.h | 72 ++ lib/acpi/acpigen.c | 49

[PATCH v2 07/44] dm: acpi: Add support for the NHLT table

2020-07-07 Thread Simon Glass
The Intel Non-High-Definition-Audio Link Table (NHLT) table describes the audio codecs and connections in a system. Various devices can contribute information to produce the table. Add core support for this, based on a structure which is built up through calls to the driver. Signed-off-by: Simon

[PATCH v2 08/44] acpi: Export functions to write sized values

2020-07-07 Thread Simon Glass
At present only acpigen_write_integer() is exported for use by other code. But in some cases it is useful to call the specific function depending on the size of the value. Export these functions and add a test. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1)

[PATCH v2 09/44] acpi: Support generation of a scope

2020-07-07 Thread Simon Glass
Add a function to write a scope to the generated ACPI code. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v2: - Rename parameter from 'name' to 'scope' include/acpi/acpigen.h | 9 + lib/acpi/acpigen.c | 7 +++ test/dm/acpi.c | 3 +--

[PATCH v2 06/44] dm: core: Add a way of overriding the ACPI device path

2020-07-07 Thread Simon Glass
Some devices such as GPIO need to override the normal path that would be generated by driver model. Add a device-tree property for this. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner --- (no changes since v1) doc/device-tree-bindings/device.txt | 23

[PATCH v2 05/44] dtoc: Support ACPI paths in of-platdata

2020-07-07 Thread Simon Glass
The start of an ACPI path typically has backslashes in it. These are not preserved during the translation from device tree to C code, since dtc (correctly) uses the first backslash as an escape character, and dtoc therefore leaves it out of the C string. Fix this with special-case handling.

[PATCH v2 04/44] acpi: Allow creating the GNVS to fail

2020-07-07 Thread Simon Glass
In some cases an internal error may prevent this from working. Update the function return value and report the error. At present the API for writing tables does not easily support reporting errors, but once it is fully updated to use a context pointer, this will be easier. Signed-off-by: Simon

[PATCH v2 02/44] binman: Refactor binman_entry_find() to allow other nodes

2020-07-07 Thread Simon Glass
At present we can only read from a top-level binman node entry. Refactor this function to produce a second local function which supports reading from any node. Signed-off-by: Simon Glass --- Changes in v2: - Rename binman_entry_find_() lib/binman.c | 19 +-- 1 file changed, 13

[PATCH v2 03/44] binman: Add way to locate an entry in memory

2020-07-07 Thread Simon Glass
Add support for accessing an entry's contents in memory-mapped SPI flash. Signed-off-by: Simon Glass --- (no changes since v1) include/binman.h | 22 ++ lib/binman.c | 23 +++ 2 files changed, 45 insertions(+) diff --git a/include/binman.h

Re: [PATCH v1 38/43] x86: mp: Allow use of mp_run_on_cpus() without MP

2020-07-07 Thread Simon Glass
Hi Bin, On Tue, 30 Jun 2020 at 02:40, Bin Meng wrote: > > Hi Simon, > > On Mon, Jun 15, 2020 at 11:58 AM Simon Glass wrote: > > > > At present if MP is not enabled (e.g. booting from coreboot) the 'mtrr' > > command does not work correctly. It is not easy to make it work for all > > CPUs, since

[PATCH v2 01/44] binman: Allow setting the ROM offset

2020-07-07 Thread Simon Glass
On x86 the SPI ROM can be memory-mapped, at least most of it. Add a way to tell binman the offset from a ROM address to a RAM address. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Add a way to set the binman ROM offset include/binman.h | 8 lib/binman.c

Re: [PATCH v1 40/43] x86: Drop setup_pcat_compatibility()

2020-07-07 Thread Simon Glass
Hi Bin, On Tue, 30 Jun 2020 at 02:40, Bin Meng wrote: > > Hi Simon, > > On Mon, Jun 15, 2020 at 11:58 AM Simon Glass wrote: > > > > This function does not exist anymore. Drop it from the header file. > > > > Signed-off-by: Simon Glass > > --- > > > > arch/x86/include/asm/u-boot-x86.h | 2 -- >

[PATCH v2 00/44] x86: Programmatic generation of ACPI tables (Part C)

2020-07-07 Thread Simon Glass
This series is split off from the original ACPI series and renumbered to version 1. It includes functions for generating more ACPI constructs as well as I2C, GPIO and sound support. There are also quite a few patches related to getting coral to work correctly with ACPI. Changes in v2: - Rename

Re: [PATCH v1 28/43] i2c: designware_i2c: Support ACPI table generation

2020-07-07 Thread Simon Glass
Hi Wolfgang, On Thu, 25 Jun 2020 at 06:46, Wolfgang Wallner wrote: > > Hi Simon, > > -"Simon Glass" schrieb: - > > Betreff: [PATCH v1 28/43] i2c: designware_i2c: Support ACPI table generation > > > > Update the PCI driver to generate ACPI information so that Linux has the > > full

Re: [PATCH v1 22/43] x86: Add support for building up an NHLT structure

2020-07-07 Thread Simon Glass
Hi Wolfgang, On Thu, 2 Jul 2020 at 02:11, Wolfgang Wallner wrote: > > Hi Simon, > > I dont know NHLT well enough to actually review the code, but I did compare > the files in this patch to the version in coreboot. Most of the changes are > obvious (coding style, spelling, ...), but some things

Re: [PATCH v1 37/43] x86: Store the coreboot table address in global_data

2020-07-07 Thread Simon Glass
Hi Wolfgang, On Wed, 1 Jul 2020 at 09:16, Wolfgang Wallner wrote: > > Hi Simon, > > -"Simon Glass" schrieb: - > > Betreff: [PATCH v1 37/43] x86: Store the coreboot table address in > > global_data > > > > At present this information is used to locate and parse the tables but is > > not

Re: [PATCH v1 33/43] x86: irq: Support flags for acpi_gpe

2020-07-07 Thread Simon Glass
Hi Wolfgang, On Wed, 1 Jul 2020 at 09:15, Wolfgang Wallner wrote: > > Hi Simon, > > -"Simon Glass" schrieb: - > > > Betreff: [PATCH v1 33/43] x86: irq: Support flags for acpi_gpe > > > > This binding currently has a flags cell but it is not used. Make use of it > > to create ACPI tables

Re: [PATCH v1 25/43] x86: gpio: Add support for obtaining ACPI info for a GPIO

2020-07-07 Thread Simon Glass
Hi Bin, On Tue, 30 Jun 2020 at 01:47, Bin Meng wrote: > > Hi Simon, > > On Mon, Jun 15, 2020 at 11:58 AM Simon Glass wrote: > > > > Implement the method that converts a GPIO into the form used by ACPI, so > > that GPIOs can be added to ACPI tables. > > > > Signed-off-by: Simon Glass > > --- >

Re: [PATCH v1 32/43] pmc: Move common registers to the header file

2020-07-07 Thread Simon Glass
Hi Bin, On Tue, 30 Jun 2020 at 02:27, Bin Meng wrote: > > Hi Simon, > > On Mon, Jun 15, 2020 at 11:58 AM Simon Glass wrote: > > > > These registers need to be accesses from ACPI code, so move them to the > > header file. > > > > I don't think these are common offset to every platform. That's

Re: [PATCH v1 12/43] x86: Add bindings for NHLT

2020-07-07 Thread Simon Glass
Hi Bin, On Mon, 29 Jun 2020 at 23:58, Bin Meng wrote: > > Hi Simon, > > On Mon, Jun 15, 2020 at 11:57 AM Simon Glass wrote: > > > > Add devicetree bindings for the Intel Non-High-Definition-Audio Link Table > > (NHLT). > > > > Signed-off-by: Simon Glass > > --- > > > >

Re: [PATCH v1 07/43] dm: acpi: Add support for the NHLT table

2020-07-07 Thread Simon Glass
Hi Bin, On Mon, 6 Jul 2020 at 18:22, Bin Meng wrote: > > Hi Simon, > > On Tue, Jul 7, 2020 at 3:22 AM Simon Glass wrote: > > > > Hi Bin, > > > > On Thu, 2 Jul 2020 at 22:33, Bin Meng wrote: > > > > > > Hi Simon, > > > > > > On Fri, Jul 3, 2020 at 11:50 AM Simon Glass wrote: > > > > > > > > Hi

PPC440EPx Evaluation Board Schematic

2020-07-07 Thread Nicholas Williams
I am wondering if anyone has a copy of the PPC440EPx evaluation board (Sequoia) schematic that was made by AMCC. The information is no longer easily available as the amcc.com and apm.com sites are no longer running and the schematic is not archived on the wayback machine. I figured that U-Boot

RE: [PATCH v2 0/2] Add support for PWM SiFive

2020-07-07 Thread Yash Shah
Any comments or update on this series? - Yash > -Original Message- > From: Yash Shah > Sent: 23 April 2020 16:58 > To: martyn.we...@collabora.co.uk; h...@denx.de; u-boot@lists.denx.de; > Sachin Ghadi > Cc: Yash Shah > Subject: [PATCH v2 0/2] Add support for PWM SiFive > > The patch

Re: [PATCH 7/7] arm: juno: Enable SATA controller

2020-07-07 Thread Tom Rini
On Thu, Jun 11, 2020 at 12:03:21PM +0100, Andre Przywara wrote: > The ARM Juno boards (-r1 and -r2) feature a Silicon Image 3132 PCIe > SATA controller soldered on the board, providing two SATA ports. > > Enable the driver and the sata command in the defconfig, to be able to > load images from

Re: [PATCH 6/7] arm: juno: Enable PCI

2020-07-07 Thread Tom Rini
On Thu, Jun 11, 2020 at 12:03:20PM +0100, Andre Przywara wrote: > The ARM Juno boards in their -r1 and -r2 variants sport a PCIe > controller, which we configure already in board specific code to be ECAM > compliant. Hence we can just enable the generic ECAM driver to let > U-Boot use PCIe

Re: [PATCH 5/7] sata_sil: Enable DM_PCI operation

2020-07-07 Thread Tom Rini
On Thu, Jun 11, 2020 at 12:03:19PM +0100, Andre Przywara wrote: > Even though the sata_sil driver was converted over to the driver model, > it still assumed that the PCI controller is using the legacy interface. > > Allow the "devno" member to be a struct udevice pointer and use > DM_PCI_COMPAT

Re: [PATCH 3/7] net: smc911x: Properly handle EEPROM MAC address

2020-07-07 Thread Tom Rini
On Thu, Jun 11, 2020 at 12:03:17PM +0100, Andre Przywara wrote: > When compiled as a DM_ETH driver, the scm911x driver was reading the MAC > address from the optional EEPROM storage, but failed to copy this to the > platdata struct. Since it was also missing a definition of the >

Re: [PATCH 2/7] net: dm: Remove warning about EEPROM provided MAC address

2020-07-07 Thread Tom Rini
On Thu, Jun 11, 2020 at 12:03:16PM +0100, Andre Przywara wrote: > Similar to patch 821fec0ceb3e ("net: remove scary warning about EEPROM > provided MAC address") this removes the somewhat awkward "warning" on > boards using DM_ETH: > In many parts of the computing world having a unique MAC

Re: [PATCH 4/7] arm: juno: Enable DM_ETH

2020-07-07 Thread Tom Rini
On Thu, Jun 11, 2020 at 12:03:18PM +0100, Andre Przywara wrote: > The smc911X driver is now DM enabled, so we can switch the Juno board > over to use DM_ETH for the on-board Fast Ethernet device. > Works out of the box by using the DT. > > Signed-off-by: Andre Przywara > Reviewed-by: Linus

Re: [PATCH 4/4] arm: use correct argument size of special registers

2020-07-07 Thread Tom Rini
On Wed, May 27, 2020 at 08:04:24PM +0200, Heinrich Schuchardt wrote: > Compiling with clang on ARMv8 shows errors like: > > ./arch/arm/include/asm/system.h:162:32: note: use constraint modifier "w" > asm volatile("msr sctlr_el1, %0" : : "r" (val) : "cc"); >

Re: [PATCH 3/4] arm: remove outdated comment concerning -ffixed-x18

2020-07-07 Thread Tom Rini
On Wed, May 27, 2020 at 08:04:23PM +0200, Heinrich Schuchardt wrote: > Clang 9 supports -ffixed-x18. > > Signed-off-by: Heinrich Schuchardt > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH 2/4] trace: clang compatible handling of gd register

2020-07-07 Thread Tom Rini
On Wed, May 27, 2020 at 08:04:22PM +0200, Heinrich Schuchardt wrote: > On ARM systems gd is stored in register r9 or x18. When compiling with > clang gd is defined as a macro calling function gd_ptr(). So we can not > make assignments to gd. > > Use function set_gd() for setting the register on

Re: [PATCH 1/7] arm: vexpress64: Fix counter frequency

2020-07-07 Thread Tom Rini
On Thu, Jun 11, 2020 at 12:03:15PM +0100, Andre Przywara wrote: > The arch timer on 64-bit Arm Ltd. platforms is driven by a 24 MHz > crystal oscillator, so the frequency is not 25165824 MHz, as the current > code suggests. > > Signed-off-by: Andre Przywara > Reviewed-by: Linus Walleij

  1   2   3   4   >