summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-11-02Merge tag 'i2cfixes-for-v2024-01-rc2' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-i2c i2c updates for v2024.01-rc2 - nuvoton: support standard/fast/fast plus mode - bootcount: remove legacy i2c driver and implement DM based version Bugfixes: - designware_i2c: adjust timing calculation SPL probing failed on the StarFive VisionFive 2 board Heinrich fixed this, by syncing timing calculation with linux implementation.
2023-11-02Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini
+ CI: Use OpenSBI 1.3.1 release for testing + riscv: Support resume after exception + rng: Support RNG provided by RISC-V Zkr ISA extension + board: starfive VF2: Support jtag + board: starfive VF2: Support TRNG driver + board: sifive unmatched: Move kernel load address
2023-11-02configs: visionfive2: Enable JH7110 RNG driverChanho Park
Enables JH7110 RNG driver to visionfive2 board. Signed-off-by: Chanho Park <chanho61.park@samsung.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-11-02riscv: dts: jh7110: Add rng device tree nodeChanho Park
Adds jh7110 trng device tree node. Signed-off-by: Chanho Park <chanho61.park@samsung.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-11-02rng: Add StarFive JH7110 RNG driverChanho Park
Adds to support JH7110 TRNG driver which is based on linux kernel's jh7110-trng.c. This can support to generate 256-bit random numbers and 128-bit but this makes 256-bit default for convenience. Signed-off-by: Chanho Park <chanho61.park@samsung.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-11-02clk: starfive: jh7110: Add security clocksChanho Park
Add STGCLK_SEC_HCLK and STGCLK_SEC_MISCAHB clocks for JH7110 TRNG device. Signed-off-by: Chanho Park <chanho61.park@samsung.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-11-02riscv: import read/write_relaxed functionsChanho Park
This imports mmio functions from Linux's arch/riscv/include/asm/mmio.h to use read/write[b|w|l|q]_relaxed functions. Signed-off-by: Chanho Park <chanho61.park@samsung.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-11-02rng: Provide a RNG based on the RISC-V Zkr ISA extensionHeinrich Schuchardt
The Zkr ISA extension (ratified Nov 2021) introduced the seed CSR. It provides an interface to a physical entropy source. A RNG driver based on the seed CSR is provided. It depends on mseccfg.sseed being set in the SBI firmware. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-11-02riscv: allow resume after exceptionHeinrich Schuchardt
If CSRs like seed are readable by S-mode, may not be determinable by S-mode. For safe driver probing allow to resume via a longjmp after an exception. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-11-02board: starfive: spl: Support jtag for VisionFive2 boardChanho Park
JTAG pins are mapped as below. To access the JTAG pins, we need to control the GPIO pins from SPL which seems to be the earliest stage for JTAG. - JTAG nTRST: GPIO36 / Input - JTAG TDI: GPIO61 / Input - JTAG TMS: GPIO63 / Input - JTAG TCK: GPIO60 / Input - JTAG TDO: GPIO44 / Output Signed-off-by: Chanho Park <chanho61.park@samsung.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-11-02riscv: cpu: jh7110: Add gpio helper macrosChanho Park
Add gpio.h header file that includes JH7110 helper macros. The file is imported from StarFive github[1] with small changes such as alignment. [1]: https://github.com/starfive-tech/u-boot Signed-off-by: Chanho Park <chanho61.park@samsung.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-11-02riscv: Weakly define invalidate_icache_range()Samuel Holland
Some RISC-V CPUs, such as the T-HEAD XuanTie series, have a vendor-specific way to invalidate a portion of the instruction cache. Allow them to override invalidate_icache_range(). Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-11-02riscv: Align the trap handler to 64 bytesSamuel Holland
This is required on CPUs which always operate in CLIC mode, such as the T-HEAD E906 and E907. Per the CLIC specification: "In this mode, the trap vector base address held in mtvec is constrained to be aligned on a 64-byte or larger power-of-two boundary." Reported-by: Madushan Nishantha <jlmadushan@gmail.com> Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-11-02riscv: Sort target configs alphabeticallySamuel Holland
Clean things up for the next time somebody adds a target. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-11-02board: sifive: unmatched: move kernel load address to 0x80200000Yong-Xuan Wang
U-boot initially loads the kernel image to the kernel_addr_r, and subsequently relocates it to memory address 0x80200000. Setting kernel_addr_r to 0x80200000 can eliminate one copy operation. Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-11-02CI: use OpenSBI 1.3.1 for testingHeinrich Schuchardt
Use the most recent upstream release of OpenSBI for CI testing. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-11-01Merge tag 'clk-2024.01-rc2' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-clk Clock changes for 2024.01-rc2 This contains several fixes for the clock core.
2023-11-01clk: also handle ENOENT in *_optional functionsYang Xiwen
If the device does not specify any clocks in device tree, these functions will return PTR_ERR(-ENOENT). This is not the intended behavior and does not comply with linux kernel CCF. Fix that by returning NULL under such circumstances instead. Signed-off-by: Yang Xiwen <forbidden405@outlook.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20230818-clk-fix-v1-3-49ec18f820bf@outlook.com
2023-11-01clk: use private clk struct in CLK_CCF's enable/disable functionsMaksim Kiselev
In clk_enable()/clk_disable() functions, when CCF is activated, we must pass a private clk struct to enable()/disable() ops functions. Otherwise, the use of a container_of() construction within these ops should be banned. Because passing a non-private clk struct to container_of() results in an out of range error. At the moment, clk-mux, clk-fixed-factor, clk-gate and possibly other clocks use container_of() in their enable()/disable() functions. Therefore, for these functions to work correclty, private clk struct must be passed. Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20230905221649.3577929-1-bigunclemax@gmail.com
2023-11-01clk: fix count parameter type for clk_release_allEugen Hristev
The second parameter for clk_release_all is used as an unsigned (which makes sense) but the function prototype declares it as an int. This causes warnings/error like such below: include/clk.h:422:48: error: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Werror=sign-conversion] 422 | return clk_release_all(bulk->clks, bulk->count); To fix this, changed the type of the count to `unsigned int` Fixes: 82a8a669b4f7 ("clk: add clk_release_all()") Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com> Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20230619104752.278500-1-eugen.hristev@collabora.com
2023-11-01drivers: clk: Adjust temp var data type to properly match that of struct clk_opsNathan Barrett-Morrison
In commit 5c5992cb90cf ("clk: Add debugging for return values"), a temporary storage variable was added around the ops->get_rate() call inside clk_get_rate(), so that the result could be passed through log_ret. This temporary variable was declared as an int, yet when we look in struct clk_ops, we can see this needs to be a ulong: ulong (*get_rate)(struct clk *clk); This was resulting in a signed to unsigned casting error on our builds, where a clock value of 0xABCDABCD was being incorrectly cast to 0xFFFFFFFFABCDABCD. Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20230515195005.1961495-1-nathan.morrison@timesys.com
2023-11-01Merge branch '2023-11-01-bootstd-fixes'Tom Rini
- Four patches to address issues with bootstd flows in some cases
2023-11-01bootstd: cros: Correct condition for read methodSimon Glass
This has a typo which makes the method inoperable. Correct it so that 'bootflow read' works correctly for ChromeOS. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-01bootstd: Handle a few special cases in cmdline_set_arg()Simon Glass
Two bugs have appeared: - arguments can have an equals sign embedded in them, which must be considered part of the value - arguments must fully match the name; partial matches should be ignored Fix these and add a test to cover both. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-01bootstd: Make efi_mgr bootmeth work for non-sandbox setupsMark Kettenis
Enable the bootflow based on this bootmeth if the BootOrder EFI variable is set. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-01bootstd: BOOTDEV_SPI_FLASH requires BOOTSTDHeinrich Schuchardt
Compiling sandbox_defconfig with CONFIG_BOOTSTD=n fails: /usr/bin/ld: drivers/mtd/spi/sf_bootdev.o: in function `sf_get_bootflow': /drivers/mtd/spi/sf_bootdev.c:43:(.text+0x96): undefined reference to `bootmeth_set_bootflow' Add the missing Kconfig dependency. Fixes: Fixes: 0c1f4a9fb13a ("bootstd: Add a SPI flash bootdev") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-01Merge https://source.denx.de/u-boot/custodians/u-boot-mmcTom Rini
2023-11-01cmd: mmc: Add mmc reg read command for reading card registersMarek Vasut
Add extension to the 'mmc' command to read out the card registers. Currently, only the eMMC OCR/CID/CSD/EXTCSD/RCA/DSR register are supported. A register value can either be displayed or read into an environment variable. Tested-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-11-01mmc: sdhci: Rework SDHCI_QUIRK_BROKEN_R1BSean Anderson
As noted in commit 3a6383207be ("mmc: sdhci: add the quirk for broken r1b response"), some MMC controllers don't always set the transfer complete bit with R1b responses. According to the SD Host Controller Simplified Specification v4.20, > In the case of a command pairing with response-with-busy[, Transfer > Complete] is set when busy is de-asserted. Refer to DAT Line Active > and Command Inhibit (DAT) in the Present State register. By polling the DAT Line Active bit in the present state register, we can detect when we are no longer busy, without waiting for a long timeout. This results in much faster reads/writes on buggy controllers. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Tested-by: Henrik Grimler <henrik@grimler.se>
2023-11-01mmc: pci: Drop the superfluous castBin Meng
dm_pci_map_bar() return a value of (void *) already, hence no need to cast it again before assigning to host->ioaddr. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2023-11-01mmc: spl: select SPL_BLK for SPL_DM_MMCOleksandr Suvorov
mmc_bind() in mmc-uclass.c calls blk_create_devicef() which is defined in blk-uclass.c, so SPL_BLK is required by SPL_DM_MMC. Implicitly select SPL_BLK for SPL_DM_MMC. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2023-10-31Merge branch '2023-10-31-platform-updates'Tom Rini
- Updates for npcm8xx, developerbox, corstone1000 and one clock fix for TI K3 platforms.
2023-10-31corstone1000: enable PSCI resetEmekcan Aras
enable PSCI reset used for the system reset Even though Corstone-1000 does not implement the entire PSCI APIs, it relies on PSCI reset interface for the system reset. Signed-off-by: Emekcan Aras <emekcan.aras@arm.com> Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2023-10-31corstone1000: enable distro booting commandAbdellatif El Khlifi
enable distro_bootcmd Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
2023-10-31corstone1000: add compressed kernel supportAbdellatif El Khlifi
unzip the kernel before executing it The Corstone-1000 kernel has become too large to fit in the available storage. Switching to a compressed kernel avoids the problem, but requires uncompressing it. Changes made are generated using savedefconfig. Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com> Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
2023-10-31board: developerbox: update flash rawwrite binary sizeMasahisa Kojima
Current documentation limits the firmware size to 1.5MB. When the fTPM and StandaloneMM-based RPMB secure storage is enabled, firmware size is bigger than that size. Let's specify the A/B update bank size(4MB) for flash rawwrite parameter. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Jassi Brar <jaswinder.singh@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-10-31board: developerbox: update old NOR flash layout build instructionMasahisa Kojima
v2023.07 is the last version supporting old NOR flash layout by default. The later versions of U-Boot, Developerbox is configured to enable A/B update and new NOR Flash layout by default. This commit updates the documentation to pin the U-Boot version for the old NOR flash layout. It is still useful for the user wants to replace the factory default EDK II firmware to U-Boot. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Jassi Brar <jaswinder.singh@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-10-31board: developerbox: remove obsolete NOR flash layout definitionMasahisa Kojima
There are two kinds of NOR flash layout for the Developerbox. Capsule update for the old layout is no longer available since it has small capacity for secure world images and can not house the TA such as fTPM. This commit removes the definition related to the obsolete NOR flash layout for the UEFI capsule update. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Jassi Brar <jaswinder.singh@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-10-31clk: ti: k3-pll: Add calibration support for non fractional modeVishal Mahaveer
PLL calibration needs to be enabled when operating in non fractional mode. Add the sequence to do a fast calibration when using PLL in this mode. Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
2023-10-31configs: nuvoton: npcm8xx: Disable CONFIG_SPI_FLASH_USE_4K_SECTORSJim Liu
disable this config to improve flash program time Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-10-31board: nuvuton: arbel: Fix incorrect ram sizeJim Liu
1. Fix incorrect ram size of 4GB dram with ECC enabled 2. Fix wrong place to set dram bank size - The dram bank size should be set in dram_init_banksize - Dram_init should not access gd->bd because the board info struct is not reserved yet. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> [trini: Rework slightly] Signed-off-by: Tom Rini <trini@konsulko.com>
2023-10-31configs: npcm: Support more uart baud rateJim Liu
Add uart baud rate table to arbel(npcm8xx) and poleg(npcm7xx) Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> [trini: Rework slightly] Signed-off-by: Tom Rini <trini@konsulko.com>
2023-10-31pinctrl: npcm8xx: Add name for gpio functionJim Liu
GPIO function name is needed in the debug log Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-10-31bootcount: Add driver model I2C driverPhilip Richard Oberfichtner
This adds a generic I2C bootcounter adhering to driver model to replace the previously removed legacy implementation. There is no change in functionality, it can be used on any I2C device. The device tree configuration may look like this for example: bootcount { compatible = "u-boot,bootcount-i2c"; i2cbcdev = <&i2c_rtc>; offset = <0x11>; }; Signed-off-by: Philip Richard Oberfichtner <pro@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-10-31i2c: Implement i2c_get_chip_by_phandle()Philip Richard Oberfichtner
This new function enhances the i2c_get_chip*() toolbox by implementing a variant that does not require a chip_addr. Instead, the desired device is pointed to by a phandle. Signed-off-by: Philip Richard Oberfichtner <pro@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-10-31bootcount: Remove legacy I2C driverPhilip Richard Oberfichtner
The legacy I2C bootcounter will hereby be removed and eventually be replaced by a driver model implementation in the follow-up commit. The legacy driver has the following drawbacks: - It's not adhering to the driver model - Settings are grabbed from Kconfig rather than device tree - i2c_{read,write} are being used instead of dm_i2c_{read,write} Signed-off-by: Philip Richard Oberfichtner <pro@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-10-30Merge branch '2023-10-30-assorted-general-updates'Tom Rini
- Two Kconfig content fixes, fix some issues reported by Coverity, resync get_maintainer.pl (two small fixees), update i2c_eeprom, and fix an off by one in addrmap_set_entry
2023-10-30misc: i2c_eeprom: consider pagesize when writing to eepromMichel Alex
Calculate the maximum length of the buffer when writing across the page boundary. If the buffer length (len) exceeds the page boundary (pagesize), split it. Use this length instead of comparing the length with the pagesize, because if the write start address (offset) is not at the beginning of a page and the page_offset + len is greater than the page boundary (pagesize), the write operation would overflow the current page and the behaviour can be undefined (e.g. at24). Signed-off-by: Alex Michel <alex.michel@wiedemann-group.com>
2023-10-30get_maintainer.pl: update from Linux kernel v6.5Tom Rini
Update U-Boot's version of scripts/get_maintainer.pl to sync it up with the latest changes to the Linux kernel's version of the same script. The last sync was with Linux kernel version v5.13-rc6. The commits to the kernel's get_maintainer.pl since then (starting with the most recent) are: 11fb48961e52 get_maintainer: Honor mailmap for in file emails 26d98e9f78da get_maintainer: don't remind about no git repo when --nogit is used Signed-off-by: Tom Rini <trini@konsulko.com>
2023-10-30Kconfig: Remove all default n/no optionsMichal Simek
Similar change was done by commit b4c2c151b14b ("Kconfig: Remove all default n/no options") and again sync is required. default n/no doesn't need to be specified. It is default option anyway. Signed-off-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com> # tegra Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Angelo Dureghello <angelo@kernel-space.org>