[PATCH v2 49/49] x86: chromebook_samus_tpl: Correct the image layout

2020-06-13 Thread Simon Glass
At present there is not enough space for U-Boot due to the EFI loader. Correct this. Signed-off-by: Simon Glass --- Changes in v2: - Add patches to partially migrate rockchip to use binman configs/chromebook_samus_tpl_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 45/49] rockchip: Drop the fit_spl_optee.sh script

2020-06-13 Thread Simon Glass
Now that all board use binman instead of this script, drop it. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/mach-rockchip/fit_spl_optee.sh | 84 - 1 file changed, 84 deletions(-) delete mode 100755 arch/arm/mach-rockchip/fit_spl_optee.sh diff --git a/

[PATCH v2 46/49] x86: Move the fdtmap away from the binary blobs

2020-06-13 Thread Simon Glass
This causes conflicts on chromebook_link64. Move it to after U-Boot where there should be plenty of space. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/dts/u-boot.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/dts/u-boot.dtsi b/arch/x86/d

[PATCH v2 44/49] rockchip: Convert evb-rk3229 over to use binman

2020-06-13 Thread Simon Glass
At present this board uses a custom script to produce the .its file. Update it to use binman instead. Binman can create all the images that are needed. Signed-off-by: Simon Glass --- (no changes since v1) Makefile | 1 + configs/evb-rk3229_defconfig | 2 +- 2 files changed,

[PATCH v2 43/49] rockchip: Convert evb-rk3288 over to use binman

2020-06-13 Thread Simon Glass
At present this board uses a custom script to produce the .its file. Update it to use binman instead. Binman can create all the images that are needed. Signed-off-by: Simon Glass --- (no changes since v1) Kconfig | 2 +- arch/arm/dts/rk322x-u-boot.dtsi | 72 +++

[PATCH v2 47/49] x86: chromebook_link64: Correct the image layout

2020-06-13 Thread Simon Glass
At present the image layout is not correct, since it uses the SDRAM address of the 64-bit U-Boot as the ROM address. Fix this. Signed-off-by: Simon Glass --- (no changes since v1) configs/chromebook_link64_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/chromebook_link6

[PATCH v2 48/49] x86: chromebook_panther: Correct the image layout

2020-06-13 Thread Simon Glass
This board does not have microcode but at present that is not supported by Kconfig nor the binman image layout. Fix both of these. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/Kconfig| 7 ++- arch/x86/dts/u-boot.dtsi| 6 +- configs/chrom

[PATCH v2 41/49] Makefile: Allow CONFIG_SPL_FIT_GENERATOR to be empty

2020-06-13 Thread Simon Glass
At present we use the empty string to indicate that there is no FIT generator, but this doesn't allow an individual board to undefine it. Create a separate bool instead. Update the config of the boards which currently have an empty string. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v2 40/49] Makefile: Fix a long line in cmd_mkfitimage

2020-06-13 Thread Simon Glass
Fix this line which is over the limit. Signed-off-by: Simon Glass --- (no changes since v1) Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c3fe2cb8a5..6e0fbfe8d3 100644 --- a/Makefile +++ b/Makefile @@ -994,7 +994,8 @@ cmd_mkimage = $(o

[PATCH v2 39/49] Makefile: Move CONFIG_TOOLS_DEBUG check to later

2020-06-13 Thread Simon Glass
At present this is checked before the config has been loaded by the Makefile, so it doesn't work. Move the check to later. Signed-off-by: Simon Glass --- (no changes since v1) Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7009eb7be7.

[PATCH v2 36/49] tegra: Makefile: Drop explicit targets built by binman

2020-06-13 Thread Simon Glass
On tegra various files that need to be created by binman. It does not make sense to enumerate these in the Makefile. They are described in the configuration (devicetree) for each board and we can simply run binman (always) to generate them. This avoid sprinkling the Makefile with arch-specific cod

[PATCH v2 42/49] Makefile: Warn against using CONFIG_SPL_FIT_GENERATOR

2020-06-13 Thread Simon Glass
This option is used to run arch-specific shell scripts which produce .its files which are used to produce FIT images. We already have binman which is designed to produce firmware images. It is more powerful and has tests. So this option should be deprecated and not used. Existing uses should be mi

[PATCH v2 33/49] x86: Makefile: Drop explicit targets built by binman

2020-06-13 Thread Simon Glass
On x86 various files that need to be created by binman. It does not make sense to enumerate these in the Makefile. They are described in the configuration (devicetree) for each board and we can simply run binman (always) to generate them. Update the Makefile to have a separate, final step which ru

[PATCH v2 38/49] rockchip: Makefile: Drop explicit targets built by binman

2020-06-13 Thread Simon Glass
On rockchip various files that need to be created by binman. It does not make sense to enumerate these in the Makefile. They are described in the configuration (devicetree) for each board and we can simply run binman (always) to generate them. This avoid sprinkling the Makefile with arch-specific

[PATCH v2 37/49] mediatek: Makefile: Drop explicit targets built by binman

2020-06-13 Thread Simon Glass
On mediatek various files that need to be created by binman. It does not make sense to enumerate these in the Makefile. They are described in the configuration (devicetree) for each board and we can simply run binman (always) to generate them. This avoid sprinkling the Makefile with arch-specific

[PATCH v2 30/49] tegra: Don't enable binman on ARMv8 SoCs

2020-06-13 Thread Simon Glass
At present only the ARMv7 tegra SoCs actually use binman to create an image. Change the config to reflect this, since otherwise running binman will produce an error. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/mach-tegra/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH v2 31/49] Makefile: Rename ALL-y to INPUTS-y

2020-06-13 Thread Simon Glass
When binman is in use, most of the targets built by the Makefile are inputs to binman. We then need a final rule to run binman to produce the final outputs. Rename the variable to indicate this, and add a new 'inputs' target. Signed-off-by: Simon Glass --- (no changes since v1) Makefile

[PATCH v2 28/49] rockchip: Enable building a SPI ROM image on bob

2020-06-13 Thread Simon Glass
Add a simple binman config and enable CONFIG_HAS_ROM so that U-Boot produces a ROM for bob. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/dts/rk3399-gru-u-boot.dtsi | 4 arch/arm/dts/rk3399-gru.dtsi | 2 +- arch/arm/dts/rk3399-u-boot.dtsi | 27 ++

[PATCH v2 29/49] tegra: Drop the unused non-binman code

2020-06-13 Thread Simon Glass
This has been in the Makefile long enough to ensure migration is complete. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) Makefile | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 07c237120d..fa5f556fb9 100644 --- a/M

[PATCH v2 27/49] rockchip: Enable building a SPI ROM image on jerry

2020-06-13 Thread Simon Glass
Add a simple binman config and enable CONFIG_HAS_ROM so that U-Boot produces a ROM for jerry. Change the binman image definition to support multiple images, since it may be used to build both u-boot-rockchip.bin and u-boot.rom Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/dts/

[PATCH v2 32/49] powerpc: mpc85xx: Only enable binman when it is needed

2020-06-13 Thread Simon Glass
Quite a few boards using this SoC family don't use binman, yet CONFIG_BINMAN is enabled for all of them. But the option should only be enabled if we expect binman to produce an image. Calling binman when the device tree is missing, etc. will cause failer. Add a condition so that CONFIG_BINMAN is o

[PATCH v2 25/49] rockchip: jerry: Add serial support

2020-06-13 Thread Simon Glass
This option allows the serial console to work correctly. Add it. Signed-off-by: Simon Glass --- (no changes since v1) configs/chromebook_jerry_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig index 443e3cdace

[PATCH v2 35/49] sunxi: Makefile: Drop explicit targets built by binman

2020-06-13 Thread Simon Glass
On sunxi various files that need to be created by binman. It does not make sense to enumerate these in the Makefile. They are described in the configuration (devicetree) for each board and we can simply run binman (always) to generate them. This avoid sprinkling the Makefile with arch-specific cod

[PATCH v2 34/49] x86: Drop CONFIG_BUILD_ROM and repurpose BUILD_ROM

2020-06-13 Thread Simon Glass
This Kconfig is not needed anymore since U-Boot will build the ROM if the required binary blobs exist. The BUILD_ROM environment variable used to request that the ROM be built. Now this always happens if the required binary blobs are available. Update it to mean that U-Boot should fail if the ROM

[PATCH v2 26/49] rockchip: bob: Support SPI-flash booting

2020-06-13 Thread Simon Glass
Update the config for chromebook_bob to support booting from SPI flash. The existing SPL size is too small since ATF is needed, so double it. Signed-off-by: Simon Glass --- (no changes since v1) configs/chromebook_bob_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --g

[PATCH v2 23/49] rockchip: Allow Bob to use SPI boot

2020-06-13 Thread Simon Glass
Bob is a Chromebook and can boot from SPI flash. Add it to the condition check for this. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/mach-rockchip/spl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip

[PATCH v2 24/49] Makefile: Allow building .rom files for non-x86 boards

2020-06-13 Thread Simon Glass
Some non-x86 devices can use SPI flash to boot and need to produce images of a fixed size to program the flash. Add a way to handle this for non-x86 boards. Signed-off-by: Simon Glass --- (no changes since v1) Makefile | 12 1 file changed, 12 insertions(+) diff --git a/Makefile

[PATCH v2 20/49] dtoc: Allow adding variable-sized data to a dtb

2020-06-13 Thread Simon Glass
Add a method for adding a property containing arbitrary bytes. Make sure that the tree can expand as needed in this case. Signed-off-by: Simon Glass --- (no changes since v1) tools/dtoc/fdt.py | 17 +++-- tools/dtoc/test_fdt.py | 4 2 files changed, 19 insertions(+), 2 d

[PATCH v2 21/49] binman: Add support for generating a FIT

2020-06-13 Thread Simon Glass
FIT (Flat Image Tree) is the main image format used by U-Boot. In some cases scripts are used to create FITs within the U-Boot build system. This is not ideal for various reasons: - Each architecture has its own slightly different script - There are no tests - Some are written in shell, some in Py

[PATCH v2 22/49] x86: rockchip: Change how selection of ROMs works

2020-06-13 Thread Simon Glass
Most x86 boards build a u-boot.rom which is programmed into SPI flash. But this is not unique to x86. For example some rockchip boards can also boot from SPI flash. Also, at least on x86, binary blobs are sadly quite common. It is not possible to build a functional image without them, and U-Boot n

[PATCH v2 11/49] binman: Use super() instead of specifying parent type

2020-06-13 Thread Simon Glass
It is easier and less error-prone to use super() when the parent type is needed. Update binman to remove the type names. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/etype/_testing.py | 4 ++-- tools/binman/etype/blob.py | 2 +- to

[PATCH v2 14/49] binman: Allow external binaries to be missing

2020-06-13 Thread Simon Glass
Sometimes it is useful to build an image even though external binaries are not present. This allows the build system to continue to function without these files, albeit not producing valid images. U-Boot does with with ATF (ARM Trusted Firmware) today. Add a new flag to binman to request this beh

[PATCH v2 19/49] mkimage: Allow updating the FIT timestamp

2020-06-13 Thread Simon Glass
Normally the FIT timestamp is created the first time mkimage is run on a FIT, when converting the source .its to the binary .fit file. This corresponds to using the -f flag. But if the original input to mkimage is a binary file (already compiled) then the timestamp is assumed to have been set previ

[PATCH v2 16/49] binman: Detect when valid images are not produced

2020-06-13 Thread Simon Glass
When external blobs are missing, show a message indicating that the images are not functional. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/control.py | 16 +++-- tools/binman/entry.py | 21 + tools/binm

[PATCH v2 18/49] binman: Allow zero-length entries to overlap

2020-06-13 Thread Simon Glass
Some binary blobs unfortunately obtain their position in the image from other binary blobs, such as Intel's 'descriptor'. In this case we cannot rely on packing to work. It is not possible to produce a valid image in any case, due to the missing blobs. Allow zero-length overlaps so that this does

[PATCH v2 13/49] binman: Convert existing binary blobs to blob_ext

2020-06-13 Thread Simon Glass
Many of the existing blobs rely on external binaries which may not be available. Move them over to use blob_ext to indicate this. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/etype/cros_ec_rw.py | 1 + tools/binman/etype/intel_cmc.py

[PATCH v2 17/49] binman: Allow missing Intel blobs

2020-06-13 Thread Simon Glass
Update the Intel blob entries to support missing binaries. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/etype/intel_descriptor.py | 7 - tools/binman/etype/intel_ifwi.py | 17 --- tools/binman/etype/section.py | 4 +-- tools/binman/ftest.py

[PATCH v2 12/49] binman: Add an etype for external binary blobs

2020-06-13 Thread Simon Glass
It is useful to be able to distinguish between ordinary blobs such as u-boot.bin and external blobs that cannot be build by the U-Boot build system. If the external blobs are not available for some reason, then we know that a value image cannot be built. Introduce a new 'blob-ext' entry type for t

[PATCH v2 15/49] patman: Update errors and warnings to use stderr

2020-06-13 Thread Simon Glass
When warnings and errors are produced by tools they should be written to stderr. Update the tout implementation to handle this. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/ftest.py | 2 +- tools/patman/tout.py | 5 - 2 files changed, 5 insertions(+), 2 deletions(-)

[PATCH v2 10/49] binman: Re-enable concurrent tests

2020-06-13 Thread Simon Glass
With the change to absolute imports the concurrent tests feature unfortunately broke. Fix it. We cannot easy add a warning, since the output messes up tests which check the output. Signed-off-by: Simon Glass --- (no changes since v1) tools/patman/test_util.py | 4 +++- 1 file changed, 3 inser

[PATCH v2 07/49] binman: Add support for calling mkimage

2020-06-13 Thread Simon Glass
As a first step to integrating mkimage into binman, add a new entry type that feeds data into mkimage for processing and incorporates that output into the image. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/README.entries | 23 tools/binman/etype/_testin

[PATCH v2 09/49] binman: Adjust pylibfdt for incremental build

2020-06-13 Thread Simon Glass
If the pylibfdt shared-object file is detected, then Python assumes that the libfdt.py file exists also. Sometimes when an incremental build aborts, the shared-object file is built but the libfdt.py is not. The only way out at this point is to use 'make mkproper', or similar. Fix this by removing

[PATCH v2 04/49] binman: cbfs: Fix IFWI typo

2020-06-13 Thread Simon Glass
This comment references the wrong thing. Fix it. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/etype/cbfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/binman/etype/cbfs.py b/tools/binman/etype/cbfs.py index e9aed8310c..744a32fa0c 100644 --- a

[PATCH v2 03/49] binman: Output errors to stderr

2020-06-13 Thread Simon Glass
At present binman outputs errors to stdout which means that fails are effectively silent when printed by buildman, for example. Fix this by outputing errors to stderr. Signed-off-by: Simon Glass --- Changes in v2: - Add new binman patch to output errors to stderr tools/binman/main.py | 2 +- 1

[PATCH v2 00/49] rockchip: x86: Support building ROM files automatically with binman

2020-06-13 Thread Simon Glass
Rockchip-based Chromebooks support booting from SPI flash. It is annoying to have to manually build the SPI image when the SD image is built automatically. This feature is already available for x86 devices, so the existing mechanism is reused. Briefly, this allows a BUILD_ROM environment variable

[PATCH v2 06/49] binman: Specify the toolpath when running test coverage

2020-06-13 Thread Simon Glass
At present binman's test coverage runs without a toolpath set. This means that the system tools will be used. That may not be correct if they are out of date or missing and this can result in a reduction in test coverage below 100%. Provide the toolpath to binman in this case. Signed-off-by: Simo

[PATCH v2 01/49] dm: core Fix long line in device_bind_common()

2020-06-13 Thread Simon Glass
Fix an over-length line in this function. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/core/device.c b/drivers/core/device.c index a7408d9c76..2e3d555ea4 100644 --- a/drivers/core/device

[PATCH v2 02/49] .gitignore: Ignore Python 3 cache directories

2020-06-13 Thread Simon Glass
These can appear when moving between branches that have different tools in the tree. Ignore them. Signed-off-by: Simon Glass --- (no changes since v1) .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 2e1c8bf2bf..e66aa864da 100644 --- a/.gitignore

[PATCH v2 08/49] binman: Fix a few typos in the entry docs

2020-06-13 Thread Simon Glass
Some typos have been fixed in the code but the entry docs were not regenerated. Fix this. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/README.entries | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/binman/README.entries b/tools/binman/README.e

[PATCH v3 34/35] dm: acpi: Enhance acpi_get_name()

2020-06-13 Thread Simon Glass
For many device types it is possible to figure out the name just by looking at its uclass or parent. Add a function to handle this, since it allows us to cover the vast majority of cases automatically. However it is sometimes impossible to figure out an ACPI name for a device just by looking at it

[PATCH v2 05/49] binman: Correct the search patch for pylibfdt

2020-06-13 Thread Simon Glass
Now that binman uses tools/ as its base directory for importing modules, the path to the pylibfdt build by U-Boot is incorrect. Fix it with a new path. Signed-off-by: Simon Glass --- Changes in v2: - Leave the old (object-directory) path in place tools/binman/main.py | 1 + 1 file changed, 1 i

[PATCH v3 32/35] x86: Allow devices to write to DSDT

2020-06-13 Thread Simon Glass
Call the new core function to inject ASL programmatically into the DSDT. This is made up of fragments generated by devices that have the inject_dsdt() method. The normal, compiled ASL file is added after this. Signed-off-by: Simon Glass --- Changes in v3: - Refactor the code to remove the extra

[PATCH v3 33/35] pci: Avoid a crash in device_is_on_pci_bus()

2020-06-13 Thread Simon Glass
This function cannot currently be called on the root node. Add a check for this as well as a test. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) include/dm/device.h | 2 +- test/dm/pci.c | 14 ++ 2 files changed, 15 insertions(+), 1 dele

[PATCH v3 35/35] acpi: Add an acpi command to list/dump generated ACPI items

2020-06-13 Thread Simon Glass
Add a command that shows the individual blocks of data generated by each device, effectively splitting the full table into its component parts. This can be helpful for debugging. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v3: - Update acpi_dump_items() to take an en

[PATCH v3 29/35] acpi: Support ordering SSDT data by device

2020-06-13 Thread Simon Glass
Add a /chosen property to control the order in which the data appears in the SSDT. This allows matching up U-Boot's output from a dump of the known-good data obtained from within Linux. Signed-off-by: Simon Glass --- Changes in v3: - Make find_item() static and rename to find_acpi_item() - Renam

[PATCH v3 31/35] acpi: Add support for DSDT generation

2020-06-13 Thread Simon Glass
Some devices need to inject extra code into the Differentiated System Descriptor Table (DSDT). Add a method to handle this. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v3: - Fix 'THe' typo - Rename build_type() to sort_acpi_item_type() Changes in v1: - Generalise th

[PATCH v3 30/35] x86: Allow devices to write an SSDT

2020-06-13 Thread Simon Glass
Call the new core function to write the SSDT. This is made up of fragments generated by devices that have the fill_ssdt() method. Signed-off-by: Simon Glass --- Changes in v3: Drop coreboot_acpi_ids enum Changes in v1: - Use OEM_TABLE_ID instead of ACPI_TABLE_CREATOR - Update ACPI_DSTATUS enum

[PATCH v3 27/35] x86: acpi: Move MADT down a bit

2020-06-13 Thread Simon Glass
Put this table before MCFG so that it matches the order that coreboot uses when passing tables to Linux. This is a cosmetic change since the order of the tables does not otherwise matter. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) Changes in v1: - Correc

[PATCH v3 28/35] acpi: Record the items added to SSDT

2020-06-13 Thread Simon Glass
It is useful to be able to control the order of data written to the SSDT so that we can compare the output against known-good kernel dumps. Add code to record each item that is added along with the device that added it. That allows us to reorder things later if needed. Signed-off-by: Simon Glass

[PATCH v3 25/35] acpi: Add support for a generic power sequence

2020-06-13 Thread Simon Glass
Add a way for devices to enable and disable themselves using ACPI code that updates GPIOs. This takes several timing parameters and supports enable, reset and stop. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) include/acpi/acpi_device.h | 41 +

[PATCH v3 26/35] acpi: Add support for SSDT generation

2020-06-13 Thread Simon Glass
Some devices need to generate code for the Secondary System Descriptor Table (SSDT). Add a method to handle this. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v3: - Fix 'THe' typo Changes in v1: - Switch parameter order of _acpi_fill_ssdt() and make it static - Fix '

[PATCH v3 22/35] acpi: Add support for various misc ACPI opcodes

2020-06-13 Thread Simon Glass
Add more functions to handle some miscellaneous ACPI opcodes. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v3: - Fix function name in comment for acpigen_write_not() - Use #defines for the mask values include/acpi/acpigen.h | 117

[PATCH v3 24/35] acpi: Add support for writing a GPIO power sequence

2020-06-13 Thread Simon Glass
Power to some devices is controlled by GPIOs. Add a way to generate ACPI code to enable and disable a GPIO so that this can be handled within an ACPI method. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) include/acpi/acpigen.h | 12 +++ lib/acpi/acpige

[PATCH v3 19/35] acpi: Support writing Device Properties objects via _DSD

2020-06-13 Thread Simon Glass
More complex device properties can be provided to drivers via a device-specific data (_DSD) object. To create this we need to build it up in a separate data structure and then generate the ACPI code, due to its recursive nature. Add an implementation of this. Signed-off-by: Simon Glass Reviewed

[PATCH v3 23/35] acpi: Add support for writing a Power Resource

2020-06-13 Thread Simon Glass
These are used in ACPI to disable power to various pats of the system when in sleep. Add a way to create a power resource, with the caller finishing off the details. Reviewed-by: Wolfgang Wallner Signed-off-by: Simon Glass --- (no changes since v1) include/acpi/acpigen.h | 22

[PATCH v3 20/35] acpi: Support writing a GPIO

2020-06-13 Thread Simon Glass
Allowing writing out a reference to a GPIO within the ACPI output. This can be used by ACPI code to access a GPIO at runtime. Signed-off-by: Simon Glass --- Changes in v3: - Use an enum for the GPIO priority - Add error checking include/acpi/acpi_dp.h | 20 lib/acpi/acpi_d

[PATCH v3 21/35] acpi: Support copying properties from device tree to ACPI

2020-06-13 Thread Simon Glass
Some drivers in Linux support both device tree and ACPI. U-Boot itself uses Linux device-tree bindings for its own configuration but does not use ACPI. It is convenient to copy these values over to the device tree for passing to linux. Add some convenience functions to help with this. Signed-off-

[PATCH v3 18/35] acpi: Support writing a UUID

2020-06-13 Thread Simon Glass
ACPI supports writing a UUID in a special format. Add a function to handle this. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) include/acpi/acpigen.h | 13 + lib/acpi/acpigen.c | 38 ++ test/dm/acpigen.c

[PATCH v3 17/35] acpi: Support writing a name

2020-06-13 Thread Simon Glass
ACPI supports storing names which are made up of multiple path components. Several special cases are supported. Add a function to emit a name. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) include/acpi/acpigen.h | 25 +++ include/test/ut.h | 1

[PATCH v3 14/35] acpigen: Support writing a package

2020-06-13 Thread Simon Glass
A package collects together several elements. Add an easy way of writing a package header and updating its length later. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v3: - Fix 'easy of testing' typo - Move two function comments into the previous patch include/acpi/a

[PATCH v3 16/35] acpi: Support writing a string

2020-06-13 Thread Simon Glass
ACPI supports storing a simple nul-terminated string. Add support for this. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) include/acpi/acpigen.h | 10 ++ lib/acpi/acpigen.c | 6 ++ test/dm/acpigen.c | 32 ++

[PATCH v3 15/35] acpi: Support writing an integer

2020-06-13 Thread Simon Glass
ACPI supports storing integers in various ways. Add a function to handle this. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) include/acpi/acpigen.h | 17 ++ lib/acpi/acpigen.c | 51 ++ test/dm/acpigen

[PATCH v3 13/35] acpigen: Support writing a length

2020-06-13 Thread Simon Glass
It is convenient to write a length value for preceding a block of data. Of course the length is not known or is hard to calculate a priori. So add a way to mark the start on a stack, so the length can be updated when known. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in

[PATCH v3 11/35] acpi: Support generation of I2C descriptor

2020-06-13 Thread Simon Glass
Add a function to write a GPIO descriptor to the generated ACPI code. Reviewed-by: Wolfgang Wallner Signed-off-by: Simon Glass --- Changes in v3: - Update comment in acpi_device_set_i2c() to talk about scope parameter Changes in v2: - Fix memset of I2C descriptor drivers/i2c/sandbox_i2c.c |

[PATCH v3 07/35] gpio: Add a method to convert a GPIO to ACPI

2020-06-13 Thread Simon Glass
When generating ACPI tables we need to convert GPIOs in U-Boot to the ACPI structures required by ACPI. This is a SoC-specific conversion and cannot be handled by generic code, so add a new GPIO method to do the conversion. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no change

[PATCH v3 12/35] acpi: Support generation of SPI descriptor

2020-06-13 Thread Simon Glass
Add a function to write a SPI descriptor to the generated ACPI code. Signed-off-by: Simon Glass --- Changes in v3: - Make acpi_device_write_spi() static - Add an extra comment about scope to acpi_device_set_spi() - Use BIT() in a few places - Resist the temptation to go to >80 characters Change

[PATCH v3 10/35] acpi: Support generation of a GPIO/irq for a device

2020-06-13 Thread Simon Glass
Some devices use interrupts but some use GPIOs. Since these are fully specified in the device tree we can automatically produce the correct ACPI descriptor for a device. Add a function to handle this. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- Changes in v3: - Fix 'an GPIO is

[PATCH v3 09/35] acpi: Support generation of GPIO descriptor

2020-06-13 Thread Simon Glass
Add a function to write a GPIO descriptor to the generated ACPI code. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) include/acpi/acpi_device.h | 22 ++ lib/acpi/acpi_device.c | 151 + test/dm/acpigen.c

[PATCH v3 08/35] acpi: Support string output

2020-06-13 Thread Simon Glass
Add support for output of strings and streams of bytes. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) include/acpi/acpigen.h | 19 +++ lib/acpi/acpigen.c | 14 ++ test/dm/acpigen.c | 42 +

[PATCH v3 02/35] acpi: Add a function to get a device path and scope

2020-06-13 Thread Simon Glass
Add a function to build up the ACPI path for a device and another for its scope. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner Reviewed-by: Bin Meng --- Changes in v3: - s/NUL/NULL/ for the NUL character, since that is in more common use Changes in v1: - Split into more patches for

[PATCH v3 05/35] acpi: Support generation of ACPI code

2020-06-13 Thread Simon Glass
Add a new file to handle generating ACPI code programatically. This is used when information must be dynamically added to the tables, e.g. the SSDT. Initial support is just for writing simple values. Also add a 'base' value so that the table can be freed. This likely doesn't happen in normal code,

[PATCH v3 03/35] acpi: Add a way to check device status

2020-06-13 Thread Simon Glass
At present U-Boot does not support the different ACPI status values, but it is best to put this logic in a central place. Add a function to get the device status. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) include/acpi/acpi_device.h | 28 +++

[PATCH v3 06/35] acpi: Support generation of interrupt descriptor

2020-06-13 Thread Simon Glass
Add a function to write an interrupt descriptor to the generated ACPI code. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes since v1) include/acpi/acpi_device.h | 15 + lib/acpi/acpi_device.c | 118 + test/dm/acpigen.c

[PATCH v3 04/35] irq: Add a method to convert an interrupt to ACPI

2020-06-13 Thread Simon Glass
When generating ACPI tables we need to convert IRQs in U-Boot to the ACPI structures required by ACPI. This is a SoC-specific conversion and cannot be handled by generic code, so add a new IRQ method to do the conversion. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- (no changes

[PATCH v3 00/35] dm: Add programmatic generation of ACPI tables (part B)

2020-06-13 Thread Simon Glass
This is split from the original series in an attempt to get things applied in chunks. This part includes: - writing basic ACPI code for integers, strings, names, packages - writing descriptors for GPIO, I2C, interrupts, SPI - writing code to enable/disable ACPI peripherals via GPIOs - writing SSDT

[PATCH v3 01/35] dm: core: Add an ACPI name for the root node

2020-06-13 Thread Simon Glass
This always has a fixed ACPI name so add it as a driver function. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner Reviewed-by: Bin Meng --- (no changes since v1) Changes in v1: - Capitalise ACPI_OPS_PTR drivers/core/root.c | 13 + 1 file changed, 13 insertions(+) diff

Re: [PATCH 09/10] dtoc: update dtb_platdata to support cd-gpios

2020-06-13 Thread Simon Glass
Hi Walter, On Mon, 8 Jun 2020 at 10:01, Walter Lozano wrote: > > Hi Simon > > On 4/6/20 12:59, Simon Glass wrote: > > On Fri, 29 May 2020 at 12:15, Walter Lozano > > wrote: > >> Currently dtoc does not support the property cd-gpios used to declare > >> the gpios for card detect in mmc. > >> > >

Re: [PATCH v2 15/23] ti: Drop panda board

2020-06-13 Thread Tom Rini
On Sun, Jun 14, 2020 at 12:15:59AM +0100, Peter Robinson wrote: > >> > > > > > DM, DM_SPI and other driver model migration deadlines > >> > > > > > are expired for this board. > >> > > > > > > >> > > > > > Drop it. > >> > > > > > > >> > > > > > Cc: Lokesh Vutla > >> > > > > > Signed-off-by: Jagan

Re: [PATCH v2 15/23] ti: Drop panda board

2020-06-13 Thread Peter Robinson
>> > > > > > DM, DM_SPI and other driver model migration deadlines >> > > > > > are expired for this board. >> > > > > > >> > > > > > Drop it. >> > > > > > >> > > > > > Cc: Lokesh Vutla >> > > > > > Signed-off-by: Jagan Teki >> > > > > >> > > > > Please hold this patch. I see patches in ML for co

Re: [PATCH v2 5/5] arm: qemu: override flash accessors to use virtualizable instructions

2020-06-13 Thread Ard Biesheuvel
On Thu, 11 Jun 2020 at 10:17, Ard Biesheuvel wrote: > > Some instructions in the ARM ISA have multiple output registers, such > as ldrd/ldp (load pair), where two registers are loaded from memory, > but also ldr with indexing, where the memory base register is incremented > as well when the value

Re: [PATCH v3 3/3] fastboot: Add default fastboot_set_reboot_flag implementation

2020-06-13 Thread Roman Stratiienko
Hi Roman, ср, 10 июн. 2020 г. в 19:37, Roman Kovalivskyi : > > Default implementation of fastboot_set_reboot_flag function that depends > on "bcb" commands could be used in general case if there are no need to > make any platform-specific implementation, otherwise it could be > disabled via Kconfi

Re: [PATCH v2 15/23] ti: Drop panda board

2020-06-13 Thread Jagan Teki
On Sun, 14 Jun, 2020, 01:09 Tom Rini, wrote: > On Sun, Jun 14, 2020 at 01:05:53AM +0530, Jagan Teki wrote: > > On Sun, 14 Jun, 2020, 01:02 Peter Robinson, > wrote: > > > > > On Sat, Jun 13, 2020 at 7:24 PM Jagan Teki > > > > wrote: > > > > > > > > On Fri, Jun 5, 2020 at 10:01 AM Lokesh Vutla >

Re: [PATCH] musb-new: Use predefined configuration data for SUN50I_H6

2020-06-13 Thread Roman Stratiienko
чт, 14 мая 2020 г. в 09:44, Roman Stratiienko : > > CC: ja...@amarulasolutions.com > > пт, 8 мая 2020 г. в 15:29, Roman Stratiienko : > > > > Same was done in the kernel for all devices compatible with > > 'allwinner,sun8i-a33-musb' at [1] and [2]. > > > > Fixes musb initialization on H6 SOC. > > >

Re: [PATCH v2 15/23] ti: Drop panda board

2020-06-13 Thread Tom Rini
On Sun, Jun 14, 2020 at 01:05:53AM +0530, Jagan Teki wrote: > On Sun, 14 Jun, 2020, 01:02 Peter Robinson, wrote: > > > On Sat, Jun 13, 2020 at 7:24 PM Jagan Teki > > wrote: > > > > > > On Fri, Jun 5, 2020 at 10:01 AM Lokesh Vutla wrote: > > > > > > > > Hi Jagan, > > > > > > > > On 27/05/20 6:26

Re: [PATCH v2 15/23] ti: Drop panda board

2020-06-13 Thread Jagan Teki
On Sun, 14 Jun, 2020, 01:02 Peter Robinson, wrote: > On Sat, Jun 13, 2020 at 7:24 PM Jagan Teki > wrote: > > > > On Fri, Jun 5, 2020 at 10:01 AM Lokesh Vutla wrote: > > > > > > Hi Jagan, > > > > > > On 27/05/20 6:26 pm, Jagan Teki wrote: > > > > DM, DM_SPI and other driver model migration deadl

Re: [PATCH v2 15/23] ti: Drop panda board

2020-06-13 Thread Peter Robinson
On Sat, Jun 13, 2020 at 7:24 PM Jagan Teki wrote: > > On Fri, Jun 5, 2020 at 10:01 AM Lokesh Vutla wrote: > > > > Hi Jagan, > > > > On 27/05/20 6:26 pm, Jagan Teki wrote: > > > DM, DM_SPI and other driver model migration deadlines > > > are expired for this board. > > > > > > Drop it. > > > > > >

[PATCH] ARM: dts: stm32: add seeed studio odyssey-stm32mp157c board

2020-06-13 Thread Marcin Sloniewski
This commit adds device tree files supporting SBC from Seeed Studio based on STM32MP157C. This works with generic stm32mp1 config. Right now only booting from SD card is supported. Signed-off-by: Marcin Sloniewski --- arch/arm/dts/Makefile | 3 +- .../dts/odyssey-stm

Re: [PATCH v2 21/23] silica: Drop pengwyn

2020-06-13 Thread Jagan Teki
On Wed, May 27, 2020 at 6:27 PM Jagan Teki wrote: > > OF_CONTROL, DM_SPI and other driver model migration deadlines > are expired for this board. > > Drop it. > > Cc: Lothar Felten Any comments?

Re: [PATCH v2 19/23] gumstix: Drop pepper

2020-06-13 Thread Jagan Teki
On Wed, May 27, 2020 at 6:27 PM Jagan Teki wrote: > > OF_CONTROL, DM_SPI and other driver model migration deadlines > are expired for this board. > > Drop it. > > Cc: Ash Charles Any comments?

Re: [PATCH v2 18/23] birdland: Drop bav335x

2020-06-13 Thread Jagan Teki
On Wed, May 27, 2020 at 6:27 PM Jagan Teki wrote: > > OF_CONTROL, DM_SPI and other driver model migration deadlines > are expired for this board. > > Drop it. > > Cc: Gilles Gameiro Any comments?

  1   2   >