aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-20Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-sh ↵Tom Rini
into next
2023-03-20Merge branch '2023-03-17-improve-read-command-add-write-command' into nextTom Rini
To quote the author: The first patch simplies do_read somewhat by making use of an existing helper instead of parsing the dev_part string manually. As a bonus (and my actual motivation), it now understands dev#partname syntax - hard-coded partition numbers are so last decade. I also need the symmetrical operation, being able to write to a named raw partition, and fortunately it doesn't require that many lines of code to implement that. There's a very minor change in the error reporting due to using cmdtp->name to generate the new messages, but I don't think "Error reading blocks" offers much that "read error" doesn't. New in v2: the last three patches add documentation, ensure CMD_WRITE is set for sandbox and adds some basic test cases for the various ways of accessing the partitions (by number, name, or as raw offset within the whole disk). v3: Add Simon's R-b to patches 2, 4, 5, fixup whitespace in patch 5. I don't want to duplicate the documentation, but I can see the value in 'write' having its own entry in the TOC, so I added a stub write.rst that just refers to the read.rst, which then explicitly documents both.
2023-03-18serial: sh: Make indent consistentMarek Vasut
Make the indent of these macro elements consistent with the rest of this table. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-18serial: sh: Add DEBUG_UART supportMarek Vasut
Add support for debug output very early during boot using the DEBUG_UART mechanism. This uses a static fixed UART port configuration selected via Kconfig options and dedicated print functions from debug_uart.h. This is useful e.g. when debugging problems so early during boot, that not even the DM is initialized at that point, and thus DM_SERIAL is not available either. This functionality is disabled by default. To activate it, define the following Kconfig options and select SCIF type using CFG_SCI/CFG_SCIF_A/ CFG_HSCIF/<nothing for regular SCIF>: CONFIG_DEBUG_UART=y CONFIG_DEBUG_UART_SCIF=y CONFIG_DEBUG_UART_BASE=0xe6540000 CONFIG_DEBUG_UART_CLOCK=24000000 The later two options define the SCIF physical base address and SCIF input clock in Hz. Optionally, to validate DEBUG_UART works, enable the following as well to get early serial output message by default: CONFIG_DEBUG_UART_ANNOUNCE=y Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-18serial: sh: Rename CONFIG_SCI and CONFIG_SCIF_USE_EXT_CLK to CFG_ variantsMarek Vasut
Both CONFIG_SCI and CONFIG_SCIF_USE_EXT_CLK options do not have a matching Kconfig entry because they are internal to the SCIF driver. Change their prefix to CFG_, i.e. CFG_SCIF_USE_EXT_CLK and CFG_SCI, to reflect that and avoid interferring with Kconfig symbols. Since neither of those options are defined elsewhere, no functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-18pinctrl: renesas: Replace ifdeffery with IS_ENABLED()Marek Vasut
Switch ifdef in sh_gpio_get_value() to IS_ENABLED() macro. The CONFIG_RCAR_GEN3 will never have SPL counterpart, so the IS_ENABLED() macro is the right one here. No functional change, except for improved build test coverage. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-18net: ravb: Support fixed PHY in R-CarMikhail Lappo
Calling old U-Boot API doesn't allow to use fixed PHY. Searching by mask is the part of new function, after scanning FDT for a fixed PHY definition Fixes: e821a7bdb13 ("net: ravb: Detect PHY correctly") Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Mikhail Lappo <mikhail.lappo@esrlabs.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> [Hai Pham: Drop phy_connect_dev since it's called in phy_connect] Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> [Marek: Use mask -1 instead of 0 to reinstate the search behavior over all PHY addresses. Add Fixes tag, sort the tag list.]
2023-03-18i2c: rcar_i2c: Sort Kconfig depends list ascendingMarek Vasut
Sort the list of "depends" symbols in ascending order. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-03-18i2c: rcar_iic: Sort Kconfig depends list ascendingMarek Vasut
Sort the list of "depends" symbols in ascending order. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-03-18clk: renesas: rcar-gen3: Replace SSCG caching with MDSEL/PE cachingMarek Vasut
Do not cache the single CPG MODE register bit 12, instead cache the entire register value, and only pick the matching bit from the cached value when core clock of type MDSEL or PE are used. Both MDSEL and PE clock type currently define .offset field as 12 on Gen3, which means this code will use bit 12 on Gen3 again, however there are additional clock on Gen4 which use different bits, and having this flexibility in place now will be useful when adding Gen4. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-18ARM: rmobile: Split R-Car Gen3 into separate Kconfig from common 64bit optionsMarek Vasut
There are multiple shared Kconfig options between R-Car Gen3 and Gen4. Keep the common options in Kconfig.64 and move the R-Car Gen3 specific options into separate Kconfig.rcar3 . The Kconfig.rcar3 contains SoC and board list, which is limited to R-Car Gen3. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-18ARM: rmobile: Introduce CONFIG_RCAR_64 symbolMarek Vasut
Introduce common Kconfig symbol for 64bit R-Car platforms and move common configuration options into it. This is preparatory patch to prevent duplication of Kconfig lists later on, when Gen4 is added. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-18ARM: rmobile: Factor out SYS_SOC Kconfig optionMarek Vasut
Pull the SYS_SOC Kconfig option to avoid duplication of this option in Kconfig.{32,64,rza1} . The default value is the same, so just set it in one location. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-18ARM: rmobile: Sort R-Car Gen3 Kconfig listsMarek Vasut
Sort the 'imply' and 'select' lists in R-Car Gen3 Kconfig options. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-18ARM: rmobile: Convert ifdef in rmobile_get_prr() to IS_ENABLED()Marek Vasut
Switch ifdef in rmobile_get_prr() to IS_ENABLED() macro. The CONFIG_RCAR_GEN3 will never have SPL counterpart, so the IS_ENABLED() macro is the right one here. No functional change, except for improved build test coverage. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-18ARM: renesas: falcon: Enable RWDT reset for V3U FalconHai Pham
Enable RWDT reset on Reset Controller so that it can be used as reset trigger source for V3U Falcon. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Use one current_el() in board_init
2023-03-18ARM: renesas: falcon: Initialize ARM generic timer and GICv3 if EL3Hai Pham
U-Boot executes at EL3 is required to initalize those settings. In other cases, they will be done by prior-stage firmware instead. This fixes crash when U-Boot is at non-secure exception level. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-18ARM: renesas: Enable DTO support by default on R-Car Gen3Marek Vasut
All R-Car Gen3 defconfigs present in U-Boot do enable DTO support, enable it for all of R-Car Gen3 by default in Kconfig instead, so that no new boards would miss this functionality. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-18ARM: renesas: Demote overlap memory nodes message to debug on Gen3Hai Pham
The R-Car DTs might contains multiple /memory@* nodes from various sources, i.e. prior firmware, u-boot itself or the OS The duplicates are likely to happen so the messages are not meaningful in the default setting since we have already handled that. Reduce the message to debug level. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-18ARM: renesas: Remove defines for USB on Eagle/CondorHai Pham
The Eagle board based on R-Car V3M, which does not support any USB interfaces. The same applies for the Condor board based on R-Car V3H. Remove the defines. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-17test: add tests of 'read' and 'write' shell commandsRasmus Villemoes
Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-03-17sandbox: enable CMD_WRITERasmus Villemoes
Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-03-17doc: document read/write commandsRasmus Villemoes
The read and write commands are, deliberately, implemented in the same file, so that they stay feature-compatible (e.g. if someone implements support for "read the full partition, however large that is", that same syntax should also work for write). In order to ensure the documentation for both are similarly kept in sync, and to avoid duplication, document them both in read.rst, and add a stub write.rst referring to read.rst. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-17cmd: introduce 'write' commandRasmus Villemoes
It's almost no extra code to hook up a buddy to the 'read' command. In fact, since the command is passed its own 'struct cmd_tbl', we can use the exact same callback, and let it figure out for itself whether it was invoked as "read" or "write". Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-03-17cmd: read: use part_get_info_by_dev_and_name_or_num() instead of open-coded ↵Rasmus Villemoes
dev_part parsing Use the helper part_get_info_by_dev_and_name_or_num() for parsing a dev[:part] string and obtaining the partition info in one go, instead of open-coding all that. As a bonus, this will automatically allow using the dev#partname syntax as well, for accessing raw partitions by name. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-03-16Merge tag 'xilinx-for-v2023.07-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze into next Xilinx changes for v2023.07-rc1 cmd: - Print results in hex instead of dec in smc command firmware: - Cover missing ZYNQMP_FIRMWARE dependencies fpga: - fix loads for unencrypted use case relocation - Add support for BE systems spi: - Fix xilinx_spi init reset sequence arasan nand: - Remove hardcoded bbt option - Set ofnode value xilinx: - Enable SMC command - Fix some sparse issues zynqmp: - Remove cdns,zynq-gem compatible string - Add optee node - Some DT cleanups zynq: - Some DT cleanups microblaze - Remove MANUAL_RELOC option
2023-03-16Merge tag 'fsl-qoriq-next-2023-3-14' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq into next Enable DM_SERIAL for freescale ls2080a Drop non DM_ETH code for freescale: lx2160a/ls2080rdb/ls2080aqds/ls1088a
2023-03-16Revert 9f62a472dfb2 ("video: Remove duplicate cursor-positioning function")Tom Rini
This reverts commit 9f62a472dfb26ec14408a27938ddd2a25700009d. The changes here aren't quite right, and on platforms such as Raspberry Pi where we can have both serial and video output, the change above causes output to change. This can be seen as the hush tests we have now fail. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-16Merge tag 'dm-next-12mar23a' of git://git.denx.de/u-boot-dm into nextTom Rini
More tests and fixes for fdt command binman signing feature fix buildman -A bug introduced recently Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-14buildman: Fix CROSS_COMPILE output for sandboxSimon Glass
The previous attempt at fixing this broke the normal usage of the -A flag. At present, 'buildman -A sandbox' adds the path containing the toolchain. We can assume that this is in the path and we don't want to set CROSS_COMPILE=/bin/ Change this to align with what MakeEnvironment() does, but only for sandbox boards. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-14Revert "buildman: Correct CROSS_COMPILE output for sandbox"Simon Glass
This reverts commit bd0a548ad4a155fec29473d4cc8e135832926973. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-14tools: add fdt_add_pubkeyRoman Kopytin
Having to use the -K option to mkimage to populate U-Boot's .dtb with the public key while signing the kernel FIT image is often a little awkward. In particular, when using a meta-build system such as bitbake/Yocto, having the tasks of the kernel and U-Boot recipes intertwined, modifying deployed artifacts and rebuilding U-Boot with an updated .dtb is quite cumbersome. Also, in some scenarios one may wish to build U-Boot complete with the public key(s) embedded in the .dtb without the corresponding private keys being present on the same build host. So this adds a simple tool that allows one to disentangle the kernel and U-Boot builds, by simply copy-pasting just enough of the mkimage code to allow one to add a public key to a .dtb. When using mkimage, some of the information is taken from the .its used to build the kernel (algorithm and key name), so that of course needs to be supplied on the command line. Signed-off-by: Roman Kopytin <Roman.Kopytin@kaspersky.com> Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-03-14binman: add tests for sign optionIvan Mikhaylov
Add the test which provides sequence of actions: 1. create the image from binman dts 2. create public and private keys 3. add public key into dtb with fdt_add_pubkey 4. 1. sign FIT container with new sign option with extracting from image 2. sign exact FIT container with replacing of it in image 5. check with fit_check_sign Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com> Renumber test file from 277 to 280; Move UpdateSignatures() to Entry base class; Don't allow missing mkimage as it doesn't make sense; Propagate --toolpath for CI; Call mark_build_done() to avoid regenerating FIT: Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-14binman: add sign option for binmanIvan Mikhaylov
Introduce proof of concept for binman's new option which provides sign and replace FIT containers in binary images. Usage as example: from: mkimage -G privateky -r -o sha256,rsa4096 -F fit binman replace -i flash.bin -f fit.fit fit to: binman sign -i flash.bin -k privatekey -a sha256,rsa4096 -f fit.fit fit and to this one if it's need to be extracted, signed with key and put it back in image: binman sign -i flash.bin -k privatekey -a sha256,rsa4096 fit Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
2023-03-14binman: add documentation for binman sign optionIvan Mikhaylov
Add the documentation about binman sign option and providing an example. Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com> Add a section about 'binman sign' at the bottom: Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-14test: cmd: fdt: Test fdt applyMarek Vasut
Add 'fdt chosen' test which works as follows: - Create basic DT, map it to sysmem - Apply DTO which adds single property via fragment (without address spec) - Apply DTO which adds more properties (string, u32, empty) and a subnode, with phandle via frament@0 and thus tests /__symbols__ node - Apply DTO which modifies property of the previous DTO via phandle and thus tests the /__fixups__ node - Print modified DT, verify it contains updates from DTOs The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-14test: cmd: fdt: Test fdt chosenMarek Vasut
Add 'fdt chosen' test which works as follows: - Create basic DT, map it to sysmem - Print /chosen node, verify it is nonexistent - Create chosen node - Print /chosen node, verify it contains only version - Create /chosen node with initrd entries - Print /chosen node, verify it contains version and initrd entries The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-14test: cmd: fdt: Test fdt rsvmemMarek Vasut
Add 'fdt rsvmem' test which works as follows: - Create custom FDT with single reserved memory (rsvmem) entry, map it to sysmem - Add new rsvmem entry - Delete existing older rsvmem entry - Add new rsvmem entry again - Always print the rsvmem list and validate it The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-14test: cmd: fdt: Test fdt memoryMarek Vasut
Add 'fdt memory' test which works as follows: - Create custom FDT with /memory node, with select #*cells, map it to sysmem - Perform memory fixup - Read back the /memory node and validate its content The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-14test: cmd: fdt: Test fdt headerMarek Vasut
Add 'fdt header' test which works as follows: - Create basic FDT, map it to sysmem - Print the FDT header - Get all members of the FDT header into variable and verify the variables contain correct data The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org> Merged in test: cmd: fdt: Drop unused fdt_test_header_get() fdt parameter: Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-14test: cmd: fdt: Test fdt print and listMarek Vasut
Add 'fdt print' and 'fdt list' test which works as follows: - Create fuller FDT, map it to sysmem - Print the entire FDT, parts of the FDT and select properties - Compare output from the print or list The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-14cmd: fdt: Drop the 0x prefixMarek Vasut
The 'fdt get addr' is always assumed to be hex value, drop the prefix. Since this might break existing users who depend on the existing behavior with 0x prefix, this is a separate patch. Revert if this breaks anything. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-14console: Use only 0x00 as line separator for console recordingMarek Vasut
In case character 0x20 (space) is used as line separator, character 0x9 (tab) is treated end of line. Commands which output a lot of tabs, i.e. various tree printing commands like 'fdt print' then end up generating a lot of newlines in the recorded output, and the recorded output is corrupted. Use character 0x00 (NUL) as separator instead to treat the tabs as valid part of recorded line. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-14test: cmd: fdt: Drop new unneeded curly bracketsMarek Vasut
Drop no longer needed { } around ut_assert*() functions in FDT test. No functional change. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-14test: Wrap assert macros in ({ ... }) and fix missing semicolonsMarek Vasut
Wrap the assert macros in ({ ... }) so they can be safely used both as right side argument as well as in conditionals without curly brackets around them. In the process, find a bunch of missing semicolons, fix them. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-14Merge tag 'v2023.04-rc4' into nextTom Rini
Prepare v2023.04-rc4 Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-14Merge branch '2023-03-14-revert-two-TI-patches' into nextTom Rini
Per request of the author, these two patches weren't quite ready to be applied yet, so revert them.
2023-03-14Revert "configs: j721s2: merge HS and non-HS defconfigs"Tom Rini
This reverts commit c714045cc3c0c36bc836c909e74db3273a7dd390. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-14Revert "configs: j7200: Merge HS and non-HS defconfigs"Tom Rini
This reverts commit e352e1061f4c9a8adb70b6ff819890c42e5b3ef7. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-14configs: ls208x: enable DM_SERIALIoana Ciornei
Now that the DT nodes for the serial devices are in place for these boards, enable DM_SERIAL in the associated configs. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>