aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-02-23Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usbWIP/23Feb2022Tom Rini10-130/+66
- OMAP EHCI updates
2022-02-23Merge tag 'dm-pull-22222' of https://gitlab.denx.de/u-boot/custodians/u-boot-dmTom Rini30-152/+1140
binman fixes/improvements to FIT generator binman SPL fixes moveconfig support regex matches
2022-02-23configs: omap various: Remove OMAP_EHCI_PHY from defconfigsAdam Ford6-16/+0
With the Kconfig options being deleted, the references to OMAP_EHCI_PHY are useless. Remove them from the various defconfigs. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-02-23usb: ehci-omap: Remove OMAP_EHCI_PHYx_RESET_GPIO from KconfigAdam Ford1-34/+0
With the omap-ehci driver now using the phy subsystem to enable and disable reset, the driver no longer needs to know which GPIO's are used, and they can be removed from Kconfig. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-02-23usb: ehci-omap: Use PHY system to manage phy resetsAdam Ford1-50/+56
There are a few boards that use hard-coded GPIO definitions in their respective defconfig files. If the GPIO's are listed in their device trees, the nop-phy can toggle the GPIO's, so the EHCI driver does not need to know anything about the GPIO's. Add functions for getting the phys and remove the GPIO toggles since the phy will now do that. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-02-23usb: ehci-omap: Make Kconfig select PHY if USB_EHCI_OMAPAdam Ford1-0/+2
The USB_EHCI_OMAP driver currently has a series of Kconfig options which let users specify a GPIO for the reset pin. Some devices may have only one reset, while others might have more. Since there is a nop phy driver, let's selct enable the PHY system, and imply the nop phy driver. The nop phy driver can now toggle the reset pins when putting the phy in and out of reset. If the gpio is listed under the phy, it will get toggled and the hard-coded config options specifying the GPIO numbers can eventually go away. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-02-23phy: nop-phy: Fix enabling resetAdam Ford1-2/+3
The reset function should place the phy into reset, while the init function should take the phy out of reset. Currently the reset function takes it out of reset, and the init calls the reset. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-02-23usb: ehci-omap: Move omap_ehci_hcd_init to omap_ehci_probeAdam Ford1-1/+6
The OMAP3 hierarchy has the ehci node as a sub-node of the usbhshost. The usbhshost node contains an ohci and an ehci subnode. The configuration of the ehci belongs in the EHCI node and not its parent. Move it to the proper probe. usb start starting USB... Bus ehci@48064800: USB EHCI 1.00 Bus usb_otg_hs@480ab000: Port not available. scanning bus ehci@48064800 for devices... 3 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found Signed-off-by: Adam Ford <aford173@gmail.com>
2022-02-23usb: ehci-omap: Drop dead codeAdam Ford2-29/+1
omap_ehci_hcd_stop appears to be dead code, and omap_ehci_hcd_init is only called by the probe function, so it can be static to that function. Remove both from the header along with some additional checking for DM_USB. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-02-22scripts: dtc: libfdt: fdt_ro.c: always define fdt_check_fullPhilippe Reynes1-1/+7
On some configs (like stm32mp15_dhcom_basic_defconfig), if configs SPL_LOAD_FIT_FULL and SPL_FIT_FULL_CHECK are enabled. Then the compilatio fails with the following error: arm-linux-gnueabi-ld.bfd: boot/image-fit.o: in function `fit_check_format': <PATH>/uboot/u-boot-stm/boot/image-fit.c:1641: undefined reference to `fdt_check_full' scripts/Makefile.spl:509: recipe for target 'spl/u-boot-spl' failed This issue happens because the function fdt_check_full is only defined if "!defined(FDT_ASSUME_MASK) || FDT_ASSUME_MASK != 0xff". But this function may be called even if this condition are not verified. To avoid this issue, the function fdt_check_full is always defined. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-22phy: phy-uclass: check the parents for physAngus Ainslie1-6/+14
The port/hub leaf nodes don't contain the phy definitions in some dts files so check the parents. Signed-off-by: Angus Ainslie <angus@akkea.ca> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-22binman: Allow different operations in FIT generator nodesSimon Glass5-49/+274
At present we only support expanding out FDT nodes. Make the operation into an @operation property, so that others can be supported. Re-arrange and tidy up the documentation so that it has separate headings for each topic. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22binman: Tidy up the docs a little with fitSimon Glass2-14/+16
Add a few quotes and clarify the data property. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22binman: fit: Refactor to reduce function sizeSimon Glass1-43/+71
Split subnode and property processing into separate functions to make the _AddNode() function a little smaller. Tweak a few comments. This does not change any functionality. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22binman: Move entry-data collection into a Entry methodSimon Glass3-10/+118
Collecting the data from a list of entries and putting it in a file is a useful operation that will be needed by other entry types. Put this into a method in the Entry class. Add some documentation about how to collect data for an entry type. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22binman: Add a ELF test file with disjoint text sectionsSimon Glass3-1/+56
Add a file that has two text sections at different addresses, so we can test this behaviour in binman, once added. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22binman: Support a list of strings with the mkimage etypeSimon Glass3-4/+26
At present the 'args' property of the mkimage entry type is a string. This makes it difficult to include CONFIG options in that property. In particular, this does not work: args = "-n CONFIG_SYS_SOC -E" since the preprocessor does not operate within strings, nor does this: args = "-n" CONFIG_SYS_SOC" "-E" since the device tree compiler does not understand string concatenation. With this new feature, we can do: args = "-n", CONFIG_SYS_SOC, "-E"; Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22binman: Add to the TODOSimon Glass1-0/+8
Add some ideas that have come to mind recently. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22binman: Add support for TEE BL32Roger Quadros6-0/+62
Add an entry for OP-TEE Trusted OS 'BL32' payload. This is required by platforms using Cortex-A cores with TrustZone technology. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org> Add missing-blob-help, renumber the test file, update entry-docs: Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22elf: Add a way to read segment information from an ELF fileSimon Glass2-2/+66
Add a function which reads the segments and the entry address. Also fix a comment nit in the tests while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22binman: Update docs to indicate mkimage is supportedSimon Glass1-2/+2
Now that there is a mkimage entry-type, update the docs to remove the future reference. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22dtoc: Support reading a list of argumentsSimon Glass3-0/+28
It is helpful to support a string or stringlist containing a list of space-separated arguments, for example: args = "-n fred", "-a", "123"; This resolves to the list: -n fred -a 123 which can be passed to a program as arguments. Add a helper to do the required processing. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22dtoc: Allow deleting nodes and adding them in the same syncSimon Glass2-0/+13
This does not work at present, since the current algorithm assumes that either there are no nodes or all nodes have an offset. If a node is new, but an old node is still in the tree, then syncing fails due to this assumption. Fix it and add a test. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22dtoc: Support deleting a nodeSimon Glass2-0/+26
Add a function to delete a node. This is synced to the tree when requested. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22dtoc: Support adding a string list to a device treeSimon Glass2-0/+26
Add a new function to add a string list. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22spl: Allow disabling binman symbols in SPLSimon Glass2-0/+28
When CONFIG_SPL_FIT is enabled we do not access U-Boot directly in the image, since it is embedded in a FIT which is parsed at runtime. Provide a CONFIG option to drop the symbols in this case. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22spl: x86: Correct the binman symbols for SPLSimon Glass3-7/+7
These symbols are incorrect, meaning that binman cannot find the associated entry. This leads to errors like: binman: Section '/binman/simple-bin': Symbol '_binman_spl_prop_size' in entry '/binman/simple-bin/u-boot-spl/u-boot-spl-nodtb': Entry 'spl' not found in list (mkimage,u-boot-spl-nodtb, u-boot-spl-bss-pad,u-boot-spl-dtb,u-boot-spl,u-boot-img,main-section) Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22moveconfig: Allow regex matches when finding combinationsSimon Glass1-2/+22
It is useful to be able to search for CONFIG options that match a regex, such as this, which lists boards which define SPL_FIT_GENERATOR and anything not starting with ROCKCHIP: ./tools/moveconfig.py -f SPL_FIT_GENERATOR ~ROCKCHIP.* Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22moveconfig: Show the config name rather than the defconfigSimon Glass1-1/+14
The _defconfig suffix is unnecessary when showing matching boards. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-22binman: Correct the error message for a bad hash algorithmSimon Glass2-2/+2
This shows an internal type at present, rather than the algorithm name. Fix it and update the test to catch this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-02-22binman: Update image positions of FIT subentriesAlper Nebi Yasak2-0/+163
Binman keeps track of positions of each entry in the final image, but currently this data is wrong for things included in FIT entries, especially since a previous patch makes FIT a subclass of Section and inherit its implementation. There are three ways to put data into a FIT image. It can be directly included as a "data" property, or it can be external to the FIT image represented by an offset-size pair of properties. This external offset is either "data-position" from the start of the FIT or "data-offset" from the end of the FIT, and the size is "data-size" for both. However, binman doesn't use the "data-offset" method while building FIT entries. According to the Section docstring, its subclasses should calculate and set the correct offsets and sizes in SetImagePos() method. Do this for FIT subentries for the three ways mentioned above, and add tests for the two ways binman can pack them in. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-22binman: Skip processing "hash" subnodes of FIT subsectionsAlper Nebi Yasak4-14/+97
Binman's FIT entry type can have image subentries with "hash" subnodes intended to be processed by mkimage, but not binman. However, the Entry class and any subclass that reuses its implementation tries to process these unconditionally. This can lead to an error when boards specify hash algorithms that binman doesn't support, but mkimage supports. Let entries skip processing these "hash" subnodes based on an instance variable, and set this instance variable for FIT subsections. Also re-enable processing of calculated and missing properties of FIT entries which was disabled to mitigate this issue. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-21Merge branch '2022-02-21-platform-updates'WIP/21Feb2022Tom Rini13-113/+229
- Assorted updates / fixes for Apple, TI and Aspeed platforms
2022-02-21ti: i2c: fix probe_chip() return valueNikita Yushchenko1-1/+1
Per documentation, dm_i2c_ops.probe_chip() shall return -EREMOTEIO if probe fails. Currently, omap_i2c_probe_chip() returns 1 instead. Fix that. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2022-02-21crypto: aspeed: fix polling RSA status wrong issueNeal Liu1-1/+1
Check interrupt status to see if RSA engine is completed. After completion of the task, write-clear the status to finish operation. Add missing register base for completion. Fixes: 89c36cca0b6 ("crypto: aspeed: Add AST2600 ACRY support") Signed-off-by: Neal Liu <neal_liu@aspeedtech.com> Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
2022-02-21arm: dts: k3-j7200: Fix up MAIN R5FSS cluster mode back to Split-modeSuman Anna1-0/+4
The default U-Boot environment variables and design are all set up for the MAIN R5FSS cluster to be in Split-mode. This is the setting used when the dts nodes were originally added in v2021.01 U-Boot and the dt nodes are synched with the kernel binding property names in commit 468ec2f3ef8f ("remoteproc: k3_r5: Sync to upstreamed kernel DT property names") merged in v2021.04-rc2. The modes for the MAIN R5FSS cluster got switched back to LockStep mode by mistake in commit fa09b12dc5f6 ("arm: ti: k3: Resync dts files and bindings with Linux Kernel v5.14") in v2022.01-rc1. This throws the following warning messages when early-booting the cores using default env variables, k3_r5f_rproc r5f@5d00000: Invalid op: Trying to start secondary core 7 in lockstep mode Load Remote Processor 3 with data@addr=0x82000000 83148 bytes: Failed! Fix this by switching back both the clusters to the expected Split-mode. Make this mode change in the u-boot specific dtsi file to avoid such sync overrides in the future until the kernel dts is also switched to Split-mode by default. Fixes: fa09b12dc5f6 ("arm: ti: k3: Resync dts files and bindings with Linux Kernel v5.14") Signed-off-by: Suman Anna <s-anna@ti.com>
2022-02-21arm: omap3: Make some memory functions static and clean headersAdam Ford4-25/+18
There are a few memory functions for both the emif4 (AM3517) and sdrc (OMAP35/DM37) code that can be defined as static, because those functions are not used externally. Make them static and clean up some of the corresponding headers. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-02-21arm: omap3: Cleanup sys_info to fit OMAP3 booting with LTOAdam Ford2-38/+5
With LTO enabled, some functions appear to be optimized in a way that causes hanging on some OMAP3 boards after some unrelated patches were applied. The solution appears to make several functions __used. There also appears be to be some dead code, so remove it while cleaning this up. This has been tested on a general purpose OMAP3530, DM3730, and AM3517. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-02-21arm: dts: k3-j721e-r5-common-proc-board: tps659413: Correct the min/max ↵Keerthy1-3/+3
voltages of VDD_CPU Correct the min/max voltages of VDD_CPU. As per data sheet the VDD_CPU minimum voltage is .6V & maximum voltage is .9V. Correct the same. While at it fix the comment to reflect VDD_CPU instead of VDD_MPU. Data Sheet Link: https://www.ti.com/lit/gpn/dra829v Signed-off-by: Keerthy <j-keerthy@ti.com>
2022-02-21iommu: Add M1 Pro/Max support to Apple DART driverJanne Grunau1-0/+1
For the purpose of this driver (activating bypass mode) t6000-dart and t8103-dart are fully compatible. Signed-off-by: Janne Grunau <j@jannau.net> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2022-02-21doc: board: apple: Update Apple M1 documentationMark Kettenis1-5/+28
U-Boot now supports NVMe storage and on the laptop models, the SPI keyboard. Since we now disable the debug console by default provide instructions on how the enable the debug console including a table listing the appropriate UART base address for each of the supported SoCs. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2022-02-21arm: apple: Disable debug UARTMark Kettenis1-1/+0
The address of the debug UART varies differs between the M1 and the M1 Pro/Max SoCs. So we have to disable it to make a single U-Boot binary that works on all SoC generations. Leave the settings for the base address and clock rate of the M1 in place to make it easier to re-enable the debug UART when needed. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2022-02-21arm: apple: Add M1 Pro/Max supportMark Kettenis1-39/+168
Choose the memory map based on the compatible property from the device tree passed to us by m1n1. Since DRAM on the M1 Pro/Max starts at a different address avoid hardcoding the top of usable memory. Also make sure that the addresses entered into the memory map are page aligned such that we don't crash in dcache_enable(). Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Tested on: Macbook M1 Max Tested-by: Janne Grunau <j@jannau.net>
2022-02-21Merge tag 'xilinx-for-v2022.04-rc3' of ↵Tom Rini34-128/+493
https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2022.04-rc3 microblaze: - Fix exception handler zynqmp: - Show information about secure images - DT changes (som u-boot file removal) - Fix zynqmp_pm_cfg_obj_convert.py - Fix platform boot xilinx: - Fix bootm_size calculation - Remove GPIO_EXTRA_HEADER selection power: - Add zynqmp power management driver scsi: - Add phy support to ceva driver zynq qspi: - Fix unaligned accesses and check baudrate setup - Add support for spi memory operations net: - Fix 64bit calculation in axi_emac video: - Add missing gpio dependency for seps driver
2022-02-21arm64: zynqmp: Remove additional gpio header from dlc21Michal Simek1-1/+0
This header shouldn't be in this file and there is already pointer to dt-bindings/gpio/gpio.h. Fixes: d2d14383bae4 ("arm64: zynqmp: Add support for DLC21 (Smartlynq+) board") Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/266bc91073f1149f3f60b1c9c0ba509c48470e2e.1644911870.git.michal.simek@xilinx.com
2022-02-21arm64: zynqmp: Fix debug uart initializationMichal Simek4-11/+35
The commit 0dba45864b2a ("arm: Init the debug UART") calls debug_uart_init() from crt0.S but it won't work because SOC is not configured yet. That's why create board_debug_uart_init() which calls psu_init() via new psu_uboot_init() earlier before the first access to UART in SPL. In full U-Boot call psu_uboot_init() only when CONFIG_ZYNQMP_PSU_INIT_ENABLED is enabled. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/878dc2daaa8685346f889989fbfb98b2e44da7fb.1645104518.git.michal.simek@xilinx.com
2022-02-21ARM: zynq: Fix debug uart initializationMichal Simek3-6/+17
The commit 0dba45864b2a ("arm: Init the debug UART") calls debug_uart_init() from crt0.S but it won't work because SOC is not configured yet. That's why create board_debug_uart_init() which calls ps7_init() earlier before the first access to UART. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/18e67e02a0c7190839a1ef3a11f3fd6babcf34cc.1645104518.git.michal.simek@xilinx.com
2022-02-21arm64: zynqmp: Fix dependencies around ZYNQMP_PSU_INIT_ENABLEDMichal Simek3-1/+3
ZYNQMP_PSU_INIT_ENABLED is called only when BOARD_EARLY_INIT_F is defined that's why cover this dependency in Kconfig. board_early_init_f() is only part related to CONFIG_ZYNQMP_PSU_INIT_ENABLED which is disabled now that's why disable BOARD_EARLY_INIT_F and also build board_early_init_f() only when CONFIG_BOARD_EARLY_INIT_F is enabled. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/d89253ec1590cd513dcd4bfbedebae618bd6d605.1645104518.git.michal.simek@xilinx.com
2022-02-21arm64: zynqmp: Build psu_spl_init for SPL all the timeMichal Simek2-2/+1
ZYNQMP_PSU_INIT_ENABLED specifically saying that has connection to full U-Boot not SPL that's why build psu_spl_init for SPL all the time. Also disable ZYNQMP_PSU_INIT_ENABLED because it ends up in situation that psu_init() is called twice which is wrong. By default only SPL should call it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/bf1e5d9a163f8853c7d951ad42965114ab0b1f50.1645104518.git.michal.simek@xilinx.com
2022-02-21xilinx: Enable OF_BOARD for zynq and zynqmp boardsMichal Simek3-1/+4
The commit 985503439762 ("fdt: Don't call board_fdt_blob_setup() without OF_BOARD") forced to enable OF_BOARD for platforms which provide DT externally. Zynq/ZynqMP boards are using this feature for a long time that's why there is a need to enable it by default. Also code expects to return error in case of error that's why also fill it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/9f11bbffe2849f4da7d72712082d579262fe8fd8.1645104518.git.michal.simek@xilinx.com