aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-01-31Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-marvellWIP/31Jan2022Tom Rini15-137/+790
- kirkwood: Add Pogoplug-V4 support (Tony) - kirkwood: GoFlex Home : Use Marvell PHY driver (Tony) - Another set of kwboot improvements (Pali) - Minor misc stuff
2022-01-31arm: kirkwood: GoFlex Home : Use Marvell uclass mvgbe and PHY driver for ↵Tony Dinh3-96/+22
Ethernet The GoFlex Home board has the network chip Marvell 88E1116R. Use uclass mvgbe and the compatible driver M88E1118R to bring up Ethernet. - Currently, CONFIG_RESET_PHY_R symbol is used in arch/arm/mach-kirkwood/include/mach/config.h for all Kirkwood boards with mv8831116 PHY, with each board defines the function reset_phy(). Undefine it for this board. - Add board_eth_init() to use uclass mvgbe to bring up the network. And remove ad-hoc code. - Enable CONFIG_PHY_MARVELL to properly configure the network. - Miscellaneous changes: use CONFIG_SYS_THUMB_BUILD to keep u-boot image under 512K, use BIT macro, and cleanup comments. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-31tools: kwboot: Set debug flag to 1Pali Rohár1-0/+1
This should enable BootROM output on UART. (At least on A385 BootROM this is broken, BootROM ignores this debug flag and does not enable its output on UART if some valid image is available in SPI-NOR.) 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-01-31tools: kwboot: Fix usage of -D without -tPali Rohár1-1/+1
When -D is specified then both bootmsg and debugmsg are not set, but imgpath is set. Fix this check for valid and required parameters. 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-01-31tools: kwboot: Handle EINTR in kwboot_tty_recv()Pali Rohár1-3/+7
The select() and read() syscalls may be interrupted. Handle EINTR and retry them. 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-01-31tools: kwboot: Handle EINTR in kwboot_write()Pali Rohár1-3/+5
The write() syscall may be interrupted. Handle EINTR and retry it. 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-01-31tools: kwboot: Remove 2s delay before sending first xmodem packetPali Rohár1-4/+0
This delay is not needed anymore since kwboot already handles retrying logic for incomplete xmodem packets and also forces BootROM to flush its input queue. Removing it decreases total transfer time. 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-01-31tools: kwboot: Force BootROM to flush input queue after boot patternPali Rohár1-1/+35
Force the BootROM to flush its input queue after sending boot pattern. This ensures that after function kwboot_bootmsg() finishes, BootROM is able to start receiving xmodem packets without any specific delay or setup. 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-01-31tools: kwboot: Allow to use option -b without image pathPali Rohár1-5/+17
Allow option -b without image path parameter, to send boot pattern and wait for response but not send any image. This allows to use kwboot just for processing boot pattern and user can use any other xmodem tool for transferring the image itself (e.g. sx). Useful for debugging purposes. 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-01-31tools: kwboot: Show 'E' in progress output when error occursPali Rohár1-2/+6
When kwboot is unable to resend current xmodem packet, show an 'E' in the progress output instead of a '+'. This allows to distinguish between the state when kwboot is retrying sending the packet and when retry is not possible. 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-01-31tools: kwboot: Fix handling of repeated xmodem packetsPali Rohár1-3/+25
Unfortunately during some stages of xmodem transfer, A385 BootROM is not able to handle repeated xmodem packets. So if an error occurs during that stage, stop the transfer and return failure. 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-01-31tools: kwboot: Do not change received character in kwboot_xm_recv_reply()Pali Rohár1-4/+2
Marvell BootROM expects retransmission of previous xmodem packet only in the case when it sends NAK response to the host. Do not change non-xmodem response (possibly UART transfer error) to NAK in kwboot_xm_recv_reply() function. Allow caller to receive original response from device. Change argument 'nak_on_non_xm' to 'stop_on_non_xm'. Instead of changing non-xmodem character to NAK, stop processing on invalid character and return it. 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-01-31tools: kwboot: Remove code for handling CAN bytePali Rohár1-11/+5
It is unknown why handling of CAN byte was added into kwboot tool as Marvell BootROM does not support CAN byte. It never sends CAN byte to host and if host sends CAN byte BootROM handles it as an unknown byte. Remove code for handling and sending CAN bytes from the kwboot tool. 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-01-31tools: kwboot: Improve retrying logic for incomplete xmodem packetsPali Rohár1-1/+10
Sometimes if the first byte of xmodem packet (SOH) is incorrectly transmitted, BootROM sends NAK for every non-SOH received byte, which makes BootROM and the host kwboot tool out of sync. BootROM automatically re-synchronizes after 2s pause by dropping its input queue. So when attempting retransmit for 9th time or later, ignore NAK reply from BootROM and either wait for valid ACK or let kwboot timeout, which implies re-synchronization. This fixes retransmission of xmodem packets and allows kwboot to work also without "Waiting ... and flushing tty" code which is at the beginning of kwboot xmodem transfer. 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-01-31tools: kwboot: Wait blk_rsp_timeo when flushingPali Rohár1-2/+2
Use the blk_rsp_timeo variable when sleeping before flushing tty. 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-01-31tools: kwboot: Increase blk_rsp_timeo to 2sPali Rohár1-1/+1
Fix xmodem retry mechanism if some bytes from xmodem packet were lost and BootROM is still waiting for completing previous xmodem packet. It is required to wait at least 1.312s on A385, otherwise BootROM does not accept next xmodem packet if previous one was not completely transferred. 2s should be enough timeout cause that BootROM will drop incomplete xmodem packet and expects new packet. 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-01-31arm: kirkwood: Pogoplug V4 : Use Marvell network PHY driverTony Dinh1-0/+1
The Pogoplug V4 board has the network chip Marvell 88E1116R. So to properly configure the network, enable CONFIG_PHY_MARVELL to activate the compatible driver M88E1118R. - This patch depends on the series: https://patchwork.ozlabs.org/project/uboot/patch/20220124061712.28316-2-mibodhi@gmail.com/ Signed-off-by: Tony Dinh <mibodhi@gmail.com>
2022-01-31arm: kirkwood: Pogoplug-V4 : Add board implementation filesTony Dinh6-0/+447
Add board header, defconfig, and implementation files for Pogoplug V4. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Pali Rohár <pali@kernel.org>
2022-01-31arm: kirkwood: Pogoplug-V4 : Add Kconfig filesTony Dinh2-0/+22
Add Kconfig files for Pogoplug V4 board Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Pali Rohár <pali@kernel.org>
2022-01-31arm: kirkwood: Pogoplug-V4 : Add DTS filesTony Dinh2-0/+181
Add DTS files for Pogoplug V4 board Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Pali Rohár <pali@kernel.org>
2022-01-31arm: mvebu: Espressobin: Fix URLs in commentsPali Rohár1-2/+2
Use versioned URLs for line numbers as branches are moving in the time and use master branch for mv-ddr-marvell where is up-to-date code. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-30Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxiWIP/30Jan2022Tom Rini18-69/+104
a bit delayed, the first batch of the sunxi pull request for this cycle. This is mostly collecting some patches that were lying around for a while, plus some recent fixes. Nothing too exciting at this point, but of course they should be merged nevertheless. There is the much bigger F1C100s SoC support coming up, which I hope to be able to send in the next few days, along with the removal of sunxi's lowlevel_init usage. Compile tested for all 159 sunxi boards, plus briefly tested on BananaPi M1, OrangePi Zero, Pine64 and Pine-H64.
2022-01-30mkimage: sunxi_egon: Allow overriding the padding sizeSamuel Holland1-3/+6
Due to a bug in the H3 SoC, where the CPU 0 hotplug flag cannot be written, resuming CPU 0 requires using the "Super Standby" code path in the BROM instead of the hotplug path. This path requires jumping to an eGON image in SRAM. This resume image, whose single purpose is to jump back to the secure monitor, only needs to contain a single instruction. Padding the image to 8 KiB would be wasteful of SRAM. Hook up the -B (block size) option so users can set the block/padding size. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-01-30sunxi: Fix H616 DRAM read calibration for dual rankJernej Skrabec1-1/+1
Although it isn't known what bit 0 in PHY reg 8 does, it's obvious that it has to be set before read calibration and cleared afterwards. This is already done for first rank, but not for second (copy & paste error.) Fix it. Fixes: f4317dbd06b6 ("sunxi: Add H616 DRAM support") Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-01-30sunxi: fix H616 DRAM ODT supportJernej Skrabec1-1/+1
Kconfig symbol is missing CONFIG_ prefix, so compiler will always skip ODT configuration. Fix symbol name. Fixes: f4317dbd06b6 ("sunxi: Add H616 DRAM support") Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-01-30sunxi: Add option to prevent booting on power plug-inChris Morgan2-0/+21
For sunxi boards with the AXP209, AXP221, AXP809, and AXP818 PMICs (plus possibly others, I only confirmed the datasheets for these), it is sometimes desirable to not boot whenever the device is plugged in. An example would be when using the NTC CHIP inside a PocketCHIP. This provides a configurable option to check if bit 0 of register 0 of the PMIC says it was powered because of a power button press (0) or a plug-in event (1). If the value is 1 and this option is selected, the device shuts down shortly after printing a message to console stating the reason why it's shutting down. Powering up the board with the power button is not affected. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> [Andre: reword to speak of boot, remove #ifdefs] Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-01-30pmic: axp: define ALDO_IN startup bitAndre Przywara6-4/+13
Most AXP PMICs feature a "startup source" register, which keeps information about how the PMIC started operation. Bit 0 in there means it has been started by "plugging in the power cable". Define a symbol in each PMIC's header file to be able to use that register and bit later on. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-01-30sunxi: gpio: Fix up pointer arithmeticAndre Przywara1-4/+4
The calls for flipping bits in the Allwinner pin controller registers were using unnecessarily complex pointer arithmetic. Improve readability by simplifying the expression. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-01-30mmc: sunxi: Use DM_GPIO flags to set pull-upSamuel Holland1-6/+2
Now that the sunxi_gpio driver handles pull-up/down via the driver model, pin configuration does not need a platform-specific function. Signed-off-by: Samuel Holland <samuel@sholland.org> Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-01-30gpio: sunxi: Implement .set_flagsSamuel Holland1-35/+27
This, along with gpio_flags_xlate(), allows the GPIO driver to handle pull-up/down flags provided by consumer drivers or in the device tree. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-01-30sunxi: gpio: Add per-bank drive and pull settersSamuel Holland2-4/+18
The GPIO and pinctrl drivers need these setters for pin configuration. Since they are DM drivers, they should not be using hardcoded base addresses. Factor out variants of the setter functions which take a pointer to the GPIO bank's MMIO registers. Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-01-30sunxi: gpio: Return void from setter functionsSamuel Holland2-8/+4
The return values of these functions are always zero, and they are never checked. Since they are not needed, remove them. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-01-30sunxi: dram_sun4i/5i: use DRAM_MEMORY_TYPE_DDR3 instead of magic number 3Giulio Benetti2-2/+2
Since DRAM_MEMORY_TYPE_DDR3 is defined let's use it instead of magic number 3. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-01-30i2c: mvtwsi: Add compatible string for allwinner, sun4i-a10-i2cChris Morgan1-0/+1
This adds a compatible string for the Allwinner Sun4i-A10 I2C controller. Without this, boards based on the R8 and A13 (at a minimum) fail to boot. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Acked-by: Akash Gajjar <gajjar04akash@gmail.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-01-30sunxi: call fdt_fixup_ethernet again to set macaddr for more aliasesIcenowy Zheng1-2/+4
Sometimes some ethernet aliases do not exist in U-Boot DT but they exist in the DT used to boot the system (for example, modified via DT overlays). In this situation setup_environment is called again in ft_board_setup() to generate macaddr environment variable for them. However now the call to fdt_fixup_ethernet() is moved before the call of ft_board_setup(). Call fdt_fixup_ethernet() again to add MAC addresses for the extra ethernet aliases. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> [updated commit message] Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-01-30sunxi: SPI: fix pinmuxing for Allwinner H6 SoCsDaniel Wagenknecht1-1/+2
The driver for SPI0 on Allwinner H6 SoCs did not use the correct define SUN50I_GPC_SPI0 for the pin function, but one for a different Allwinner SoC series. Fix the conditionals to use the correct define for H6 SoCs. This matches the conditional logic in the SPL spi driver. Tested by probing the spi-flash on a pine64_h64-model-b board with adapted device-tree (disable mmc2, enable spi0). Signed-off-by: Daniel Wagenknecht <dwagenk@mailbox.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-01-29Merge tag 'efi-2022-04-rc1-3' of ↵WIP/29Jan2022Tom Rini55-274/+613
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-04-rc1-3 Documentation: * update Nokia RX-51 documentation and move it to rst * describe boot switch settings for HiFive Unmatched board UEFI: * fix the checking of images hashes and signatures * provide the RISCV_EFI_BOOT_PROTOCOL
2022-01-29Merge branch '2022-01-28-assorted-fixes'Tom Rini24-39/+265
- Extend the pci command to support a few more features. - Add support for custom SPL boot device names (so it's easier for users to understand) - Updates for am64x to address some review comments. - Migration deadline notice for DM_SERIAL - coreboot payload test - Support rsa3072 signatures. - DFU should skip writing empty UBI pages, bootcount printf format char correction.
2022-01-29squashfs: show an error message if the inode_table can't be, allocatedLars Weber1-0/+2
Signed-off-by: Lars Weber <weber@weber-software.com>
2022-01-29efi_loader: hash the image once before checking against db/dbxIlias Apalodimas1-1/+4
We don't have to recalculate the image hash every time we check against a new db/dbx entry. So let's add a flag forcing it to run once since we only support sha256 hashes Suggested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-29efi_loader: correctly handle mixed hashes and signatures in dbIlias Apalodimas4-12/+60
A mix of signatures and hashes in db doesn't always work as intended. Currently if the digest algorithm is not explicitly set to sha256 we stop walking the security database and reject the image. That's problematic in case we find and try to check a signature before inspecting the sha256 hash. If the image is unsigned we will reject it even if the digest matches. Since we no longer reject the image on unknown algorithms add an explicit check and reject the image if any other hash algorithm apart from sha256 is detected on dbx. Suggested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-29lib: allow printing RISC-V EFI Boot Protocol GUIDHeinrich Schuchardt1-0/+6
On RISC-V a new UEFI protocol has been introduced. Support printing its GUID using %pUs. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-29efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL supportSunil V L7-0/+107
This adds support for new RISCV_EFI_BOOT_PROTOCOL to communicate the boot hart ID to bootloader/kernel on RISC-V UEFI platforms. The specification of the protocol is hosted at: https://github.com/riscv-non-isa/riscv-uefi Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-29tools: mkeficapsule: rework the code a little bitAKASHI Takahiro1-72/+167
Abstract common routines to make the code easily understandable. No functional change. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-29tools: mkeficapsule: output messages to stderr instead of stdoutAKASHI Takahiro1-13/+14
All the error messages should be printed out to stderr. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-29efi_loader: correct function comment styleHeinrich Schuchardt38-86/+86
Replace @return and @param. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-29doc: describe MSEL settings for booting from SD cardHeinrich Schuchardt1-2/+5
unmatched.rst describes booting from SD card or from SPI. But only for booting from SPI the boot selection settings are described. Add the missing information. Fix a typo 'uSD'. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2022-01-29Nokia RX-51: Convert documentation to rst formatPali Rohár5-141/+173
Convert documentation to rst format Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-29Nokia RX-51: Update documentation about flashingPali Rohár1-0/+45
This change contains update for doc/README.nokia_rx51 documentation file with information how to load U-Boot image to device RAM without need to flash it and also how to flash it into OneNAND via 0xFFFF flasher. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-01-29Nokia RX-51: Update documentation about ext2/3/4Pali Rohár1-3/+2
Since commit 25c5b6517854 ("Nokia RX-51: Do not try calling both ext2load and ext4load") command ext4load is used for all ext2/3/4 fs variants. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>