[PATCH 3/8] misc: socfpga: Add RSU driver-model anchor device
dinesh.maniyam at altera.com
dinesh.maniyam at altera.com
Tue Jun 30 08:55:19 CEST 2026
From: Dinesh Maniyam <dinesh.maniyam at altera.com>
Add a UCLASS_MISC driver bound to the "altr,socfpga-rsu" compatible.
The RSU command layer stores its active low-level session on this
device's private data, so the session state lives on a driver-model
device rather than in a file-scope variable.
The anchor has no MMIO and no flash-controller coupling of its own; the
QSPI flash requirement is enforced by CMD_SOCFPGA_RSU, the only consumer
of the device. Add the binding document and the devicetree node in
socfpga_soc64_u-boot.dtsi, and the SOCFPGA_RSU_DM Kconfig symbol
(default y, selected together with the command).
Signed-off-by: Dinesh Maniyam <dinesh.maniyam at altera.com>
---
arch/arm/dts/socfpga_soc64_u-boot.dtsi | 5 +++
.../misc/altr,socfpga-rsu.yaml | 41 +++++++++++++++++++
drivers/misc/Kconfig | 16 ++++++++
drivers/misc/Makefile | 1 +
drivers/misc/socfpga_rsu.c | 30 ++++++++++++++
5 files changed, 93 insertions(+)
create mode 100644 doc/device-tree-bindings/misc/altr,socfpga-rsu.yaml
create mode 100644 drivers/misc/socfpga_rsu.c
diff --git a/arch/arm/dts/socfpga_soc64_u-boot.dtsi b/arch/arm/dts/socfpga_soc64_u-boot.dtsi
index ce5b37ef547..5ec3c0662e3 100644
--- a/arch/arm/dts/socfpga_soc64_u-boot.dtsi
+++ b/arch/arm/dts/socfpga_soc64_u-boot.dtsi
@@ -7,6 +7,11 @@
/ {
soc at 0 {
+ socfpga-rsu {
+ compatible = "altr,socfpga-rsu";
+ bootph-all;
+ };
+
socfpga-system-mgr-firewall {
compatible = "intel,socfpga-dtreg";
#address-cells = <1>;
diff --git a/doc/device-tree-bindings/misc/altr,socfpga-rsu.yaml b/doc/device-tree-bindings/misc/altr,socfpga-rsu.yaml
new file mode 100644
index 00000000000..7b6ea87a8bc
--- /dev/null
+++ b/doc/device-tree-bindings/misc/altr,socfpga-rsu.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+title: Altera SoC FPGA Remote System Update (U-Boot anchor)
+
+description: |
+ Devicetree node used by U-Boot as a driver-model anchor for Remote
+ System Update (RSU) on Altera Stratix 10 / Agilex family SoCs.
+
+ RSU is implemented in firmware (SDM mailbox) and SPI NOR (Cadence
+ QSPI); this node has no MMIO. When CONFIG_SOCFPGA_RSU_DM is enabled,
+ U-Boot binds a UCLASS_MISC driver to this compatible and stores the
+ active RSU low-level session on the device private data.
+
+maintainers:
+ - Tien Fong Chee <tien.fong.chee at altera.com>
+ - Dinesh Maniyam <dinesh.maniyam at altera.com>
+
+properties:
+ compatible:
+ const: altr,socfpga-rsu
+
+ bootph-all:
+ description:
+ Bind the anchor at every U-Boot phase that uses RSU (SPL, U-Boot
+ proper).
+ type: boolean
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ soc {
+ socfpga-rsu {
+ compatible = "altr,socfpga-rsu";
+ bootph-all;
+ };
+ };
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index ea785793d18..42bd08e038d 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -66,6 +66,22 @@ config ALTERA_SYSID
Select this to enable a sysid for Altera devices. Please find
details on the "Embedded Peripherals IP User Guide" of Altera.
+config SOCFPGA_RSU_DM
+ bool "Altera SoC FPGA RSU driver-model anchor device"
+ depends on MISC
+ depends on OF_CONTROL
+ depends on CMD_SOCFPGA_RSU
+ default y
+ help
+ Expose RSU as a devicetree-bound UCLASS_MISC device
+ (altr,socfpga-rsu). The RSU command layer stores its active
+ low-level session on this device; ensure the altr,socfpga-rsu
+ node is present in the U-Boot DTS.
+
+ This anchor driver has no MMIO and no flash-controller coupling
+ of its own; the QSPI flash requirement is enforced by
+ CMD_SOCFPGA_RSU (the only consumer of this device).
+
config ATSHA204A
bool "Support for Atmel ATSHA204A module"
select BITREVERSE
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index e2170212e5a..1d26cf58284 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -30,6 +30,7 @@ obj-$(CONFIG_SANDBOX) += spltest_sandbox.o
endif
endif
obj-$(CONFIG_ALTERA_SYSID) += altera_sysid.o
+obj-$(CONFIG_SOCFPGA_RSU_DM) += socfpga_rsu.o
obj-$(CONFIG_ATSHA204A) += atsha204a-i2c.o
obj-$(CONFIG_CBMEM_CONSOLE) += cbmem_console.o
obj-$(CONFIG_FSL_DEVICE_DISABLE) += fsl_devdis.o
diff --git a/drivers/misc/socfpga_rsu.c b/drivers/misc/socfpga_rsu.c
new file mode 100644
index 00000000000..6e7d7ffc072
--- /dev/null
+++ b/drivers/misc/socfpga_rsu.c
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2026 Altera Corporation <www.altera.com>
+ *
+ * SoC FPGA Remote System Update — driver model binding (UCLASS_MISC).
+ */
+
+#include <dm.h>
+#include <asm/arch/socfpga_rsu_dm.h>
+
+static int socfpga_rsu_probe(struct udevice *dev)
+{
+ struct socfpga_rsu_priv *priv = dev_get_priv(dev);
+
+ priv->ll = NULL;
+ return 0;
+}
+
+static const struct udevice_id socfpga_rsu_ids[] = {
+ { .compatible = "altr,socfpga-rsu" },
+ { }
+};
+
+U_BOOT_DRIVER(socfpga_rsu) = {
+ .name = "socfpga_rsu",
+ .id = UCLASS_MISC,
+ .of_match = socfpga_rsu_ids,
+ .probe = socfpga_rsu_probe,
+ .priv_auto = sizeof(struct socfpga_rsu_priv),
+};
--
2.43.7
More information about the U-Boot
mailing list