aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-02-03Merge tag 'smbios-2024-04-rc2' of ↵WIP/03Feb2024Tom Rini8-39/+60
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request smbios-2024-04-rc2 * In smbios command - write 'Not Specified' for missing strings - show correct table size for SMBIOS2.1 entry point - adjust formatting of handle numbers - add missing colon after UUID * In generated SMBIOS table - avoid introducing 'Unknown' string for missing properties - provide RISC-V vendor ID in the type 4 structure - provide the correct chassis handle in structure type 2 * Rename Structure Table Maximum Size field in SMBIOS 3 entry point
2024-02-02smbios: correctly name Structure Table Maximum Size fieldHeinrich Schuchardt7-10/+10
In the SMBIOS 3 entry point the Structure Table Maximum Size field was incorrectly named max_struct_size. A Maximum Structure Size field only exists in the SMBIOS 2.1 entry point and has a different meaning. Call the Structure Table Length field table_maximum_size. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02smbios: do not determine maximum structure sizeHeinrich Schuchardt1-6/+1
Only the SMBIOS 2.1 entry point has a field for the maximum structure size. As we have switched to an SMBIOS 3 entry point remove the superfluous calculation. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02cmd: smbios: show correct table size for SMBIOS2.1 entry pointHeinrich Schuchardt1-4/+4
The SMBIOS table size for SMBIOS2.1 entry points is in field 'Structure Table Length' (offset 0x16) and not in field 'Maximum Structure Size' (offset 0x08). Rename the receiving variable max_struct_size to table_maximum_size to avoid future confusion. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02smbios: correctly fill chassis handleHeinrich Schuchardt1-0/+2
The chassis handle field in the type 2 structure must point to the handle of the type 3 structure. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-02-02smbios: provide type 4 RISC-V SMBIOS Processor IDHeinrich Schuchardt1-0/+12
For RISC-V CPUs the SMBIOS Processor ID field contains the Machine Vendor ID from CSR mvendorid. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02smbios: if a string value is unknown, use string number 0Heinrich Schuchardt1-15/+18
The SMBIOS specification describes: "If a string field references no string, a null (0) is placed in that string field." Accordingly we should avoid writing a string "Unknown" to the SMBIOS table. dmidecode displays 'Not Specified' if the string number is 0. Commit 00a871d34e2f ("smbios: empty strings in smbios_add_string()") correctly identified that strings may not have length 0 as two consecutive NULs indentify the end of the string list. But the suggested solution did not match the intent of the SMBIOS specification. Fixes: 00a871d34e2f ("smbios: empty strings in smbios_add_string()") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-02-02smbios: Fix table when no string is presentMatthias Brugger1-0/+4
When no string is present in a table, next_ptr points to the same location as eos. When calculating the string table length, we would only reserve one \0. By spec a SMBIOS table has to end with two \0\0 when no strings a present. Signed-off-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02cmd: smbios: replace missing string by 'Not Specified'Heinrich Schuchardt1-1/+5
A missing string value is indicated by a string index of 0. In this case print 'Not Specified' like the Linux dmidecode command does. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02cmd: smbios: add missing colon after UUIDHeinrich Schuchardt1-1/+1
For consistent formatting add a colon ':' after the UUID label. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-02-02cmd: smbios: always use '0x%04x' for printing handlesHeinrich Schuchardt1-2/+2
Handles are u16 numbers. Consistently use '0x%04x' to print them. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02smbios: get_str_from_dt() - add sysinfo_id descriptionHeinrich Schuchardt1-0/+1
Add description for parameter sysinfo_id of function get_str_from_dt(). Fixes: 07c9e683a484 ("smbios: Allow a few values to come from sysinfo") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-02-02lib: smbios_entr() use logical or for booleansHeinrich Schuchardt1-1/+1
As a matter of programming style use logical or to combine two boolean results. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-01Merge tag 'u-boot-amlogic-fixes-20240201' of ↵Tom Rini1-10/+0
https://source.denx.de/u-boot/custodians/u-boot-amlogic - stop printing board model twice after sysinfo update
2024-02-01Merge https://source.denx.de/u-boot/custodians/u-boot-watchdogTom Rini11-0/+259
- add andes atcwdt200 support (Randolph)
2024-02-01configs: andes: add watchdog support fot andes ae350Randolph8-0/+32
It adds the ATCWDT200 support for Andes AE350 platform. It also enables wdt command support. Signed-off-by: CL Wang <cl634@andestech.com> Signed-off-by: Randolph <randolph@andestech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-02-01drivers: watchdog: add andes atcwdt200 supportRandolph3-0/+227
This patch adds an implementation of the Andes watchdog ATCWDT200 driver. Signed-off-by: CL Wang <cl634@andestech.com> Signed-off-by: Randolph <randolph@andestech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31Merge tag 'u-boot-at91-2024.04-a' of ↵Tom Rini2-12/+65
https://source.denx.de/u-boot/custodians/u-boot-at91 First set of u-boot-at91 features for the 2024.04 cycle: This set includes some DT alignments and solves a compile issue for custom nand defconfigs.
2024-01-31Merge https://source.denx.de/u-boot/custodians/u-boot-riscvWIP/31Jan2024Tom Rini33-28/+811
* Add RISC-V falcon mode documentation * Add Clang build support * Add cmd to detect Debug Trigger Extension support * Add PWM setting for Unmatched board * Add Milk-V Duo board support * Add new device node and enable new config option for VisionFive2 board * Add second virtio device for RISC-V QEMU
2024-01-31riscv: dts: starfive: add regulator deviceNam Cao1-0/+5
Add the axp15060 regulator device. OpenSBI uses this device to perform board reset and shutdown. Signed-off-by: Nam Cao <namcao@linutronix.de> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31riscv: dts: jh7110: add power management unit controller nodeNam Cao1-0/+6
JH7110 has a power management unit controller node. Add this node. This device is used by OpenSBI during board reset/shutdown. Signed-off-by: Nam Cao <namcao@linutronix.de> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31board: visionfive2: configure PHY pad drive strengthLukasz Tekieli1-0/+8
Configure the pad drive strength register for both PHYs. The values correspond to what can be found in the Linux DTS for VisionFive2 v1.3b. Pad drive strength configuration is required for the phy0 to work correctly with 100Mbit links. Signed-off-by: Lukasz Tekieli <tekieli.lukasz@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31net: phy: motorcomm: configure pad drive strength registerLukasz Tekieli1-0/+130
This ports the pad drive strength register configuration which can be already found in the Linux driver for this PHY. Signed-off-by: Lukasz Tekieli <tekieli.lukasz@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31doc: sophgo: milkv_duo: document Milk-V Duo boardKongyang Liu3-0/+73
Add document for Milk-V Duo board which based on Sophgo's CV1800B SoC. Signed-off-by: Kongyang Liu <seashell11234455@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31riscv: sophgo: milkv_duo: initial support addedKongyang Liu7-0/+87
Add support for Sophgo's Milk-V Duo board, only minimal device tree and serial console are enabled, and it can boot via vendor first stage bootloader. Signed-off-by: Kongyang Liu <seashell11234455@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31riscv: dts: sophgo: add basic device tree for Milk-V Duo boardKongyang Liu4-0/+249
Import device tree from Linux kernel to add basic support for CPU, PLIC, UART and Timer. The name cv1800b in the filename represent the chip used on Milk-V Duo board. Signed-off-by: Kongyang Liu <seashell11234455@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31configs: visionfive2: Disable ENV_IS_NOWHEREAurelien Jarno1-1/+0
The VisionFive 2 board supports saving the u-boot environment settings are saved to on-board SPI flash. However the defconfig enables both ENV_IS_NOWHERE and ENV_IS_IN_SPI_FLASH, preventing the "saveenv" command to work. Fix that by disabling ENV_IS_NOWHERE. Fixes: 7d79bed00c9e ("configs: starfive: Enable environment in SPI flash support") Reported-by: E Shattow <lucent@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31riscv: Support building with Clangkleines Filmröllchen1-1/+1
The -ffixed-gp option of GCC has an exact equivalent of -ffixed-x3 in Clang. Signed-off-by: kleines Filmröllchen <filmroellchen@serenityos.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-01-31cmd: sbi: add support for Debug Trigger ExtensionHeinrich Schuchardt2-0/+2
Detect and show if the SBI implements the Debug Trigger Extension. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31board: sifive: spl: Initialized the PWM setting in the SPL stageVincent Chen2-0/+67
LEDs and multiple fans can be controlled by SPL. This patch ensures that all fans have been enabled in the SPL stage. In addition, the LED's color will be set to yellow. Signed-off-by: Vincent Chen <vincent.chen@sifive.com> Co-developed-by: Nylon Chen <nylon.chen@sifive.com> Signed-off-by: Nylon Chen <nylon.chen@sifive.com> Co-developed-by: Zong Li <zong.li@sifve.com> Signed-off-by: Zong Li <zong.li@sifve.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31riscv: qemu: enable booting on a second virtio deviceAurelien Jarno1-0/+1
QEMU RISC-V supports multiple virtio devices, but only tries to boot to the first one. Enable support for a second virtio device, that is useful for instance to boot on a disk image + an installer. Ideally that should be made dynamic, but that's a first step. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31board: starfive: handle compatible property in dynamic DT configurationAurelien Jarno1-0/+4
The difference between the StarFive VisionFive 2 1.2A and 1.3B boards is handled dynamically by looking at the PCB version in the EEPROM in order to have a single u-boot version for both versions of the board. While the "model" property is correctly handled, the "compatible" one is always the the one of version 1.3b. This patch add support for dynamically configuring that property. Fixes: 9b7060bd15e7 ("riscv: dts: jh7110: Combine the board device tree files of 1.2A and 1.3B") Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31configs: andes: add the fdt blob copy address for SPLRandolph4-0/+4
Add the address to which the FDT blob is to be moved. Signed-off-by: Randolph <randolph@andestech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31spl: riscv: falcon: move fdt blob to specified addressRandolph3-26/+16
In Falcon Boot mode, the fdt blob should be move to the RAM from kernel BSS section. To avoid being cleared by BSS initialisation. SPL_PAYLOAD_ARGS_ADDR is the address where SPL copies. Signed-off-by: Randolph <randolph@andestech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31doc: falcon: riscv: Falcon Mode boot on RISC-VRandolph1-0/+158
Add documentation to introduce the Falcon Mode on RISC-V. In this mode, the boot sequence is SPL -> OpenSBI -> Linux kernel. Signed-off-by: Randolph <randolph@andestech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-30Merge tag 'clk-2024.04-rc2' of ↵WIP/30Jan2024Tom Rini104-526/+853
https://source.denx.de/u-boot/custodians/u-boot-clk Clock changes for v2024.04 This pull has the usual fixes and new (clock-adjacent) drivers. It also has some cleanups for the clock API; in particular removing the unused rfree callback. CI: https://source.denx.de/u-boot/custodians/u-boot-clk/-/pipelines/19486
2024-01-30ARM: meson: stop printing board model after sysinfo updateNeil Armstrong1-10/+0
After the sysinfo update, Model is printed twice, remove the now duplicate Model print from mach-meson/board-info. Link: https://lore.kernel.org/r/20240124-u-boot-model-print-fix-v1-1-484960069623@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-01-29clk: clk-gpio: add actual gated clockSvyatoslav Ryhel1-5/+33
Existing gpio-gate-clock driver acts like a simple GPIO switch without any effect on gated clock. Add actual clock actions into enable/disable ops and implement get_rate op by passing gated clock if it is enabled. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20240110160956.4476-2-clamor95@gmail.com [ sorted includes ] Signed-off-by: Sean Anderson <seanga2@gmail.com>
2024-01-29clk: Document clk_ops return codes and behaviorSean Anderson1-10/+103
Currently, clock consumers cannot take any programmatic action based on the return code of a clock function. This is because there is no standardization, and generally no way of separating e.g. "there was a major problem setting the rate for this clock" which usually should not be recovered from, from "this clock doesn't support setting its rate" or "this clock doesn't support *this* rate" which could be absolutely fine depending on the driver. This commit aims to standardize the acceptable codes which may be returned from clock operations. In general, - ENOSYS should be returned when an operation is not supported for a particular clock. - ENOENT may be returned if the clock ID is invalid. However, it is encouraged to move any checks to request() to reduce code duplication. - EINVAL should be returned for logical errors only (such as requesting an invalid rate). Each function has had specific guidance added for when to return each error code. This is just guidance for now; most of the clock subsystem does not yet conform to this standard. However, it is expected that new clock drivers return these error codes. Additionally, this commit adds expected behavior for each of the clock operations. I believe these should be mostly straightforward and correspond to existing behavior. I remember not understanding what the expected invariants were for several clock functions, so hopefully this should help out new driver authors. In the future, some of these invariants could be checked via an optional config option. Signed-off-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20231216193843.2463779-4-seanga2@gmail.com
2024-01-29treewide: Remove clk_freeSean Anderson95-430/+71
This function is a no-op. Remove it. Signed-off-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20231216193843.2463779-3-seanga2@gmail.com
2024-01-29clk: Remove rfreeSean Anderson7-79/+4
Nothing uses this function. Remove it. Since clk_free no longer does anything, just stub it out. Signed-off-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20231216193843.2463779-2-seanga2@gmail.com
2024-01-29clk: fix clk_get_rate() always return ulongJulien Masson1-6/+1
When we call clk_get_rate(), we expect to get clock rate value as ulong. In that case we should not use log_ret() macro since it use internally an int. Otherwise we may return an invalid/truncated clock rate value. Signed-off-by: Julien Masson <jmasson@baylibre.com> Fixes: 5c5992cb90c ("clk: Add debugging for return values") Reviewed-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/87o7erv9p4.fsf@baylibre.com
2024-01-29clk: meson: add Hardware Clock measure driverNeil Armstrong3-0/+645
Amlogic SoCs embeds an hardware clock measure block, port it from Linux and implement it as a UCLK_CLK with only the dump op and fail-only xlate. Based on the Linux driver introduced in [1]. [1] commit 2b45ebef39a2 ("soc: amlogic: Add Meson Clock Measure driver"). Reviewed-by: Sean Anderson <seanga2@gmail.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20231218-uboot-meson-clk-msr-v3-1-acf4d90ccfee@linaro.org
2024-01-29Prepare v2024.04-rc1v2024.04-rc1Tom Rini2-6/+5
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-01-29Merge tag 'efi-2024-04-rc1-4' of ↵Tom Rini11-64/+77
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request efi-2024-04-rc1-4 Documentation: * uefi: remove ".py" suffix for pytest.py command * correct date in migration plan for CONFIG_DM UEFI: * fix conflicting SPDX license in RISC-V EFI linker scripts * page align EFI binary section in RISC-V EFI binaries * separate .data and .text sections of RISC-V EFI binaries * use common function to get EFI configuration table
2024-01-29tools: buildman: fix non-existing SafeConfigParser in Python 3.12+Quentin Schulz1-1/+1
SafeConfigParser was renamed back in Python 3.2 (yes, no typo) to ConfigParser[1], but it was still working as an alias until it got removed in 3.12[2]. [1] https://docs.python.org/3.8/whatsnew/3.2.html#configparser [2] https://github.com/python/cpython/pull/92503 Cc: Quentin Schulz <foss+uboot@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2024-01-29video: console: Fix buffer overflow in cmd 'font list'Janne Grunau1-1/+1
vidconsole_ops.get_font is documented to return -ENOENT after the last video_fontdata entry. Signed-off-by: Janne Grunau <j@jannau.net>
2024-01-29video: Support VIDEO_X2R10G10B10 in truetype consoleJanne Grunau1-2/+8
Without explicit support for VIDEO_X2R10G10B10 VIDEO_X8R8G8B8 white will be rendered as cyan-ish. The conversion leaves to lowest 2 bits unset for more compact code. Signed-off-by: Janne Grunau <j@jannau.net>
2024-01-29env: sf: report malloc error to callerRalph Siemsen1-1/+3
In the non-redundant code for env_sf_save(), a failure to malloc() the temporary buffer produces the following output: Saving Environment to SPIFlash... OK This is misleading as the flash has neither been erased nor written. Fix it to return an error to the caller, so the output will be: Saving Environment to SPIFlash... Failed (-12) Note that there is another copy of env_sf_save() in the same file, for handling redundant environment, and it already has the same logic. Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>
2024-01-29video: tidss: Use DT property names for parsing nodesDevarsh Thakkar1-5/+5
Use device-tree node property names for parsing nodes instead of indexing as indexing could be different between different SoCs based on number of DSS entities available on that particular SoC. Also correct the video layer naming in driver to match to actual one being used in upstream DSS device-tree node [1]. This also fixes AM62x splash screen usage using the latest upstream DSS device-tree nodes where hard-coded indexing which driver was using before this patch was not matching the correct properties in the DT node. [1]: Upstream AM62x DSS node: https://github.com/torvalds/linux/blob/v6.8-rc1/arch/arm64/boot/dts/ti/k3-am62-main.dtsi#L774 Fixes: 5f9f816bb8 ("drivers: video: tidss: TIDSS video driver support for AM62x") Signed-off-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Nikhil M Jain <n-jain1@ti.com>