28022 Commits

Author SHA1 Message Date
Tom Rini
f4bb74e253 Kconfig: Update various legacy syntax
TODO: Split among types

Signed-off-by: Tom Rini <trini@konsulko.com>
2026-02-27 11:14:21 -06:00
David Lechner
b3d16267b5 mmc: mtk-sd: add mediatek,mt8189-mmc compatible
Add support for MediaTek MT8189 MMC controller.

According to [1], this is similar to, but not quite the same as
mediatek,mt8196-mmc.

Link: https://lore.kernel.org/linux-mediatek/20251203-mt8189-add-mmc-support-v1-1-f5ce43212fe9@collabora.com/ [1]
Signed-off-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-02-26 11:15:44 +08:00
Heinrich Schuchardt
adc49c29a9 power: regulator: Kconfig: add SPL_DM_REGULATOR_FAN53555
Symbol CONFIG_SPL_DM_REGULATOR_FAN53555 is selected by
SPL_DM_PMIC_FAN53555 and used in a Makefile. But the
symbol definition is missing.

Add the missing configuration symbol.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-02-25 18:40:30 +08:00
Julien Masson
219c05f3f6 power: pmic: mtk-pwrap: add MediaTek PMIC Wrapper driver
Add support for the PMIC wrapper (pwrap) IP block found on MediaTek
MT8365 and similar SoCs.

On these SoCs the PMIC is connected via SPI. The SPI controller is not
directly visible to the CPU, but only through the PMIC wrapper inside
the SoC.

Signed-off-by: Julien Masson <jmasson@baylibre.com>
Co-developed-by: Macpaul Lin <macpaul.lin@mediatek.com>
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
Co-developed-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-02-25 15:18:22 +08:00
Bo-Chen Chen
5419cf43cf power: regulator: mt6359: add driver for MT6359P
Add a new regulator driver for MT6359P and similar PMIC chips.

The MT6359P is a eco version for MT6359 regulator. For the MT8391
platform, we use the MT6359P (MT6365) as the main PMIC. The MT6359 and
MT6359P have different register maps. Therefore, on the MT8391 platform,
we only provide support for the MT6359P. If support for the MT6359 PMIC
it can be added later.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-02-25 15:18:22 +08:00
Julien Masson
4267b414dc power: regulator: add MediaTek MT6357 driver
Add a driver for the power regulators of the MediaTek MT6357 PMIC chip.

Signed-off-by: Julien Masson <jmasson@baylibre.com>
Co-developed-by: Macpaul Lin <macpaul.lin@mediatek.com>
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-02-25 15:18:21 +08:00
Tom Rini
a226944635 Merge patch series "net: mdio-mt7531-mmio: consolidate and improve probe"
Christian Marangi <ansuelsmth@gmail.com> says:

This small series consolidate header usage of mdio-mt7531-mmio driver
and improve usage in preparation for support of OF PHY autoprobe.

This driver is still not used (as it will be used by AN7581/AN7583)
in the OF mode (it's used by MT7988 for the MDIO functions)

For OF PHY to be correctly autoprobed, the MDIO driver needs to attached
to the MDIO node (the parent of the PHY nodes)

With such change the MDIO driver can be binded with the MDIO node instead
of the switch node as previously required.

Link: https://lore.kernel.org/r/20260209114515.1916-1-ansuelsmth@gmail.com
2026-02-23 15:29:21 -06:00
Christian Marangi
358f97fcca net: mdio-mt7531-mmio: improve parsing of switch register on probe
The MDIO node is ALWAYS a parent of the MT7531 switch node and the MDIO
registers are in the MT7531 register space (in the context of MT7988
it's all memory-mapped)

With these assumption, we can simplify and permit better usage of PHY OF
automatic probing by binding the mt7531-mdio-mmio driver with the MDIO
node instead of the switch node.

For OF PHY to be correctly autoprobed, the MDIO driver needs to attached
to the MDIO node (the parent of the PHY nodes).

The driver will reach the parent node (the switch node) and will parse
the register address from there.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-02-23 15:28:16 -06:00
Christian Marangi
145487611f net: mdio-mt7531-mmio: use common header priv struct
Instead of having duplicate priv struct for mdio-mt7531-mmio driver in
both driver and header, use the one exposed by the header directly.

This make sure we have consistent priv struct if the driver will be
updated in the future.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-02-23 15:28:16 -06:00
Tom Rini
15bd325817 Prepare v2026.04-rc3
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQTzzqh0PWDgGS+bTHor4qD1Cr/kCgUCaZynwwAKCRAr4qD1Cr/k
 Cs4tAQDQ4/a6lkPZ10G6WTThFgb31oakeD+HyhEqWtvgN+C8IwEA3PJo8CcEJQGo
 +XSzgYYUKNxWiKkfBqc8ERDkoqO0cQg=
 =Hh7I
 -----END PGP SIGNATURE-----

Merge tag 'v2026.04-rc3' into next

Prepare v2026.04-rc3
2026-02-23 13:45:55 -06:00
Jeffrey Yu
c5d82cab77 spi: add support for ISSI IS25WP02GG flash
This patch adds support for the ISSI IS25WP02GG QSPI NOR flash device.
Tested on the Versal VMK180
board in dual-parallel QSPI configuration.

Signed-off-by: jeffrey yu <jeyu@issi.com>
2026-02-20 10:39:19 -06:00
Christoph Reiter
311f923761 mtd: spi-nor-ids: Add Fujitsu MB85RS256TY FRAM
This part is an FRAM, but can be used through the spi-nor generic code.

Signed-off-by: christoph.reiter@evk.biz
2026-02-20 10:39:19 -06:00
Tom Rini
cf6aa7cf73 Merge patch series "bootcount: Small clean-up and fix, and dm_i2c single-word support"
Niko Mauno <niko.mauno@vaisala.com> says:

In this series, we first introduce a clean-up where we switch to use
predefined bit masks instead of hard-coded values for count and magic
halves in the single-word (32-bit) boot count scheme.

Then we fix a case of missing boot count value masking in single-word
scenario in bootcount.c, which allowed clobbering of the magic half
when storing the value. With this change the clobbering preventing
behavior becomes consistent with existing single word bootcount storing
implementations in bootcount_at91.c and bootcount_davinci.c.

Finally, we enable the DM I2C bootcount driver to work also in single
word (4 byte) mode, in addition to the pre-existing half-word (2 byte)
mode. By default the driver still operates in half word mode as so far,
but can now be used alternatively in single word mode by adding
'size = <0x4>;' in the associated device tree node.

Link: https://lore.kernel.org/r/cover.1770197302.git.niko.mauno@vaisala.com
2026-02-18 16:35:12 -06:00
Niko Mauno
f97642853c bootcount: dm_i2c: Support also single word mode
In addition to pre-existing half-word (2 byte) mode, add support for
the driver to work also in single word (4 byte) mode by adding
'size = <0x4>;' in the device tree node.

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
2026-02-18 16:35:07 -06:00
Niko Mauno
05b56599b5 bootcount: Fix potential clobbering issue
When storing the single word bootcount value, apply the bootcount count
mask to prevent clobbering the magic half of the value.

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
2026-02-18 16:35:07 -06:00
Niko Mauno
27e1924ffa bootcount: Use predefined count/magic bit masks
Use predefined bit masks in operations where only the magic half or
only the count half of the 32-bit value are processed.

Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2026-02-18 16:35:07 -06:00
Shiji Yang
b681f2be8c pinctrl: mediatek: set MT798x rev as MTK_PINCTRL_V1
The MT798x series SoCs have IES regiter definitions. They should
belong to the pinctrl v1 revision.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
2026-02-18 12:06:19 -06:00
Chris-QJ Chen
06cfded6ed pinctrl: mediatek: add pinctrl driver for MT8195
Add support for MT8195 pinctrl. The driver is based on the kernel one.

Signed-off-by: Chris-QJ Chen <chris-qj.chen@mediatek.com>
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
2026-02-18 12:06:19 -06:00
Tom Rini
fa3f16e450 Merge patch series "Add MT8195 support"
Julien Stephan <jstephan@baylibre.com> says:

This series adds basic support for Mediatek soc MT8195:
- clock driver
- watchdog
- add a new macro helper to define gate clock. Other driver can be
  cleaned later to use the new macro

Other driver will be added later.

It will also serve as basis for board support such as MT8395_EVK based
on MT8195.

Link: https://lore.kernel.org/r/20260202-add-mt8195-clock-support-v1-0-5d03495246b9@baylibre.com
2026-02-18 12:03:46 -06:00
Chris-QJ Chen
a0c5403283 clk: mediatek: add MT8195 clock driver
The following clocks have been added for MT8195 SoC:
 apmixedsys, topckgen, infracfg

 These clocks driver are based on the ones present in the kernel:
 drivers/clk/mediatek/clk-mt8195-*

Signed-off-by: Chris-QJ Chen <chris-qj.chen@mediatek.com>
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
2026-02-18 12:01:18 -06:00
Julien Stephan
5f2111e9ff clk: mediatek: implement GATE_FLAGS macro
Add helper macro for mtk_gate, the same way, there are macros for
FIXED_CLK, MUX and FACTOR.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
2026-02-18 12:01:18 -06:00
Julien Stephan
2517e2b524 arm: mediatek: add support for MediaTek MT8195 SoC
This adds basic support for MediaTek MT8195 SoC.

Add watchdog support by adding upstream compatible string.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
2026-02-18 12:01:18 -06:00
Tom Rini
03637bda63 Merge patch series "clk: mediatek: mt8188: fix clocks"
Julien Stephan <jstephan@baylibre.com> says:

I recently submitted the clock driver for MT8188. I naively submitted a
driver that was ported from the kernel driver, and mostly work to boot a
kernel.

Recently David Lechner, added support for the clk dump command for
Mediatek clock drivers, so I used it to check the MT8188 and found
several issues fixed on this series:

- removed topckgen_cg, gates are now part of topckgen
- fixed several parents clocks
- added missing fixed clocks

While at it, I also refactored a bit the driver to improve readability,
and future additions to it.

Link: https://lore.kernel.org/r/20260202-mt8188-fix-clock-v2-0-b39bddfcac66@baylibre.com
2026-02-18 12:00:45 -06:00
Julien Stephan
0cdd01dbde clk: mediatek: mt8188: refactor driver to improve readability
Refactor some part of the driver to improve readability and future
additions:

- use CLK_TOP_NR_CLK for added clocks
- rename the id map to make it more clear that the map applies to top
  clocks only
- refactor the id map to improve readability
- xtal2_rate is only used for PLL clocks, so only the apmixedsys clock
  tree needs it. Remove it elsewhere.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
2026-02-18 11:59:32 -06:00
Julien Stephan
2797fa3efd clk: mediatek: mt8188: fix some clock parents
Fix a number of clock parent definitions for MT8188 clocks.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
2026-02-18 11:59:32 -06:00
Julien Stephan
5e9bbbdab0 clk: mediatek: mt8188: add missing fixed clock
CLK_TOP_CLK13M was missing, add it.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
2026-02-18 11:59:32 -06:00
Julien Stephan
6354f83f43 clk: mediatek: mt8188: fix circular clock dependency
FACTOR1(CLK_TOP_APLL1_D4, CLK_TOP_APLL1, 1, 3)
--> CLK_TOP_APLL1_D4 declares CLK_TOP_APLL1 as it's parents

MUX_GATE(CLK_TOP_APLL1, apll1_parents, 0x0F8, 0, 4, 7)
--> CLK_TOP_APLL1 declares apll1_parents as it's parents

static const int apll1_parents[] = {
	CLK_TOP_CLK26M,
	CLK_TOP_APLL1_D4
};
--> CLK_TOP_APLL1_D4 is a parent of CLK_TOP_APLL1

Fix this, by correctly setting CLK_TOP_APLL1_DX parent to CLK_APMIXED_APLLX

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
2026-02-18 11:59:32 -06:00
Julien Stephan
a04835c0e9 clk: mediatek: mt8188: remove separate topckgen-cg driver
Remove the separate topckgen-cg driver for handling clock gates in the
topckgen address space.
Commit 8aeeeff50d46 ("clk: mediatek: allow gates in topckgen drivers")
added support for gates in topckgen driver.
This commit fixes MT8188 driver, the same way commit ba207d7f54f9 ("clk:
mediatek: mt8365: remove separate topckgen-cg driver") does for MT8365.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
2026-02-18 11:59:32 -06:00
Tom Rini
e8dd062642 Merge patch series "Implement all missing SMBIOS types required by distro tooling"
Raymond Mao <raymondmaoca@gmail.com> says:

From: Raymond Mao <raymond.mao@riscstar.com>

This series finish the last missing puzzle of required SMBIOS types by:
1) Fixing duplicated handles when multiple instances exist in one type;
2) Implementing the rest of required types 9/16/17/19;
3) Adding version control when printing properties for all types.

Type 9/16/17/19 are generally DT-based, the idea is to write these tables
using a hybrid approach:
Explicit DT definitions under existing '/smbios/smbios' take precedence,
with fallback to scan and interpret values from the entire DT.

Moreover, all below APIs:
smbios_get_val_si()
smbios_get_u64_si()
smbios_add_prop_si()
are on top of sysinfo, thus allow vendors to get values from other
subsystems by implementing their own sysinfo driver if needed.

Link: https://lore.kernel.org/r/20260213225254.2544596-1-raymondmaoca@gmail.com
2026-02-18 08:27:58 -06:00
Raymond Mao
374896158b smbios: add support for dynamic generation of Type 16 table
This commit implements SMBIOS Type 16 (Physical Memory Array)
generation with a hybrid approach supporting both:

1. Explicit definition via Device Tree 'smbios' node:
   Child node under '/smbios/smbios/memory-array' will be used to
   populate as individual Type 16 structure directly.
   - Properties follow SMBIOS field names with lowercase letters and
     hyphen-separated words (e.g., 'memory-error-correction',
     'maximum-capacity', 'extended-maximum-capacity', etc.).
   - This method supports precise platform-defined overrides and system
     descriptions.

2. Fallback to automatic DT-based discovery:
   If child node under '/smbios/smbios/memory-array' does not exist,
   the implementation will:
   - Scan all top-level 'memory@' nodes to populate Type 16 structure with
     inferred size and location data.
   - Scan nodes named or marked as 'memory-controller' and parse
     associated 'dimm@' subnodes (if present) to extract DIMM sizes and
     map them accordingly.

This dual-mode support enables flexible firmware SMBIOS reporting while
aligning with spec-compliant naming and runtime-detected memory topology.

Type 16 support is under GENERATE_SMBIOS_TABLE_VERBOSE to avoid
increasing rom size for those platforms which only require basic SMBIOS
support.

Signed-off-by: Raymond Mao <raymondmaoca@gmail.com>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2026-02-18 08:27:51 -06:00
Tom Rini
9ddccb5144 Merge patch series "treewide: Clean up usage of DECLARE_GLOBAL_DATA_PTR"
Peng Fan (OSS) <peng.fan@oss.nxp.com> says:

This patch set primarily removes unused DECLARE_GLOBAL_DATA_PTR
instances.

Many files declare DECLARE_GLOBAL_DATA_PTR and include
asm/global_data.h even though gd is never used. In these cases,
asm/global_data.h is effectively treated as a proxy header, which is
not a good practice.

Following the Include What You Use principle, files should include
only the headers they actually depend on, rather than relying on
global_data.h indirectly. This approach is also adopted in Linux kernel
[1].

The first few patches are prepartion to avoid building break after
remove the including of global_data.h.

A script is for filtering the files:
list=`find . -name "*.[ch]"`
for source in ${list}
do
        result=`sed -n '/DECLARE_GLOBAL_DATA_PTR/p' ${source}`
        if [ "${result}" == "DECLARE_GLOBAL_DATA_PTR;" ]; then
                echo "Found in ${source}"

                result=`sed -n '/\<gd\>/p' ${source}`
                result2=`sed -n '/\<gd_/p' ${source}`
                result3=`sed -n '/\<gd->/p' ${source}`
                if [ "${result}" == "" ] && [ "${result2}" == "" ] && [ "${result3}" == "" ];then
                        echo "Cleanup ${source}"
                        sed -i '/DECLARE_GLOBAL_DATA_PTR/{N;/\n[[:space:]]*$/d;s/.*\n//;}' ${source}
                        sed -i '/DECLARE_GLOBAL_DATA_PTR/d' ${source}
                        sed -i '/global_data.h/d' ${source}
                        git add ${source}
                fi
        fi
done

[1] https://lpc.events/event/17/contributions/1620/attachments/1228/2520/Linux%20Kernel%20Header%20Optimization.pdf

CI: https://github.com/u-boot/u-boot/pull/865

Link: https://lore.kernel.org/r/20260209-cleanup-v2-0-73a3a84ddbdb@nxp.com
2026-02-17 13:51:26 -06:00
Peng Fan
0f90b1e715 treewide: Clean up DECLARE_GLOBAL_DATA_PTR usage
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 <patrice.chotard@foss.st.com> #STMicroelectronics boards and STM32MP1 ram test driver
Tested-by: Anshul Dalal <anshuld@ti.com> #TI boards
Acked-by: Yao Zi <me@ziyao.cc> #TH1520
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-02-17 13:50:22 -06:00
Peng Fan
d3b0b3c118 pci: layerspace: Add missing header files
struct fdt_resource, u32 and bool types are used in this header, add
missing header files following "include what you use".

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-02-17 13:50:22 -06:00
Tom Rini
54f9b6528e AMD/Xilinx/FPGA changes for v2026.07-rc1
gpio:
 - Add gpio delay driver
 
 zynqmp:
 - Wire gpio usb delay
 - Enable SPL pinctrl per pin
 
 xilinx:
 - Enable NFS support
 
 versal2:
 - Extend DDR initialization
 
 zynqmp-rtc:
 - Use clock framework for calibration value
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSXAixArPbWpRanWW+rB/7wTvUR9QUCaY7VfAAKCRCrB/7wTvUR
 9a3pAP4qFyahoK7L3FKQ14SIgC9bewUpRD4GTEA6KXcRUxIYhAEAtWtOQO6zf7oQ
 yJ7ka9Zge7HAF5MABd/NTfX+0dbfqQM=
 =jj++
 -----END PGP SIGNATURE-----

Merge tag 'xilinx-for-v2026.07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-microblaze into next

AMD/Xilinx/FPGA changes for v2026.07-rc1

gpio:
- Add gpio delay driver

zynqmp:
- Wire gpio usb delay
- Enable SPL pinctrl per pin

xilinx:
- Enable NFS support

versal2:
- Extend DDR initialization

zynqmp-rtc:
- Use clock framework for calibration value
2026-02-16 09:04:55 -06:00
Tom Rini
b3be5b4c26 An update on AB subsystem allowing multiple FWU metadata
storage drivers to be selected simultaneously instead of
 being mutually exclusive. The board can then select the
 appropriate driver at runtime based on the devicetree
 description.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEgWII69YpahbL5iK5gS8AYozs+qIFAmmPL+AACgkQgS8AYozs
 +qJx8w//V3hzX38VQXh5R3gfdBHBFqoPJv2qvgCZSbw0xDXxMsNPoOpHhWfiTw3Z
 /LavAbPjk6FXE331OhR5ZT5cDFjN+ZKaaBBWMgGSAQIaj0gqrcCxZZLfs+q+mD8E
 WazHOO9VrHe2IYzQPBfA75gEct0EyCllsyo5fjCKPfPjDVpeJ/r0oT0JKp5ohGT6
 46ZJf+c9elBCix0VOD/p8mwuKpDhVp49o5aSQ3uNpCZSbMqjXf7jTpUAsingULw9
 vEK6tMrcPwqTDkfOz2gFuxrFSRj8eHWTivt8Yjavg68lk5mHJTL59VjwnkzMwjpH
 A3tgQEDHEYpfqmuhydIdvTqJxZP63BfRHJlqcyBrYN7XsaiWn/SgkEwOG2RbOVEB
 JRZddErXVYdAF1CZH9F4xtBEgQIRhj0xTIRkn0h3qzK2+Rola+0InQ+b8BNRYXWp
 oW0X9NxxBLq6Jd8QNNxDqu37iQKXE2VcHKWAHG3ZhimKNQVpQf17wCQHuIjR7jVh
 R+n+uenYhBOF2BDG6idbmpODuMy86N/RPmkPhPtOP0XFnb1lWbPMT1Yc8p3MBE/n
 XR8d0iL4Ky5QXtrTueC0MpIW1PS59mENx1alcgfs6xgHSQncf9fyV9IHTxRbKpDC
 M+VCYBJBtlQuE7xiXdYZvEgLkdvopTDoofYPt/EzstVuBY1HiMI=
 =hRRD
 -----END PGP SIGNATURE-----

Merge tag 'ab-next-13022026' of https://source.denx.de/u-boot/custodians/u-boot-tpm into next

CI: https://source.denx.de/u-boot/custodians/u-boot-tpm/-/pipelines/29283

An update on AB subsystem allowing multiple FWU metadata
storage drivers to be selected simultaneously instead of
being mutually exclusive. The board can then select the
appropriate driver at runtime based on the devicetree
description.
2026-02-16 09:04:33 -06:00
Siddharth Vadapalli
bfb530e06c usb: cdns3: use VBUS Valid to determine role for dr_mode OTG
The cdns3_bind() function is responsible for identifying the appropriate
driver to bind to the USB Controller's device-tree node. If the device-tree
node has the 'dr_mode' property set to 'otg', the existing approach fails
to bind a driver, leading to loss of functionality.

To address this, use the VBUS Valid field of the OTG Status register to
determine the role as follows:
- If VBUS Valid field is set, it indicates that a USB Host is supplying
  power and the Controller should assume the Peripheral role.
- If VBUS Valid field is clear, it indicates the absence of a USB Host and
  the Controller should assume the Host role.

Additionally, when 'dr_mode' happens to be 'otg' and the STRAP settings
are not specified, use VBUS Valid to determine the role in cdns3_drd_init()
and assign it to cdns->dr_mode.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
2026-02-16 15:08:43 +01:00
Tom Rini
136faf7b0c Merge tag 'u-boot-socfpga-next-20260213' of https://source.denx.de/u-boot/custodians/u-boot-socfpga into next
This pull request updates SoCFPGA platforms with DDR improvements, new
board support, Agilex5 enhancements and general cleanup across the
codebase.

DDR and memory handling

  * Add DRAM size checking support for Arria10.
  * Widen MEM_TOTAL_CAPACITY mask handling in IOSSM mailbox driver.
  * Assign unit address to memory node for improved memory
    representation and consistency.

Agilex / Agilex5 updates

  * Restore multi-DTB support for NAND boot and fix NAND clock handling.
  * Enable SD card UHS mode and eMMC HS200/HS400 mode support on Agilex5.
  * Fix DT property naming conventions for Agilex5.
  * Exclude AGILEX_L4_SYS_FREE_CLK from clock enable/disable operations
    to avoid unintended clock control.

New board support

  * Add support for CoreCourse Cyclone V boards:
     * AC501
     * AC550
Including device trees, QTS configuration, defconfigs and maintainers
entries.

Fixes and cleanup

  * Fix GEN5 handoff script path.
  * Remove incorrect CONFIG_SPL_LDSCRIPT settings.
  * Replace legacy TARGET namespace and perform related cleanup across
    SoCFPGA code.
  * General Kconfig, build and SoCFPGA maintenance updates.

Overall this pull request improves platform robustness, adds new board
coverage and cleans up legacy configuration usage across the SoCFPGA
U-Boot codebase.

[trini: Change TARGET_SOCFPGA_CYCLONE5 to ARCH_SOCFPGA_CYCLONE5 in the
new platforms this added]
Signed-off-by: Tom Rini <trini@konsulko.com>
2026-02-14 11:12:59 -06:00
Jean-Marie Verdun
6caff66ce4 soft_spi performance enhancement
Add a test when delay is set to 0 to improve performances
by 20% on ARM based systems

Signed-off-by: Jean-Marie Verdun <verdun@hpe.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-02-14 11:06:46 -06:00
Tien Fong Chee
62f7a94602 Replace TARGET namespace and cleanup properly
TARGET namespace is for machines / boards / what-have-you that
building U-Boot for. Simply replace from TARGET to ARCH
make things more clear and proper for ALL SoCFPGA.

Signed-off-by: Brian Sune <briansune@gmail.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>

# Conflicts:
#	drivers/ddr/altera/Makefile
2026-02-14 11:06:46 -06:00
Naresh Kumar Ravulapalli
cb23bbf4d7 drivers: ddr: altera: iossm_mailbox: widen MEM_TOTAL_CAPACITY mask
The previous mask for MEM_TOTAL_CAPACITY_INTF was limited to 8 bits,
which could truncate DDR size values on larger-memory systems.

Update INTF_CAPACITY_GBITS_MASK to 32 bits to correctly represent
the full capacity field according to the hardware specification.

Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>
Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com> Best regards,
2026-02-14 11:06:46 -06:00
Alif Zakuan Yuslaimi
22aac1c5b4 clk: altera: agilex: Exclude AGILEX_L4_SYS_FREE_CLK from enable/disable operations
AGILEX_L4_SYS_FREE_CLK is a free-running clock with no gate control in
hardware, therefore attempting to enable or disable it is not applicable.

Update the clock driver to explicitly exclude this clock ID from
enable/disable operations by returning -EOPNOTSUPP in bitmask_from_clk_id()
and treating this as a no-op in the socfpga_clk_enable() and
socfpga_clk_disable() functions.

This prevents unnecessary register access for clocks that cannot be gated
and ensures clean handling when the clock is present in the device tree.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2026-02-14 11:06:46 -06:00
Alif Zakuan Yuslaimi
847e67582b ddr: altera: arria10: Add DRAM size checking
Add DRAM size checking compare between size from device tree and actual
hardware.

Trigger hang if DRAM size from device tree is greater than actual hardware.
Display warning message if DRAM size mismatch between device tree and
actual hardware.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com> Best regards,
2026-02-14 11:06:46 -06:00
Dinesh Maniyam
83f2843f20 socfpga: agilex: fix NAND clock handling
In v2025.10, the Agilex clock driver was updated to support
clk_enable() and clk_disable() using clock-ID based bitmasks.
However, only AGILEX_NAND_CLK was implemented, while the NAND DT
node still referenced both nand and nand_x clocks.

Since AGILEX_NAND_X_CLK is not defined in the clock driver or the
clock-ID specification, clk_enable() failed during NAND probe.
As a result, the Denali NAND controller never completed
initialization.

Fix this by mapping the NAND X clock to the existing l4_mp clock
bitmask, aligning the DT expectations with the clock driver and
restoring proper NAND controller initialization.

Signed-off-by: Dinesh Maniyam <dinesh.maniyam@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2026-02-14 11:06:46 -06:00
Shiji Yang
eae0ca2125 mtd: spi-nor-tiny: fix 4-Byte address instructions for Cypress and ISSI
In theory, for the same vendor, we should use the same instructions as
the spi-nor-core implementation.

Fixes: 72151ad10f8d ("mtd: spi-nor-core: Add Cypress manufacturer ID in set_4byte")
Fixes: 5bf3f3dd11db ("mtd: spi-nor: Enable QE bit for ISSI flash")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
2026-02-13 10:54:58 -06:00
Miquel Raynal
4f76c90bad mtd: spi-nor: winbond: Make sure w25q{01, 02}jv behave correctly
These chips are internally made of two/four dies with linear addressing
capabilities to make it transparent to the user that two/four dies were
used. There is one drawback however, the read status operation is racy
as the status bit only gives the active die status and not the status of
the other die. For commands affecting the two dies, it means if another
command is sent too fast after the first die has returned a valid
status (deviation can be up to 200us), the chip will get corrupted/in an
unstable state.

The solution adopted here is to iterate manually over all internal
dies (which takes about 30us per die) until all are ready. This approach
will always be faster than a blind delay which represents the maximum
deviation, while also being totally safe.

A flash-specific hook for the status register read had to be
implemented. Testing with the flash_speed benchmark in Linux shown no
difference with the existing performances (using the regular status read
core function).

As the presence of multiple dies is not filled in these chips SFDP
tables (the table containing the crucial information is optional), we
need to manually wire the hook.

This change is adapted from Linux.

Link: https://lore.kernel.org/all/20250110-winbond-6-12-rc1-nor-volatile-bit-v3-1-735363f8cc7d@bootlin.com/
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2026-02-13 10:40:36 -06:00
Marek Vasut
10e84cc16a spi: Clean up more of the stacked parallel ifdeffery
Invert the conditional when to exit, and fall back to common code
in the default case. This should have no functional impact on either
code path.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2026-02-13 10:38:33 -06:00
Marek Vasut
59fa20f729 spi: Squash spi_slave_of_to_plat() into spi_child_post_bind()
The spi_slave_of_to_plat() is called from one place, spi_child_post_bind().
Squash it into the later and remove the public declaration, make this
function local static. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2026-02-13 10:38:33 -06:00
Shiji Yang
df5dd0bff4 mtd: spi-nor-ids: remove duplicate IDs for w25q32 and w25q512 series
Some Winbond Flash chips share the same device ID. Names are not that
important for the SPI Flash, hence we don't need these duplicate ID
definitions. And the Flash size of w25q512jv is actually wrong. Clean
them up to keep the source file tidy.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
2026-02-13 10:31:07 -06:00
Kory Maincent
7080475bb7 fwu-mdata: Allow multiple metadata storage drivers to be enabled
Change the Kconfig from a "choice" to a conditional block, allowing
multiple FWU metadata storage drivers to be selected simultaneously
instead of being mutually exclusive.

This enables systems with FWU metadata on different storage types
(e.g., both GPT-partitioned block devices and MTD devices) to have
both drivers compiled in. The board can then select the appropriate
driver at runtime based on the devicetree description.

The change converts FWU_MDATA to a menuconfig and replaces the
"choice/endchoice" block with "if FWU_MDATA/endif", making
FWU_MDATA_GPT_BLK default to 'y' for backward compatibility.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Acked-by: Sughosh Ganu <sughosh.ganu@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2026-02-13 16:04:40 +02:00
Michal Simek
b86fa3fd24 gpio: Add GPIO delay driver
Add a GPIO controller driver that provides configurable delays when
setting GPIO output values. This is useful for hardware that requires
specific timing delays during power sequencing or GPIO state changes.

The driver wraps underlying GPIO controllers and adds programmable
ramp-up and ramp-down delays specified in microseconds through the
device tree. Each GPIO can have independent delay timings.

Device tree binding matches Linux.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/575998efc6ba0e405640789cf8d05f0b633f496e.1770105146.git.michal.simek@amd.com
2026-02-13 08:16:25 +01:00