Skip to contentSkip to conversation

arch: arm64: socfpga: clean up dtbs_check warnings

PATCH New Dinh Nguyen 1 participant 6 messages Jun 26, 2023

Subsystems (2)
lore
Share & tools
lore

Dinh Nguyen

author maintainer
#0 lore raw

cover arch: arm64: socfpga: clean up dtbs_check warnings

Hi,

This will be the first of many patchsets to clean up the SoCFPGA platform dtbs_check warnings.

Dinh

Dinh Nguyen (5):
arm64: dts: socfpga: agilex/n5x/stratix10: fix dtbs_check warning for
partitions
arm64: dts: socfpga: agilex/stratix10: fix dtbs_check warnings for
sram
arm64: dts: socfpga: stratix10: fix dtbs_check warning for usbphy
arm64: dts: stratix10/agilex/n5x: fix dtbs_check warning for memory
node
arm64: dts: agilex/stratix10/n5x: fix dtbs_check for rstmgr

 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi  | 14 ++++++++------
 .../boot/dts/altera/socfpga_stratix10_socdk.dts    |  6 +++---
 .../dts/altera/socfpga_stratix10_socdk_nand.dts    |  8 ++++----
 .../boot/dts/altera/socfpga_stratix10_swvp.dts     |  2 +-
 arch/arm64/boot/dts/intel/socfpga_agilex.dtsi      |  7 +++++--
 arch/arm64/boot/dts/intel/socfpga_agilex_n6000.dts |  4 ++--
 arch/arm64/boot/dts/intel/socfpga_agilex_socdk.dts |  6 +++---
 .../boot/dts/intel/socfpga_agilex_socdk_nand.dts   |  4 ++--
 arch/arm64/boot/dts/intel/socfpga_n5x_socdk.dts    |  6 +++---
 9 files changed, 31 insertions(+), 26 deletions(-)
Signature · 1 line
2.25.1
author maintainer
#1 lore raw

PATCH 1/5 arm64: dts: socfpga: agilex/n5x/stratix10: fix dtbs_check warning for partitions

flash@0: partitions: Unevaluated properties are not allowed ('partition@3FE0000' was unexpected)

---
 arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts      | 2 +-
 arch/arm64/boot/dts/altera/socfpga_stratix10_socdk_nand.dts | 4 ++--
 arch/arm64/boot/dts/intel/socfpga_agilex_socdk.dts          | 2 +-
 arch/arm64/boot/dts/intel/socfpga_n5x_socdk.dts             | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts +1 -1
index 38ae674f2f02..c66da5a94691 100644
@@ -205,7 +205,7 @@ qspi_boot: partition@0 {
 				reg = <0x0 0x03FE0000>;
 			};
 
-			qspi_rootfs: partition@3FE0000 {
+			qspi_rootfs: partition@3fe0000 {
 				label = "Root Filesystem - JFFS2";
 				reg = <0x03FE0000 0x0C020000>;
 			};
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk_nand.dts +2 -2
index ede99dcc0558..a9ea9e6ec6b3 100644
@@ -103,9 +103,9 @@ &nand {
 	status = "okay";
 
 	flash@0 {
+		reg = <0>;
 		#address-cells = <1>;
 		#size-cells = <1>;
-		reg = <0>;
 		nand-bus-width = <16>;
 
 		partition@0 {
@@ -194,7 +194,7 @@ qspi_boot: partition@0 {
 				reg = <0x0 0x03FE0000>;
 			};
 
-			qspi_rootfs: partition@3FE0000 {
+			qspi_rootfs: partition@3fe0000 {
 				label = "Root Filesystem - JFFS2";
 				reg = <0x03FE0000 0x0C020000>;
 			};
arch/arm64/boot/dts/intel/socfpga_agilex_socdk.dts +1 -1
index 07c3f8876613..b6e5e69fd8e5 100644
@@ -131,7 +131,7 @@ qspi_boot: partition@0 {
 				reg = <0x0 0x03FE0000>;
 			};
 
-			qspi_rootfs: partition@3FE0000 {
+			qspi_rootfs: partition@3fe0000 {
 				label = "Root Filesystem - JFFS2";
 				reg = <0x03FE0000 0x0C020000>;
 			};
arch/arm64/boot/dts/intel/socfpga_n5x_socdk.dts +1 -1
index 08c088571270..7b1ced8e1d12 100644
@@ -109,7 +109,7 @@ qspi_boot: partition@0 {
 				reg = <0x0 0x03FE0000>;
 			};
 
-			qspi_rootfs: partition@3FE0000 {
+			qspi_rootfs: partition@03fe0000 {
 				label = "Root Filesystem - JFFS2";
 				reg = <0x03FE0000 0x0C020000>;
 			};
Signature · 1 line
2.25.1
author maintainer
#2 lore raw

PATCH 2/5 arm64: dts: socfpga: agilex/stratix10: fix dtbs_check warnings for sram

In reply to Dinh Nguyen

sram@ffe00000: 'ranges' is a required property sram@ffe00000: '#size-cells' is a required property sram@ffe00000: '#address-cells' is a required property

---
 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 3 +++
 arch/arm64/boot/dts/intel/socfpga_agilex.dtsi     | 3 +++
 2 files changed, 6 insertions(+)
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +3 -0
index 41c9eb51d0ee..55abc578e0ec 100644
@@ -331,6 +331,9 @@ nand: nand-controller@ffb90000 {
 		ocram: sram@ffe00000 {
 			compatible = "mmio-sram";
 			reg = <0xffe00000 0x100000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0xffe00000 0x100000>;
 		};
 
 		pdma: dma-controller@ffda0000 {
arch/arm64/boot/dts/intel/socfpga_agilex.dtsi +3 -0
index f9674cc46764..34e65a9cae61 100644
@@ -336,6 +336,9 @@ nand: nand-controller@ffb90000 {
 		ocram: sram@ffe00000 {
 			compatible = "mmio-sram";
 			reg = <0xffe00000 0x40000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0xffe00000 0x40000>;
 		};
 
 		pdma: dma-controller@ffda0000 {
Signature · 1 line
2.25.1
author maintainer
#3 lore raw

PATCH 3/5 arm64: dts: socfpga: stratix10: fix dtbs_check warning for usbphy

In reply to Dinh Nguyen

soc: usbphy@0: 'anyOf' conditional failed, one must be fixed:

---
 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +5 -6
index 55abc578e0ec..1c846f13539c 100644
@@ -487,12 +487,6 @@ uart1: serial@ffc02100 {
 			status = "disabled";
 		};
 
-		usbphy0: usbphy@0 {
-			#phy-cells = <0>;
-			compatible = "usb-nop-xceiv";
-			status = "okay";
-		};
-
 		usb0: usb@ffb00000 {
 			compatible = "snps,dwc2";
 			reg = <0xffb00000 0x40000>;
@@ -639,4 +633,9 @@ fpga_mgr: fpga-mgr {
 			};
 		};
 	};
+
+	usbphy0: usbphy0 {
+		compatible = "usb-nop-xceiv";
+		#phy-cells = <0>;
+	};
 };
Signature · 1 line
2.25.1
author maintainer
#4 lore raw

PATCH 4/5 arm64: dts: stratix10/agilex/n5x: fix dtbs_check warning for memory node

In reply to Dinh Nguyen

Although, we expect the bootloader to full memory details but passing empty values can give warning, so add a default value.

memory: False schema does not allow {'device_type': ['memory'], 'reg': [[0, 0, 0, 0]]}

---
 arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts      | 4 ++--
 arch/arm64/boot/dts/altera/socfpga_stratix10_socdk_nand.dts | 4 ++--
 arch/arm64/boot/dts/altera/socfpga_stratix10_swvp.dts       | 2 +-
 arch/arm64/boot/dts/intel/socfpga_agilex_n6000.dts          | 4 ++--
 arch/arm64/boot/dts/intel/socfpga_agilex_socdk.dts          | 4 ++--
 arch/arm64/boot/dts/intel/socfpga_agilex_socdk_nand.dts     | 4 ++--
 arch/arm64/boot/dts/intel/socfpga_n5x_socdk.dts             | 4 ++--
 7 files changed, 13 insertions(+), 13 deletions(-)
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts +2 -2
index c66da5a94691..92cd968cb798 100644
@@ -38,10 +38,10 @@ led-hps2 {
 		};
 	};
 
-	memory {
+	memory@80000000 {
 		device_type = "memory";
 		/* We expect the bootloader to fill in the reg */
-		reg = <0 0 0 0>;
+		reg = <0 0x80000000 0 0>;
 	};
 
 	ref_033v: regulator-v-ref {
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk_nand.dts +2 -2
index a9ea9e6ec6b3..bd6f78e0fe2f 100644
@@ -38,10 +38,10 @@ led-hps2 {
 		};
 	};
 
-	memory {
+	memory@80000000 {
 		device_type = "memory";
 		/* We expect the bootloader to fill in the reg */
-		reg = <0 0 0 0>;
+		reg = <0 0x80000000 0 0>;
 	};
 
 	ref_033v: regulator-v-ref {
arch/arm64/boot/dts/altera/socfpga_stratix10_swvp.dts +1 -1
index a8db58573954..ff413f8e3b07 100644
@@ -29,7 +29,7 @@ chosen {
 		linux,initrd-end = <0x125c8324>;
 	};
 
-	memory {
+	memory@80000000 {
 		device_type = "memory";
 		reg = <0x0 0x0 0x0 0x80000000>;
 	};
arch/arm64/boot/dts/intel/socfpga_agilex_n6000.dts +2 -2
index 6231a69204b1..1a32840c74e0 100644
@@ -20,10 +20,10 @@ chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory@0 {
+	memory@80000000 {
 		device_type = "memory";
 		/* We expect the bootloader to fill in the reg */
-		reg = <0 0 0 0>;
+		reg = <0 0x80000000 0 0>;
 	};
 
 	soc {
arch/arm64/boot/dts/intel/socfpga_agilex_socdk.dts +2 -2
index b6e5e69fd8e5..4e50d3d10806 100644
@@ -37,10 +37,10 @@ led2 {
 		};
 	};
 
-	memory {
+	memory@80000000 {
 		device_type = "memory";
 		/* We expect the bootloader to fill in the reg */
-		reg = <0 0 0 0>;
+		reg = <0 0x80000000 0 0>;
 	};
 };
 
arch/arm64/boot/dts/intel/socfpga_agilex_socdk_nand.dts +2 -2
index 51f83f96ec65..0f9020bd0c52 100644
@@ -37,10 +37,10 @@ led2 {
 		};
 	};
 
-	memory {
+	memory@80000000 {
 		device_type = "memory";
 		/* We expect the bootloader to fill in the reg */
-		reg = <0 0 0 0>;
+		reg = <0 0x80000000 0 0>;
 	};
 };
 
arch/arm64/boot/dts/intel/socfpga_n5x_socdk.dts +2 -2
index 7b1ced8e1d12..755129e5b546 100644
@@ -19,10 +19,10 @@ chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory@80000000 {
 		device_type = "memory";
 		/* We expect the bootloader to fill in the reg */
-		reg = <0 0 0 0>;
+		reg = <0 0x80000000 0 0>;
 	};
 
 	soc {
Signature · 1 line
2.25.1
author maintainer
#5 lore raw

PATCH 5/5 arm64: dts: agilex/stratix10/n5x: fix dtbs_check for rstmgr

In reply to Dinh Nguyen

The bindings expect "altr,rst-mgr" as a fallback in the rstmgr compatible:

rstmgr@ffd11000: compatible: 'oneOf' conditional failed, one must be fixed:
['altr,stratix10-rst-mgr'] is too short
'altr,rst-mgr' was expected

---
 arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/intel/socfpga_agilex.dtsi +2 -2
index 34e65a9cae61..fc047aef4911 100644
@@ -376,9 +376,9 @@ pinctrl1: pinconf@ffd13100 {
 		};
 
 		rst: rstmgr@ffd11000 {
-			#reset-cells = <1>;
-			compatible = "altr,stratix10-rst-mgr";
+			compatible = "altr,stratix10-rst-mgr", "altr,rst-mgr";
 			reg = <0xffd11000 0x100>;
+			#reset-cells = <1>;
 		};
 
 		smmu: iommu@fa000000 {
Signature · 1 line
2.25.1