summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-30Revert "rockchip: Only call binman when TPL available"Jagan Teki
This reverts commit f5315dd6290a588434e4f79bfd2886bb7df9210d. [why] TPL is not mandatory for not all Rockchip SoCs, some SoCs like RK356x, and RK3588 still use mainline u-boot without TPL as their ddr init programs are accessed via binaries provided by Rockchip instead of ddr source code. Marking TPL build makes it not able to build u-boot.itb on RK356x targets so revert this so that it can build an SPL build that would support all across Rockchip platforms. Suggested-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Jagan Teki <jagan@edgeble.ai> Tested-by: Anand Moon <linux.amoon@gmail.com> # CM3
2023-01-27Merge branch '2023-01-27-apple-soc-updates'Tom Rini
First, to quote the author: This series adds support for the PCIe controller found on Apple M1 and M2 machines and enables support for PCIe XHCI controllers. This makes the type-A USB ports on the M1 Mac mini work. Since the use of Apples DART IOMMU is mandatory (these PCIe DARTs don't support bypass mode), this adds DMA mapping operations to the IOMMU uclass and implements them for the Apple DART. It modifies the XHCI driver code to go map DMA buffers through the IOMMU if there is one. Since the M1 Mac mini now has two types of XHCI controllers with different number of ports (2 for the DWC3 controllers, 8 for the Fresco Logic PCIe controller) this uncovered an issue in with the way the hub descriptor is implemented in the XHCI driver. Second, Mark also fixes some Apple-specific instances of CONFIG_IS_ENABLED that should be IS_ENABLED.
2023-01-27Merge tag 'efi-2023-04-rc1-3' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request efi-2023-04-rc1-3 Documentation: * Improve the sl-mx8mm documenation * Clean up README, move some section to HTML * Man-pages for the mtime and sleep command * Description of reducible builds * Document dynamic event handlers UEFI: * Support scrolling in eficonfig command Other: * fix mtest on 64 bit systems
2023-01-27usb: xhci: Fix root hub descriptorMark Kettenis
When a system has multiple XHCI controllers, some of the properties described in the descriptor of the root hub (such as the number of ports) might differ between controllers. Fix this by switching from a single global hub descriptor to a hub descriptor per controller. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Marek Vasut <marex@denx.de>
2023-01-27arm: apple: Enable PCIe USB controllerMark Kettenis
Some Apple Silicon machines have a PCIe XHCI controller in additon to the DWC3 controllers integrated on the SoC. On the Mac mini the Type-A ports are handled by this PCIe controller. Enabling it allows the use of these ports in U-Boot. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2023-01-27pci: Add Apple PCIe controller driverMark Kettenis
This driver supports the PCIe controller on the Apple M1 and M2 SoCs. The code is adapted from the Linux driver. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2023-01-27test: Add test for mapping IOMMUs for PCI devicesMark Kettenis
Test that we correctly probe an IOMMU that is mapped by an "iommu-map" device tree property of a PCIe controller node. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27iommu: Implement mapping IOMMUs for PCI devicesMark Kettenis
Systems such as Apple's M1 and M2 SoCs may have separate IOMMUs for each PCIe root port. In this case the right IOMMU for a PCI device behind a particular root port is described by an "iommu-map" property in the device tree. Parse this property and use it to find the right IOMMU device for PCI devices. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2023-01-27usb: xhci: Implement DMA mappingMark Kettenis
An XHCI controller that sits behind an IOMMU needs to map and unmap its memory buffers to do DMA. Implement this by inroducing new xhci_dma_map() and xhci_dma_unmap() helper functions. The xhci_dma_map() function replaces the existing xhci_virt_to_bus() function in the sense that it returns the bus address in the case of simple address translation in the absence of an IOMMU. The xhci_bus_to_virt() function is eliminated by storing the CPU address of the allocated scratchpad memory in struct xhci_ctrl. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Marek Vasut <marex@denx.de>
2023-01-27iommu: apple: Implement DMA mapping operations for Apple DARTMark Kettenis
Implement translation table support for all the variations of Apple's DART IOMMU that can be found on Apple's M1 and M2 SoCs. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2023-01-27test: Add test for IOMMU uclass map/unmap opsMark Kettenis
Test that the map and unmap operations work for devices that have DMA translated by an IOMMU and devices that don't have DMA translated by an IOMMU. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27iommu: Add DMA mapping operationsMark Kettenis
In order to support IOMMUs in non-bypass mode we need device ops to map and unmap DMA memory. The map operation enters a mapping for a region specified by CPU address and size into the translation table of the IOMMU and returns a DMA address suitable for programming the device to do DMA. The unmap operation removes this mapping from the translation table of the IOMMU. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2023-01-27serial: s5p: Use IS_ENABLED where appropriateMark Kettenis
There are no SPL/TPL variants of CONFIG_CLK_EXYNOS and CONFIG_ARCH_APPLE, so switch from CONFIG_IS_ENABLED to IS_ENABLED. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27Merge branch '2023-01-27-assorted-updates'Tom Rini
- TI j721s2 support, Nuvoton npcm8xx updates, bouncebuf fix, mkimage fix so you can adjust the magic image, pinctrl fixes, ifwitool bugfix
2023-01-27mkimage: fit: Support signed configurations in 'auto' FITsMassimo Pegorer
Extend support for signing in auto-generated (-f auto) FIT. Previously, it was possible to get signed 'images' subnodes in the FIT using options -g and -o together with -f auto. This patch allows signing 'configurations' subnodes instead of 'images' ones (which are hashed), using option -f auto-conf instead of -f auto. Adding also -K <dtb> and -r options, will add public key to <dtb> file with required = "conf" property. Summary: -f auto => FIT with crc32 images -f auto -g ... -o ... => FIT with signed images -f auto-conf -g ... -o ... => FIT with sha1 images and signed confs Example: FIT with kernel, two device tree files, and signed configurations; public key (needed to verify signatures) is added to u-boot.dtb with required = "conf" property. mkimage -f auto-conf -A arm -O linux -T kernel -C none -a 43e00000 \ -e 0 -d vmlinuz -b /path/to/first.dtb -b /path/to/second.dtb \ -k /folder/with/key-files -g keyname -o sha256,rsa4096 \ -K u-boot.dtb -r kernel.itb Example: Add public key with required = "conf" property to u-boot.dtb without needing to sign anything. This will also create a useless FIT named unused.itb. mkimage -f auto-conf -d /dev/null -k /folder/with/key-files \ -g keyname -o sha256,rsa4096 -K u-boot.dtb -r unused.itb Signed-off-by: Massimo Pegorer <massimo.pegorer@vimar.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27common: bouncebuf: Use dma-mapping for cache opsAndrew Davis
This matches how this would be done in Linux and these functions do the alignment for us which makes the code look cleaner. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27include: configs: Update env for selecting right dtbSinthu Raja
Now that single defconfig shall be used for booting J721S2 EVM and AM68 SK, the default device tree will not work for selecting dtb for kernel. Update the findfdt env to select right dtb based on board_name env variable. Signed-off-by: Sinthu Raja <sinthu.raja@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-01-27arm: dts: k3-am68-sk: Add r5 specific dt supportSinthu Raja
Add initial support for AM68 SK device tree that runs on R5. Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2023-01-27arm: dts: Add support for A72 specific AM68 Starter Kit Base BoardSinthu Raja
The SK architecture comprises of baseboard and a SOM board. The AM68 Starter Kit's baseboard contains most of the actual connectors, power supply etc. The System on Module (SoM) is plugged on to the base board. Therefore, add support for peripherals brought out in the base board. Schematics: https://www.ti.com/lit/zip/SPRR463 Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2023-01-27arm: dts: Add initial support for AM68 Starter Kit System on ModuleSinthu Raja
AM68 Starter Kit (SK) is a low cost, small form factor board designed for TI’s AM68 SoC. TI’s AM68 SoC comprises of dual core A72, high performance vision accelerators, hardware accelerators, latest C71x DSP, high bandwidth real-time IPs for capture and display. The SoC is power optimized to provide best in class performance for industrial applications. AM68 SK supports the following interfaces: * 16 GB LPDDR4 RAM * x1 Gigabit Ethernet interface * x1 USB 3.1 Type-C port * x2 USB 3.1 Type-A ports * x1 PCIe M.2 M Key * 512 Mbit OSPI flash * x2 CSI2 Camera interface (RPi and TI Camera connector) * 40-pin Raspberry Pi GPIO header SK's System on Module (SoM) contains the SoC, PMIC, DDR and OSPI flash. Therefore, add support for the components present on the SoM. Schematics: https://www.ti.com/lit/zip/SPRR463 TRM: http://www.ti.com/lit/pdf/spruj28 Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2023-01-27board: ti: j721s2: Add board_init and support for selecting DT based on EEPROMSinthu Raja
Add the board_init_f API for SPL and run the platform-required SoC initialization. Add the functionality for board name-based DTB selection from FIT within SPL. This will make it easier to utilise one defconfig for both the EVM and the SK. Signed-off-by: Sinthu Raja <sinthu.raja@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-01-27arch: mach-k3: Update board specific API name to K3 generic API nameSinthu Raja
Although the board_init_f API initialises the SoC, the API name is incorrectly specified and misleads the functionality. This file should only include k3-specific functionality. Change the API's name to something more K3-specific and separate the function to make it more modular. Signed-off-by: Sinthu Raja <sinthu.raja@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-01-27board: ti: j721s2: Add support for detecting multiple device treesSinthu Raja
Update the board_fit_config_name_match() to choose the right dtb based on the board name read from EEPROM. Also restrict multpile EEPROM reads by verifying if EEPROM is already read Signed-off-by: Sinthu Raja <sinthu.raja@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-01-27board: ti: j721s2: Enable support for reading EEPROM at next alternate addressSinthu Raja
J721S2 EVM has EEPROM populated at 0x50. AM68 SK has EEPROM populated at next address 0x51 in order to be compatible with RPi. So start looking for TI specific EEPROM at 0x50, if not found look for EEPROM at 0x51. Signed-off-by: Sinthu Raja <sinthu.raja@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-01-27board: ti: j721s2: Add support to update board_name for am68-skSinthu Raja
Update setup_board_eeprom_env() to choose the right board name for am68-sk. Signed-off-by: Sinthu Raja <sinthu.raja@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-01-27configs: j721s2_evm: Enable configs to store env in MMC FAT partitionSinthu Raja
J721S2 EVM used to store env on eMMC, since EVM and SK uses same defconfig and there is no eMMC on SK, we need to keep env in an interface which available on both EVM and SK. So, save env in FAT partition of MMC SD Card. Enable defconfigs relevant for storing env on FAT partition of MMC. Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2023-01-27configs: j721s2_evm_a72: Enable support for building multiple dtbs into FITSinthu Raja
Enable configs for building multiple dtbs into a single fit image and load the right dtb for next stage. Add k3-am68-sk-base-board dtb along with evm dtb inside DTB FIT image. This helps to use same defconfig for both EVM and SK Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2023-01-27configs: j721s2_evm_r5: Enable support for building multiple dtbs into FITSinthu Raja
Enable configs for building multiple dtbs into a single fit image and load the right dtb for next stage. This will help to use same defconfig for both EVM and SK. Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2023-01-27MAINTAINERS: add include/power/ to POWERJohn Keeping
Add the related include files to the power MAINTAINERS entry. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27ifwitool: Fix member accessSimon Glass
On a second and third look, a recent patch seems to be writing to the wrong place - updating offsets from the address of the pointer instead of what the pointer points to. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 2d1b2ac13fe ("tool: ifwitool: Fix buffer overflow") Acked-by: Sean Anderson <seanga2@gmail.com>
2023-01-27pinctrl: fix docstringMichael Walle
Fix the copy and paste error. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27pinctrl: get rid of some ifdefferyMichael Walle
Don't define an empty version for pinconfig_post_bind(). Just guard the call and let the linker garbage collection do the rest. This way, we also don't have to do any guesswork. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Marek Vasut <marex@denx.de>
2023-01-27pinctrl: don't fall back to pinctrl_select_state_simple()Michael Walle
If CONFIG_PINCTRL_FULL is enabled, never fall back to the simple implementation. pinctrl_select_state() is called for each device and it is expected to fail. A fallback to the simple imeplementation doesn't make much sense. To keep the return code consistent, we need to change the -EINVAL (which was ignored before) to -ENOSYS. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27arm: npcm8xx: add security feature headerJim Liu
The NPCM driver can use on npcm7xx/npcm8xx so add npcm8xx header for driver. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-01-27ARM: config: enable function for nuvoton npcm845 bmcJim Liu
Enable npcm845 i2c、ethernet、REGULATOR and security feature Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-01-27ARM: dts: npcm8xx: add npcm845 function nodeJim Liu
Add functaion node list as below: 1. i2c 2. gmac 3. otp 4. aes 5. sha 6. rng 7. serial Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-01-27efi_loader: don't use HandleProtocolHeinrich Schuchardt
HandleProtocol() is deprecrated. According to the UEFI specification it should be implemented as a call to OpenProtocolInterface() with a hard coded agent handle. This implies that we would have to call CloseProtocolInterfaces() after usage with the same handle. Getting rid of an EFI_CALL() is also appreciated. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-27eficonfig: increase the number of menu entriesMasahisa Kojima
Current eficonfig has the maximum number of menu entries and it is 99. If there are more EFI load options and files in the system, eficonfig can not handle it. This commit increases this maximum number of menu entries to INT_MAX. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-27eficonfig: add vertical scroll supportMasahisa Kojima
The current eficonfig menu does not support vertical scroll, so it can not display the menu entries greater than the console row size. This commit add the vertial scroll support. The console size is retrieved by SIMPLE_TEXT_OUTPUT_PROTOCOL.QueryMode() service, then calculates the row size for menu entry by subtracting menu header and description row size from the console row size. "start" and "end" are added in the efimenu structure. "start" keeps the menu entry index at the top, "end" keeps the bottom menu entry index. item_data_print() menu function only draws the menu entry between "start" and "end". This commit also fixes the issue that "Save" and "Quit" entries can be moved by BKEY_PLUS in change boot order menu. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-27eficonfig: refactor change boot order implementationMasahisa Kojima
This commit removes the change boot order specific menu implementation. The change boot order implementation calls eficonfig_process_common() same as other menus. The change boot order menu requires own item_data_print and item_choice implementation, but display_statusline function can be a same function as other menus. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-27eficonfig: refactor eficonfig_process_common functionMasahisa Kojima
Current change boot order implementation does not call eficonfig_process_common() and call own menu functions for display_statusline, item_data_print and item_choice. Change boot order functionality should call eficonfig_process_common() to improve maintenanceability. This commit is a preparation to remove the change boot order specific implementation. The menu functions (display_statusline, item_data_print and item_choice) are added as argument of eficonfig_process_common(). The menu description string displayed at the bottom of the menu is also added as argument. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-27efi_loader: fix comment in ESRT codeHeinrich Schuchardt
There is no variable num_pages in function efi_esrt_allocate_install(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-27README: remove 'U-Boot Porting Guide' sectionHeinrich Schuchardt
This section does not match the standards of our documentation. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-01-27doc: move directory hierarchy to HTMLHeinrich Schuchardt
Move section 'Directory hierarchy' from file README to the HTML documentation. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27README: remove section 'Versioning'Heinrich Schuchardt
The information is already maintained in doc/develop/release_cycle.rst. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27doc: move 'Reproducible builds'Heinrich Schuchardt
Move the README section to the HTML documentation. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27README: replace references to CHANGELOGHeinrich Schuchardt
Board configurations are in configs/ and not in the Makefile. git log is the adequate way to identify who contributed to our source. scripts/get_maintainer.pl is the correct way to identify maintainers. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27README: remove NetBSD sectionHeinrich Schuchardt
The information in this section is outdated. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27README: rework contribution advicesHeinrich Schuchardt
Remove description of coding standards and patch submission process. Link to the relevant HTML documentation instead. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27README: correct path to sandbox.rstHeinrich Schuchardt
sandbox.rst was moved. Fixes: 2851cc94f301 ("dm: Add documentation for host command and implementation") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>