summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2025-10-28ufs: renesas: Update Kconfig entry help textMarek Vasut
The current Renesas UFS driver contains initialization code that is specific to R-Car S4 R8A779F0. The upcoming R-Car X5H initialization code is different and contained in a separate driver. Update the Kconfig entry help text for the current driver to help discern it from the X5H driver. No functional change. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-10-28ufs: Call ufs_scsi_bind() from uclass .post_bindMarek Vasut
Instead of duplicating the ufs_scsi_bind() call in every driver, call it from UFS uclass .post_bind callback for every driver in one place. While doing so, inline ufs_scsi_bind() directly into ufs_post_bind() as trivial device_bind_driver() call. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Link: https://patch.msgid.link/[email protected] [narmstrong: also updated the rockchip and mediatek drivers] Signed-off-by: Neil Armstrong <[email protected]>
2025-10-28spi: spi-uclass: Use unwind gotoAndrew Goodbody
In _spi_get_bus_and_cs the check for stacked parallel support needing multiple chip select support does a direct return on error. Instead it should set the error code in ret and then use the unwind goto. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28spi: fspi: Logical or used instead of logical andAndrew Goodbody
In erratum_err050568 the test for apllicability uses logical or to check multiple chip IDs but this means the test will always evaluate to true as at least 1 term will always be true. Logical and should have been used so that the expression evaluates to true if all terms are true which would mean that no chip ID of interest was in use. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28spi: npcm-fiu: Remove repeated testAndrew Goodbody
In npcm_fiu_uma_operation to enter a code block nbytes must be non-zero. So testing for nbytes inside the code block is redundant and can be removed. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28spi: ich: Do not use uninitialised valueAndrew Goodbody
In ich_spi_exec_op_swseq the variable with_address is only assigned a value in the case of op->addr.nbytes being non-zero. Initialise with_address to zero. so that it is always valid. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28Merge patch series "spi: cadence_qspi: Fix Smatch reported issues"Tom Rini
Andrew Goodbody <[email protected]> says: Smatch reported issues with an off by 1 error in a test for a timeout and also an error exit that did not set an error code. Link: https://lore.kernel.org/r/[email protected]
2025-10-28clk: Return value calculated by ERR_PTRAndrew Goodbody
In clk_set_default_get_by_id ret is passed to ERR_PTR but nothing is done with the value that this calculates which is obviously not the intention of the code. This is confirmed by the code around where this function is called. Instead return the value from ERR_PTR. This issue found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Acked-by: Quentin Schulz <[email protected]>
2025-10-28Merge patch series "clk: versaclock: Fix two issues found by Smatch"Tom Rini
Andrew Goodbody <[email protected]> says: Should return value calculated by ERR_PTR as calling code attempts to check for it. Also do not dereference a pointer that could be an error pointer before checking it with IS_ERR. Link: https://lore.kernel.org/r/[email protected]
2025-10-28mmc: owl_mmc: Do not dereference data before NULL checkAndrew Goodbody
In owl_mmc_prepare_data there is a NULL check for the pointer data but it happens after data has already been dereferenced. Refactor the code so that the NULL check happens before any code dereferences data. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28gpio: intel_gpio: Initialise or0 and or1Andrew Goodbody
In intel_gpio_set_flags the two variables or0 and or1 may be used uninitialised. Correct this by setting initial values in the declaration. Also there is no need to use '|=' when the initial value is 0 and there is only one assignment performed to each variable so just use '=' instead. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28ufs: amd-versal2: Fix indentMarek Vasut
Fix indent, use tabs. No functional change. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-10-28ufs: core: Rename ufs.c to ufs-uclass.cMarek Vasut
Previous commit folded existing ufs-uclass.c into ufs.c , which produced a nice and reviewable change , but also broke the UCLASS should be in *-uclass.c pattern. Fix it. Keep the change separate from the previous one to make this reviewable. Signed-off-by: Marek Vasut <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-10-28ufs: core: Fold ufs-uclass into ufsMarek Vasut
Move the few lines of ufs-uclass.c into ufs.c and remove the ufs-uclass.c . No functional change. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-10-28ufs: core: Keep Makefile and Kconfig list sortedMarek Vasut
Sort the Makefile and Kconfig lists alphabetically. No functional change. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-10-28spi: cadence_qspi: Do not return unset error codeAndrew Goodbody
In spi_calibration if the low range fails to calibrate then the code attempted to return the variable err but this has not been set in this case. Instead just return -EIO. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28spi: cadence_qspi: Off by 1 in test for timeoutAndrew Goodbody
In cadence_qspi_apb_exec_flash_cmd the test for a timeout uses a post-decrement on the variable retry which will result in a value of -1 after the loop exit, or it would if the variable were signed. To fix this make retry a signed variable and test its value for being equal to -1. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28ufs: Add MediaTek UFS driverIgor Belwon
Add the UFS driver for MediaTek platforms. Loosely based on the Linux driver, this UFS driver can successfully get a link and R/W access to the UFS chip on the MediaTek MT6878 mobile SoC, when U-Boot is running as lk, or as the kernel (Secure world access is not tested) Signed-off-by: Igor Belwon <[email protected]> Link: https://patch.msgid.link/20251011-mtk-ufs-uboot-v1-3-a05f991ee150@mentallysanemainliners.org Signed-off-by: Neil Armstrong <[email protected]>
2025-10-28ufs: unipro: Add PA_SCRAMBLING propertyIgor Belwon
This property is required for proper I/O access on the MediaTek MT6878 UFS controller, and is part of UniPro specifications. Signed-off-by: Igor Belwon <[email protected]> Link: https://patch.msgid.link/20251011-mtk-ufs-uboot-v1-2-a05f991ee150@mentallysanemainliners.org Signed-off-by: Neil Armstrong <[email protected]>
2025-10-28ufs: rockchip: Add initial supportShawn Lin
This patch adds initial support for UFS controller on Rockchip platforms. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Shawn Lin <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-10-28ufs: core: Add ufshcd_dme_enable() and ufshcd_dme_reset()Shawn Lin
In order for host drivers to use. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Shawn Lin <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-10-28ufs: Add bRefClkFreq attribute settingJared McArthur
A UFS device needs its bRefClkFreq attribute set to the correct value before switching to high speed. If bRefClkFreq is set to the wrong value, all transactions after the power mode change will fail. The bRefClkFreq depends on the host controller and the device. Query the device's current bRefClkFreq and compare with the ref_clk specified in the device-tree. If the two differ, set the bRefClkFreq to the device-tree's ref_clk frequency. Taken from Linux kernel v6.17 (drivers/ufs/core/ufshcd.c and include/ufs/ufs.h) and ported to U-Boot. Signed-off-by: Jared McArthur <[email protected]> Reviewed-by: Bryan Brattlof <[email protected]> Reviewed-by: Udit Kumar <[email protected]> Reviewed-by: Neha Malcom Francis <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-10-28ufs: Add support for sending UFS attribute requestsJared McArthur
Some UFS attributes must be set before a UFS device is initialized. Add ufshcd_query_attr and ufshcd_query_attr_retry to send UFS attribute requests. Taken from Linux Kernel v6.17 (drivers/ufs/core/ufshcd.c) and ported to U-Boot. Signed-off-by: Jared McArthur <[email protected]> Reviewed-by: Bryan Brattlof <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Udit Kumar <[email protected]> Reviewed-by: Neha Malcom Francis <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-10-28ufs: Fix wrong bitfield usage for Data Direction in Transfer RequestKunihiko Hayashi
Commit d232d7fdbf6f ("ufs: core: sync ufshci.h with Linux v6.12") updated the Data Direction values from bitmask values to simple enumerations. Before: enum { UTP_NO_DATA_TRANSFER = 0x00000000, UTP_HOST_TO_DEVICE = 0x02000000, UTP_DEVICE_TO_HOST = 0x04000000, }; Updated: enum utp_data_direction { UTP_NO_DATA_TRANSFER = 0, UTP_HOST_TO_DEVICE = 1, UTP_DEVICE_TO_HOST = 2, }; However, the U-Boot code still uses these values directly without shifting, and resulting in wrong bitfield placement in the Transfer Request Descriptor. This fixes the issue by applying the necessary shift to align the value. Fixes: d232d7fdbf6f ("ufs: core: sync ufshci.h with Linux v6.12") Signed-off-by: Kunihiko Hayashi <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-10-28ufs: ti-j721e: Correct error detectionAndrew Goodbody
In ti_j721e_ufs_probe there is a call to clk_get_rate but the code after that attempts to detect an error from that call incorrectly uses IS_ERR_VALUE. Instead the test should just be for regular error codes. The call returns an unsigned long so that needs to be cast to a signed type first of all. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Anshul Dalal <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-10-28clk: versaclock: Use IS_ERR check before dereferenceAndrew Goodbody
In versaclock_probe vc5->pin_xin may be an error pointer so need to check with IS_ERR before attempting to dereference it. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28clk: versaclock: return value calculated by ERR_PTRAndrew Goodbody
In versaclock_get_name -ENOMEM is passed to ERR_PTR but nothing is done with the value that this calculates which is obviously not the intention of the code. This is confirmed by the code around where this function is called. Instead return the value from ERR_PTR. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28usb: musb-new: Cannot test unsigned member to be negativeAndrew Goodbody
You cannot test an unsigned member of a struct for being negative, the test will always fail. Instead assign the return value of fdtdec_get_int, which returns an int, to a temporary variable declared as an int, so that it can be tested for being negative before being assigned to the unsigned struct member. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28usb: musb-new: Limit check array index before useAndrew Goodbody
epnum is used as an index into an array. The limit check for this index should be performed before using it to access an element in the array to prevent possible bounds overrun. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
2025-10-28usb: musb-new: Null check before dereferenceAndrew Goodbody
A null check for the variable 'data' was introduced before dereferencing it for set_phy_power but other uses were not so protected. Add the null check for other dereferences of 'data'. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28usb: xhci: exynos: variable node should be signedAndrew Goodbody
The variable node is assigned to the return value of a function that returns an int. It is tested for being negative and then passed as an argument to a function that takes an int. So 'node' should not be declared as unsigned. Correct it. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28usb: ulpi: Incorrect operator usedAndrew Goodbody
Combining two bits into a mask to be used so that the same write code can be used to set or reset bits in a register clearly needs to use the binary 'or' operator, not the binary 'and'. Fix it. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28usb: ohci-hcd: Null check lurb_priv before dereferenceAndrew Goodbody
When a variable needs a null check before it is dreferenced ensure that this is done even in the case of assignment on declaration. This was not happening for lurb_priv so correct it. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28usb: fsl-dt-fixup: Return an error code on errorAndrew Goodbody
fsl_fdt_fixup_usb_erratum uses strcmp to detect an error but then returns 'err' without it being set to an error. Calling code may not detect that an error occurred leading to a silent failure. Instead just return -EINVAL. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-10-28usb: ehci: exynos: variable node should be signedAndrew Goodbody
THe variable node is assigned to the return value of a function that returns an int. It is tested for being negative and then passed as an argument to a function that takes an int. So 'node' should not be declared as unsigned. Correct it. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2025-10-28timer: sifive_clint: Add GHRTv2 compaible stringJimmy Ho
The current sifive_clint driver can fully support GHRTv2 clint. Add the compatible of GHRTv2 clint, sifive,clint2, to sifive_clint_ids list. Signed-off-by: Vincent Chen <[email protected]> Signed-off-by: Wayling Chen <[email protected]> Signed-off-by: Max Hsu <[email protected]> Signed-off-by: Jimmy Ho <[email protected]>
2025-10-28gpio: tegra_gpio: convert to use set_flagsLukasz Majewski
Convert to use set_flags operation. For now following flags are supported: - GPIOD_IS_AF (i.e. "alternate function"). - GPIOD_IS_IN - GPIOD_IS_OUT Tested-by: Ɓukasz Majewski <[email protected]> # Colibri T30 Signed-off-by: Lukasz Majewski <[email protected]> Reviewed-by: Svyatoslav Ryhel <[email protected]> Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-10-28video: tegra: Incorrect operator usedAndrew Goodbody
Combining two bits into a mask requires the use of the binary 'or' operator not the logical one. Correct it. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Acked-by: Svyatoslav Ryhel <[email protected]>
2025-10-28video: tegra: Remove unreachable codeAndrew Goodbody
The goto immediately after a return is unreachable. Remove it and its target label as redundant. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Acked-by: Svyatoslav Ryhel <[email protected]>
2025-10-28crypto: tegra: Tighten TEGRA_AES driver dependencyTom Rini
This driver relies on tegra-specific headers to compile so make it depend on ARCH_TEGRA. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Svyatoslav Ryhel <[email protected]>
2025-10-28timer: tegra: Bind watchdog to timer nodeLukasz Majewski
Bind watchdog driver to the Tegra timer node since it uses one of the timers to act as a watchdog and has no dedicated hardware block. Signed-off-by: Lukasz Majewski <[email protected]> Reviewed-by: Svyatoslav Ryhel <[email protected]> Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-10-28watchdog: Add support for Tegra watchdog timerLukasz Majewski
Provide support for Tegra watchdog functionality. The WATCHDOG index 0 in conjunction with TIMER 5 is used inline with existing Linux kernel driver. Signed-off-by: Lukasz Majewski <[email protected]> Reviewed-by: Svyatoslav Ryhel <[email protected]> Signed-off-by: Svyatoslav Ryhel <[email protected]>
2025-10-28i2c: rcar_i2c: Add R-Car Gen5 supportMinh Le
Add support for R-Car Gen5 SoCs into the driver. I2C on R-Car Gen5 is treated the same as Gen3 and Gen4. Signed-off-by: Minh Le <[email protected]> Signed-off-by: Hai Pham <[email protected]> Signed-off-by: Marek Vasut <[email protected]> # Tweak commit message Reviewed-by: Heiko Schocher <[email protected]>
2025-10-28i2c: add support for the MT7621 I2C controllerJustin Swartz
This commit introduces a port of the Linux kernel's driver for the Mediatek's MT7621 I2C controller. The port was undertaken as the existing driver intended for Mediatek I2C controllers (mtk_i2c.c) is not compatible with the MT7621. To use the driver: 1. Ensure that the mode of the i2c pin group is configured for "i2c" rather than "gpio". 2. Delete the existing (bitbanged) i2c node from arch/mips/dts/mt7621.dtsi, or specify: /delete-node/ &i2c; 3. Declare: i2c: i2c@1e000900 { compatible = "mediatek,mt7621-i2c"; reg = <0x1e000900 0x100>; clocks = <&clk50m>; clock-names = "sys_clock"; resets = <&rstctrl RST_I2C>; reset-names = "i2c_reset"; pinctrl-names = "default"; pinctrl-0 = <&i2c_pins>; #address-cells = <1>; #size-cells = <0>; status = "okay"; }; Signed-off-by: Justin Swartz <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
2025-10-27net: sun8i-emac: Add support for active-low leds with internal PHYPaul Kocialkowski
A device-tree property is already defined to indicate that the internal PHY should be used with active-low leds, which corresponds to a specific bit in the dedicated syscon register. Add support for setting this bit when the property is present. Signed-off-by: Paul Kocialkowski <[email protected]> Reviewed-by: Andre Przywara <[email protected]>
2025-10-27net: sun8i-emac: Remove internal PHY config default valuePaul Kocialkowski
We know about all the relevant fields in the syscon register so there is no reason to read it first and modify it. Build the register from scratch instead, with all relevant fields set. Signed-off-by: Paul Kocialkowski <[email protected]>
2025-10-24firmware: scmi: Add i.MX95 SCMI CPU ProtocolPeng Fan
This protocol allows an agent to start, stop a CPU or set reset vector. It is used to manage auxiliary CPUs in an LM (e.g. additional cores in an AP cluster). Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Alice Guo <[email protected]>
2025-10-24firmware: scmi: Add i.MX95 SCMI LMM protocol driverPeng Fan
Add Logical Machine Management(LMM) protocol which is intended for boot, shutdown, and reset of other logical machines (LM). It is usually used to allow one LM to manager another used as an offload or accelerator engine. Following Linux Kernel, created a separate folder for holding vendor protocol drivers. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Alice Guo <[email protected]>
2025-10-24firmware: scmi: Support probe vendor ID 0x80 and 0x82Peng Fan
Preparing to add i.MX LMM and CPU protocol driver, support probe SCMI vendor ID 0x80(i.MX SCMI LMM ID) and 0x82(i.MX SCMI CPU ID). And use Kconfig option to support conditional compilation. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Alice Guo <[email protected]>
2025-10-24firmware: scmi: Conditionally compile protocol supportPeng Fan
Add conditional compilation for SCMI protocol support in scmi_get_protocol() and scmi_add_protocol() based on corresponding Kconfig options. This ensures that only the enabled protocols are compiled and accessed, and reducing binary size. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Alice Guo <[email protected]>