summaryrefslogtreecommitdiff
path: root/drivers/misc
AgeCommit message (Collapse)Author
28 hourscros_ec: Convert dm_cros_ec_get_ops into an inline function and constify ↵Marek Vasut
dm_cros_ec_ops Convert dm_cros_ec_get_ops into an inline function to improve compiler code coverage, and constify struct dm_cros_ec_ops in a few places. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Simon Glass <[email protected]>
4 daysmisc: ele_api: Add V2X Get State APIYe Li
Add V2X Get State API to return V2X states for debug purpose Signed-off-by: Ye Li <[email protected]>
4 daysmisc: ele: Use dev_read_addrPeng Fan
Use dev_read_addr which supports livetree API, otherwise driver will fail to get addr when OF_LIVE is enabled. Signed-off-by: Peng Fan <[email protected]>
5 daysKconfig: drivers: restyle remainingJohan Jonker
Restyle all Kconfigs for the rest of "drivers": Menu entries : no space left Menu attributes: 1 TAB Help text : 1 TAB + 2 spaces Replace '---help---' by 'help' Signed-off-by: Johan Jonker <[email protected]> [trini: Add missing indentation on a few more multi-paragraph help texts] Signed-off-by: Tom Rini <[email protected]>
5 daysKconfig: misc: add empty lineJohan Jonker
Restyle by adding an empty line between configs. Signed-off-by: Johan Jonker <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2026-06-09Merge assorted patches to use device API to replace devfdt_ helpersTom Rini
These assorted patch series from Peng Fan (OSS) <[email protected]> have the goal to remove the direct usage of devfdt_ APIs in drivers. The device APIs supports both live device tree and flat DT backends, avoiding direct dependency on devfdt_* helpers.
2026-06-09misc: k3_avs: Use dev_read_addr_index()Peng Fan
Use dev_read_addr_index() which supports both live device tree and flat DT backends, avoiding direct dependency on devfdt_* helpers. No functional changes. Signed-off-by: Peng Fan <[email protected]>
2026-05-25cros_ec: Sync ec_commands.h from upstream Chrome OS ECSimon Glass
Sync include/ec_commands.h from upstream commit 4f3d17aa34 ("skywalker: set SLEEP_TIMEOUT_MS to 50 seconds"). The new file makes two build assumptions that do not hold for U-Boot. It hides '<stdint.h>' from __KERNEL__ builds, leaving UINT16_MAX (used by EC_RES_MAX) undefined for U-Boot; widen the gate to '!defined(__KERNEL__) || defined(__UBOOT__)' It gates '<linux/limits.h>' on '#ifdef __KERNEL__'; the matching '#else' branch defines BIT()/BIT_ULL()/GENMASK()/GENMASK_ULL() locally, assuming kernel headers provide those macros otherwise. U-Boot defines __KERNEL__ too but has no <linux/limits.h>. Nest a '!defined(__UBOOT__)' check around the include so the __UBOOT__ path stays in the __KERNEL__ branch (no local BIT/GENMASK defines), which avoids redefinition warnings against U-Boot's linux/bitops.h. Pull in linux/bitops.h up front for U-Boot so the file's own BIT() and GENMASK() uses still resolve. Adapt callers to two interface changes. The 'ec_current_image' enum tag is now 'ec_image' (EC_IMAGE_* constants unchanged); rename it in affected files to match. The VBNV-context interface was dropped upstream, but it still used in lab Chromebooks; keep those constants and structs in cros_ec.h Likewise, MEC_EMI_BASE and MEC_EMI_SIZE are a U-Boot-local addition to ec_commands.h that the upstream sync removes; preserve them in cros_ec.h next to the VBNV block, and switch the only consumer (arch/x86/cpu/apollolake/cpu_spl.c) to include cros_ec.h Signed-off-by: Simon Glass <[email protected]>
2026-05-18misc: x86: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]>
2026-05-18misc: i2c: eeprom-emul: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-05-18misc: cros_ec: Staticize and constify driver opsMarek Vasut
Set the ops structure as static const. The structure is not accessible from outside of this driver and is not going to be modified at runtime. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Simon Glass <[email protected]> Acked-by: Quentin Schulz <[email protected]>
2026-04-03misc: Add missing dependency to CROS_EC_SANDBOXTom Rini
In order to build CROS_EC_SANDBOX we must also have the hashing API enabled, add that as a dependency. Signed-off-by: Tom Rini <[email protected]>
2026-03-30core: Rework REGMAP symbols implementationTom Rini
As exposed by "make randconfig", we have an issue with the dependencies for REGMAP (and xPL variants). As this is a library function, it should always be selected and not depended on by other functionality. This is largely done correctly today, so just correct the few outliers. Acked-by: Anshul Dalal <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2026-03-30misc: Correct dependencies on QCOM_GENITom Rini
As exposed by "make randconfig", we have an issue with the dependencies for QCOM_GENI. The symbol PARTITION_TYPE_GUID depends on EFI_PARTITION and this driver cannot function without both being set, so select that as well. Reviewed-by: Casey Connolly <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2026-03-18Merge patch series "led: remove legacy API"Tom Rini
Quentin Schulz <[email protected]> says: This migrates the last user of the legacy LED API, IMX233-OLinuXino and net/bootp.c, to the modern LED framework. I do have concern about being able to use BOOTP in SPL? In which case, I should probably add an additional check on CONFIG_IS_ENABLED(LED) in addition to IS_ENABLED(CONFIG_LED_BOOT)? I haven't tested this as I do not own an IMX233-OLinuXino, so please give this a try if you own this device. Then, since there's no user left of this legacy API, it is entirely removed. Link: https://lore.kernel.org/r/[email protected]
2026-03-18led: remove legacy APIQuentin Schulz
No user of the legacy LED API anymore (except Sunxi with the PinePhone but that is now a Sunxi-specific implementation), so let's remove anything related. Signed-off-by: Quentin Schulz <[email protected]>
2026-03-16misc: ele_api: Add support for XSPI SET GMID commandYe Li
The XSPI SET GMID command is used to assign GMID ownership to the requester, allowing access to protected XSPI control registers. This API must be called in SPL if XSPI GMID-protected settings need to be modified. Otherwise, XSPI configuration depends on the previous GMID owner to provide the correct settings. Signed-off-by: Ye Li <[email protected]> Signed-off-by: Alice Guo <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2026-03-16misc: imx_ele: Fix compile without CMD_FUSENiko Mauno
If CONFIG_CMD_FUSE is not enabled in imx93_11x11_evk_defconfig, then compilation fails with various undefined references to 'fuse_read', such as: | .../arch/arm/mach-imx/imx9/soc.c:188:(.text.get_cpu_rev+0x38): undefined reference to `fuse_read' therefore remove the 'fuse' command dependency in order to compile fuse.c unconditionally to mitigate the issue. Signed-off-by: Niko Mauno <[email protected]>
2026-03-13Merge patch series "Minor fixes for the k3_fuse driver"Tom Rini
Anshul Dalal <[email protected]> says: This series adds some minor *non-critical* fixes to the k3_fuse misc driver in U-Boot. Link: https://lore.kernel.org/r/[email protected]
2026-03-13misc: k3_fuse: Limit writes to 25bit valuesVignesh Raghavendra
K3 OTP bits can only be programmed 25bits at a time. Limit the value accordingly using a 25 bit mask. Signed-off-by: Vignesh Raghavendra <[email protected]> Signed-off-by: Anshul Dalal <[email protected]>
2026-03-13misc: k3_fuse: Enable fuse Sense supportVignesh Raghavendra
fuse sense is essentially read, map it to fuse read. Signed-off-by: Vignesh Raghavendra <[email protected]> Signed-off-by: Anshul Dalal <[email protected]>
2026-03-13misc: k3_fuse: Check readback on fuse progVignesh Raghavendra
Error out if readback value doesn't match the programmed value. Signed-off-by: Vignesh Raghavendra <[email protected]> Signed-off-by: Anshul Dalal <[email protected]>
2026-03-13misc: k3_fuse: Fix printing of error codesVignesh Raghavendra
Use signed int format to print error codes so that its more readable Fixes: ed5f2e5bed91 ("drivers: k3_fuse: Add fuse sub-system func calls") Signed-off-by: Vignesh Raghavendra <[email protected]> Signed-off-by: Anshul Dalal <[email protected]>
2026-03-10Merge tag 'u-boot-rockchip-20260309' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-rockchip into next CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/29452 - New SoC support: RK3506, RK3582; - New Board support: RK3528 FriendlyElec NanoPi Zero2; - Other fixes
2026-03-10rockchip: otp: Add support for RK3506Jonas Karlman
Add support for the OTP controller in RK3506. The OTPC is similar to the OTPC in RK3568 and can use the same ops for reading OTP data. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2026-02-28imx: scu_api: implement sc_misc_get_boot_typeHeiko Schocher
add function sc_misc_get_boot_type() which returns the boot type. Signed-off-by: Heiko Schocher <[email protected]> Signed-off-by: Walter Schweizer <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2026-02-17treewide: Clean up DECLARE_GLOBAL_DATA_PTR usagePeng Fan
Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and drop the unnecessary inclusion of asm/global_data.h. Headers should be included directly by the files that need them, rather than indirectly via global_data.h. Reviewed-by: Patrice Chotard <[email protected]> #STMicroelectronics boards and STM32MP1 ram test driver Tested-by: Anshul Dalal <[email protected]> #TI boards Acked-by: Yao Zi <[email protected]> #TH1520 Signed-off-by: Peng Fan <[email protected]>
2026-01-29misc: Keep FSL_IFC available on PowerPC as wellTom Rini
This symbol is used on a number of PowerPC platforms as well, so make it available there again. Fixes: 424b324165ea ("armv7: Add CPLD support via IFC to the ls1021a-iot board.") Acked-by: Peng Fan <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2026-01-28armv7: Add CPLD support via IFC to the ls1021a-iot board.Mateus Lima Alves
This patch adds CPLD support via IFC to the ls1021a-iot board. Signed-off-by: Mateus Lima Alves <[email protected]>
2026-01-17misc: ele_api: Add Voltage change start and finish APIsYe Li
On GDET enabled part, need to call voltage change start and finish APIs when adjust the voltage more than 100mv. Otherwise GDET will be triggered and system is reset Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-01-13misc: Add fixed-layout supportMarek Vasut
The "fixed-layout" nvmem controller subnode used to be optional wrapper around nvmem controller cells subnodes. The "fixed-layout" node is now mandatory in most cases, but in order to support both recent and legacy DTs, both variants have to be supported. Implement support for the "fixed-layout" node in the most trivial manner, check whether the nvmem cell supernode is compatible with "fixed-layout" and if it is, proceed one level above it to find the nvmem controller. Signed-off-by: Marek Vasut <[email protected]>
2025-12-05led: remove support for red LED in legacy APIQuentin Schulz
To the exception of red_led_on in the arm-specific assembly code, all code interacting with the red status LED was guarded by the CONFIG_LED_STATUS_RED symbol, which is enabled in none of the upstream defconfigs. Since the last board which overrode the weak red_led_on function got migrated to the new LED mechanism, there's also no user of the arm-specific assembly code anymore, therefore it can be removed along the other unreachable code sections. Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
2025-12-05led: remove support for green status led in legacy APIQuentin Schulz
The last user of it was removed in a previous commit so let's remove its support entirely. Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
2025-12-05led: remove coloured_LED_init, yellow and blue status LEDs in legacy APIQuentin Schulz
The last user of coloured_LED_init has been recently removed, so we can remove all places it's called and defined as it does nothing now. Nobody makes use of the yellow and blue status LEDs from the legacy API, so let's remove all references to it. Signed-off-by: Quentin Schulz <[email protected]>
2025-11-06qfw/acpi: do not zero out XSDT addressHeinrich Schuchardt
On RISC-V QEMU provides an XSDT table. The RSDP table points to it. We must not zero out this pointer because otherwise no ACPI table can be found. Fixes: 15ca25e31ed5 ("x86: emulation: Support BLOBLIST_TABLES properly") Reviewed-by: Bin Meng <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]>
2025-10-30misc: introduce Qcom GENI wrapperCasey Connolly
Qualcomm peripherals like UART, SPI, I2C, etc are all exposed under a common GENI Serial Engine wrapper device. Replace the stub driver we use for this currently with a full-on misc device and implement support for loading peripheral firmware. Each of the peripherals has it's own protocol-specific firmware, this is stored on the internal storage of the device with a well-known partition type GUID. To support this, GENI will bind peripherals in two stages. First the ones that already have firmware loaded (such as the serial port) are bound in the typical way. But devices that require firmware loading are deferred until EVT_LAST_STAGE_INIT. At this point we can be sure that the storage device is available, so we load the firmware and then bind and probe the remaining children. Child devices are expected to determine if firmware loading is necessary and call qcom_geni_load_firmware(). Since Linux currently doesn't support loading firmware (and firmware may not be available), we probe all GENI peripherals to ensure that they always load firmware if necessary. Signed-off-by: Casey Connolly <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2025-10-28x86: Rename arch/x86/include/asm/pnp_def.h to include/pnp_def.hTom Rini
There is nothing x86-centric in this include file, and moving it will allow for some drivers to be compile-tested on sandbox. Signed-off-by: Tom Rini <[email protected]>
2025-10-09fw_loader: Split from fs_loader into separate library fileMarek Vasut
The script based firmware loader does not use anything from the fs_loader implementation. Separate it into its own library source file and convert the mediatek PHY to use this separate code. This should reduce the amount of code that is pulled in alongside the firmware loader, as the FS loader is no longer included. Signed-off-by: Marek Vasut <[email protected]>
2025-10-08misc: ti: k3: Tighten K3_FUSE dependenciesTom Rini
This driver cannot build without access to some platform specific header files. Express those requirements in Kconfig as well. Signed-off-by: Tom Rini <[email protected]>
2025-10-07misc: fs_loader: Use buffer pointer in request_firmware_into_buf_via_script()Marek Vasut
Use plain buffer pointer in request_firmware_into_buf_via_script() instead of a pointer to pointer. The later is not necessary as the request_firmware_into_buf_via_script() does not modify the buffer pointer. Update the mediatek driver to match. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Weijie Gao <[email protected]>
2025-09-20imx8: Add ahab_commit commandJohn Ripple
The ahab_commit command allows the user to commit into the SECO fuses that control the SRK key revocation information. This is used to Revoke compromised SRK keys. To use ahab_commit, the boot container must be built with an SRK revocation bit mask that is not 0x0. For the SPSDK provided by NXP, this means setting the 'srk_revoke_mask' option in the config file used to sign the boot container. The 'ahab_commit 0x10' can then be used to commit the SRK revocation information into the SECO fuses. Signed-off-by: John Ripple <[email protected]>
2025-09-20Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv ↵Tom Rini
into next CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/27673 - Switch to upstream devicetree for TH1520 platform - Remove fdt_high env variable - Support SMP on RISC-V cores with Zalrsc only - Make MPFS Generic - riscv: dts: starfive: prune redundant jh7110-common
2025-09-19misc: mpfs_syscontroller: add functions to read device tree overlaysJamie Gibbons
Include functions to use the system controller to read the device tree overlays which supports auto update functionality. Signed-off-by: Jamie Gibbons <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2025-09-18Merge patch series "Add support for MediaTek MT7987/MT7988 built-in 2.5Gb ↵Tom Rini
ethernet PHY (v4)" Weijie Gao <[email protected]> says: This patch adds PHY driver for MediaTek MT7987/MT7988 built-in 2.5Gb ethernet PHY. [trini: Change 'tristate' Kconfig to 'bool'] Link: https://lore.kernel.org/r/[email protected]
2025-09-18net: phy: Add MediaTek built-in 2.5Gb ethernet PHY driverWeijie Gao
The MediaTek MT7987/MT7988 SoCs features a built-in 2.5Gb PHY connected to GMAC1. The PHY supports 10/100/1000/2500 Mbps full-duplex only. The PHY requires one or two firmware files. Firmware for MT7988 has already been added to upstream: mediatek/mt7988/i2p5ge-phy-pmb.bin. MT7987 has two firmware files which will be add to upstream later: i2p5ge-phy-pmb.bin and i2p5ge-phy-DSPBitTb.bin. Environment variable can be set for firmware data loading: mt7987_i2p5ge_load_pmb_firmware for i2p5ge-phy-pmb.bin mt7987_i2p5ge_load_dspbit_firmware for i2p5ge-phy-DSPBitTb.bin mt7988_i2p5ge_load_pmb_firmware for i2p5ge-phy-pmb.bin This driver allows dedicated weak functions to be overridden by board to provide the firmware data: mt7987_i2p5ge_get_fw() for MT7987 mt7988_i2p5ge_get_fw() for MT7988 To enable the PHY, add the following not to device tree: &eth1 { status = "okay"; phy-mode = "xgmii"; phy-handle = <&phy15>; phy15: ethernet-phy@15 { compatible = "ethernet-phy-ieee802.3-c45"; reg = <15>; phy-mode = "xgmii"; }; }; Signed-off-by: Sky Huang <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
2025-09-18misc: fs_loader: allow using long script name in ↵Weijie Gao
request_firmware_into_buf_via_script() Use cmd_process() to remove the length limit of script name used for run_command(). Signed-off-by: Weijie Gao <[email protected]>
2025-09-18misc: fs_loader: allow returning actual firmware data size in ↵Weijie Gao
request_firmware_into_buf_via_script() It's important to return the actual firmware data size as some firmware files may have no checksum and need the size as the only way for firmware validation check. Signed-off-by: Weijie Gao <[email protected]>
2025-09-09misc: fs_loader: Initialize actread variableAlif Zakuan Yuslaimi
Initialize the actread variable to prevent undefined behavior that can occur if the variable is used before being assigned a value. This will help to prevent potential issues, especially if actread is used (e.g., read, incremented, or returned) before being explicitly set elsewhere in the code. Signed-off-by: Alif Zakuan Yuslaimi <[email protected]>
2025-08-26misc: fs_loader: Add request_firmware_into_buf_via_script() for flexible ↵Lucien.Jheng
firmware loading via U-Boot script This commit introduces a new API, request_firmware_into_buf_via_script(), to the fs_loader framework. This function allows firmware to be loaded into memory using a user-defined U-Boot script, providing greater flexibility for firmware loading scenarios that cannot be handled by static file paths or device/partition selection alone. Key features: - The API runs a specified U-Boot script (by name), which is responsible for loading the firmware into memory by any means (e.g., load from MMC, USB, network, etc.). - The script must set two environment variables: 'fw_addr' (the memory address where the firmware is loaded) and 'fw_size' (the size of the firmware in bytes). - The function validates these variables, copies the firmware into a newly allocated buffer (using memdup), and returns the pointer via the provided double pointer argument. - The maximum allowed firmware size is checked to prevent buffer overflows. - The environment variables are cleared after use to avoid stale data. - Detailed error messages are provided for all failure conditions to aid debugging. Usage example: 1. Define a U-Boot script in the environment that loads the firmware and sets the required variables: => env set my_fw_script 'load mmc 0:1 ${loadaddr} firmware.bin && env set fw_addr ${loadaddr} && env set fw_size ${filesize}' 2. In your code, call the new API: void *fw_buf = NULL; int ret = request_firmware_into_buf_via_script(&fw_buf, 0x46000000, "my_fw_script"); if (ret < 0) return ret; This approach allows board integrators and users to customize the firmware loading process without modifying the source code, simply by changing the script in the U-Boot environment. Signed-off-by: Lucien.Jheng <[email protected]> Reviewed-by: Marek Vasut <[email protected]> [trini: Fix printf of size_t needing to use %zx] Signed-off-by: Tom Rini <[email protected]>
2025-08-25Merge tag 'v2025.10-rc3' into nextTom Rini
Prepare v2025.10-rc3