summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
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]>
2025-10-24phy: ti: phy-j721e-wiz: Allow reinitialization when SERDES is pre-configuredHrushikesh Salunke
Move the SERDES configuration check after clock and reset initialization and change it from a hard failure to a skip of WIZ initialization. This allows the driver to probe successfully when the SERDES has been pre-configured by a previous boot stage (e.g., ROM or SPL). This approach aligns with how the Linux kernel handles pre-configured SERDES, where the driver gracefully skips reinitialization rather than failing to probe. Signed-off-by: Hrushikesh Salunke <[email protected]>
2025-10-22Merge tag 'net-20251022' of https://source.denx.de/u-boot/custodians/u-boot-netTom Rini
Pull request net-20251022 net: - airoha: improvements - Tighten a few more driver dependencies - designware: fix bitbang init error - phy: Make driver overloading get_phy_id depend on !COMPILE_TEST - phy: add paged PHY register accessors - make dhcp_run() common for NET and NET_LWIP - dwc_eth_ops: Correct check for FDT_64BIT - mediatek: mt7988: various fixup + MDIO detach - phy: aquantia: switch to use phy_get_ofnode(), fix bindings typo net-legacy: - bootp: Prevent buffer overflow to avoid leaking the RAM content - tftp: make TFTP ports unconditionally configurable misc: - uthreads: Make use of CONFIG_IS_ENABLED consistently
2025-10-22Merge tag 'u-boot-at91-2026.01-a' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-at91 First set of u-boot-at91 features for the 2026.01 cycle: This small fixes set includes a change on clocks register value and a fix for the sam9x60ek default timer.
2025-10-22net: designware: fix bitbang init errorJim Liu
The Synchronous Abort and reset errors occurred due to incorrect parameter passing during initialization. Signed-off-by: Jim Liu <[email protected]> [jf: add missing #if IS_ENABLED(CONFIG_BITBANGMII)] Signed-off-by: Jerome Forissier <[email protected]>
2025-10-22net: phy: Make driver overloading get_phy_id depend on !COMPILE_TESTTom Rini
With commit 597fe041a85f ("net/phy: enable get_phy_id redefinable") we made get_phy_id a public but weak function, so that PHY drivers that had required non-standard ways of getting the PHY ID could be supported. However, overloading a weak function multiple times is (rightly) a link error. At this point, we have two PHYs which make use of this feature, so make both of them only available when COMPILE_TEST is unset, as part of being able to support "allyesconfig" in the future. Signed-off-by: Tom Rini <[email protected]>
2025-10-22net: phy: add paged PHY register accessorsLucien.Jheng
Synchronize paged PHY helpers with Linux v6.17. Add support for PHY devices that use paged register access by implementing the following functions: - phy_save_page(): Save current page number - phy_select_page(): Switch to a specific page and return previous page - phy_restore_page(): Restore previously saved page Also adds read_page and write_page callbacks to the phy_driver structure to enable driver-specific page handling. These helpers allow safe access to paged PHY registers by ensuring proper page selection and restoration, even in error conditions, which will be used by the Airoha PHY driver. Signed-off-by: Lucien.Jheng <[email protected]>
2025-10-22net: airoha: simplify rx/free packet logic a bitMikhail Kshevetskiy
The commit 997786bbf473 ("drivers/net/airoha_eth: fix stalling in package receiving") can be improved. Instead of returning previous descriptor it's possible: * do nothing in even descriptor case * return 2 descriptor to the queue (current and previous) in the odd descriptor case. This patch: * implements above approach * remove logic not required within new approach * adds note that PKTBUFSRX must be even and larger than 7 for reliable driver operations Signed-off-by: Mikhail Kshevetskiy <[email protected]>
2025-10-22net: mediatek: move MT7531 MMIO MDIO to dedicated driverChristian Marangi
In preparation for support of MDIO on AN7581, move the MT7531 MMIO logic to a dedicated driver and permit usage of the mdio read/write function to the mtk_eth driver. This only affect MT7988 that can use MMIO operation to access the Switch register. The MT7988 code is updated to make use of the external driver. This permits Airoha driver to make use of DM_MDIO to bind for the MT7531 driver that have the same exact register. Signed-off-by: Christian Marangi <[email protected]>
2025-10-22net: mediatek: mt7988: free allocated MDIO bus on cleanupChristian Marangi
Correctly free the MDIO Bus on calling cleanup function. While at it also fix a copy-paste error and rename the cleanup function name to the more specific name. Signed-off-by: Christian Marangi <[email protected]>
2025-10-22net: mediatek: mt7988: restore PHY page on PHY setting exitChristian Marangi
On exiting the phy_setting function for MT7988, the PHY page is never restored to Page 0. This can cause all kind of problem with reading the status of the PHY at runtime. Correctly restore PHY page on exiting the PHY setting function. Signed-off-by: Christian Marangi <[email protected]>
2025-10-22net: mediatek: mt7531/7988: fix broken PHY turn ON/OFFChristian Marangi
The PHY for MT7531/MT7988 are never actully turned ON/OFF for the affected PHY as we are read/writing to the wrong PHY address. This is caused by the fact that we use the MT753X_PHY_ADDR macro 2 times offsetting the address multiple times. One in the _setup() function and one in the mt7531_mii_read/write. Drop the additional usage of MT753X_PHY_ADDR in setup() to correctly set the PHY. Signed-off-by: Christian Marangi <[email protected]>
2025-10-22net: phy: aquantia: switch to use phy_get_ofnode()Beiyan Yun
Use PHY API phy_get_ofnode() helper to get PHY DT node. Signed-off-by: Beiyan Yun <[email protected]>
2025-10-22net: Tighten more driver dependenciesTom Rini
In this case, the mediatek network drivers cannot build outside of ARCH_MEDIATEK or ARCH_MTMIPS, and so express this requirement in Kconfig as well. In the case of DWC_ETH_XGMAC / DWC_ETH_XGMAC_SOCFPGA, the file controlled by the DWC_ETH_XGMAC option references a socfpga-specific array defined in the file controlled by DWC_ETH_XGMAC_SOCFPGA. Rework these options in Kconfig to handle this dependency. Signed-off-by: Tom Rini <[email protected]>
2025-10-22arm: socfpga: Tighten a few more driver dependenciesTom Rini
Some drivers which depend on SoCFPGA specific headers had not had appropriate dependencies list in Kconfig. Add ARCH_SOCFPGA or TARGET_SOCFPGA_SOC64 where appropriate. Signed-off-by: Tom Rini <[email protected]>
2025-10-20Revert "spi: cadence-qspi: Remove cdns, is-dma property handling"Michal Simek
This reverts commit a040578d8270ed8788d7663808ea63ce5ffd7840. Based on feedback other SOCs (for example Star64) are using driver in non DMA mode which is causing issues that's why revert this patch. cdns,is-dma should be removed differently. Signed-off-by: Michal Simek <[email protected]> Reported-by: E Shattow <[email protected]>
2025-10-17Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-shTom Rini
SH HSCIF FIFO fixes, R-Car V4H/V4M DT corrections, R-Car V4H Sparrow Hawk PCIe shutdown support before booting Linux.
2025-10-17serial: sh: Handle HSCIF RX FIFO overflowMarek Vasut
The HSCIF RX FIFO may overflow when data are streaming from remote end into the HSCIF while U-Boot is still starting up. In that case, HSFSR bit RDF is set, but HSFDR field R is zero. This confuses .tstc callback into considering RX FIFO to be empty, which leads to .getc to be never invoked, even when user attempts to pass more input onto the command line. Fix this by considering the RDF flag in serial_rx_fifo_level(), which is called from .tstc in case of no errors. If RDF flag is set, trigger the .getc callback and let it clear the RX FIFO. Signed-off-by: Marek Vasut <[email protected]>
2025-10-17pci: pcie-rcar-gen4: Shut down controller on link down and removeMarek Vasut
In case the link is down, or the controller driver is removed before booting the next stage, shut down the PCIe link, put both the remote PCIe device and the controller into reset, and disable clock. This way, the hardware is not left active when not in use. Signed-off-by: Marek Vasut <[email protected]>
2025-10-17Merge patch series "led: fixes"Tom Rini
Patrice Chotard <[email protected]> says: - Update led_get_by_label() - Fix led Kconfig Link: https://lore.kernel.org/r/[email protected]
2025-10-17led: Add LED dependency for LED_ACTIVITY and LED_BOOTPatrice Chotard
Add LED dependency for LED_ACTIVITY and LED_BOOT. Signed-off-by: Patrice Chotard <[email protected]> Cc: Yegor Yefremov <[email protected]> Reviewed-by: Yegor Yefremov <[email protected]>
2025-10-17led: Update led_get_by_label()Patrice Chotard
During led_init() execution, led_get_label() returns either the label property (which is an obsolete property [1]) or the LED's node name. It can't be the function name as dev parameter is NULL. Later, during led_post_bind() execution, for the same LED, the attributed label by led_get_label() can be the function name, as led_get_label() dev's parameter is set. During call sequence led_boot_on() => led_boot_get() => led_get_by_label() with label given in parameter (priv->boot_led_label which is either the label or node's name set previously in led_init()) can be different to to uc_plat->label and returns -ENODEV. Update led_get_by_label() to allow to retrieve LED also by its node name. [1] https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/common.yaml Signed-off-by: Patrice Chotard <[email protected]> Cc: Yegor Yefremov <[email protected]>
2025-10-17clk: at91: remove default values for PMC_PLL_ACRManikandan Muralidharan
Remove default values for PMC PLL Analog Control Register(ACR) as the values are specific for each SoC and PLL, so load them from PLL characteristics structure Signed-off-by: Manikandan Muralidharan <[email protected]> Signed-off-by: Varshini Rajendran <[email protected]>
2025-10-17clk: at91: Add ACR in all PLL setting.Manikandan Muralidharan
Add ACR in all PLL setting. Add correct ACR value for each PLL used in different SoCs. Signed-off-by: Manikandan Muralidharan <[email protected]> Signed-off-by: Varshini Rajendran <[email protected]>
2025-10-16virito: blk: fix logic to determine block sizesHeinrich Schuchardt
With commit c85b8071e7d3 ("virtio: blk: support block sizes exceeding 512 bytes") logic was added to detect the VIRTIO_BLK_F_BLK_SIZE capability and to copy the block size reported by QEMU to the block device descriptor. The logical block size can be set when invoking QEMU: -drive if=none,file=4096.img,format=raw,id=vda \ -device virtio-blk-device,drive=vda,physical_block_size=4096,logical_block_size=4096 In U-Boot the logical block size is shown by command `virtio info`: => virtio info Device 0: QEMU VirtIO Block Device Type: Hard Disk Capacity: 1024.0 MB = 1.0 GB (262144 x 4096) There where two flaws which together hid that the logic was incorrect: * VIRTIO_BLK_F_BLK_SIZE was missing in the driver capabilities and the bit was filtered out. * The result of the call to virtio_has_feature() was negated. The problem became apparent when using ARM FVP as emulator which does not set VIRTIO_BLK_F_BLK_SIZE. Fixes: c85b8071e7d3 ("virtio: blk: support block sizes exceeding 512 bytes") Reported-by: Debbie Horsfall <[email protected]> Tested-by: Andre Przywara <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]>
2025-10-16ti_sci: Pointer is never assigned to valid valueAndrew Goodbody
The pointer resp is declared but never assigned a value but is then dereferenced. Fix this by assigning the pointer to the message buffer. This issue was found by Smatch. Reviewed-by: Udit Kumar <[email protected]> Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Nishanth Menon <[email protected]> Tested-by: Anshul Dalal <[email protected]>
2025-10-16ti_sci: Provide error code on error exitAndrew Goodbody
In ti_sci_get_response the check for message sequence will return ret on a fail but ret will be 0 at that point. Instead return -EINVAL. Also change dev_dbg call to dev_err to be consistent with other error detection code in the same function. This issue was found by Smatch. Reviewed-by: Udit Kumar <[email protected]> Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Nishanth Menon <[email protected]> Tested-by: Anshul Dalal <[email protected]>
2025-10-16ti_sci: Prevent memory leakAndrew Goodbody
temp is assigned the pointer returned by malloc which is used without a NULL check and then never freed. Add a NULL check and ensure temp is freed on all return paths. This issue was found by Smatch. Reviewed-by: Udit Kumar <[email protected]> Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Nishanth Menon <[email protected]> Tested-by: Anshul Dalal <[email protected]>
2025-10-16Merge tag 'u-boot-watchdog-20251016' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-watchdog CI: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=400&view=results - watchdog: Tighten some driver dependencies in Kconfig (Tom)
2025-10-16clk: sophgo: Fix a warning about void returns valueTom Rini
The cv1800b_clk_setfield function returns void, but was doing "return writel(...);" and while seemingly having a void function return a void function is not a warning, when readl is a macro this problem is shown. Correct the code to instead simply call writel. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Yao Zi <[email protected]>
2025-10-16watchdog: Tighten dependencies on WDT_DAVINCITom Rini
The WDT_DAVINCI driver is not safe to compile on 64bit platforms such as allyesconfig on a 64bit host. Tighten the dependencies here to the platforms which could use it today. Signed-off-by: Tom Rini <[email protected]>
2025-10-16watchdog: Tighten some watchdog driver dependenciesTom Rini
A few watchdog drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2025-10-14Merge tag 'xilinx-for-v2026.01-rc1-v2' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze AMD/Xilinx/FPGA changes for v2026.01-rc1 v2 zynqmp: - DT updates - Enable new commands mbv: - Simplify defconfigs clk: - Separate legacy handler and use SMC handler misc: - Tighten TTC Kconfig dependency net: - Add 10GBE support to Gem pwm: - cadence-ttc: Fix array sizes fwu: - Add platform hook support spi: - Remove undocumented cdns,is-dma property video: - Fix DPSUB RGB handling