aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-08Merge https://source.denx.de/u-boot/custodians/u-boot-watchdogWIP/08Mar2022Tom Rini4-18/+28
- Update MAINTAINERS file (Stefan) - wdt-uclass.c: add a property u-boot, noautostart (Philippe) - armada_37xx: Probe driver also when watchdog is already running (Pali) - rti_wdt: Add 10% safety margin to clock frequency (Jan)
2022-03-08Merge branch '2022-03-08-assorted-fixes'Tom Rini9-19/+62
- mkimage. serial uclass, mailmap and gitgnore fixes
2022-03-08board: .gitignore: replace dsdt.c by dsdt_generated.cPhilippe Reynes6-18/+18
Since commit 5d94cbd1dca7 ("scripts: Makefile.lib: generate dsdt_generated.c instead of dsdt.c"), the file generated is named dsdt_generated.c instead of dsdt.c. So all files .gitignore referencing dsdt.c should be upated with dsdt_generated.c. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-03-08drivers: serial: Make sure we really return a serial deviceMark Kettenis1-1/+2
The stdout-path property in the device tree does not necessarily point at a serial device. On machines such as the Apple M1 laptops where the serial port isn't easy to access and users expect to see console output on the integrated display stdout-path may point at the device tree node for the framebuffer for example. If stdout-path does not point at a node for a serial device, the serial_check_stdout() will not find a bound device and will drop down into code that attempts to use lists_bind_fdt() to bind a device anyway. However, that fallback code does not check that the uclass of the device is UCLASS_SERIAL. So if stdout-path points at the framebuffer instead of the serial device it will return a UCLASS_VIDEO device. Since the code that calls this function expects the returned device to be a UCLASS_SERIAL device, U-Boot will crash as soon as it attempts to send output to the console. Add a check here to verify that the uclass of the bound device really is UCLASS_SERIAL. If it isn't, serial_check_stdout() will return an error and serial_find_console_or_panic() will use the serial device with sequence number 0 as the console and all is fine. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-03-08.mailmap: Fix Heinrich's xypron.glpk@gmx.de recordMichal Simek1-0/+1
There is one issue with Heinrich xypron.glpk@gmx.de <xypron.glpk@gmx.de> record which should be specifically grouped with his name. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2022-03-08tools: mkimage: Call verify_header after writing image to diskPali Rohár1-0/+41
If image backend provides verify_header callback then call it after writing image to disk. This ensures that written image is correct. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-03-08watchdog: rti_wdt: Add 10% safety margin to clock frequencyJan Kiszka1-3/+11
When running against RC_OSC_32k, the watchdog may suffer from running faster than expected, expiring earlier. The Linux kernel adds a 10% margin to the timeout calculation by slowing down the read clock rate accordingly. Do the same here, also to have comparable preset values for both drivers. Along this, fix the name of the local var holding to frequency - in Hz, not kHz. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Roese <sr@denx.de>
2022-03-08watchdog: armada_37xx: Probe driver also when watchdog is already runningPali Rohár1-14/+3
If Armada 37xx watchdog is started before U-Boot then CNTR_CTRL_ACTIVE bit is set, U-Boot armada-37xx-wdt.c driver fails to initialize and so U-Boot is unable to use or kick this watchdog. Do not check for CNTR_CTRL_ACTIVE bit and always initialize watchdog. Same behavior is implemented in Linux kernel driver. This change allows to activate watchdog in firmware which loads U-Boot. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-08drivers: watchdog: wdt-uclass.c: add a property u-boot, noautostartPhilippe Reynes1-1/+6
Since commit 492ee6b8d0e7 ("watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset()"), all the watchdog are started when the config WATCHDOG_AUTOSTART. To avoid a binary choice none/all, a property u-boot,noautostart may be added in the watchdog node of the u-boot device tree to not autostart this watchdog. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-08MAINTAINERS: Add watchdog maintainers entryStefan Roese1-0/+8
I've been handling "inofficially" the watchdog related patches for a few years now. Let's make this official and add a tree for it and also add myself here in the MAINTAINERS file. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Harald Seiler <hws@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-03-05Merge https://source.denx.de/u-boot/custodians/u-boot-sunxiWIP/05Mar2022Tom Rini7-37/+69
- Fix ARMv5/F1C100 FEL booting - Fix F1C100 reset - Introduce proper F1C100 boot method detection - Enable SPI booting for F1C100 Boot tested from FEL, SPI, SD card and eMMC (where applicable) on Pine64-LTS, Pine-H64, BananaPi M1, OrangePi Zero, LicheePi Nano(F1C100).
2022-03-05Merge branch '2022-03-04-assorted-minor-fixes'Tom Rini10-23/+74
- mailmap file updates, OpenSSL code cleanup, assorted TI platform fixes, typo fix.
2022-03-04lib: rsa: use actual OpenSSL 1.1.0 EVP MD APIWIP/2022-03-04-assorted-minor-fixesYann Droneaud1-5/+3
Since OpenSSL 1.1.0, EVP_MD_CTX_create() is EVP_MD_CTX_new() EVP_MD_CTX_destroy() is EVP_MD_CTX_free() EVP_MD_CTX_init() is EVP_MD_CTX_reset() As there's no need to reset a newly created EVP_MD_CTX, moreover EVP_DigestSignInit() does the reset, thus call to EVP_MD_CTX_init() can be dropped. As there's no need to reset an EVP_MD_CTX before it's destroyed, as it will be reset by EVP_MD_CTX_free(), call to EVP_MD_CTX_reset() is not needed and can be dropped. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
2022-03-04.mailmap: Record all address for main U-Boot contributorMichal Simek1-2/+20
Based on looking at top contributors it was seen that top statistics from top contributors don't include all contributions from different email addresses. That's why I checked all top contributors are checked it. git shortlog -n $START..$END -e -s The patch is adding mapping for Bin Meng, Marek Vasut, Masahiro Yamada, Michal Simek, Tom Rini, Wolfgang Denk. And also use mapping for Stefan Roese and Wolfgang Denk to be properly counted. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-04mkimage: error handling for FIT imageHeinrich Schuchardt1-1/+6
If parameter -F is given but FIT support is missing, a NULL pointer might dereferenced (Coverity CID 350249). If incorrect parameters are given, provide a message and show usage. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-03-04cmd: pwm: fix typo 'eisable' -> 'disable'Sébastien Szymanski1-1/+1
Fixed misspelled 'disable' in help text. Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2022-03-04arm: dts: iot2050: Add cfg register space for ringacc and udmapJan Kiszka1-1/+24
Recent unrelated fixes (9876ae7db6da) revealed that we were missing bits from 2af181b53e28 in the IOT2050 dt. Add them, but only for main U-Boot. SPL loads from QSPI only, thus cannot use DMA. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-03-04configs: j721e_*_evm_a72_defconfig: Enable config for setting mmc speed modeAswath Govindraju2-0/+2
Enable config for setting mmc speed mode from U-Boot command line. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-03-04arm: mach-k3: am6_init: Use CONFIG_TI_I2C_BOARD_DETECTChristian Gmeiner2-12/+17
We only want to call do_board_detect() if CONFIG_TI_I2C_BOARD_DETECT is set. Same as done for am64. This makes it possible to add a custom am65 based board design to U-Boot that does not use this board detection mechanism. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2022-03-04configs: ti: use standard configuration nodes namingRomain Naour1-1/+1
Currently, any u-boot bootloader for ti armv7 platforms using DEFAULT_FIT_TI_ARGS to boot with a fitimage (boot_fit = 1) doesn't boot when built with Yocto Poky (openembedded-core). ## Loading kernel from FIT Image at 90000000 ... Could not find configuration node ERROR: can't get kernel image! Arago forked the kernel-fitimage class [1] and altered the configuration nodes naming while adding the OPTEE support by using FITIMAGE_CONF_BY_NAME by default [2]. The "upstream" kernel-fitimage class from openembedded-core still add the "conf-" prefix for each configuration nodes [3]. The ITS file format (from doc/uImage.FIT/source_file_format.txt) is not really accurate with the expected naming of these nodes. But in practice the "conf-" prefix is widely used. When the FIT image support has been added for ti armv7 platforms the naming from Arago has been used [3]. Fix this issue by adding the prefix expected by the ITS file generated by kernel-fitimage class from openembedded-core. [1] http://arago-project.org/git/meta-arago.git?p=meta-arago.git;a=commitdiff;h=719ab1b2098bcdc59c249e3529fa82cb1b9130e6 [2] http://arago-project.org/git/meta-arago.git?p=meta-arago.git;a=commitdiff;h=f23f2876a0cda89241d031bb7ba0b4256ed90035 [3] https://git.openembedded.org/openembedded-core/tree/meta/classes/kernel-fitimage.bbclass?h=yocto-3.1.13#n290 [3] 1e93cc8473e4fe018aececc8ed3bf8fc2b3ff561 Signed-off-by: Romain Naour <romain.naour@smile.fr> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Denys Dmytriyenko <denys@konsulko.com>
2022-03-04Merge https://source.denx.de/u-boot/custodians/u-boot-marvellWIP/04Mar2022Tom Rini10-191/+606
- pci_mvebu: Minor cleanup (Pali) - mvebu: turris_omnia: Enable ext4 write support (Marek) - a37xx: Misc fixes in PCI and pinctrl (Pali & Marek) - a38x/rtc: Fix null pointer access (Francios) - mvebu: x530: clearfog: Fix ODT configuration (Chris) - kwboot: Fix boot and terminal mode (Pali)
2022-03-04tools: kwboot: Update references with public linksPali Rohár1-3/+28
Public documents about BootROM of some Marvell SoCs are available in the public Web Archive. Put this information into source code. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2022-03-04tools: kwboot: Update doc about AvantaPali Rohár2-4/+4
Testes proved that current kwboot version supports also Avanta SoCs. It looks like that Avanta SoCs are using same kwbimage format as Armada. Signed-off-by: Pali Rohár <pali@kernel.org> Tested-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2022-03-04tools: kwboot: Update manpagePali Rohár1-4/+99
Document -D, -b, -d, -q and -s options. Add common examples how to use kwboot. Add information about Armada 38x BootROM bug for debug console mode and how to workaround it. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2022-03-04tools: kwboot: Update usagePali Rohár1-3/+4
Add all supported Armada SoCs and document -b and -d options in usage. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2022-03-04tools: kwboot: Add support for backspace key in mini terminalPali Rohár2-14/+97
Marvell BootROM recognize only '\b' byte as backspace. Use terminfo for retrieving current backspace sequence and replace any occurrence of backspace sequence by the '\b' byte. Reading terminfo database is possible via tigetstr() function from system library libtinfo.so.*. So link kwboot with -ltinfo. Normally terminfo functions are in <term.h> system header file. But this header file conflicts with U-Boot "termios_linux.h" header file. So declare terminfo functions manually. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2022-03-04tools: kwboot: Fix sending and processing debug message pattern (-d option)Pali Rohár1-16/+123
-d option is currently broken. In most cases BootROM does not detect this message pattern. For sending debug message pattern it is needed to do same steps as for boot message pattern. Implement sending debug message pattern via same separate thread like it is for boot message pattern. Checking if BootROM entered into UART debug mode is different than detecting UART boot mode. When in boot mode, BootROM sends xmodem NAK bytes. When in debug mode, BootROM activates console echo and reply back every written byte (extept \r\n which is interpreted as executing command and \b which is interpreting as removing the last sent byte). So in kwboot, check that BootROM send back at least 4 debug message patterns as a echo reply for debug message patterns which kwboot is sending in the loop. Then there is another observation, if host writes too many bytes (as command) then BootROM command line buffer may overflow after trying to execute such long command. To workaround this overflow, it is enough to remove bytes from the input line buffer by sending 3 \b bytes for every sent character. So do it. With this change, it is possbile to enter into the UART debug mode with kwboot -d option. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2022-03-04tools: kwboot: Use separate thread for sending boot message patternPali Rohár2-19/+104
After BootROM successfully detects boot message pattern on UART it waits until host stop sending data on UART. For example Armada 385 BootROM requires that host does not send anything on UART at least 24 ms. If host is still sending something then BootROM waits (possibly infinitely). BootROM successfully detects boot message pattern if it receives it in small period of time after power on. So to ensure that host put BootROM into UART boot mode, host must send continuous stream of boot message pattern with a small gap (for A385 at least 24 ms) after series of pattern. But this gap cannot be too often or too long to ensure that it does not cover whole BootROM time window when it is detecting for boot message pattern. Therefore it is needed to do following steps in cycle without any delay: 1. send series of boot message pattern over UART 2. wait until kernel transmit all data 3. sleep small period of time At the same time, host needs to monitor input queue, data received on the UART and checking if it contains NAK byte by which BootROM informs that xmodem transfer is ready. But it is not possible to wait until kernel transmit all data on UART and at the same time in the one process to also wait for input data. This is limitation of POSIX tty API and also by linux kernel that it does not provide asynchronous function for waiting until all data are transmitted. There is only synchronous variant tcdrain(). So to correctly implement this handshake on systems with linux kernel, it is needed to use tcdrain() in separate thread. Implement sending of boot message pattern in one thread and reading of reply in the main thread. Use pthread library for threads. This change makes UART booting on Armada 385 more reliable. It is possible to start kwboot and power on board after minute and kwboot correctly put board into UART boot mode. Old implementation without separate thread has an issue that it read just one byte from UART input queue and then it send 128 message pattern to the output queue. If some noise was on UART then kwboot was not able to read BootROM response as its input queue was just overflowed and kwboot was sending more data than receiving. This change basically fixed above issue too. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2022-03-04tools: kwboot: Cleanup bootmsg and debugmsg variablesPali Rohár1-17/+14
Function kwboot_debugmsg() is always called with kwboot_msg_debug as msg and function kwboot_bootmsg() with kwboot_msg_debug as msg. Function kwboot_bootmsg() is never called with NULL msg. Simplify, cleanup and remove dead code. No functional change. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2022-03-04tools: kwboot: Remove msg_req_delayPali Rohár1-6/+1
Variable msg_req_delay is set but never used. So completely remove it. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2022-03-04tools: kwboot: Check for return value of kwboot_tty_send() and tcflush()Pali Rohár1-11/+19
Failure of kwboot_tty_send() and tcflush() functions is fatal, it does not make sense to continue. So return error back to the caller like in other places where are called these functions. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2022-03-04ARM: mvebu: x530: clearfog: Add ODT configurationChris Packham2-0/+2
Commit 369e532691e0 ("ddr: marvell: a38x: allow board specific ODT configuration") added the odt_config member to struct mv_ddr_topology_map ahead of the clk_enable and ck_delay members. This means that any boards that configured either of clk_enable or ck_delay needed to have their board topology updated. This affects the x530 and clearfog boards. Other A38x boards don't touch any of the trailing members of mv_ddr_topology_map so don't need updating. Fixes: 369e532691e0 ("ddr: marvell: a38x: allow board specific ODT configuration") Signed-off-by: Chris Packham <judge.packham@gmail.com> Acked-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-04arm64: a37xx: pinctrl: Fix PWM pins indexesMarek Behún1-3/+3
Commit 5534fb4f4833 ("arm64: a37xx: pinctrl: Correct PWM pins definitions") introduced bogus definitions os PWM pins: all 4 pins have index 11, instead of having indexes 11, 12, 13, 14. Fix this. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-04drivers: rtc: fix null pointer access in armada38x_rtc_resetFrancois Berder1-1/+1
Replace null pointer by pointer to device registers when calling armada38x_rtc_write. Signed-off-by: Francois Berder <fberder@outlook.fr> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-04arm: a37xx: pci: Fix a3700_fdt_fix_pcie_regions() function againPali Rohár1-26/+55
The a3700_fdt_fix_pcie_regions() function still computes nonsense. It computes the fixup offset from the PCI address taken from the first row of the "ranges" array, which means that: - PCI address must equal CPU address (otherwise the computed fix offset will be wrong), - the first row must contain the lowest address. This is the case for the default device-tree, which is why we didn't notice it. It also adds the fixup offset to all PCI and CPU addresses, which is wrong. Instead: 1) The fixup offset must be computed from the CPU address, not PCI address. 2) The fixup offset must be computed from the row containing the lowest CPU address, which is not necessarily contained in the first row. 3) The PCI address - the address to which the PCIe controller remaps the address space as seen from the point of view of the PCIe device - must be fixed by the fix offset in the same way as the CPU address only in the special case when the CPU adn PCI addresses are the same. Same addresses means that remapping is disabled, and thus if we change the CPU address, we need also to change the PCI address so that the remapping is still disabled afterwards. Consider an example: The ranges entries contain: PCI address CPU address 70000000 EA000000 E9000000 E9000000 EB000000 EB000000 By default CPU PCIe window is at: E8000000 - F0000000 Consider the case when TF-A moves it to: F2000000 - FA000000 Until now the function would take the PCI address of the first entry: 70000000, and the new base, F2000000, to compute the fix offset: F2000000 - 70000000 = 82000000, and then add 8200000 to all addresses, resulting in PCI address CPU address F2000000 6C000000 6B000000 6B000000 6D000000 6D000000 which is complete nonsense - none of the CPU addresses is in the requested window. Now it will take the lowest CPU address, which is in second row, E9000000, and compute the fix offset F2000000 - E9000000 = 09000000, and then add it to all CPU addresses and those PCI addresses which equal to their corresponding CPU addresses, resulting in PCI address CPU address 70000000 F3000000 F2000000 F2000000 F4000000 F4000000 where all of the CPU addresses are in the needed window. Fixes: 4a82fca8e330 ("arm: a37xx: pci: Fix a3700_fdt_fix_pcie_regions() function") Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-04arm: mvebu: turris_omnia: Enable ext4 write support in defconfigMarek Behún1-0/+1
Enable ext4 write support in Turris Omnia's defconfig. Some users find it useful. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-04pci: pci_mvebu: Cleanup macro namesPali Rohár1-70/+60
Use "MVPCIE_" prefix instead of generic "PCIE_" prefix for pci_mvebu.c specific macros. Define offset macros for Root Port registers and use standard register macros from pci.h when accessing Root Port registers. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-04pci: pci_mvebu: Remove unused SELECT and lane_maskPali Rohár1-3/+0
Macro SELECT() is unused and struct mvebu_pcie field lane_mask is unused too. Remove them. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-04tools: kwboot: Fix quitting terminalPali Rohár1-2/+2
Sometimes kwboot after quitting terminal prints error message: terminal: Bad address This is caused by trying to call write() syscall with count of (size_t)-1 bytes. When quit sequence is split into more read() calls then number of input bytes (nin) at the end of cycle can underflow and be negative. Fix it. Fixes: de7514046ea5 ("tools: kwboot: Fix detection of quit esc sequence") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-03-03Merge tag 'u-boot-at91-fixes-2022.04-a' of ↵WIP/03Mar2022Tom Rini1-6/+19
https://source.denx.de/u-boot/custodians/u-boot-at91 First set of u-boot-atmel fixes for the 2022.04 cycle: This fixes set includes only a single fix for the Ethernet on sama7g5ek board which is broken at the moment.
2022-03-03Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriqTom Rini19-164/+577
Update and fixes for sl28, lx2, pblimage generation for some powerpc products
2022-03-03sunxi: f1c100s: Drop SYSRESET to enable reset functionalityAndre Przywara1-0/+1
The F1C100s DT contains the wrong compatible string for the watchdog, which breaks reset functionality. Updating the DT goes via the Linux tree, but to allow reset functionality meanwhile (useful for development!), disable SYSRESET for now, to let the old-fashioned watchdog driver kick in and provide the reset_cpu() implementation. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-03sunxi: f1c100s: Fix FEL registers restoreAndre Przywara1-2/+2
Commit 88998f777531 ("arm: arm926ej-s: Add sunxi code") introduced the ARM926 version of the code to save and restore some FEL state, to be able to return to the BROM FEL code after the SPL has run. However during review a change was made, that happened to mess up the register restore part, so SCTLR and CPSR ended up with the wrong values, breaking return to FEL. Use the same offset that we actually save those registers to, to make FEL booting actually work on the Lichee Pi Nano. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-03mach-sunxi: Enable SPI boot for SUNIV and licheepi nanoJesse Taube2-1/+2
Enable SPI boot in SPL on SUNIV architecture and use it in the licheepi nano that uses the F1C100s. Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-03mach-sunxi: Add SPL SPI boot for SUNIVJesse Taube2-7/+18
The SUNIV SoCs come with a sun6i-style SPI controller at the base address of sun4i SPI controller. The module clock of the SPI controller is missing which leaves us running directly from the AHB clock, which is set to 200MHz. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> [Icenowy: Original implementation] Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> [Jesse: adaptation to Upstream U-Boot] Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-03mach-sunxi: Add boot device detection for SUNIV/F1C100sJesse Taube2-27/+46
In contrast to other Allwinner SoCs the F1C100s BROM does not store a boot source indicator in the eGON header in SRAM. This leaves the SPL guessing where we were exactly booted from, and for instance trying the SD card first, even though we booted from SPI flash. By inspecting the BROM code and by experimentation, Samuel found that the top of the BROM stack contains unique pointers for each of the boot sources, which we can use as a boot source indicator. This patch removes the existing board_boot_order bodge and replace it with a proper boot source indication function. The only caveat is that this only works in the SPL, as the SPL header gets overwritten with the exception vectors, once U-Boot proper takes over. Always return MMC0 as the boot source, when called from U-Boot proper, as a placeholder for now, until we find another way. Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> Suggested-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-03-01Merge https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini1-5/+7
2022-03-01phy: nop-phy: Fix phy reset if no reset-gpio definedTim Harvey1-5/+7
Ensure there is a valid reset-gpio defined before using it. Fixes: f9852acdce02 ("phy: nop-phy: Fix enabling reset") Cc: Adam Ford <aford173@gmail.com> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2022-02-28Prepare v2022.04-rc3v2022.04-rc3Tom Rini1-1/+1
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-02-28Merge branch '2022-02-28-bugfixes'Tom Rini12-63/+429
- Assorted bugfixes