Skip to contentSkip to conversation

dt-bindings: fpga: altera: fix dtbs_check warning for fpga-bridge

PATCH In review Dinh Nguyen 2 participants 8 messages Dec 28, 2025 – Dec 30, 2025

Subsystems (3)
lore
Share & tools
lore

Dinh Nguyen

author maintainer
#0 lore raw

PATCH 1/5 dt-bindings: fpga: altera: fix dtbs_check warning for fpga-bridge

Document the nodename with a regex pattern. This change fixes this warning:

fpga_bridge@ff400000 (altr,socfpga-lwhps2fpga-bridge): $nodename:0:
'fpga_bridge@ff400000' does not match '^fpga-bridge(@.*|-([0-9]|[1-9][0-9]+))?$'

---
 .../devicetree/bindings/fpga/altr,socfpga-hps2fpga-bridge.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/fpga/altr,socfpga-hps2fpga-bridge.yaml +3 -0
index d19c6660d6c9..36732cb2446e 100644
@@ -13,6 +13,9 @@ allOf:
   - $ref: fpga-bridge.yaml#
 
 properties:
+  $nodename:
+    pattern: "^fpga-bridge(@.*|-([0-9]|[1-9][0-9]+))?$"
+
   compatible:
     enum:
       - altr,socfpga-lwhps2fpga-bridge
Signature · 1 line
2.42.0.411.g813d9a9188
author maintainer
#1 lore raw

PATCH 2/5 dt-bindings: altera: document syscon as fallback for sys-mgr

For 32-bit Altera SoCFPGA parts, the sys-mgr uses the syscon mfd as a fallback.

This change addresses this warning from dtbs_check:

sysmgr@ffd08000 (altr,sys-mgr): compatible: 'oneOf' conditional failed, one must be fixed:
['altr,sys-mgr', 'syscon'] is too long 'altr,sys-mgr-s10' was expected
'altr,sys-mgr' was expected
from schema $id: http://devicetree.org/schemas/soc/altera/altr,sys-mgr.yaml

---
 .../devicetree/bindings/soc/altera/altr,sys-mgr.yaml        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/soc/altera/altr,sys-mgr.yaml +4 -2
index d56ff4c05ae5..2dd3395f3f63 100644
@@ -13,7 +13,9 @@ properties:
   compatible:
     oneOf:
       - description: Cyclone5/Arria5/Arria10
-        const: altr,sys-mgr
+        items:
+          - const: altr,sys-mgr
+          - const: syscon
       - description: Stratix10 SoC
         items:
           - const: altr,sys-mgr-s10
@@ -45,7 +47,7 @@ additionalProperties: false
 examples:
   - |
     sysmgr@ffd08000 {
-      compatible = "altr,sys-mgr";
+      compatible = "altr,sys-mgr", "syscon";
       reg = <0xffd08000 0x1000>;
       cpu1-start-addr = <0xffd080c4>;
     };
Signature · 1 line
2.42.0.411.g813d9a9188
Acked-by on v1 2/5
#2 lore raw

Re: [PATCH 2/5] dt-bindings: altera: document syscon as fallback for sys-mgr

Quoted 1 line · Dinh Nguyen

For 32-bit Altera SoCFPGA parts, the sys-mgr uses the syscon mfd as a

There is no mfd, so just syscon.

Quoted 21 lines

fallback.

This change addresses this warning from dtbs_check:

sysmgr@ffd08000 (altr,sys-mgr): compatible: 'oneOf' conditional failed, one must be fixed:
['altr,sys-mgr', 'syscon'] is too long 'altr,sys-mgr-s10' was expected
'altr,sys-mgr' was expected
from schema $id: http://devicetree.org/schemas/soc/altera/altr,sys-mgr.yaml

---
 .../devicetree/bindings/soc/altera/altr,sys-mgr.yaml        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/soc/altera/altr,sys-mgr.yaml +0 -0
index d56ff4c05ae5..2dd3395f3f63 100644

Documentation/devicetree/bindings/soc/altera/altr,sys-mgr.yaml properties: · line 18

Quoted 7 lines
Documentation/devicetree/bindings/soc/altera/altr,sys-mgr.yaml +3 -1
@@ -13,7 +13,9 @@ properties:
   compatible:
     oneOf:
       - description: Cyclone5/Arria5/Arria10
-        const: altr,sys-mgr
+        items:
+          - const: altr,sys-mgr
+          - const: syscon

And s10 does not have fallback, so that's pretty messy. I guess it's just legacy, but let me state - don't grow such bindings/patterns for new devices.

Best regards,
Krzysztof

author maintainer
#3 lore raw

PATCH 3/5 ARM: dts: socfpga: fix fpga_bridge nodename to fpga-bridge

In reply to Dinh Nguyen

The fpga_bridge node name should be separated by a '-' not '_'.

---
 arch/arm/boot/dts/intel/socfpga/socfpga.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/intel/socfpga/socfpga.dtsi +2 -2
index 35be14150f41..ba24f971686e 100644
@@ -523,7 +523,7 @@ h2f_user2_clk: h2f_user2_clk {
 				};
 		};
 
-		fpga_bridge0: fpga_bridge@ff400000 {
+		fpga_bridge0: fpga-bridge@ff400000 {
 			compatible = "altr,socfpga-lwhps2fpga-bridge";
 			reg = <0xff400000 0x100000>;
 			resets = <&rst LWHPS2FPGA_RESET>;
@@ -531,7 +531,7 @@ fpga_bridge0: fpga_bridge@ff400000 {
 			status = "disabled";
 		};
 
-		fpga_bridge1: fpga_bridge@ff500000 {
+		fpga_bridge1: fpga-bridge@ff500000 {
 			compatible = "altr,socfpga-hps2fpga-bridge";
 			reg = <0xff500000 0x10000>;
 			resets = <&rst HPS2FPGA_RESET>;
Signature · 1 line
2.42.0.411.g813d9a9188
#4 lore raw

Re: [PATCH 3/5] ARM: dts: socfpga: fix fpga_bridge nodename to fpga-bridge

Quoted 1 line · Dinh Nguyen

The fpga_bridge node name should be separated by a '-' not '_'.

Please fix it everywhere in the same commit, not only two nodes out of 40...

Best regards,
Krzysztof

author maintainer
#5 lore raw

PATCH 4/5 ARM: dts: socfpga: add #address-cells and #size-cells for sram node

In reply to Dinh Nguyen

Add #address-cells and #size-cells for sram node to fix below DTB_CHECK warnings:

socfpga_arria5_socdk.dtb: sram@ffff0000 (mmio-sram): '#size-cells' is a required property from schema $id: http://devicetree.org/schemas/sram/sram.yaml

---
 arch/arm/boot/dts/intel/socfpga/socfpga.dtsi         | 3 +++
 arch/arm/boot/dts/intel/socfpga/socfpga_arria10.dtsi | 3 +++
 2 files changed, 6 insertions(+)
arch/arm/boot/dts/intel/socfpga/socfpga.dtsi +3 -0
index ba24f971686e..f686fd0966e1 100644
@@ -785,6 +785,9 @@ nand0: nand-controller@ff900000 {
 		ocram: sram@ffff0000 {
 			compatible = "mmio-sram";
 			reg = <0xffff0000 0x10000>;
+			#address-cells = <0x1>;
+			#size-cells = <0x1>;
+			ranges;
 		};
 
 		qspi: spi@ff705000 {
arch/arm/boot/dts/intel/socfpga/socfpga_arria10.dtsi +3 -0
index b108265e9bde..4df2b98a3e59 100644
@@ -686,6 +686,9 @@ nand: nand-controller@ffb90000 {
 		ocram: sram@ffe00000 {
 			compatible = "mmio-sram";
 			reg = <0xffe00000 0x40000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
 		};
 
 		eccmgr: eccmgr {
Signature · 1 line
2.42.0.411.g813d9a9188
author maintainer
#6 lore raw

PATCH 5/5 ARM: dts: socfpga: fix dtbs_check warning for fpga-region

In reply to Dinh Nguyen

soc (simple-bus): base_fpga_region: 'ranges' is a required property
from schema $id: http://devicetree.org/schemas/simple-bus.yaml

base_fpga_region (fpga-region): $nodename:0: 'base_fpga_region' does not match '^fpga-region(@.*|-([0-9]|[1-9][0-9]+))?$'
from schema $id: http://devicetree.org/schemas/fpga/fpga-region.yaml

---
 arch/arm/boot/dts/intel/socfpga/socfpga.dtsi         | 3 ++-
 arch/arm/boot/dts/intel/socfpga/socfpga_arria10.dtsi | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/boot/dts/intel/socfpga/socfpga.dtsi +2 -1
index f686fd0966e1..587700a88fa8 100644
@@ -87,12 +87,13 @@ pdma: pdma@ffe01000 {
 			};
 		};
 
-		base_fpga_region {
+		base_fpga_region: fpga-region {
 			compatible = "fpga-region";
 			fpga-mgr = <&fpgamgr0>;
 
 			#address-cells = <0x1>;
 			#size-cells = <0x1>;
+			ranges;
 		};
 
 		can0: can@ffc00000 {
arch/arm/boot/dts/intel/socfpga/socfpga_arria10.dtsi +2 -1
index 4df2b98a3e59..a53a94678df2 100644
@@ -80,12 +80,13 @@ pdma: pdma@ffda1000 {
 			};
 		};
 
-		base_fpga_region {
+		base_fpga_region: fpga-region {
 			#address-cells = <0x1>;
 			#size-cells = <0x1>;
 
 			compatible = "fpga-region";
 			fpga-mgr = <&fpga_mgr>;
+			ranges;
 		};
 
 		clkmgr@ffd04000 {
Signature · 1 line
2.42.0.411.g813d9a9188
#7 lore raw
In reply to Dinh Nguyen
Quoted 5 lines · Dinh Nguyen

Document the nodename with a regex pattern. This change fixes this warning:

fpga_bridge@ff400000 (altr,socfpga-lwhps2fpga-bridge): $nodename:0:
'fpga_bridge@ff400000' does not match '^fpga-bridge(@.*|-([0-9]|[1-9][0-9]+))?$'

I don't understand how enforcing node name fixes warning of incorrect node name in DTS.

Quoted 11 lines
---
 .../devicetree/bindings/fpga/altr,socfpga-hps2fpga-bridge.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/fpga/altr,socfpga-hps2fpga-bridge.yaml +0 -0
index d19c6660d6c9..36732cb2446e 100644

Documentation/devicetree/bindings/fpga/altr,socfpga-hps2fpga-bridge.yaml allOf: · line 17

Quoted 5 lines
Documentation/devicetree/bindings/fpga/altr,socfpga-hps2fpga-bridge.yaml +2 -0
@@ -13,6 +13,9 @@ allOf:
   - $ref: fpga-bridge.yaml#
 
 properties:
+  $nodename:
+    pattern: "^fpga-bridge(@.*|-([0-9]|[1-9][0-9]+))?$"

Best regards,
Krzysztof