summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2026-05-15firmware: scmi: sandbox: 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: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15spi: fsl_espi: fix read transactionsMichael Walle
Since commit 7917c2e35604 ("spi: fsl_espi: fix din offset") MTD is basically broken because any read transaction will get wrong data. While the commit in question will fix simple transfers (where both SPI_XFER_BEGIN and SPI_XFER_END is set), it will break the most common case, where opcode and address is send first and then data comes as a second transfer. This basically reverts commit 7917c2e35604 ("spi: fsl_espi: fix din offset") and make the fix particular for this simple case. Instead of providing two buffers for reading and writing, just malloc one which is used for both. This will work because the data is first written on the SPI bus and then it will be read (and overwite the written data) into the same buffer. Suggested-by: Tomas Alvarez Vanoli <[email protected]> Fixes: 7917c2e35604 ("spi: fsl_espi: fix din offset") Signed-off-by: Michael Walle <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: zynqmp: 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: Michal Simek <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: tegra186: 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: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: scmi: 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: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: sandbox: 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]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: mtk: 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: David Lechner <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: meson-secure-pwrc: 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: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: meson-gx-pwrc: 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: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: meson-ee-pwrc: 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: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: imx8mp-mediamix: 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: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: imx8m: 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: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: imx8: 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: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: imx8-legacy: 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: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: bcm6328: 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: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: domain: apple: 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: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15mmc: cv1800b_sdhci: honor 'no-1-8-v' DT propertyHiago De Franco
CV1800B SDHCI controller does support 1.8V, however, boards like MilkV-Duo 256M do not have a VCCIO 1.8V regulator (the bus is wired for 3.3V only). These boards set 'no-1-8-v' in their device tree, and mmc_of_parse() does respect this property. Later, when sdhci_setup_cfg() is called, it reads SDHCI_CAPABILITIES_1 from the hardware and unconditionally adds the UHS caps again based on what the controller advertises. Since the board cannot switch to 1.8V, the host issues CMD11 (voltage switch request), the card transitions, but the bus stays at 3.3V. The SD card stops responding until the next power cycle. Before calling sdhci_setup_cfg(), set the SDHCI_QUIRK_NO_1_8_V quirk when 'no-1-8-v' is present. The quirk causes the SDR104/SDR50/DDR50 bits to be masked out of the caps, allowing the card to initialize properly. This matches the pattern used by zynq_sdhci. Fixes: eb36f28ff721 ("mmc: cv1800b: Add sdhci driver support for cv1800b SoC") Signed-off-by: Hiago De Franco <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15power: pmic: 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: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15mmc: bootstd: 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]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-15mmc: sdhci: Start status timeout after command issueTanmay Kathpalia
The status polling timeout in sdhci_send_command() should measure the time spent waiting for the command interrupt after the command has been issued. Do not initialize the timer at function entry, since the command inhibit wait and setup path can consume time before SDHCI_COMMAND is written. Start the timer immediately after issuing the command instead. Signed-off-by: Tanmay Kathpalia <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2026-05-14gpio: Correct dependencies for MCP230xxCharles Perry
This driver depends on DM_I2C and DM_SPI, add it. Fixes: 3b639f643889 ("gpio: mcp230xx: Add support for models with SPI interface.") Signed-off-by: Charles Perry <[email protected]> Reviewed-by: Quentin Schulz <[email protected]>
2026-05-14rtc: ds1307: Handle oscillator stop flag set on ds1339 chipRonan Dalton
Currently the oscillator stop flag (OSF) bit is never checked or cleared on the DS1339 RTC chip. On getting the time from the RTC, check if the OSF bit is set, log a warning, and clear the flag. This matches the behavior of the DS1337 chip. Note that the `date` command always reads from the RTC even when setting or resetting the date, so the OSF flag is cleared in those cases as well. Signed-off-by: Ronan Dalton <[email protected]> Cc: Tom Rini <[email protected]> Cc: Simon Glass <[email protected]> Cc: Francesco Dolcini <[email protected]> Cc: Mark Tomlinson <[email protected]> Cc: Chris Packham <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-05-14Merge tag 'i2c-updates-for-2026.07-rc3' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-i2c updates for 2026.07-rc3 - designware_i2c: Staticize driver ops from Marek - i2c: Remove legacy CONFIG_SYS_I2C_SOFT -
2026-05-14i2c: Remove legacy CONFIG_SYS_I2C_SOFTTom Rini
The last users of this legacy i2c stack have been removed or converted to a modern part of the stack instead. Remove this code and references to it. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
2026-05-14i2c: designware_i2c: Staticize driver opsMarek Vasut
Set the ops structure as static. The structure is not accessible from outside of this driver. Reviewed-by: Heiko Schocher <[email protected]> Signed-off-by: Marek Vasut <[email protected]>
2026-05-13Merge tag 'u-boot-stm32-20260512' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-stm CI: https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/30081 - reset: stm32: Fix compilation error - Remove remaining non-existant STM32_RESET flag - configs: stm32mp13: Add SPI-NAND UBI boot support - Support metadata-driven A/B boot for STM32MP25
2026-05-13usb: gadget: f_acm: Fix memory leak in acm_addFrancois Berder
If udc_device_get_by_index fails, the f_acm struct was not released. Free it before returning the error. Signed-off-by: Francois Berder <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://patch.msgid.link/BESP194MB2805271AD5DBE47B322F8DC3DA3A2@BESP194MB2805.EURP194.PROD.OUTLOOK.COM Signed-off-by: Mattijs Korpershoek <[email protected]>
2026-05-12Merge patch series "add memdup_nul(), use it and memdup() in a few places"Tom Rini
Rasmus Villemoes <[email protected]> says: There are quite a few places where we allocate X+1 bytes, initialize the first X bytes via memcpy() and then set the last byte to 0. The kernel has a helper for that, kmemdup_nul(). Introduce a similar one, and start making use of it in a few places. Also the existing memdup() helper can be put to more use. There are lots more places one could modify. But for code shared with host tools, one would need to do some refactoring, putting memdup() and memdup_nul() in their own str-util.c TU which could then also be included in the tools build. Link: https://lore.kernel.org/r/[email protected]
2026-05-12drivers/core: use memdup() instead of malloc()+memcpy()Rasmus Villemoes
Use memdup() instead of open-coding it. In the dm_setup_inst() case, there was never any reason to use calloc(), as the whole allocation is definitely initialized via the immediately following memcpy(). Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2026-05-12virtio: fix return value checkChristian Pötzsch
The virtio_blk_do_single_req function returns ulong, which normally is the processed size, but in an error case can be the actual error. Use the special IS_ERR_VALUE macro to test for error. Addresses-Coverity-ID: CID 645833 (DEADCODE) & CID 645834 (NO_EFFECT) Signed-off-by: Christian Pötzsch <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2026-05-12arm: apple: Switch to board based text envJanne Grunau
The main use case for u-boot on Apple silicon based devices is to provide an EFI based bootloader for operating systems. This uses a generic u-boot image with DTBs passed from an earlier boot loader (m1n1). Use the generic board name "mac" for this purpose. Signed-off-by: Janne Grunau <[email protected]>
2026-05-12watchdog: apple: Add "apple,t8103-wdt" compatibleJanne Grunau
After discussion with the devicetree maintainers we agreed to not extend lists with the generic compatible "apple,wdt" anymore [1]. Use "apple,t8103-wdt" as base compatible as it is the SoC driver and bindings were originally written for. The t602x (M2 Pro/Max/Ultra) devicetrees submitted in [2] use this compatible as fallback instead of "apple,wdt". Link: https://lore.kernel.org/asahi/[email protected]/ [1] Link: https://lore.kernel.org/asahi/[email protected]/ [2] Signed-off-by: Janne Grunau <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Acked-by: Mark Kettenis <[email protected]>
2026-05-12spi: apple: Add "apple,t8103-spi" compatibleJanne Grunau
After discussion with the devicetree maintainers we agreed to not extend lists with the generic compatible "apple,spi" anymore [1]. Use "apple,t8103-spi" as base compatible as it is the SoC driver and bindings were originally written for. The t602x (M2 Pro/Max/Ultra) devicetrees submitted in [2] use this compatible as fallback instead of "apple,spi". Link: https://lore.kernel.org/asahi/[email protected]/ [1] Link: https://lore.kernel.org/asahi/[email protected]/ [2] Signed-off-by: Janne Grunau <[email protected]> Acked-by: Mark Kettenis <[email protected]>
2026-05-12power: domain: apple: Add "apple,t8103-pmgr-pwrstate" compatibleJanne Grunau
After discussion with the devicetree maintainers we agreed to not extend lists with the generic compatible "apple,pmgr-pwrstate" anymore [1]. Use "apple,t8103-pmgr-pwrstate" as base compatible as it is the SoC driver and bindings were originally written for. The t602x (M2 Pro/Max/Ultra) devicetrees submitted in [2] use this compatible as fallback instead of "apple,pmgr-pwrstate". Link: https://lore.kernel.org/asahi/[email protected]/ [1] Link: https://lore.kernel.org/asahi/[email protected]/ [2] Signed-off-by: Janne Grunau <[email protected]> Acked-by: Mark Kettenis <[email protected]>
2026-05-12pinctrl: apple: Add "apple,t8103-pinctrl" compatibleJanne Grunau
After discussion with the devicetree maintainers we agreed to not extend lists with the generic compatible "apple,pinctrl" anymore [1]. Use "apple,t8103-pinctrl" as fallback compatible as it is the SoC driver and bindings were originally written for. The t602x (M2 Pro/Max/Ultra) devicetrees submitted in [2] use this compatible as fallback instead of "apple,t8103-pinctrl". Link: https://lore.kernel.org/asahi/[email protected]/ [1] Link: https://lore.kernel.org/asahi/[email protected]/ [2] Signed-off-by: Janne Grunau <[email protected]> Acked-by: Mark Kettenis <[email protected]>
2026-05-12nvme: apple: add "apple,t8103-nvme-ans2" compatibleJanne Grunau
After discussion with the devicetree maintainers we agreed to not extend lists with the generic compatible "apple,nvme-ans2" anymore [1]. Add "apple,t8103-nvme-ans2" as fallback compatible as this is the SoC the driver and bindings were originally written for. The t602x (M2 Pro/Max/Ultra) devicetrees submitted in [2] use this compatible as fallback instead of "apple,t8103-nvme-ans2". Link: https://lore.kernel.org/asahi/[email protected]/ [1] Link: https://lore.kernel.org/asahi/[email protected]/ [2] Signed-off-by: Janne Grunau <[email protected]> Acked-by: Mark Kettenis <[email protected]>
2026-05-12mmc: sdhci-cadence: trigger tuning for SD HS mode on SD6HC (v6) PHYTze Yee Ng
The Cadence SD6HC (SDHCI spec v4.20+) controller uses a soft PHY whose DLL delay characteristics vary with PVT (Process, Voltage, Temperature) and board-level trace routing. A static delay value programmed via device tree for SD High Speed mode is insufficient because the optimal sampling point varies per board, SD card, and operating conditions. Runtime calibration is required. While the SD Physical Layer Specification does not mandate tuning for SD HS mode (only for UHS-I SDR50/SDR104), the Cadence SD6HC PHY requires runtime calibration of its receive data delay line to find a valid sampling window under constrained clock conditions. The tuning is triggered from the set_ios_post callback because at that moment hardware has committed the new bus width, clock frequency, and speed mode to the controller registers. This ensuring the tuning sequence runs at the correct SD HS operating conditions. The tuning is gated by a device tree property "cdns,sd-hs-tuning" so that only boards requiring runtime calibration opt in. When enabled, the driver performs a 40-tap DLL sweep using CMD19 to find the largest consecutive passing window, then programs the midpoint into PHY_DLL_SLAVE_CTRL_REG. To enable on a board, add to the MMC node in device tree: &mmc { cdns,sd-hs-tuning; }; Signed-off-by: Tze Yee Ng <[email protected]>
2026-05-12reset: stm32: Fix compilation errorPatrice Chotard
The following compilation error occurs when environment variable KBUILD_OUTPUT is not set : drivers/reset/stm32/stm32-reset-mp21.c:8:10: fatal error: stm32-reset-core.h: No such file or directory 8 | #include <stm32-reset-core.h> | ^~~~~~~~~~~~~~~~~~~~ As stm32-reset-core.h is located in same directory than stm32-reset-mp21.c, we should use #include "stm32-reset-core.h". Signed-off-by: Patrice Chotard <[email protected]> Reviewed-by: Raphaël Gallais-Pou <[email protected]>
2026-05-09Merge branch 'master' of git://source.denx.de/u-boot-usbTom Rini
- DWC3 crash fix, Kconfig logic corrections
2026-05-09usb: dwc3: Fix crash on fastboot exit due to incorrect memory freeBalaji Selvanathan
The dwc3_free_one_event_buffer() function incorrectly called free() on event buffer structures allocated with devm_kzalloc(). This caused heap corruption and a synchronous abort when exiting fastboot mode via "fastboot continue". Device-managed memory is automatically freed when the device is removed, so manual deallocation causes the heap allocator to access corrupted metadata. Fixes: 884b10e86a05 ("usb: dwc3: core: fix memory leaks in event buffer cleanup") Signed-off-by: Balaji Selvanathan <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2026-05-09usb: Correct dependencies around USB_EMULTom Rini
The symbol USB_EMUL is how sandbox has access to USB. It's implementation however enforces a few other requirements. It must have SCSI enabled, and in turn that means it must have BLK enabled. Finally, we should not be using SANDBOX itself as a symbol to decide what to build or not build here, as SANDBOX is selected for COMPILE_TEST builds as well and so may not have enabled the sandbox specific USB support. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2026-05-09reset: Correct dependencies for RESET_RZG2L_USBPHY_CTRLTom Rini
As exposed by "make randconfig", we have an issue with the dependencies for RESET_RZG2L_USBPHY_CTRL. As this functionally depends on REGULATOR_RZG2L_USBPHY, express this dependency directly in Kconfig as well. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2026-05-09usb: gadget: Correct dependencies for USB_RENESAS_USBHSTom Rini
The USB_RENESAS_USBHS functionality can only work with DM_USB_GADGET enabled, so express this dependency in Kconfig. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2026-05-08virtio: fix boot device hunting in qemu with virtioLudwig Nussel
Commit 70101c3217ae ("virtio: mmio: Return error codes on probe failures") returns -ENODEV where it would return 0 before. That path is apparently hit in qemu and breaks boot device discovery (virtio_bootdev_hunt() expects only ENOENT). So return -ENOENT in that path instead. The remaining two error returns in the function are untouched as I don't know where they play a role. Signed-off-by: Ludwig Nussel <[email protected]> Reviewed-by: Simon Glass <[email protected]> Acked-by: Kuan-Wei Chiu <[email protected]>
2026-05-06Merge tag 'mmc-for-2026.07-rc2' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-mmc - Enable FPWM bits for tps65941 - Use max-frequency to get clock rate for msm_sdhci - Fix and update for pfuze100
2026-05-06net: phy: mscc: add support for the VSC8572Charles Perry
This is similar to the VSC8574 according to the Linux commit that adds support for it [1]. This was tested on an HX1000 board with SGMII (PIC64-HX SoC which has a GEM MAC). [1]: https://lore.kernel.org/all/dfabe39a52efcd2cfff9358f271b8673143503b8.1480497966.git.neill.whillans@codethink.co.uk/ Signed-off-by: Charles Perry <[email protected]> Reviewed-by: Manikandan Muralidharan <[email protected]>
2026-05-06net: macb: add gigabit implementation for fixed-linkChristian DREHER
A fixed gigabit link on a non-gigabit controller is only rejected during PHY init (even though there is no PHY to init), because, on device-tree parsing, the controller is not probed, and it is still unknown whether it is gigabit-capable. This code was only tested on emulator with a full-duplex RGMII interface, but is expected to work in GMII or half-duplex as well. Signed-off-by: Christian DREHER <[email protected]>
2026-05-06net: macb: do not set user_io when it does not existChristian DREHER
Cadence Ethernet MAC has a feature named user_io, which provides some input and some output signals for arbitrary purpose in the SoC. From the driver code, I understand that, on Atmel SoC, it is used to drive the PHY mode. At least on Cadence IP7014 r1p12, this feature is optional, and I am working on a SoC that does not instantiate it. The presence of this feature is advertised in DCFG1, this patch merely disables the access to the user_io register based on this information. I did not apply this change to the non-gigabit capable versions of the IP, as I do not have documentation for them, and a new non-gigabit instance is unlikely to appear. I prefer avoiding regressions on old systems. Signed-off-by: Christian DREHER <[email protected]>
2026-05-06net: macb: use SA1 for MAC filtering on GEMChristian DREHER
The MACB uses specific address registers (SA Top and Bottom) to filter source or destination MAC addresses. On the Gigabit Ethernet version, SA1B is @0x88. On the non-GEM version, SA1B is @0x98. Before this commit, the code was always writing 0x98. By chance, on GEM, this is the address of SA3B, allowing the driver to work anyway. The motivation for this change is to be able to use the driver on an instance of the GEM with less than 4 SA registers. Signed-off-by: Christian DREHER <[email protected]>
2026-05-06net: macb: include arch/clk.h only when necessaryChristian DREHER
It does not exist in my setup (an on-going arm64 SoC), and removing it does not cause any missing declaration, but some code called when CONFIG_CLK is missing calls get_macb_pclk_rate, which is only defined in arch/arm/mach-at91/include/mach/clk.h Signed-off-by: Christian DREHER <[email protected]>