aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-10-26configs: khadas-vim3*_android: fix environment savingMattijs Korpershoek
The environment is used to configure some additional boot features such as: * extra boot arguments * enable AVB (Android Verified Boot) verification Right now, we cannot store it in eMMC: Loading Environment from nowhere... OK Fix it by enabling the appropriate options in the defconfig Fixes: b749d5ecdc06 ("configs: meson64_android: define raw parts for bootloader") Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20231026-fix-saveenv-v1-1-6aa59be65481@baylibre.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-10-24Merge branch '2023-10-24-assorted-general-fixes-and-updates'Tom Rini
- Remove common.h in a number of places and make checkpatch.pl complain about its use in all cases, allow the mbr command to handle 4 primary partitions, fix an issue with the pstore command, fix a problem with cli parsing of escape sequences, remove and ignore more files, allow for the serial port to be flushed with every print (for debugging), and add SCMI power domain support.
2023-10-24serial: introduce CONFIG_CONSOLE_FLUSH_ON_NEWLINERasmus Villemoes
When debugging, one sometimes only gets partial output lines or nothing at all from the last printf, because the uart has a largish buffer, and the code after the printf() may cause the CPU to hang before the uart IP has time to actually emit all the characters. That can be very confusing, because one doesn't then know exactly where the hang happens. Introduce a config knob allowing one to wait for the uart fifo to drain whenever a newline character is printed, roughly corresponding to the effect of setvbuf(..., _IOLBF, ...) in ordinary C programs. Since this uses IS_ENABLED() instead of cpp ifdef, we can remove the ifdef around the _serial_flush() definition - if neither CONSOLE_FLUSH_SUPPORT or CONSOLE_FLUSH_ON_NEWLINE are enabled, the compiler elides _serial_flush(), but it won't warn about it being unused. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-24serial: serial-uclass.c: move definition of _serial_flush up a bitRasmus Villemoes
Preparation for next patch. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-10-24test: dm: add SCMI power domain protocol testAKASHI Takahiro
This ut has tests for the SCMI power domain protocol as well as DM interfaces for power domain devices. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-24sandbox: add SCMI power domain protocol support for testingAKASHI Takahiro
SCMI power domain management protocol is supported on sandbox for test purpose. Add fake agent interfaces and associated power domain devices. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-24power: domain: add SCMI driverAKASHI Takahiro
Add power domain driver based on SCMI power domain management protocol. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2023-10-24firmware: scmi: add power domain protocol supportAKASHI Takahiro
In this patch, added are helper functions to directly manipulate SCMI power domain management protocol. DM compliant power domain driver will be implemented on top of those interfaces in a succeeding patch. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2023-10-24cmd: mbr: Allow 4 MBR partitions without need for extendedAlexander Gendin
Current code allows up to 3 MBR partitions without extended one. If more than 3 partitions are required, then extended partition(s) must be used. This commit allows up to 4 primary MBR partitions without the need for extended partition. Add mbr test unit. In order to run the test manually, mmc6.img file of size 12 MiB or greater is required in the same directory as u-boot. Test also runs automatically via ./test/py/test.py tool. Running mbr test is only supported in sandbox mode. Signed-off-by: Alex Gendin <agendin@matrox.com> [ And due to some further changes for testing ] Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-24pstore: Use root address-cells/size-cells as defaults for reserved-memoryAndrey Skvortsov
u-boot adds reserve-memory node, if it's missing, with following properties: ``` reserved-memory { #address-cells = <2>; #size-cells = <2>; ranges; } ``` But with these default address-cells and size-cells values, pstore isn't working on A64. Root node for A64 defines 'address-cells' and 'size-cells' as 1. dtc complains if reserved-memory has different address-cells and size-cells. ``` Warning (ranges_format): /reserved-memory:ranges: empty "ranges" property but its #address-cells (2) differs from / (1) ``` This patch takes into account address-cells and size-cells of the root node and uses them as values for new reserved-memory node. Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
2023-10-24.gitignore: ignore misc include, simple-bin, and tools/generated build artifactsJohn Clark
make rock5b-rk3588_defconfig make git status before ~~~~~~~ On branch master Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) Untracked files: (use "git add <file>..." to include in what will be committed) include/autoconf.mk include/autoconf.mk.dep include/config.h mkimage-in-simple-bin-spi.mkimage-rockchip-tpl mkimage-in-simple-bin-spi.mkimage-u-boot-spl mkimage-in-simple-bin.mkimage-rockchip-tpl mkimage-in-simple-bin.mkimage-u-boot-spl simple-bin-spi.map simple-bin.fit.fit simple-bin.fit.itb simple-bin.map tools/generated/ after ~~~~~~~ On branch master Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) nothing to commit, working tree clean Signed-off-by: John Clark <inindev@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-24Makefile: remove misc include and simple-bin build artifacts on cleanJohn Clark
make rock5b-rk3588_defconfig make make clean git status before ~~~~~~~ On branch master Your branch is up to date with 'origin/master'. Untracked files: (use "git add <file>..." to include in what will be committed) include/autoconf.mk include/autoconf.mk.dep include/config.h mkimage-in-simple-bin-spi.mkimage-rockchip-tpl mkimage-in-simple-bin-spi.mkimage-u-boot-spl mkimage-in-simple-bin.mkimage-rockchip-tpl mkimage-in-simple-bin.mkimage-u-boot-spl simple-bin.fit.fit simple-bin.fit.itb after ~~~~~~~ On branch master Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits) nothing to commit, working tree clean Signed-off-by: John Clark <inindev@gmail.com>
2023-10-24riscv: Remove common.h usageTom Rini
We can remove common.h from most cases of the code here, and only a few places need an additional header instead. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Rick Chen <rick@andestech.com>
2023-10-24mips: Remove common.h usageTom Rini
We can remove common.h from most cases of the code here, and only a few places need an additional header instead. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-10-24microblaze: Remove common.h usageTom Rini
We can remove common.h from most cases of the code here, and only a few places need an additional header instead. Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Michal Simek <michal.simek@amd.com>
2023-10-24m68k: Remove common.h usageTom Rini
We can remove common.h from most cases of the code here, and only a few places need an additional header instead. Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Angelo Dureghello <angelo@kernel-space.org>
2023-10-24arc: Remove common.h usageTom Rini
We can remove common.h from most cases of the code here, and only a few places need an additional header instead. Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
2023-10-24include: Add <linux/types.h> in a few placesTom Rini
These files references a number of types that are defined in <linux/types.h> (and so forth), so include it here rather than rely on indirect inclusion. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-24patman: Add a little documentation on the checkpatch testsSimon Glass
These texts lack comments. Add some so that it is clearer what is going on. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-24checkpatch.pl: Make common.h check boarderTom Rini
At this point in time we should not add common.h to any new files, so make checkpatch.pl complain. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-24cli: Consume invalid escape sequences earlyYurii Monakov
Unexpected 'Esc' key presses are accumulated internally, even if it is already clear that the current escape sequence is invalid. This results in weird behaviour. For example, the next character after 'Esc' key simply disappears from input and 'Unknown command' is printed after 'Enter'. This commit fixes some issues with extra 'Esc' keys entered by user: 1. Sequence <Esc><Esc><Enter> right after autoboot stop gives: => nknown command 'ry 'help' => 2. Sequence <Esc><p><r><i><Enter> gives: => ri Unknown command 'ri' - try 'help' => 3. Extra 'Esc' key presses break backspace functionality. Signed-off-by: Yurii Monakov <monakov.y@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-24Merge tag 'u-boot-rockchip-20231024' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-rockchip - Add Board: rk3588 NanoPC-T6, Orange Pi 5, Orange Pi 5 Plus; - clk driver fix for rk3568 and rk3588; - rkmtd cmd support for rockchip nand device; - dts update and sync from linux;
2023-10-24Merge tag 'u-boot-imx-20231024' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20231024 ------------------- CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/18211 - Fixes for MC2432 Eeprom - i.MX93 ADC - Secondary boot mode on i.MX8M
2023-10-24rockchip: configs: sandbox: enable rkmtd commandJohan Jonker
Enable rkmtd command for testing with sandbox_defconfig and sandbox64_defconfig. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-24rockchip: doc: add rkmtd.rstJohan Jonker
Add documention for Rockchip rkmtd virtual block device. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-24rockchip: test: dm: add rkmtd testJohan Jonker
Add Rockchip rkmtd test: Create/attach/detach RKMTD device. Send/read data with Rockchip boot block header. Test that reusing the same label should work. Basic test of 'rkmtd' commands. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-24rockchip: cmd: add rkmtd commandJohan Jonker
The command rkmtd creates a virtual block device to transfer Rockchip boot block data to and from NAND with block orientated tools like "ums" and "rockusb". It uses the Rockchip MTD driver to scan for boot blocks and copies data from the first block in a GPT formated virtual disk. Data must be written in U-boot "idbloader.img" format and start at partition "loader1" offset 64. The data header is parsed for length and offset. When the last sector is received it erases up to 5 erase blocks on NAND and writes bootblocks in a pattern depending on the NAND ID. Data is then verified. When a block turns out bad the block header is discarded. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-24rockchip: block: blk-uclass: add bounce buffer flag to blk_descJohan Jonker
Currently bounce buffer support is enabled for all block devices when available. Add a flag to blk_desc to enable only on demand. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-10-24rockchip: block: add rkmtd class and driversJohan Jonker
Add rkmtd class and drivers to create a virtual block device to transfer Rockchip boot block data to and from NAND with block orientated tools like "ums" and "rockusb". Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-10-24rockchip: dm: prepare rkmtd UCLASSJohan Jonker
Prepare a rkmtd UCLASS in use for writing Rockchip boot blocks in combination with existing userspace tools and rockusb command. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-24mtd: nand: raw: rockchip_nfc: add NAND_SKIP_BBTSCAN optionJohan Jonker
On Rockchip SoCs the first boot stages are written on NAND with help of manufacturer software that uses a different format then the MTD framework. Skip the automatic BBT scan with the NAND_SKIP_BBTSCAN option to be able to pass the driver probe function and to let the original data unchanged. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-10-24board: rockchip: Add Xunlong Orange Pi 5 PlusJonas Karlman
Xunlong Orange Pi 5 Plus is a single-board computer based on the Rockchip RK3588 SoC. The board provides abundant interfaces, including two HDMI output ports, one HDMI input port, two 2.5G Ethernet ports, M.2 M-Key slot, M.2 E-Key slot, two USB 3.0, two USB 2.0, and two Type-C. Features tested on a Orange Pi 5 Plus 4GB v1.2: - SD-card boot - eMMC boot - SPI Flash boot - PCIe/NVMe - USB 2.0 host - Ethernet Device tree is imported from linux v6.7-rockchip-dts64-1 tag. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-10-24board: rockchip: Add Xunlong Orange Pi 5Jonas Karlman
Xunlong Orange Pi 5 is a single-board computer based on the Rockchip RK3588S SoC. The board provides abundant interfaces, HDMI output, GPIO interface, M.2 PCIe2.0, Type-C, Gigabit LAN port, 2*USB2.0, 1*USB3.0, etc. Features tested on a Orange Pi 5 4GB v1.2: - SD-card boot - SPI Flash boot - PCIe/NVMe - USB 2.0 host - Ethernet Device tree is imported from linux v6.7-rockchip-dts64-1 tag. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-10-24mtd: spi-nor: Add support for XMC XM25QU128CRicardo Pardini
Add support for XMC XM25QU128C (128M-bit) Serial Flash memory. Used on the Xunlong Orange Pi 3B, 5 and 5 Plus boards. Datasheet: https://www.xmcwh.com/uploads/806/XM25QU128C_Ver2.0.pdf Signed-off-by: Ricardo Pardini <ricardo@pardini.net> [jonas@kwiboo.se: update commit message] Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-10-24rockchip: rk3588-rock-5b: Sync USB3 nodes from mainline linux patchesJonas Karlman
The device tree for rk3588 and rock-5b contain usb3 nodes that have deviated too much from current state of submitted mainline linux usb3 patches, see [1]. Sync usb3 related nodes from latest patches and collaboras rk3588 tree so that dwc3-generic driver can be updated to include support for the rockchip,rk3588-dwc3 compatible in the future, use rockchip,rk3568-dwc3 compatible until final node is merged in linux maintainer tree. [1] https://lore.kernel.org/lkml/20231009172129.43568-1-sebastian.reichel@collabora.com/ Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-10-24rockchip: rk3588-rock-5b: Enable support for PCIe SATA cardsJonas Karlman
Enable support for PCIe SATA cards and the on-board SATA controller. This also revert use of CONFIG_PCI_INIT_R in order to speed up boot from eMMC or SD-cards. Standard boot will initialize pci after faster boot media have been enumerated. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Christopher Obbard <chris.obbard@collabora.com> Tested-by: Christopher Obbard <chris.obbard@collabora.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-10-24rockchip: rk3588-rock-5a: Enable support for USB 2.0 portsJonas Karlman
Enable Kconfig options for the two USB 2.0 ports and bottom USB 3.0 port on ROCK 5 Model A. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-10-24rockchip: rk3588: Sync device tree from v6.7-rockchip-dts64-1 tagJonas Karlman
Sync rk3588 device tree from v6.7-rockchip-dts64-1 tag. Adds PCIe, button and led nodes to rk3588-evb1-v10 and rk3588-rock-5b boards. Also remove includes from u-boot.dtsi-files that is no longer needed. Linux commits: 42145b7a8235 ("arm64: dts: rockchip: add PCIe network controller to rock-5b") 199cbd5f195a ("arm64: dts: rockchip: add PCIe for M.2 M-key to rock-5b") da447ec38780 ("arm64: dts: rockchip: add PCIe for M.2 E-Key to rock-5b") 86a2024d95e2 ("arm64: dts: rockchip: add PCIe2 network controller to rk3588-evb1") 46bb398ea1d8 ("arm64: dts: rockchip: add PCIe3 bus to rk3588-evb1") 1c9a53ff7ece ("arm64: dts: rockchip: Add sdio node to rock-5b") 3eaf2abd11aa ("arm64: dts: rockchip: Add sfc node to rk3588s") bf012368bb0a ("arm64: dts: rockchip: Add I2S2 M0 pin definitions to rk3588s") 3d77a3e51b0f ("arm64: dts: rockchip: Add UART9 M0 pin definitions to rk3588s") 0002c377e862 ("arm64: dts: rockchip: Remove duplicate regulator vcc3v3_wf from rock-5b") a6169ab36923 ("arm64: dts: rockchip: Enable UART6 on rock-5b") dd6dc0c4c126 ("arm64: dts: rockchip: Add AV1 decoder node to rk3588s") afa933c208e5 ("arm64: dts: rockchip: add ADC buttons to rk3588-evb1") 7952cbbda301 ("arm64: dts: rockchip: add status LED to rock-5b") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Christopher Obbard <chris.obbard@collabora.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-10-24dt-bindings: leds: import common led bindings from linux v6.5Tom Fitzhenry
This brings in more colours, e.g. ORANGE needed for the QuartzPro64 DT. Linux commits: 472d7b9e8141 ("dt-bindings: leds: Expand LED_COLOR_ID definitions") Signed-off-by: Tom Fitzhenry <tom@tom-fitzhenry.me.uk> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-10-23Prepare v2024.01-rc1Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-10-23configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2023-10-23Merge branch '2023-10-23-bootstd-fixes-and-improvements'Tom Rini
- Fix a few bootstd issues that have been reported and ahci support to bootstd
2023-10-23bootstd: sata: bootdev scanning for ahci sata with no drive attachedTony Dinh
It's normal to have no SATA drive attached to the controller, so return a successful status when there is no block device found after probing. Note: this patch depends on the previous patch https://patchwork.ozlabs.org/project/uboot/patch/20230917230649.30357-1-mibodhi@gmail.com/ Resend the right patch. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-23bootstd: sata: Add bootstd support for ahci sataTony Dinh
Add ahci sata bootdev and corresponding hunting function. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-23bootstd: Scan all bootdevs in a boot_targets entry (take 2)Simon Glass
When the boot_targets environment variable is used with the distro-boot scripts, each device is included individually. For example, if there are three mmc devices, then we will have something like: boot_targets="mmc0 mmc1 mmc2" In contrast, standard boot supports specifying just the uclass, i.e.: boot_targets="mmc" The intention is that this should scan all MMC devices, but in fact it currently only scans the first. Update the logic to handle this case, without required BOOTSTD_FULL to be enabled. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Date Huang <tjjh89017@hotmail.com> Reported-by: Vincent Stehlé <vincent.stehle@arm.com> Reported-by: Ivan Ivanov <ivan.ivanov@suse.com> Tested-by: Ivan T.Ivanov <iivanov@suse.de>
2023-10-23bootstd: Correct logic for single uclassSimon Glass
The current logic for "bootflow mmc" is flawed since it checks the uclass of the bootdev instead of its parent, the media device. Correct this and add a test that covers this scenario. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Ivan T.Ivanov <iivanov@suse.de>
2023-10-23bootstd: Expand boot-ordering test to include USBSimon Glass
Scan the USB bus as well, so we can check that different uclasses work correctly in boot_targets update the function comment with more detail. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Ivan T.Ivanov <iivanov@suse.de>
2023-10-23Revert "bootstd: Scan all bootdevs in a boot_targets entry"Simon Glass
This commit was intended to allow all bootdevs in each boot_targets entry to be scanned. However it causes bad ordering with bootdevs, e.g. scanning Ethernet bootdevs when it should be keeping to mmc. Revert it so we can try another approach. This reverts commit e824d0d0c219bc6da767f13f90c5b00eefe929f0. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Ivan T.Ivanov <iivanov@suse.de>
2023-10-23CI: Re-enable maintainer checkTom Rini
At this point we have all of the defconfigs maintained again, so re-enable the check to prevent further regressions. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-10-23ae350: Update defconfig listTom Rini
Update the list of defconfigs, this was missed with the last pull request of the u-boot-riscv tree. Signed-off-by: Tom Rini <trini@konsulko.com>