summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* dm: test: Add a way to run SPL testsSimon Glass2020-10-295-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | Add a -u flag for U-Boot SPL which requests that unit tests be run. To make this work, export dm_test_main() and update it to skip test features that are not used with of-platdata. To run the tests: $ spl/u-boot-spl -u U-Boot SPL 2020.10-rc5 (Oct 01 2020 - 07:35:39 -0600) Running 0 driver model tests Failures: 0 At present there are no SPL unit tests. Note that there is one wrinkle with these tests. SPL has limited memory available for allocation. Also malloc_simple does not free memory (free() is a nop) and running tests repeatedly causes driver-model to reinit multiple times and allocate memory. Therefore it is not possible to run more than a few tests at a time. One solution is to increase the amount of malloc space in sandbox_spl. This is not a problem for pytest, since it runs each test individually, so for now this is left as is. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: test: Update the test runner to support of-platdataSimon Glass2020-10-291-11/+16
| | | | | | | | | At present DM tests assume that a devicetree is available. This is not the case with of-platadata. Update the code to add this condition. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: test: Build tests for SPLSimon Glass2020-10-293-1/+12
| | | | | | | We want to run unit tests in SPL. Add a new Kconfig to control this and enable it for sandbox_spl Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: fix typo in device.hDario Binacchi2020-10-291-1/+1
| | | | | | | Replace 'a the' with 'the' in include/dm/device.h. Signed-off-by: Dario Binacchi <dariobin@libero.it> Reviewed-by: Simon Glass <sjg@chromium.org>
* sandbox: make SDL window resizableHeinrich Schuchardt2020-10-291-1/+2
| | | | | | | | | | | | | Without resizing the SDL window showed by ./u-boot -D -l is not legible on a high resolution screen. Allow resizing the window Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* dtoc: Fix widening of int to bytesSimon Glass2020-10-295-2/+24
| | | | | | | | | | | | At present an integer is converted to bytes incorrectly. The whole 32-bit integer is inserted as the first element of the byte array, and the other three bytes are skipped. This was not noticed because the unit test did not check it, and the functional test was checking for wrong values. Update the code to handle this as a special case. Add one more test to cover all code paths. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Allow dm_warn() to be used in SPLSimon Glass2020-10-294-5/+18
| | | | | | | | | | At present this option is disabled in SPL, meaning that warnings are not displayed. It is sometimes useful to see warnings in SPL for debugging purposes. Add a new Kconfig option to permit this. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: Order the structures internally by nameSimon Glass2020-10-292-43/+83
| | | | | | | | | | | | | | | | | | | | | At present the structures are written in name order, but parents have to be written before their children, so the file does not end up being in order. The order of nodes in _valid_nodes matches the order of the devicetree. Update the code so that _valid_nodes is in sorted order, by C name of the structure. This allows us to assign a sequential ordering to each U_BOOT_DEVICE() declaration. U-Boot's linker lists are also ordered alphabetically, which means that the order in the driver_info list will match the order used by dtoc. This defines an index ('idx') for the U_BOOT_DEVICE declarations. They appear in alphabetical order, numbered from 0 in _valid_nodes and in the driver_info linker list. Add a comment against each declaration, showing the idx value. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: Document the return value of scan_structs()Simon Glass2020-10-291-0/+15
| | | | | | | Add documentation to this function as well as generate_structs(), where the return value is ultimately passed in. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Drop ad-hoc device declarations in SPLSimon Glass2020-10-293-0/+7
| | | | | | | Since sandbox's SPL is build with of-platadata, we should not use U_BOOT_DEVICE() declarations as well. Drop them. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: test: Disable some tests that should not run in SPLSimon Glass2020-10-292-7/+13
| | | | | | | | | | | Tests are easier to run in U-Boot proper. Running them in SPL does not add test coverage in most cases. Also some tests use features that are not available in SPL. Update the build rules to disable these tests in SPL. We still need test-main to be able to actually run SPL tests. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: test: Make use of CONFIG_UNIT_TESTSimon Glass2020-10-292-2/+3
| | | | | | | | At present we always include test/dm from the main Makefile. We have a CONFIG_UNIT_TEST that should control whether the test/ directory is built, so rely on that instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: test: Update Makefile conditionsSimon Glass2020-10-291-7/+7
| | | | | | | | | | | At present most of the tests in test/Makefile are dependent on CONFIG_SANDBOX. But this is not ideal since they rely on commands being available and SPL does not support commands. Use CONFIG_COMMAND instead. This has the dual purpose of allowing these tests to be used on other boards and allowing SPL to skip them. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: test: Sort the MakefileSimon Glass2020-10-291-3/+3
| | | | | | Move everything into alphabetical order. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: Avoid using #ifdef for CONFIG_OF_LIVESimon Glass2020-10-296-49/+37
| | | | | | | | | | At present this option results in a number of #ifdefs due to the presence or absence of the global_data of_root member. Add a few macros to global_data.h to work around this. Update the code accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Avoid void * in the of-platdata structsSimon Glass2020-10-291-3/+5
| | | | | | These pointers point to drivers. Update the definition to make this clear. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Expand the comment for DM_GET_DEVICE()Simon Glass2020-10-291-1/+16
| | | | | | | The current documentation for this is not particularly enlightening. Add a little more detail. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: Use a namedtuple for _linksSimon Glass2020-10-291-4/+12
| | | | | | | The use of strings to access a dict is a bit ugly. Use a namedtuple for this instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: Extract inner loop from output_node()Simon Glass2020-10-291-40/+49
| | | | | | | This function is very long. Put the inner loop in a separate function to enhance readability. Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Support multiple images in the librarySimon Glass2020-10-291-0/+7
| | | | | | | | Add support for multiple images, since these are used on x86 now. Select the first image for now, since that is generally the correct one. At some point we can add a way to determine which image is currently running. Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Add a way to read the ROM offsetSimon Glass2020-10-292-1/+13
| | | | | | | | Provide a function to read the ROM offset so that we can store the value in one place and clients don't need to store it themselves after calling binman_set_rom_offset(). Signed-off-by: Simon Glass <sjg@chromium.org>
* configs: Resync with savedefconfigTom Rini2020-10-29144-404/+138
| | | | | | Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
* MAINTAINERS, git-mailrc: Update sunxi maintainersAndre Przywara2020-10-292-3/+3
| | | | | | | | | | | Maxime mentioned that he feels not having the time to be an Allwinner maintainer anymore. Take over from him. Maxime, many thanks for your great work in the past! I hope I can still relay the occasional technical question to you in the future. Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
* Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriqTom Rini2020-10-29141-116/+2396
|\ | | | | | | | | | | - Bug fixes and updates on vid, ls1088a lx2160a and other layerscape platforms. - Add optee_rpmb support for LX2 & Kontron sl28 support
| * configs: ls1088a: enable CMD_MDIOIoana Ciornei2020-10-2310-10/+0
| | | | | | | | | | | | | | | | Enable the CMD_MDIO Kconfig option by removing the "is not set" indication from all the defconfigs for this SoC. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
| * armv8: layerscape: don't remove crypto node if just partially disabledMichael Walle2020-10-231-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On all newer Layerscape SoCs, only the export-controlled ciphers of the crypto module are disabled on non-E parts. Thus it doesn't make sense to completely remove the node. Linux will figure out what is there and what is not. Just remove it for older SoCs, where the module is indeed completely disabled on non-E parts. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Horia Geanta <horia.geanta@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
| * board/freescale/vid: enables writes to all commands for LTC3882Biwen Li2020-10-232-3/+58
| | | | | | | | | | | | | | Enable writes to all commands for LTC3882 Signed-off-by: Biwen Li <biwen.li@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
| * board: freescale: vid.c: Initialize variable 'i2caddress'Priyanka Singh2020-10-231-1/+1
| | | | | | | | | | | | | | Initialize variable 'i2caddress' in print_vdd() to zero Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
| * board: sl28: add board specific nvm commandMichael Walle2020-10-232-1/+179
| | | | | | | | | | | | | | | | | | | | The board supports 16 configuration bits which can be manipulated with this command. See the board's README for a detailed explanation on each bit. Signed-off-by: Michael Walle <michael@walle.cc> Tested-by: Heiko Thiery <heiko.thiery@gmail.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
| * board: kontron: add sl28 supportMichael Walle2020-10-2320-0/+1031
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add basic support for the Kontron SMARC-sAL28 board. This includes just the bare minimum to be able to bring up the board and boot linux. For now, the Single and Dual PHY variant is supported. Other variants will fall back to the basic variant. In particular, there is no watchdog support for now. This means that you have to disable the default watchdog, otherwise you'll end up in the recovery bootloader. See the board README for details. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Heiko Thiery <heiko.thiery@gmail.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
| * dm: pci: fsl: Correct the workaround of erratum A-007815Hou Zhiqiang2020-10-232-4/+18
| | | | | | | | | | | | | | | | | | The register to enable/disable the write-permission of DBI RO registers should be accessed via the CFG_ADDR/CFG_DATA registers instead of accessing directly. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
| * net: lx2160a.c: Update to set ECx_PMUX precedenceRazvan Ionut Cirjan2020-10-233-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | As per hardware documentation, ECx_PMUX has precedence over SerDes protocol. For LX2160/LX2162 if DPMACs 17 and 18 are enabled as SGMII through SerDes protocol but ECx_PMUX configured them as RGMII, then the ports will be configured as RGMII and not SGMII. Signed-off-by: Razvan Ionut Cirjan <razvanionut.cirjan@nxp.com> [Rebased] Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
| * gpio: mpc8xxx: support fsl-layerscape platformhui.song2020-10-231-21/+87
| | | | | | | | | | | | | | Make the MPC8XXX gpio driver to support the fsl-layerscape. Signed-off-by: hui.song <hui.song_1@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
| * configs: lx2160a: Enable OPTEE supportRuchika Gupta2020-10-231-0/+5
| | | | | | | | | | | | | | | | | | Enable support to compile OPTEE driver, access AVB TA and RPMB API's access via RPC from OPTEE for lx2160 Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com> [Rebased] Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
| * cmd: optee_rpmb command for read/write of rpmb from opteeRuchika Gupta2020-10-233-0/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable "optee_rpmb" command to write/read named persistent values created on RPMB by opening session with OPTEE AVB TA. This provides easy test for establishing a session with OPTEE TA and storage of persistent data in MMC RPMB. It includes following subcommands: optee_rpmb read_pvalue:read persistent values on rpmb via OPTEE AVB TA optee_rpmb write_pvalue:write persistent values on rpmb via OPTEE AVB TA Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com> [Rebased] Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
| * pci: layerscape: add a way of specifying additional iommu mappingsLaurentiu Tudor2020-10-233-0/+407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the current implementation, u-boot creates iommu mappings only for PCI devices enumarated at boot time thus does not take into account more dynamic scenarios such as SR-IOV or PCI hot-plug. Add an u-boot env var and a device tree property (to be used for example in more static scenarios such as hardwired PCI endpoints that get initialized later in the system setup) that would allow two things: - for a SRIOV capable PCI EP identified by its B.D.F specify the maximum number of VFs that will ever be created for it - for hot-plug case, specify the B.D.F with which the device will show up on the PCI bus More details can be found in the included documentation: arch/arm/cpu/armv8/fsl-layerscape/doc/README.pci_iommu_extra Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
| * pci: add a few ARI related definesLaurentiu Tudor2020-10-231-0/+6
| | | | | | | | | | | | | | Add a few defines related to PCI ARI configuration. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
| * pci: layerscape: move pci node search in a common functionLaurentiu Tudor2020-10-231-42/+34
| | | | | | | | | | | | | | | | | | Fix duplication of this code by placing it in a common function. Furthermore, the resulting function will be re-used in upcoming patches. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
| * pci: layerscape: move per-pci device fdt fixup in a functionLaurentiu Tudor2020-10-231-26/+34
| | | | | | | | | | | | | | | | | | | | Move the pci device related fdt fixup in a function in order to re-use it in a following patch. While at it, improve the error handling. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> [Rebased] Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
| * configs: Enable NVME support for Layerscape platformsWasim Khan2020-10-23104-0/+208
| | | | | | | | | | | | | | | | Enable CONFIG_NVME and CONFIG_CMD_NVME for Layerscape platforms Signed-off-by: Wasim Khan <wasim.khan@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
* | Prepare v2021.01-rc1Tom Rini2020-10-281-3/+3
| | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com>
* | Merge branch '2020-10-28-mux-driver-framework'Tom Rini2020-10-2821-1/+1461
|\ \ | | | | | | | | | - Add a framework for mux drivers
| * | test: mux-cmd: Add tests for the 'mux' commandPratyush Yadav2020-10-283-0/+179
| | | | | | | | | | | | | | | | | | | | | | | | Tests tests run the three mux subcommands: list, select, and deselect, and verify that the commands do what we expect. Signed-off-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | cmd: Add a mux commandPratyush Yadav2020-10-283-0/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This command lets the user list, select, and deselect mux controllers introduced with the mux framework on the fly. It has 3 subcommands: list, select, and deselect. List: Lists all the mux present on the system. The muxes are listed for each chip. The chip is identified by its device name. Each chip can have a number of mux controllers. Each is listed in sequence and is assigned a sequential ID based on its position in the mux chip. It lists details like ID, whether the mux is currently selected or not, the current state, the idle state, and the number of states. A sample output would look something like: => mux list a-mux-controller: ID Selected Current State Idle State Num States 0 no unknown as-is 0x4 1 no 0x2 0x2 0x10 2 no 0x73 0x73 0x100 another-mux-controller: ID Selected Current State Idle State Num States 0 no 0x1 0x1 0x4 1 no 0x2 0x2 0x4 Select: Selects a given mux and puts it in the specified state. This subcommand takes 3 arguments: mux chip, mux ID, state to set the mux in. The arguments mux chip and mux ID are used to identify which mux needs to be selected, and then it is selected to the given state. The mux needs to be deselected before it can be selected again in another state. The state should be a hexadecimal number. For example: => mux list a-mux-controller: ID Selected Current State Idle State Num States 0 no 0x1 0x1 0x4 1 no 0x1 0x1 0x4 => mux select a-mux-controller 0 0x3 => mux list a-mux-controller: ID Selected Current State Idle State Num States 0 yes 0x3 0x1 0x4 1 no 0x1 0x1 0x4 Deselect: Deselects a given mux and puts it in its idle state. This subcommand takes 2 arguments: the mux chip and mux ID to identify which mux needs to be deselected. So in the above example, we can deselect mux 0 using: => mux deselect a-mux-controller 0 => mux list a-mux-controller: ID Selected Current State Idle State Num States 0 no 0x1 0x1 0x4 1 no 0x1 0x1 0x4 Signed-off-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | test: Add tests for the multiplexer frameworkJean-Jacques Hiblot2020-10-285-0/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide tests to check the behavior of the multiplexer framework. Two sets of tests are added. One is using an emulated multiplexer driver that can be used to test basic functionality like select, deselect, etc. The other is using the mmio mux which adds tests specific to it. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Signed-off-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | Kconfig: Increase the pre-relocation memoryPratyush Yadav2020-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The memory is close to full and adding a syscon node in test.dts makes it go over the limit and makes malloc() fail on startup. Signed-off-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | drivers: mux: mmio-based syscon mux controllerJean-Jacques Hiblot2020-10-283-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a driver for mmio-based syscon multiplexers controlled by bitfields in a syscon register range. This is heavily based on the linux mmio-mux driver. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
| * | dm: board: complete the initialization of the muxes in initr_dm()Jean-Jacques Hiblot2020-10-283-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | This will probe the multiplexer devices that have a "u-boot,mux-autoprobe" property. As a consequence they will be put in their idle state. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
| * | drivers: Add a new framework for multiplexer devicesJean-Jacques Hiblot2020-10-289-0/+606
|/ / | | | | | | | | | | | | | | | | | | | | | | Add a new subsystem that handles multiplexer controllers. The API is the same as in Linux. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Pratyush Yadav <p.yadav@ti.com> [trini: Update some error calls to use different functions or pass correct arguments] Signed-off-by: Tom Rini <trini@konsulko.com>
* | Merge tag 'efi-2021-01-rc2' of ↵Tom Rini2020-10-288-8/+121
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2021-01-rc2 A software RTC driver is supplied for UEFI SCT testing. The following UEFI related bugs are fixed: * correct handling of daylight saving time in GetTime() and SetTime() * handling of the gd register in function tracing on RISC-V * disable U-Boot devices in ExitBootServices()