summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2025-10-02Merge tag 'u-boot-dfu-next-20251001' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dfu into next u-boot-dfu-next-20251001 CI: - https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/27791 Fastboot: - Fix has-slot command when using nand back-end. USB gadget: - Add missing null checks to atmel, dwc2 drivers (smatch) - Remove redundant check in dwc3 gadget (smatch)
2025-09-30Merge tag 'u-boot-socfpga-next-20250930' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-socfpga into next SoCFPGA updates for v2025.10: CI: https://source.denx.de/u-boot/custodians/u-boot-socfpga/-/pipelines/27762 This pull request brings a set of updates across SoCFPGA platforms covering Agilex5, Agilex7, N5X, and Stratix10. The changes include: * Agilex5 enhancements: - USB3.1 enablement and DWC3 host driver support - System Manager register configuration for USB3 - Watchdog timeout increase and SDMMC clock API integration - dcache handling improvements in SMC mailbox path - Enable SPL_SYS_DCACHE_OFF in defconfig * Clock driver improvements: - Introduce dt-bindings header for Agilex clocks - Add enable/disable API and EMAC clock selection fixes - Replace manual shifts with FIELD_GET usage * DDR updates: - IOSSM mailbox compatibility check - Correct DDR calibration status handling * Device tree changes: - Agilex5: disable cache allocation for reads - Stratix10: add NAND IP node - Enable driver model watchdog - Enable USB3.1 node for Agilex5 * Config cleanups: - Simplify Agilex7 VAB defconfig - Remove obsolete SYS_BOOTM_LEN from N5X VAB config - Enable CRC32 support for SoCFPGA - Increase USB hub debounce timeout Overall this set improves reliability of DDR and cache flows, adds missing USB and MMC features for Agilex5, and refines clock and configuration handling across platforms. This patch set has been tested on Agilex 5 devkit, and Agilex devkit.
2025-09-30pwm: meson: Stop premature exit from for loopAndrew Goodbody
In meson_pwm_probe the for loop attempts to get the name of a clock but the following if..else statements only perform useful work if -ENODATA is returned from clk_get_by_name. If clk_get_by_name simply succeeds then this results in a premature exit from the for loop and the following code can never be reached. Make the else clause only apply for an error return from clk_get_by_name. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-09-30clk: meson: Remove unreachable codeAndrew Goodbody
A second return following the first return is unreachable code so remove it. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-09-30adc: meson-saradc: uint cannot be less than zeroAndrew Goodbody
timeout is declared as a uint but then tested for being less than zero which must always fail. Change the while loop for a pre-decrement on timeout and test timeout for being zero. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-09-30pinctrl: meson: support gpio toggle commandYang Xiwen
meson_gpio_get() always assumes gpio is configured to input mode. This is incorrect and breaks `gpio toggle` command: gpio: pin aobus-banks2 (gpio 2) value is 0 Warning: value of pin is still 1 Fix it by adding the logic to handle both input and output mode. Fixes: 2009a8d03fe5 ("pinctrl: meson: add GPIO support") Signed-off-by: Yang Xiwen <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-09-30net: mdio: mux-meson-gxl: set reversed bit when using internal phyNeil Armstrong
This bit is necessary to receive packets from the internal PHY. Without this bit set, no activity occurs on the interface. Normally u-boot sets this bit, but if u-boot is compiled without net support, the interface will be up but without any activity. The vendor SDK sets this bit along with the PHY_ID bits. Ported from the Linux change at [1] from Da Xu merged in commit [2]. [1] https://lore.kernel.org/all/[email protected]/ [2] b23285e93bef ("net: mdio: mux-meson-gxl: set reversed bit when using internal phy") Suggested-by: Da Xue <[email protected]> Link: https://lore.kernel.org/r/20250502-u-boot-topic-mdio-mux-gxl-bit28-v1-1-399f6c3db154@linaro.org Signed-off-by: Neil Armstrong <[email protected]>
2025-09-30usb: dwc3: Remove redundant testAndrew Goodbody
In dwc3_ep0_complete_data there is a test for 'r' being null and the code will return at that point if so. After that point 'r' is guaranteed to not be null and testing for that is redundant. Remove the test for 'r' being non-null. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-09-30usb: dwc2: Add missing null checkAndrew Goodbody
Add in the missing null check for dev->driver that is present at other points in the function before it is dereferenced. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-09-30usb: gadget: atmel: Add missing null checkAndrew Goodbody
Add in the missing null check for udc->driver that is present at other points in the function before it is dereferenced. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-09-30fastboot: Fix has-slot command always returning yes for fb_nandChance Yang
The issue was a mismatch in return value conventions between functions: - getvar_get_part_info() expects >= 0 for success - fb_nand_lookup() returns 0 on success, 1 on failure (from mtdparts_init and find_dev_and_part) When partition didn't exist, fb_nand_lookup returned 1, but fastboot_nand_get_part_info passed it directly to getvar_get_part_info, which treated 1 >= 0 as success, causing has-slot to always return yes. Fix by converting positive return values to -ENOENT in fastboot_nand_get_part_info to match the expected error convention. Signed-off-by: Chance Yang <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2025-09-30drivers: clk: agilex: Use FIELD_GET during EMAC clock selectionNaresh Kumar Ravulapalli
FIELD_GET() macro is used during EMAC clock source selection for better code readability and maintainability. Signed-off-by: Naresh Kumar Ravulapalli <[email protected]> Reviewed-by: Tien Fong Chee <[email protected]>
2025-09-30drivers: clk: agilex: Fix EMAC clock source selectionNaresh Kumar Ravulapalli
Fix the incorrect bit masking and bit shift used to compute EMAC control which in turn is used to select EMAC clock from EMAC source A or B. Signed-off-by: Naresh Kumar Ravulapalli <[email protected]> Reviewed-by: Tien Fong Chee <[email protected]>
2025-09-30mmc: socfpga_dw_mmc: Enable/disable SDMMC clock via APIAlif Zakuan Yuslaimi
Update the driver to enable or disable the SDMMC clock via clock driver model API instead of doing it in the driver itself. This allows for scalability of the driver for various SoCFPGA devices. Signed-off-by: Alif Zakuan Yuslaimi <[email protected]> Reviewed-by: Tien Fong Chee <[email protected]>
2025-09-30drivers: clk: agilex: Support for enable/disable APIAlif Zakuan Yuslaimi
Update Agilex clock driver to support enabling or disabling the peripheral clocks via clock driver model APIs. The caller will pass the clock ID to this driver and the driver will then proceed to manipulate the desired bit in the Agilex clock manager peripheral PLL register based on the given clock ID. Signed-off-by: Alif Zakuan Yuslaimi <[email protected]> Reviewed-by: Tien Fong Chee <[email protected]>
2025-09-30drivers: ddr: altera: Correct DDR calibration status checkNaresh Kumar Ravulapalli
Bit 3 of the seq2core register is no longer set to indicate calibration completion. Instead, added polling of the seq2core register until it reads 0b00000111, signaling that the Nios processor has started the calibration process. Signed-off-by: Naresh Kumar Ravulapalli <[email protected]> Reviewed-by: Tien Fong Chee <[email protected]>
2025-09-30drivers: ddr: altera: Check IOSSM mailbox compatibilityNaresh Kumar Ravulapalli
Compatibility check of IOSSM mailbox with U-Boot is performed by verifying the mailbox specification version. If check fails, appropriate error message is displayed. Signed-off-by: Naresh Kumar Ravulapalli <[email protected]> Reviewed-by: Tien Fong Chee <[email protected]>
2025-09-29i2c: designware_i2c: Don't warn if reset DT property is not presentMaksim Kiselev
If reset property is missing in DT, then we get this warning: designware_i2c@0: Can't get reset: -2 Avoid this by checking if reset DT property is present, first. Fixes: 622597dee4f ("i2c: designware: add reset ctrl to driver") Signed-off-by: Maksim Kiselev <[email protected]> Reviewed-by: Heiko Schocher <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2025-09-26Merge tag 'u-boot-imx-next-20250926' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/27737 - Add support for i.MX94 EVK. - Set CONFIG_ETHPRIME to eth0 on phycore-imx93. - Expand the nxp_fspi support to i.MX8QXP/8DXL/8ULP.
2025-09-26spi: nxp_fspi: Support i.MX8ULP flexspiYe Li
Add i.MX8ULP flexspi compatible string and driver data. The flexspi on i.MX8ULP only has 16 LUT sequences and uses 1KB RX FIFO. Signed-off-by: Ye Li <[email protected]>
2025-09-26spi: nxp_fspi: Support i.MX8DXL flexspiYe Li
According to i.MX8DXL A1 errata ERR050601, concurrent read accesses from the A35 cores to the peripherals within the LSIO subsystem (region 0_5DXX_XXXX) and address spaces in the regions [0_0000_0000 – 0_1BFF_FFFF] and [4_0000_0000 – 4_3FFF_FFFF] can collide and cause data corruption in the returned data, with no failure report. Even a single A35 core accessing both these regions can trigger the issue because an A35 core can have more than one parallel read operation in progress. The flexspi0 AHB memory is in LSIO region mentioned in above errata. So we can't use AHB read, only can read data from FIFO. Add the compatible string for 8DXL and use a flag for the IPS read. Signed-off-by: Ye Li <[email protected]>
2025-09-26spi: nxp_fspi: Support i.MX8QXP flexspiYe Li
Add the compatible string and driver data for i.MX8QXP. Signed-off-by: Ye Li <[email protected]>
2025-09-26spi: nxp_fspi: Use second last LUT entry for AHB readYe Li
Use a dedicated LUT (second last) for AHB read command, so we can directly read from the AHB memory-mapped address and booting M core for XIP on Flexspi NOR. Signed-off-by: Ye Li <[email protected]>
2025-09-26pinctrl: nxp: Add i.MX94 daisy register offsetAlice Guo
Define the daisy register offset for i.MX94 at 0x608 within the iomuxc register space. This enables correct pad selection for daisy chain configuration on i.MX94 platforms. Signed-off-by: Jacky Bai <[email protected]> Signed-off-by: Alice Guo <[email protected]> Acked-by: Peng Fan <[email protected]>
2025-09-26cpu: imx94: Add support for i.MX94 in get_imx_type_str()Alice Guo
Add a case for i.MX94 to return the correct string identifier in the get_imx_type_str() function. This ensures proper CPU type reporting for i.MX94 platforms. Signed-off-by: Alice Guo <[email protected]>
2025-09-25spl: nand: initialize writesize for am335xYegor Yefremov
Initialize mtd->writesize in nand_init() as otherwise nand_page_size() returns 0 and this affects NAND read operations. Signed-off-by: Yegor Yefremov <[email protected]>
2025-09-26usb: host: Tighten USB musb-new host glue driver dependenciesTom Rini
A few of the USB musb-new host glue drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well. Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2025-09-26usb: host: Tighten USB host driver dependenciesTom Rini
A few of the USB host drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well. Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2025-09-26usb: gadget: max3420_udc: Remove unused driverTom Rini
This driver was never enabled by any platforms after being added to the tree over 5 years ago. Remove it. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2025-09-26usb: gadget: bcm_udc_otg: Remove unused driverTom Rini
This driver is unused since the removal of the bcm28155_ap board in commit 0f6807e77b07 ("arm: Remove bcm28155_ap board"). Remove it. Fixes: 0f6807e77b07 ("arm: Remove bcm28155_ap board") Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2025-09-26usb: gadget: Tighten requirements on USB_GADGET_ATMEL_USBATom Rini
This driver requires some mach-at91 specific header files in order to build. Express that requirement in Kconfig as well. Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2025-09-26usb: dwc3: Tighten driver glue dependenciesTom Rini
A few of the platform specific DWC3 host glue drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well. Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2025-09-25pci: pcie-rcar-gen4: Add missing 1ms delay after PWR reset assertionMarek Vasut
R-Car V4H Reference Manual R19UH0186EJ0130 Rev.1.30 Apr. 21, 2025 page 585 Figure 9.3.2 Software Reset flow (B) indicates that for peripherals in HSC domain, after reset has been asserted by writing a matching reset bit into register SRCR, it is mandatory to wait 1ms. Because it is the controller driver which can determine whether or not the controller is in HSC domain based on its compatible string, add the missing delay into the controller driver. This 1ms delay is documented on R-Car V4H and V4M, it is currently unclear whether S4 is affected as well. This patch does apply the extra delay on R-Car S4 as well. Signed-off-by: Marek Vasut <[email protected]>
2025-09-25pci: pcie-rcar-gen4: Assure reset occurs before DBI accessMarek Vasut
Assure the reset is latched and the core is ready for DBI access. On R-Car V4H, the PCIe reset is asynchronized and does not take effect immediately, but needs a short time to complete. In case DBI access happens in that short time, that access generates an SError. Make sure that condition can never happen, read back the state of the reset which should turn the asynchronized reset into synchronized one, and wait a little over 1ms to add additional safety margin. Signed-off-by: Marek Vasut <[email protected]>
2025-09-25pci: pcie-rcar-gen4: Fix inverted break condition in PHY initializationMarek Vasut
R-Car V4H Reference Manual R19UH0186EJ0130 Rev.1.30 Apr. 21, 2025 page 4581 Figure 104.3b Initial Setting of PCIEC(example), third quarter of the figure indicates that register 0xf8 should be polled until bit 18 becomes set to 1. Register 0xf8 bit 18 is 0 immediately after write to PCIERSTCTRL1 and is set to 1 in less than 1 ms afterward. The current readl_poll_timeout() break condition is inverted and returns when register 0xf8 bit 18 is set to 0, which in most cases means immediately. In case CONFIG_DEBUG_LOCK_ALLOC=y , the timing changes just enough for the first readl_poll_timeout() poll to already read register 0xf8 bit 18 as 1 and afterward never read register 0xf8 bit 18 as 0, which leads to timeout and failure to start the PCIe controller. Fix this by inverting the poll condition to match the reference manual initialization sequence. Signed-off-by: Marek Vasut <[email protected]>
2025-09-25mmc: core: style fixes in mmc.cBhimeswararao Matsa
Fix a couple of style issues reported by checkpatch.pl: - Replace `#ifdef CONFIG_MMC_TRACE` with `#if IS_ENABLED(CONFIG_MMC_TRACE)` to follow the preferred kernel style for config-dependent branches. - Drop explicit zero initialization of a static variable. No functional change intended. Signed-off-by: Bhimeswararao Matsa <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-09-25power: regulator: Fix incorrect use of binary andAndrew Goodbody
In regulator_list_autoset there is a test for ret being non-zero and error being zero but it uses the binary '&' instead of the logical '&&' which could well lead to unexpected results. Correct this to use the logical '&&' instead. This issue found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-09-23Merge tag 'v2025.10-rc5' into nextTom Rini
Prepare v2025.10-rc5
2025-09-22Merge tag 'u-boot-imx-next-20250922' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/27684 - Add i.MX8 ahab-commit command. - Add support for flashing board with UUU on imx93_frdm. - Fix the acces of PFUZE100 regulator desc. - Add more i.MX6 PWM clock definitions. - Enable OP-TEE on phytec-imx8m and update documentation. - Enable PCI host controller on iMX95 19x19 EVK. [trini: Fixup spacing issues] Signed-off-by: Tom Rini <[email protected]>
2025-09-22clk: imx6q: Add definition for missing PWM clocksRicardo Simoes
Following the work done in commit 7f39ad5a ("clk: imx6q: Add definition for IMX6QDL_CLK_PWM1"), this commit adds definitions for PWM2, PWM3, and PWM4 clocks. Allowing one to use these PWM modules together with DM_CLK. Note that the solution was verified only against PWM3. Signed-off-by: Ricardo Simoes <[email protected]> Signed-off-by: Mark Jonas <[email protected]>
2025-09-20power: regulator: pfuze100: Fix accessing the regulator descPeng Fan
se_desc loop check is wrong, it relies on the desc always has the expected name to end of the loop. It works because the device tree has the expected name as of now, but this may not be always true. Drop se_desc by moving the check into probe and fix the loop check. Reported-by: Andrew Goodbody <[email protected]> Cc: Tom Rini <[email protected]> Cc: Fabio Estevam <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2025-09-20clk: clk-uclass: Fix clk_set_default_rates issueYe Li
clk_set_rate returns the actual clock rate, When assigned clock rate is higher than 0x7FFFFFFF, the return value will be recognized as error. Change to IS_ERR_VALUE to check the return value. Signed-off-by: Ye Li <[email protected]>
2025-09-20power: regulator: Add vin-supply for GPIO and Fixed regulatorsYe Li
Enable the vin-supply when probing the regulator device. Signed-off-by: Ye Li <[email protected]>
2025-09-20clk: imx: Add imx95 blkctrl clock driverYe Li
Add iMX95 blkctrl clock driver which implements clocks for HSIOMIX blkctrl and LVDS blkctrl. Since multiple blkctrl device for different blkctrl may be enabled, and each has dedicated clock id from 0. We must enable CLK_AUTO_ID to avoid conflict on clock id. Signed-off-by: Ye Li <[email protected]>
2025-09-20pci: pcie_dw_imx: Add iMX9 support to the driverYe Li
Adding iMX95/iMX94 support to the dw driver. Follow kernel driver stype to use flags to distinguish the characteristic of different platforms. Signed-off-by: Ye Li <[email protected]>
2025-09-20pci: dw: Fix wrong register used for PCI_COMMANDYe Li
Wirting to command register should use PCI_COMMAND not PCI_PRIMARY_BUS Signed-off-by: Ye Li <[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-19Merge tag 'u-boot-stm32-20250919' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-stm into next CI: - https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/27668 STM32MP2: - Add SPI flashes support - Add RIFSC system bus driver fixes
2025-09-19gpio: mpfs_gpio: fix compilation warningsEoin Dickson
mchp_gpio_get_value() should return int instead of bool, and some casts are needed. Signed-off-by: Eoin Dickson <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>