Skip to contentSkip to conversation

arm64: dts: Reformat PCI ranges/dma-ranges entries

PATCH In review Rob Herring 4 participants 7 messages Aug 19, 2020 – Aug 21, 2020

Subsystems (11)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 arm64: dts: Reformat PCI ranges/dma-ranges entries

While bracketing doesn't matter for a DTB, the DT schema checks rely on bracketing around each distinct entry. Reformat ranges and dma-ranges entries to fix warnings such as:

arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges: [[2197815296, 0, 4194304000, 0, 4194304000, 0, 31457280, 2164260864, 0, 4225761280, 0, 4225761280, 0, 1048576]] is not valid under any of the given schemas (Possible causes of the failure):

        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges: True was expected
        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges:0: [2197815296, 0, 4194304000, 0, 4194304000, 0, 31457280, 2164260864, 0, 4225761280, 0, 4225761280, 0, 1048576] is too long
        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges:0:0: 2197815296 is not one of [16777216, 33554432, 50331648, 1107296256, 1124073472]
Cc Kevin Hilman <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Jerome Brunet <[email protected]>
Cc Martin Blumenstingl <[email protected]>
Cc Khuong Dinh <[email protected]>
Cc Robert Richter <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Li Yang <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Pengutronix Kernel Team <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc NXP Linux Team <[email protected]>
Cc Wei Xu <[email protected]>
Cc Jason Cooper <[email protected]>
Cc Andrew Lunn <[email protected]>
Cc Gregory Clement <[email protected]>
Cc Sebastian Hesselbarth <[email protected]>
Cc Andy Gross <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc Heiko Stuebner <[email protected]>
Cc Tero Kristo <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Michal Simek <[email protected]>

---
SoC maintainers, please apply this directly.

 .../boot/dts/amlogic/meson-g12-common.dtsi    |  4 +-
 arch/arm64/boot/dts/apm/apm-shadowcat.dtsi    | 20 ++++----
 arch/arm64/boot/dts/apm/apm-storm.dtsi        | 50 +++++++++----------
 arch/arm64/boot/dts/cavium/thunder2-99xx.dtsi |  4 +-
 .../arm64/boot/dts/freescale/fsl-ls1012a.dtsi |  4 +-
 .../arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 22 ++++----
 .../boot/dts/freescale/fsl-ls1043a-qds.dts    |  6 +--
 .../boot/dts/freescale/fsl-ls1043a-rdb.dts    |  6 +--
 .../arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 12 ++---
 .../boot/dts/freescale/fsl-ls1046a-qds.dts    |  6 +--
 .../boot/dts/freescale/fsl-ls1046a-rdb.dts    |  4 +-
 .../arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 12 ++---
 .../boot/dts/freescale/fsl-ls1088a-qds.dts    |  6 +--
 .../boot/dts/freescale/fsl-ls1088a-rdb.dts    |  4 +-
 .../arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 16 +++---
 .../arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 16 +++---
 .../arm64/boot/dts/freescale/fsl-ls2088a.dtsi | 16 +++---
 .../boot/dts/freescale/fsl-ls208xa-qds.dtsi   |  6 +--
 .../boot/dts/freescale/fsl-ls208xa-rdb.dtsi   |  6 +--
 .../arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 10 ++--
 .../arm64/boot/dts/freescale/fsl-lx2160a.dtsi |  4 +-
 arch/arm64/boot/dts/freescale/imx8mq.dtsi     |  8 +--
 .../arm64/boot/dts/hisilicon/hi3798cv200.dtsi |  4 +-
 arch/arm64/boot/dts/hisilicon/hip06.dtsi      |  5 +-
 arch/arm64/boot/dts/hisilicon/hip07.dtsi      |  4 +-
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi  |  4 +-
 arch/arm64/boot/dts/qcom/ipq8074.dtsi         | 12 ++---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi      |  4 +-
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi      |  8 +--
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi        |  4 +-
 30 files changed, 141 insertions(+), 146 deletions(-)
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +2 -2
index 1e83ec5b8c91..cc7811df91f3 100644
@@ -134,8 +134,8 @@ pcie: pcie@fc000000 {
 			#address-cells = <3>;
 			#size-cells = <2>;
 			device_type = "pci";
-			ranges = <0x81000000 0 0 0x0 0xfc600000 0 0x00100000
-				  0x82000000 0 0xfc700000 0x0 0xfc700000 0 0x1900000>;
+			ranges = <0x81000000 0 0 0x0 0xfc600000 0 0x00100000>,
+				 <0x82000000 0 0xfc700000 0x0 0xfc700000 0 0x1900000>;
 
 			clocks = <&clkc CLKID_PCIE_PHY
 				  &clkc CLKID_PCIE_COMB
arch/arm64/boot/dts/apm/apm-shadowcat.dtsi +10 -10
index 3feb1881bbc2..6684955d3fcc 100644
@@ -617,11 +617,11 @@ pcie0: pcie@1f2b0000 {
 			reg = < 0x00 0x1f2b0000 0x0 0x00010000   /* Controller registers */
 				0xc0 0xd0000000 0x0 0x00040000>; /* PCI config space */
 			reg-names = "csr", "cfg";
-			ranges = <0x01000000 0x00 0x00000000 0xc0 0x10000000 0x00 0x00010000   /* io */
-				  0x02000000 0x00 0x20000000 0xc1 0x20000000 0x00 0x20000000   /* mem */
-				  0x43000000 0xe0 0x00000000 0xe0 0x00000000 0x20 0x00000000>; /* mem */
-			dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000
-				      0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
+			ranges = <0x01000000 0x00 0x00000000 0xc0 0x10000000 0x00 0x00010000>, /* io */
+				 <0x02000000 0x00 0x20000000 0xc1 0x20000000 0x00 0x20000000>, /* mem */
+				 <0x43000000 0xe0 0x00000000 0xe0 0x00000000 0x20 0x00000000>; /* mem */
+			dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000>,
+				     <0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
 			bus-range = <0x00 0xff>;
 			interrupt-map-mask = <0x0 0x0 0x0 0x7>;
 			interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0x0 0x0 0x10 0x4
@@ -643,11 +643,11 @@ pcie1: pcie@1f2c0000 {
 			reg = < 0x00 0x1f2c0000 0x0 0x00010000   /* Controller registers */
 				0xa0 0xd0000000 0x0 0x00040000>; /* PCI config space */
 			reg-names = "csr", "cfg";
-			ranges = <0x01000000 0x00 0x00000000 0xa0 0x10000000 0x00 0x00010000   /* io */
-				  0x02000000 0x00 0x20000000 0xa1 0x20000000 0x00 0x20000000   /* mem */
-				  0x43000000 0xb0 0x00000000 0xb0 0x00000000 0x10 0x00000000>; /* mem */
-			dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000
-				      0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
+			ranges = <0x01000000 0x00 0x00000000 0xa0 0x10000000 0x00 0x00010000>, /* io */
+				 <0x02000000 0x00 0x20000000 0xa1 0x20000000 0x00 0x20000000>, /* mem */
+				 <0x43000000 0xb0 0x00000000 0xb0 0x00000000 0x10 0x00000000>; /* mem */
+			dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000>,
+				     <0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
 			bus-range = <0x00 0xff>;
 			interrupt-map-mask = <0x0 0x0 0x0 0x7>;
 			interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0x0 0x0 0x16 0x4
arch/arm64/boot/dts/apm/apm-storm.dtsi +25 -25

80 lines not on this page · raw message

arch/arm64/boot/dts/cavium/thunder2-99xx.dtsi +2 -2
index dfb41705a9a9..707e7d2d2a0f 100644
@@ -112,8 +112,8 @@ pcie@30000000 {
 		 *   MEM64 pref 0x40_0000_0000 - 0x60_0000_0000
 		 */
 		ranges =
-		  <0x02000000    0 0x40000000    0 0x40000000    0 0x20000000
-		   0x43000000 0x40 0x00000000 0x40 0x00000000 0x20 0x00000000>;
+		  <0x02000000    0 0x40000000    0 0x40000000    0 0x20000000>,
+		  <0x43000000 0x40 0x00000000 0x40 0x00000000 0x20 0x00000000>;
 		bus-range = <0 0xff>;
 		interrupt-map-mask = <0 0 0 7>;
 		interrupt-map =
arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi +2 -2
index ff19ec415b60..0b2a65fd094f 100644
@@ -502,8 +502,8 @@ pcie: pcie@3400000 {
 			device_type = "pci";
 			num-viewport = <2>;
 			bus-range = <0x0 0xff>;
-			ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000   /* downstream I/O */
-				  0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000>, /* downstream I/O */
+				 <0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 			msi-parent = <&msi>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 7>;
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +11 -11
index 0efeb8fa773e..7ac7a425b95f 100644
@@ -567,8 +567,8 @@ pcie@3400000 {
 			dma-coherent;
 			num-viewport = <8>;
 			bus-range = <0x0 0xff>;
-			ranges = <0x81000000 0x0 0x00000000 0x80 0x00010000 0x0 0x00010000   /* downstream I/O */
-				  0x82000000 0x0 0x40000000 0x80 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0x0 0x00000000 0x80 0x00010000 0x0 0x00010000>, /* downstream I/O */
+				 <0x82000000 0x0 0x40000000 0x80 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 			msi-parent = <&its>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 7>;
@@ -594,8 +594,8 @@ pcie@3500000 {
 			dma-coherent;
 			num-viewport = <8>;
 			bus-range = <0x0 0xff>;
-			ranges = <0x81000000 0x0 0x00000000 0x88 0x00010000 0x0 0x00010000   /* downstream I/O */
-				  0x82000000 0x0 0x40000000 0x88 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0x0 0x00000000 0x88 0x00010000 0x0 0x00010000>, /* downstream I/O */
+				 <0x82000000 0x0 0x40000000 0x88 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 			msi-parent = <&its>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 7>;
@@ -886,19 +886,19 @@ pcie@1f0000000 { /* Integrated Endpoint Root Complex */
 			msi-map = <0 &its 0x17 0xe>;
 			iommu-map = <0 &smmu 0x17 0xe>;
 				  /* PF0-6 BAR0 - non-prefetchable memory */
-			ranges = <0x82000000 0x0 0x00000000  0x1 0xf8000000  0x0 0x160000
+			ranges = <0x82000000 0x0 0x00000000  0x1 0xf8000000  0x0 0x160000>,
 				  /* PF0-6 BAR2 - prefetchable memory */
-				  0xc2000000 0x0 0x00000000  0x1 0xf8160000  0x0 0x070000
+				 <0xc2000000 0x0 0x00000000  0x1 0xf8160000  0x0 0x070000>,
 				  /* PF0: VF0-1 BAR0 - non-prefetchable memory */
-				  0x82000000 0x0 0x00000000  0x1 0xf81d0000  0x0 0x020000
+				 <0x82000000 0x0 0x00000000  0x1 0xf81d0000  0x0 0x020000>,
 				  /* PF0: VF0-1 BAR2 - prefetchable memory */
-				  0xc2000000 0x0 0x00000000  0x1 0xf81f0000  0x0 0x020000
+				 <0xc2000000 0x0 0x00000000  0x1 0xf81f0000  0x0 0x020000>,
 				  /* PF1: VF0-1 BAR0 - non-prefetchable memory */
-				  0x82000000 0x0 0x00000000  0x1 0xf8210000  0x0 0x020000
+				 <0x82000000 0x0 0x00000000  0x1 0xf8210000  0x0 0x020000>,
 				  /* PF1: VF0-1 BAR2 - prefetchable memory */
-				  0xc2000000 0x0 0x00000000  0x1 0xf8230000  0x0 0x020000
+				 <0xc2000000 0x0 0x00000000  0x1 0xf8230000  0x0 0x020000>,
 				  /* BAR4 (PF5) - non-prefetchable memory */
-				  0x82000000 0x0 0x00000000  0x1 0xfc000000  0x0 0x400000>;
+				 <0x82000000 0x0 0x00000000  0x1 0xfc000000  0x0 0x400000>;
 
 			enetc_port0: ethernet@0,0 {
 				compatible = "fsl,enetc";
arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts +3 -3
index fea167d222cf..751ab6e047f2 100644
@@ -43,9 +43,9 @@ &ifc {
 	#address-cells = <2>;
 	#size-cells = <1>;
 	/* NOR, NAND Flashes and FPGA on board */
-	ranges = <0x0 0x0 0x0 0x60000000 0x08000000
-		  0x1 0x0 0x0 0x7e800000 0x00010000
-		  0x2 0x0 0x0 0x7fb00000 0x00000100>;
+	ranges = <0x0 0x0 0x0 0x60000000 0x08000000>,
+		 <0x1 0x0 0x0 0x7e800000 0x00010000>,
+		 <0x2 0x0 0x0 0x7fb00000 0x00000100>;
 	status = "okay";
 
 	nor@0,0 {
arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts +3 -3
index 3516af4726a5..4b7a0573ebd3 100644
@@ -57,9 +57,9 @@ &ifc {
 	#address-cells = <2>;
 	#size-cells = <1>;
 	/* NOR, NAND Flashes and FPGA on board */
-	ranges = <0x0 0x0 0x0 0x60000000 0x08000000
-		  0x1 0x0 0x0 0x7e800000 0x00010000
-		  0x2 0x0 0x0 0x7fb00000 0x00000100>;
+	ranges = <0x0 0x0 0x0 0x60000000 0x08000000>,
+		 <0x1 0x0 0x0 0x7e800000 0x00010000>,
+		 <0x2 0x0 0x0 0x7fb00000 0x00000100>;
 
 		nor@0,0 {
 			compatible = "cfi-flash";
arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi +6 -6
index 5c2e370f6316..9900811a8f22 100644
@@ -828,8 +828,8 @@ pcie@3400000 {
 			dma-coherent;
 			num-viewport = <6>;
 			bus-range = <0x0 0xff>;
-			ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000   /* downstream I/O */
-				  0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000>, /* downstream I/O */
+				 <0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 			msi-parent = <&msi1>, <&msi2>, <&msi3>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 7>;
@@ -854,8 +854,8 @@ pcie@3500000 {
 			dma-coherent;
 			num-viewport = <6>;
 			bus-range = <0x0 0xff>;
-			ranges = <0x81000000 0x0 0x00000000 0x48 0x00010000 0x0 0x00010000   /* downstream I/O */
-				  0x82000000 0x0 0x40000000 0x48 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0x0 0x00000000 0x48 0x00010000 0x0 0x00010000>, /* downstream I/O */
+				 <0x82000000 0x0 0x40000000 0x48 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 			msi-parent = <&msi1>, <&msi2>, <&msi3>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 7>;
@@ -880,8 +880,8 @@ pcie@3600000 {
 			dma-coherent;
 			num-viewport = <6>;
 			bus-range = <0x0 0xff>;
-			ranges = <0x81000000 0x0 0x00000000 0x50 0x00010000 0x0 0x00010000   /* downstream I/O */
-				  0x82000000 0x0 0x40000000 0x50 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0x0 0x00000000 0x50 0x00010000 0x0 0x00010000>, /* downstream I/O */
+				 <0x82000000 0x0 0x40000000 0x50 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 			msi-parent = <&msi1>, <&msi2>, <&msi3>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 7>;
arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts +3 -3
index eec62c63dafe..c6f4d5fc172a 100644
@@ -134,9 +134,9 @@ &ifc {
 	#address-cells = <2>;
 	#size-cells = <1>;
 	/* NOR, NAND Flashes and FPGA on board */
-	ranges = <0x0 0x0 0x0 0x60000000 0x08000000
-		  0x1 0x0 0x0 0x7e800000 0x00010000
-		  0x2 0x0 0x0 0x7fb00000 0x00000100>;
+	ranges = <0x0 0x0 0x0 0x60000000 0x08000000>,
+		 <0x1 0x0 0x0 0x7e800000 0x00010000>,
+		 <0x2 0x0 0x0 0x7fb00000 0x00000100>;
 	status = "okay";
 
 	nor@0,0 {
arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts +2 -2
index d53ccc56bb63..d2dd1fd5427e 100644
@@ -81,8 +81,8 @@ &ifc {
 	#address-cells = <2>;
 	#size-cells = <1>;
 	/* NAND Flashe and CPLD on board */
-	ranges = <0x0 0x0 0x0 0x7e800000 0x00010000
-		  0x2 0x0 0x0 0x7fb00000 0x00000100>;
+	ranges = <0x0 0x0 0x0 0x7e800000 0x00010000>,
+		 <0x2 0x0 0x0 0x7fb00000 0x00000100>;
 	status = "okay";
 
 	nand@0,0 {
arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +6 -6
index 0246d975a206..4360459507c4 100644
@@ -732,8 +732,8 @@ pcie@3400000 {
 			dma-coherent;
 			num-viewport = <8>;
 			bus-range = <0x0 0xff>;
-			ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000   /* downstream I/O */
-				  0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000>, /* downstream I/O */
+				 <0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 			msi-parent = <&msi1>, <&msi2>, <&msi3>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 7>;
@@ -768,8 +768,8 @@ pcie@3500000 {
 			dma-coherent;
 			num-viewport = <8>;
 			bus-range = <0x0 0xff>;
-			ranges = <0x81000000 0x0 0x00000000 0x48 0x00010000 0x0 0x00010000   /* downstream I/O */
-				  0x82000000 0x0 0x40000000 0x48 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0x0 0x00000000 0x48 0x00010000 0x0 0x00010000>, /* downstream I/O */
+				 <0x82000000 0x0 0x40000000 0x48 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 			msi-parent = <&msi2>, <&msi3>, <&msi1>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 7>;
@@ -804,8 +804,8 @@ pcie@3600000 {
 			dma-coherent;
 			num-viewport = <8>;
 			bus-range = <0x0 0xff>;
-			ranges = <0x81000000 0x0 0x00000000 0x50 0x00010000 0x0 0x00010000   /* downstream I/O */
-				  0x82000000 0x0 0x40000000 0x50 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0x0 0x00000000 0x50 0x00010000 0x0 0x00010000>, /* downstream I/O */
+				 <0x82000000 0x0 0x40000000 0x50 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 			msi-parent = <&msi3>, <&msi1>, <&msi2>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 7>;
arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts +3 -3
index 41d8b15f25a5..b7670ff98b32 100644
@@ -108,9 +108,9 @@ eeprom@57 {
 };
 
 &ifc {
-	ranges = <0 0 0x5 0x80000000 0x08000000
-		  2 0 0x5 0x30000000 0x00010000
-		  3 0 0x5 0x20000000 0x00010000>;
+	ranges = <0 0 0x5 0x80000000 0x08000000>,
+		 <2 0 0x5 0x30000000 0x00010000>,
+		 <3 0 0x5 0x20000000 0x00010000>;
 	status = "okay";
 
 	nor@0,0 {
arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts +2 -2
index 5633e59febc3..dcf1904e9373 100644
@@ -59,8 +59,8 @@ rtc@51 {
 };
 
 &ifc {
-	ranges = <0 0 0x5 0x30000000 0x00010000
-		  2 0 0x5 0x20000000 0x00010000>;
+	ranges = <0 0 0x5 0x30000000 0x00010000>,
+		 <2 0 0x5 0x20000000 0x00010000>;
 	status = "okay";
 
 	nand@0,0 {
arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi +8 -8
index 169f4742ae3b..78688a0b2bb4 100644
@@ -486,8 +486,8 @@ pcie@3400000 {
 			dma-coherent;
 			num-viewport = <256>;
 			bus-range = <0x0 0xff>;
-			ranges = <0x81000000 0x0 0x00000000 0x20 0x00010000 0x0 0x00010000   /* downstream I/O */
-				  0x82000000 0x0 0x40000000 0x20 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0x0 0x00000000 0x20 0x00010000 0x0 0x00010000>, /* downstream I/O */
+				 <0x82000000 0x0 0x40000000 0x20 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 			msi-parent = <&its>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 7>;
@@ -512,8 +512,8 @@ pcie@3500000 {
 			dma-coherent;
 			num-viewport = <6>;
 			bus-range = <0x0 0xff>;
-			ranges = <0x81000000 0x0 0x00000000 0x28 0x00010000 0x0 0x00010000   /* downstream I/O */
-				  0x82000000 0x0 0x40000000 0x28 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0x0 0x00000000 0x28 0x00010000 0x0 0x00010000>, /* downstream I/O */
+				 <0x82000000 0x0 0x40000000 0x28 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 			msi-parent = <&its>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 7>;
@@ -538,8 +538,8 @@ pcie@3600000 {
 			dma-coherent;
 			num-viewport = <6>;
 			bus-range = <0x0 0xff>;
-			ranges = <0x81000000 0x0 0x00000000 0x30 0x00010000 0x0 0x00010000   /* downstream I/O */
-				  0x82000000 0x0 0x40000000 0x30 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0x0 0x00000000 0x30 0x00010000 0x0 0x00010000>, /* downstream I/O */
+				 <0x82000000 0x0 0x40000000 0x30 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 			msi-parent = <&its>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 7>;
@@ -724,8 +724,8 @@ fsl_mc: fsl-mc@80c000000 {
 			 * Region type 0x0 - MC portals
 			 * Region type 0x1 - QBMAN portals
 			 */
-			ranges = <0x0 0x0 0x0 0x8 0x0c000000 0x4000000
-				  0x1 0x0 0x0 0x8 0x18000000 0x8000000>;
+			ranges = <0x0 0x0 0x0 0x8 0x0c000000 0x4000000>,
+				 <0x1 0x0 0x0 0x8 0x18000000 0x8000000>;
 
 			dpmacs {
 				#address-cells = <1>;
arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi +8 -8
index f9c1d30cf4a7..4ee9ccc55869 100644
@@ -122,30 +122,30 @@ &pcie1 {
 	reg = <0x00 0x03400000 0x0 0x00100000   /* controller registers */
 	       0x10 0x00000000 0x0 0x00002000>; /* configuration space */
 
-	ranges = <0x81000000 0x0 0x00000000 0x10 0x00010000 0x0 0x00010000   /* downstream I/O */
-		  0x82000000 0x0 0x40000000 0x10 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+	ranges = <0x81000000 0x0 0x00000000 0x10 0x00010000 0x0 0x00010000>, /* downstream I/O */
+		 <0x82000000 0x0 0x40000000 0x10 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 };
 
 &pcie2 {
 	reg = <0x00 0x03500000 0x0 0x00100000   /* controller registers */
 	       0x12 0x00000000 0x0 0x00002000>; /* configuration space */
 
-	ranges = <0x81000000 0x0 0x00000000 0x12 0x00010000 0x0 0x00010000   /* downstream I/O */
-		  0x82000000 0x0 0x40000000 0x12 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+	ranges = <0x81000000 0x0 0x00000000 0x12 0x00010000 0x0 0x00010000>, /* downstream I/O */
+		 <0x82000000 0x0 0x40000000 0x12 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 };
 
 &pcie3 {
 	reg = <0x00 0x03600000 0x0 0x00100000   /* controller registers */
 	       0x14 0x00000000 0x0 0x00002000>; /* configuration space */
 
-	ranges = <0x81000000 0x0 0x00000000 0x14 0x00010000 0x0 0x00010000   /* downstream I/O */
-		  0x82000000 0x0 0x40000000 0x14 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+	ranges = <0x81000000 0x0 0x00000000 0x14 0x00010000 0x0 0x00010000>, /* downstream I/O */
+		 <0x82000000 0x0 0x40000000 0x14 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 };
 
 &pcie4 {
 	reg = <0x00 0x03700000 0x0 0x00100000   /* controller registers */
 	       0x16 0x00000000 0x0 0x00002000>; /* configuration space */
 
-	ranges = <0x81000000 0x0 0x00000000 0x16 0x00010000 0x0 0x00010000   /* downstream I/O */
-		  0x82000000 0x0 0x40000000 0x16 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+	ranges = <0x81000000 0x0 0x00000000 0x16 0x00010000 0x0 0x00010000>, /* downstream I/O */
+		 <0x82000000 0x0 0x40000000 0x16 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 };
arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi +8 -8
index a5f668d786b8..624802feed15 100644
@@ -123,8 +123,8 @@ &pcie1 {
 	reg = <0x00 0x03400000 0x0 0x00100000   /* controller registers */
 	       0x20 0x00000000 0x0 0x00002000>; /* configuration space */
 
-	ranges = <0x81000000 0x0 0x00000000 0x20 0x00010000 0x0 0x00010000
-		  0x82000000 0x0 0x40000000 0x20 0x40000000 0x0 0x40000000>;
+	ranges = <0x81000000 0x0 0x00000000 0x20 0x00010000 0x0 0x00010000>,
+		 <0x82000000 0x0 0x40000000 0x20 0x40000000 0x0 0x40000000>;
 };
 
 &pcie2 {
@@ -132,8 +132,8 @@ &pcie2 {
 	reg = <0x00 0x03500000 0x0 0x00100000   /* controller registers */
 	       0x28 0x00000000 0x0 0x00002000>; /* configuration space */
 
-	ranges = <0x81000000 0x0 0x00000000 0x28 0x00010000 0x0 0x00010000
-		  0x82000000 0x0 0x40000000 0x28 0x40000000 0x0 0x40000000>;
+	ranges = <0x81000000 0x0 0x00000000 0x28 0x00010000 0x0 0x00010000>,
+		 <0x82000000 0x0 0x40000000 0x28 0x40000000 0x0 0x40000000>;
 };
 
 &pcie3 {
@@ -141,8 +141,8 @@ &pcie3 {
 	reg = <0x00 0x03600000 0x0 0x00100000   /* controller registers */
 	       0x30 0x00000000 0x0 0x00002000>; /* configuration space */
 
-	ranges = <0x81000000 0x0 0x00000000 0x30 0x00010000 0x0 0x00010000
-		  0x82000000 0x0 0x40000000 0x30 0x40000000 0x0 0x40000000>;
+	ranges = <0x81000000 0x0 0x00000000 0x30 0x00010000 0x0 0x00010000>,
+		 <0x82000000 0x0 0x40000000 0x30 0x40000000 0x0 0x40000000>;
 };
 
 &pcie4 {
@@ -150,6 +150,6 @@ &pcie4 {
 	reg = <0x00 0x03700000 0x0 0x00100000   /* controller registers */
 	       0x38 0x00000000 0x0 0x00002000>; /* configuration space */
 
-	ranges = <0x81000000 0x0 0x00000000 0x38 0x00010000 0x0 0x00010000
-		  0x82000000 0x0 0x40000000 0x38 0x40000000 0x0 0x40000000>;
+	ranges = <0x81000000 0x0 0x00000000 0x38 0x00010000 0x0 0x00010000>,
+		 <0x82000000 0x0 0x40000000 0x38 0x40000000 0x0 0x40000000>;
 };
arch/arm64/boot/dts/freescale/fsl-ls208xa-qds.dtsi +3 -3
index 10d2fe091965..55fb4009e597 100644
@@ -18,9 +18,9 @@ &ifc {
 	status = "okay";
 	#address-cells = <2>;
 	#size-cells = <1>;
-	ranges = <0x0 0x0 0x5 0x80000000 0x08000000
-		  0x2 0x0 0x5 0x30000000 0x00010000
-		  0x3 0x0 0x5 0x20000000 0x00010000>;
+	ranges = <0x0 0x0 0x5 0x80000000 0x08000000>,
+		 <0x2 0x0 0x5 0x30000000 0x00010000>,
+		 <0x3 0x0 0x5 0x20000000 0x00010000>;
 
 	nor@0,0 {
 		#address-cells = <1>;
arch/arm64/boot/dts/freescale/fsl-ls208xa-rdb.dtsi +3 -3
index d0d670227ae2..a24be154fa0f 100644
@@ -17,9 +17,9 @@ &ifc {
 	status = "okay";
 	#address-cells = <2>;
 	#size-cells = <1>;
-	ranges = <0x0 0x0 0x5 0x80000000 0x08000000
-		  0x2 0x0 0x5 0x30000000 0x00010000
-		  0x3 0x0 0x5 0x20000000 0x00010000>;
+	ranges = <0x0 0x0 0x5 0x80000000 0x08000000>,
+		 <0x2 0x0 0x5 0x30000000 0x00010000>,
+		 <0x3 0x0 0x5 0x20000000 0x00010000>;
 
 	nor@0,0 {
 		#address-cells = <1>;
arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi +5 -5
index 41102dacc2e1..c6ee6d9f0f6a 100644
@@ -349,8 +349,8 @@ fsl_mc: fsl-mc@80c000000 {
 			 * Region type 0x0 - MC portals
 			 * Region type 0x1 - QBMAN portals
 			 */
-			ranges = <0x0 0x0 0x0 0x8 0x0c000000 0x4000000
-				  0x1 0x0 0x0 0x8 0x18000000 0x8000000>;
+			ranges = <0x0 0x0 0x0 0x8 0x0c000000 0x4000000>,
+				 <0x1 0x0 0x0 0x8 0x18000000 0x8000000>;
 
 			/*
 			 * Define the maximum number of MACs present on the SoC.
@@ -613,9 +613,9 @@ ifc: ifc@2240000 {
 			#address-cells = <2>;
 			#size-cells = <1>;
 
-			ranges = <0 0 0x5 0x80000000 0x08000000
-				  2 0 0x5 0x30000000 0x00010000
-				  3 0 0x5 0x20000000 0x00010000>;
+			ranges = <0 0 0x5 0x80000000 0x08000000>,
+				 <2 0 0x5 0x30000000 0x00010000>,
+				 <3 0 0x5 0x20000000 0x00010000>;
 		};
 
 		qspi: spi@20c0000 {
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi +2 -2
index d247e4228d60..89447a6e6347 100644
@@ -1320,8 +1320,8 @@ fsl_mc: fsl-mc@80c000000 {
 			 * Region type 0x0 - MC portals
 			 * Region type 0x1 - QBMAN portals
 			 */
-			ranges = <0x0 0x0 0x0 0x8 0x0c000000 0x4000000
-				  0x1 0x0 0x0 0x8 0x18000000 0x8000000>;
+			ranges = <0x0 0x0 0x0 0x8 0x0c000000 0x4000000>,
+				 <0x1 0x0 0x0 0x8 0x18000000 0x8000000>;
 
 			/*
 			 * Define the maximum number of MACs present on the SoC.
arch/arm64/boot/dts/freescale/imx8mq.dtsi +4 -4
index f70435cf9ad5..f0ce838acc9f 100644
@@ -1189,8 +1189,8 @@ pcie0: pcie@33800000 {
 			#size-cells = <2>;
 			device_type = "pci";
 			bus-range = <0x00 0xff>;
-			ranges = <0x81000000 0 0x00000000 0x1ff80000 0 0x00010000 /* downstream I/O 64KB */
-			          0x82000000 0 0x18000000 0x18000000 0 0x07f00000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0 0x00000000 0x1ff80000 0 0x00010000>, /* downstream I/O 64KB */
+			         <0x82000000 0 0x18000000 0x18000000 0 0x07f00000>; /* non-prefetchable memory */
 			num-lanes = <1>;
 			num-viewport = <4>;
 			interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
@@ -1218,8 +1218,8 @@ pcie1: pcie@33c00000 {
 			#address-cells = <3>;
 			#size-cells = <2>;
 			device_type = "pci";
-			ranges =  <0x81000000 0 0x00000000 0x27f80000 0 0x00010000 /* downstream I/O 64KB */
-				   0x82000000 0 0x20000000 0x20000000 0 0x07f00000>; /* non-prefetchable memory */
+			ranges =  <0x81000000 0 0x00000000 0x27f80000 0 0x00010000>, /* downstream I/O 64KB */
+				  <0x82000000 0 0x20000000 0x20000000 0 0x07f00000>; /* non-prefetchable memory */
 			num-lanes = <1>;
 			num-viewport = <4>;
 			interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi +2 -2
index 12bc1d3ed424..ff06654c1f96 100644
@@ -566,8 +566,8 @@ pcie: pcie@9860000 {
 			device_type = "pci";
 			bus-range = <0x00 0xff>;
 			num-lanes = <1>;
-			ranges = <0x81000000 0x0 0x00000000 0x4f00000 0x0 0x100000
-				  0x82000000 0x0 0x3000000 0x3000000 0x0 0x01f00000>;
+			ranges = <0x81000000 0x0 0x00000000 0x4f00000 0x0 0x100000>,
+				 <0x82000000 0x0 0x3000000 0x3000000 0x0 0x01f00000>;
 			interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
 			interrupt-names = "msi";
 			#interrupt-cells = <1>;
arch/arm64/boot/dts/hisilicon/hip06.dtsi +2 -3
index 50ceaa959bdc..33205a6dc87b 100644
@@ -737,9 +737,8 @@ pcie0: pcie@a0090000 {
 			#size-cells = <2>;
 			device_type = "pci";
 			dma-coherent;
-			ranges = <0x02000000 0 0xb2000000 0x0 0xb2000000 0
-				 0x5ff0000 0x01000000 0 0 0 0xb7ff0000
-				 0 0x10000>;
+			ranges = <0x02000000 0 0xb2000000 0x0 0xb2000000 0 0x5ff0000>,
+				 <0x01000000 0 0 0 0xb7ff0000 0 0x10000>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0xf800 0 0 7>;
 			interrupt-map = <0x0 0 0 1 &mbigen_pcie0 650 4
arch/arm64/boot/dts/hisilicon/hip07.dtsi +2 -2
index 4773a533fce5..915562c2e1d5 100644
@@ -1708,8 +1708,8 @@ p0_pcie2_a: pcie@a00a0000 {
 			#size-cells = <2>;
 			device_type = "pci";
 			dma-coherent;
-			ranges = <0x02000000 0 0xa8000000 0 0xa8000000 0 0x77f0000
-				  0x01000000 0 0 0 0xaf7f0000 0 0x10000>;
+			ranges = <0x02000000 0 0xa8000000 0 0xa8000000 0 0x77f0000>,
+				 <0x01000000 0 0 0 0xaf7f0000 0 0x10000>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0xf800 0 0 7>;
 			interrupt-map = <0x0 0 0 1 &mbigen_pcie2_a 671 4
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +2 -2
index 2bbc69b4dc99..72483bad470b 100644
@@ -486,8 +486,8 @@ pcie0: pcie@d0070000 {
 			#interrupt-cells = <1>;
 			msi-parent = <&pcie0>;
 			msi-controller;
-			ranges = <0x82000000 0 0xe8000000   0 0xe8000000 0 0x1000000 /* Port 0 MEM */
-				  0x81000000 0 0xe9000000   0 0xe9000000 0 0x10000>; /* Port 0 IO*/
+			ranges = <0x82000000 0 0xe8000000   0 0xe8000000 0 0x1000000>, /* Port 0 MEM */
+				 <0x81000000 0 0xe9000000   0 0xe9000000 0 0x10000>;   /* Port 0 IO*/
 			interrupt-map-mask = <0 0 0 7>;
 			interrupt-map = <0 0 0 1 &pcie_intc 0>,
 					<0 0 0 2 &pcie_intc 1>,
arch/arm64/boot/dts/qcom/ipq8074.dtsi +4 -8
index 96a5ec89b5f0..800054d32bf6 100644
@@ -574,10 +574,8 @@ pcie1: pci@10000000 {
 			phys = <&pcie_phy1>;
 			phy-names = "pciephy";
 
-			ranges = <0x81000000 0 0x10200000 0x10200000
-				  0 0x100000   /* downstream I/O */
-				  0x82000000 0 0x10300000 0x10300000
-				  0 0xd00000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0 0x10200000 0x10200000 0 0x100000>, /* downstream I/O */
+				 <0x82000000 0 0x10300000 0x10300000 0 0xd00000>; /* non-prefetchable memory */
 
 			interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
 			interrupt-names = "msi";
@@ -636,10 +634,8 @@ pcie0: pci@20000000 {
 			phys = <&pcie_phy0>;
 			phy-names = "pciephy";
 
-			ranges = <0x81000000 0 0x20200000 0x20200000
-				  0 0x100000   /* downstream I/O */
-				  0x82000000 0 0x20300000 0x20300000
-				  0 0xd00000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0 0x20200000 0x20200000 0 0x100000>, /* downstream I/O */
+				 <0x82000000 0 0x20300000 0x20300000 0 0xd00000>; /* non-prefetchable memory */
 
 			interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
 			interrupt-names = "msi";
arch/arm64/boot/dts/rockchip/rk3399.dtsi +2 -2
index ada724b12f01..48be19a0a9cb 100644
@@ -256,8 +256,8 @@ pcie0: pcie@f8000000 {
 		       <&pcie_phy 2>, <&pcie_phy 3>;
 		phy-names = "pcie-phy-0", "pcie-phy-1",
 			    "pcie-phy-2", "pcie-phy-3";
-		ranges = <0x83000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x1e00000
-			  0x81000000 0x0 0xfbe00000 0x0 0xfbe00000 0x0 0x100000>;
+		ranges = <0x83000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x1e00000>,
+			 <0x81000000 0x0 0xfbe00000 0x0 0xfbe00000 0x0 0x100000>;
 		resets = <&cru SRST_PCIE_CORE>, <&cru SRST_PCIE_MGMT>,
 			 <&cru SRST_PCIE_MGMT_STICKY>, <&cru SRST_PCIE_PIPE>,
 			 <&cru SRST_PCIE_PM>, <&cru SRST_P_PCIE>,
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +4 -4
index 9edfae5944f7..2c762e725d89 100644
@@ -678,8 +678,8 @@ pcie0_rc: pcie@5500000 {
 		power-domains = <&k3_pds 120 TI_SCI_PD_EXCLUSIVE>;
 		#address-cells = <3>;
 		#size-cells = <2>;
-		ranges = <0x81000000 0 0          0x0 0x10020000 0 0x00010000
-			  0x82000000 0 0x10030000 0x0 0x10030000 0 0x07FD0000>;
+		ranges = <0x81000000 0 0          0x0 0x10020000 0 0x00010000>,
+			 <0x82000000 0 0x10030000 0x0 0x10030000 0 0x07FD0000>;
 		ti,syscon-pcie-id = <&pcie_devid>;
 		ti,syscon-pcie-mode = <&pcie0_mode>;
 		bus-range = <0x0 0xff>;
@@ -710,8 +710,8 @@ pcie1_rc: pcie@5600000 {
 		power-domains = <&k3_pds 121 TI_SCI_PD_EXCLUSIVE>;
 		#address-cells = <3>;
 		#size-cells = <2>;
-		ranges = <0x81000000 0 0          0x0   0x18020000 0 0x00010000
-			  0x82000000 0 0x18030000 0x0   0x18030000 0 0x07FD0000>;
+		ranges = <0x81000000 0 0          0x0   0x18020000 0 0x00010000>,
+			 <0x82000000 0 0x18030000 0x0   0x18030000 0 0x07FD0000>;
 		ti,syscon-pcie-id = <&pcie_devid>;
 		ti,syscon-pcie-mode = <&pcie1_mode>;
 		bus-range = <0x0 0xff>;
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +2 -2
index 9174ddc76bdc..cf2b9b2ee651 100644
@@ -542,8 +542,8 @@ pcie: pcie@fd0e0000 {
 			      <0x0 0xfd480000 0x0 0x1000>,
 			      <0x80 0x00000000 0x0 0x1000000>;
 			reg-names = "breg", "pcireg", "cfg";
-			ranges = <0x02000000 0x00000000 0xe0000000 0x00000000 0xe0000000 0x00000000 0x10000000	/* non-prefetchable memory */
-				  0x43000000 0x00000006 0x00000000 0x00000006 0x00000000 0x00000002 0x00000000>;/* prefetchable memory */
+			ranges = <0x02000000 0x00000000 0xe0000000 0x00000000 0xe0000000 0x00000000 0x10000000>, /* non-prefetchable memory */
+				 <0x43000000 0x00000006 0x00000000 0x00000006 0x00000000 0x00000002 0x00000000>; /* prefetchable memory */
 			bus-range = <0x00 0xff>;
 			interrupt-map-mask = <0x0 0x0 0x0 0x7>;
 			interrupt-map = <0x0 0x0 0x0 0x1 &pcie_intc 0x1>,
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 61 lines · Rob Herring

While bracketing doesn't matter for a DTB, the DT schema checks rely on bracketing around each distinct entry. Reformat ranges and dma-ranges entries to fix warnings such as:

arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges: [[2197815296, 0, 4194304000, 0, 4194304000, 0, 31457280, 2164260864, 0, 4225761280, 0, 4225761280, 0, 1048576]] is not valid under any of the given schemas (Possible causes of the failure):

        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges: True was expected
        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges:0: [2197815296, 0, 4194304000, 0, 4194304000, 0, 31457280, 2164260864, 0, 4225761280, 0, 4225761280, 0, 1048576] is too long
        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges:0:0: 2197815296 is not one of [16777216, 33554432, 50331648, 1107296256, 1124073472]
Cc Kevin Hilman <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Jerome Brunet <[email protected]>
Cc Martin Blumenstingl <[email protected]>
Cc Khuong Dinh <[email protected]>
Cc Robert Richter <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Li Yang <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Pengutronix Kernel Team <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc NXP Linux Team <[email protected]>
Cc Wei Xu <[email protected]>
Cc Jason Cooper <[email protected]>
Cc Andrew Lunn <[email protected]>
Cc Gregory Clement <[email protected]>
Cc Sebastian Hesselbarth <[email protected]>
Cc Andy Gross <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc Heiko Stuebner <[email protected]>
Cc Tero Kristo <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Michal Simek <[email protected]>

---
SoC maintainers, please apply this directly.

 .../boot/dts/amlogic/meson-g12-common.dtsi    |  4 +-
 arch/arm64/boot/dts/apm/apm-shadowcat.dtsi    | 20 ++++----
 arch/arm64/boot/dts/apm/apm-storm.dtsi        | 50 +++++++++----------
 arch/arm64/boot/dts/cavium/thunder2-99xx.dtsi |  4 +-
 .../arm64/boot/dts/freescale/fsl-ls1012a.dtsi |  4 +-
 .../arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 22 ++++----
 .../boot/dts/freescale/fsl-ls1043a-qds.dts    |  6 +--
 .../boot/dts/freescale/fsl-ls1043a-rdb.dts    |  6 +--
 .../arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 12 ++---
 .../boot/dts/freescale/fsl-ls1046a-qds.dts    |  6 +--
 .../boot/dts/freescale/fsl-ls1046a-rdb.dts    |  4 +-
 .../arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 12 ++---
 .../boot/dts/freescale/fsl-ls1088a-qds.dts    |  6 +--
 .../boot/dts/freescale/fsl-ls1088a-rdb.dts    |  4 +-
 .../arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 16 +++---
 .../arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 16 +++---
 .../arm64/boot/dts/freescale/fsl-ls2088a.dtsi | 16 +++---
 .../boot/dts/freescale/fsl-ls208xa-qds.dtsi   |  6 +--
 .../boot/dts/freescale/fsl-ls208xa-rdb.dtsi   |  6 +--
 .../arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 10 ++--
 .../arm64/boot/dts/freescale/fsl-lx2160a.dtsi |  4 +-
 arch/arm64/boot/dts/freescale/imx8mq.dtsi     |  8 +--
Quoted 8 lines
 .../arm64/boot/dts/hisilicon/hi3798cv200.dtsi |  4 +-
 arch/arm64/boot/dts/hisilicon/hip06.dtsi      |  5 +-
 arch/arm64/boot/dts/hisilicon/hip07.dtsi      |  4 +-
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi  |  4 +-
 arch/arm64/boot/dts/qcom/ipq8074.dtsi         | 12 ++---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi      |  4 +-
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi      |  8 +--
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi        |  4 +-

Thanks,
Michal

maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Rob Herring
Quoted 1 line · Rob Herring

While bracketing doesn't matter for a DTB, the DT schema checks rely on

[..]

Quoted 2 lines

---
SoC maintainers, please apply this directly.

	  [...]
Quoted 16 lines
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +2 -2
index 9edfae5944f7..2c762e725d89 100644
@@ -678,8 +678,8 @@ pcie0_rc: pcie@5500000 {
 		power-domains = <&k3_pds 120 TI_SCI_PD_EXCLUSIVE>;
 		#address-cells = <3>;
 		#size-cells = <2>;
-		ranges = <0x81000000 0 0          0x0 0x10020000 0 0x00010000
-			  0x82000000 0 0x10030000 0x0 0x10030000 0 0x07FD0000>;
+		ranges = <0x81000000 0 0          0x0 0x10020000 0 0x00010000>,
+			 <0x82000000 0 0x10030000 0x0 0x10030000 0 0x07FD0000>;
 		ti,syscon-pcie-id = <&pcie_devid>;
 		ti,syscon-pcie-mode = <&pcie0_mode>;
 		bus-range = <0x0 0xff>;

arch/arm64/boot/dts/ti/k3-am65-main.dtsi pcie1_rc: pcie@5600000 { · line 717

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +2 -2
@@ -710,8 +710,8 @@ pcie1_rc: pcie@5600000 {
 		power-domains = <&k3_pds 121 TI_SCI_PD_EXCLUSIVE>;
 		#address-cells = <3>;
 		#size-cells = <2>;
-		ranges = <0x81000000 0 0          0x0   0x18020000 0 0x00010000
-			  0x82000000 0 0x18030000 0x0   0x18030000 0 0x07FD0000>;
+		ranges = <0x81000000 0 0          0x0   0x18020000 0 0x00010000>,
+			 <0x82000000 0 0x18030000 0x0   0x18030000 0 0x07FD0000>;
 		ti,syscon-pcie-id = <&pcie_devid>;
 		ti,syscon-pcie-mode = <&pcie1_mode>;
 		bus-range = <0x0 0xff>;

For the TI chunk:

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#3 lore raw
In reply to Rob Herring
Quoted 8 lines · Rob Herring

While bracketing doesn't matter for a DTB, the DT schema checks rely on bracketing around each distinct entry. Reformat ranges and dma-ranges entries to fix warnings such as:

arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges: [[2197815296, 0, 4194304000, 0, 4194304000, 0, 31457280, 2164260864, 0, 4225761280, 0, 4225761280, 0, 1048576]] is not valid under any of the given schemas (Possible causes of the failure):

        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges: True was expected
        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges:0: [2197815296, 0, 4194304000, 0, 4194304000, 0, 31457280, 2164260864, 0, 4225761280, 0, 4225761280, 0, 1048576] is too long
        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges:0:0: 2197815296 is not one of [16777216, 33554432, 50331648, 1107296256, 1124073472]

Seems like a bug in your tool? Why would we bother with this churn?

-Olof

author maintainer
#4 lore raw
Quoted 6 lines · Olof Johansson
Quoted 4 lines · Rob Herring

While bracketing doesn't matter for a DTB, the DT schema checks rely on bracketing around each distinct entry. Reformat ranges and dma-ranges entries to fix warnings such as:

Quoted 6 lines
Quoted 4 lines

arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges: [[2197815296, 0, 4194304000, 0, 4194304000, 0, 31457280, 2164260864, 0, 4225761280, 0, 4225761280, 0, 1048576]] is not valid under any of the given schemas (Possible causes of the failure):

        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges: True was expected
        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges:0: [2197815296, 0, 4194304000, 0, 4194304000, 0, 31457280, 2164260864, 0, 4225761280, 0, 4225761280, 0, 1048576] is too long
        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges:0:0: 2197815296 is not one of [16777216, 33554432, 50331648, 1107296256, 1124073472]

Seems like a bug in your tool? Why would we bother with this churn?

It's a feature. :)

In this case, with the entries bracketed, we can check the PCI top address cell contents in the common PCI schema and check how many ranges entries in the specific bridge schemas if they have some constraints. The use of bracketing is useful to defining the number of entries not just for ranges, but everywhere. A device binding defines how many register regions or interrupts for example. It makes sense to delineate entries in some way. While yes, we have #.*-cells, there's not really any way to handle that in json-schema. And let's face it, #.*-cells is an odd construct.

Currently, the dtc dts->yaml output maintains all this formatting. I suppose we could change that such that we parse #.*-cells and define the boundaries based on them. But then dtc has to know about every case of #.*-cells. That's not impossible to do, but doesn't keep the tool and binding data separate.

Looking at it another way, do we really want to just allow anything? A device with 3 interrupts could be written as:

interrupts = <1>, <2>, <3>;
interrupts = <1 2 3>;
interrupts = <1>, <2 3>;
interrupts = [ 00 00 00 01 00 00 00 02 00 00 00 03 ];

Or can we have some coding standards that are no more onerous or pedantic than what we have everywhere else?

Rob

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#5 lore raw
Quoted 8 lines · Rob Herring
Quoted 6 lines · Olof Johansson
Quoted 4 lines · Rob Herring

While bracketing doesn't matter for a DTB, the DT schema checks rely on bracketing around each distinct entry. Reformat ranges and dma-ranges entries to fix warnings such as:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges: [[2197815296, 0, 4194304000, 0, 4194304000, 0, 31457280, 2164260864, 0, 4225761280, 0, 4225761280, 0, 1048576]] is not valid under any of the given schemas (Possible causes of the failure):

        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges: True was expected
        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges:0: [2197815296, 0, 4194304000, 0, 4194304000, 0, 31457280, 2164260864, 0, 4225761280, 0, 4225761280, 0, 1048576] is too long
        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges:0:0: 2197815296 is not one of [16777216, 33554432, 50331648, 1107296256, 1124073472]

Seems like a bug in your tool? Why would we bother with this churn?

It's a feature. :)

The feature is better linting of ranges, the new lack of being able to do that for the way we've always been allowed to write ranges is a bug.

Quoted 10 lines

In this case, with the entries bracketed, we can check the PCI top address cell contents in the common PCI schema and check how many ranges entries in the specific bridge schemas if they have some constraints. The use of bracketing is useful to defining the number of entries not just for ranges, but everywhere. A device binding defines how many register regions or interrupts for example. It makes sense to delineate entries in some way. While yes, we have #.*-cells, there's not really any way to handle that in json-schema. And let's face it, #.*-cells is an odd construct.

Quoted 5 lines

Currently, the dtc dts->yaml output maintains all this formatting. I suppose we could change that such that we parse #.*-cells and define the boundaries based on them. But then dtc has to know about every case of #.*-cells. That's not impossible to do, but doesn't keep the tool and binding data separate.

That's already the case, isn't it? Run that part of the check if you have a new enough dtc, otherwise warn that it's too old but do all the other checks.

It's also just a change in one place: the tool, instead of evolving the language by adding ad-hoc restrictions that the compiler doesn't even know about, and requiring old code to change.

This way DTC could even warn/recommend bracketing per cell, when you give it the ability to parse/handle it.

Quoted 10 lines

Looking at it another way, do we really want to just allow anything? A device with 3 interrupts could be written as:

interrupts = <1>, <2>, <3>;
interrupts = <1 2 3>;
interrupts = <1>, <2 3>;
interrupts = [ 00 00 00 01 00 00 00 02 00 00 00 03 ];

Or can we have some coding standards that are no more onerous or pedantic than what we have everywhere else?

We're generally quite careful about applying new restrictions and expectations on coding standards all across the tree, and when we add new ones we usually don't require legacy code to change overnight, only when there are other relevant changes to those files.

-Olof

author maintainer
#6 lore raw
Quoted 15 lines · Olof Johansson
Quoted 13 lines · Rob Herring
Quoted 11 lines · Olof Johansson
Quoted 8 lines · Rob Herring

While bracketing doesn't matter for a DTB, the DT schema checks rely on bracketing around each distinct entry. Reformat ranges and dma-ranges entries to fix warnings such as:

arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges: [[2197815296, 0, 4194304000, 0, 4194304000, 0, 31457280, 2164260864, 0, 4225761280, 0, 4225761280, 0, 1048576]] is not valid under any of the given schemas (Possible causes of the failure):

        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges: True was expected
        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges:0: [2197815296, 0, 4194304000, 0, 4194304000, 0, 31457280, 2164260864, 0, 4225761280, 0, 4225761280, 0, 1048576] is too long
        arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dt.yaml: pcie@f8000000: ranges:0:0: 2197815296 is not one of [16777216, 33554432, 50331648, 1107296256, 1124073472]
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Seems like a bug in your tool? Why would we bother with this churn?

It's a feature. :)

The feature is better linting of ranges, the new lack of being able to do that for the way we've always been allowed to write ranges is a bug.

You are free to write your dts files however you like. You can still include all the errors, too. :)

Quoted 16 lines
Quoted 10 lines

In this case, with the entries bracketed, we can check the PCI top address cell contents in the common PCI schema and check how many ranges entries in the specific bridge schemas if they have some constraints. The use of bracketing is useful to defining the number of entries not just for ranges, but everywhere. A device binding defines how many register regions or interrupts for example. It makes sense to delineate entries in some way. While yes, we have #.*-cells, there's not really any way to handle that in json-schema. And let's face it, #.*-cells is an odd construct.

Quoted 5 lines

Currently, the dtc dts->yaml output maintains all this formatting. I suppose we could change that such that we parse #.*-cells and define the boundaries based on them. But then dtc has to know about every case of #.*-cells. That's not impossible to do, but doesn't keep the tool and binding data separate.

Quoted 3 lines

That's already the case, isn't it? Run that part of the check if you have a new enough dtc, otherwise warn that it's too old but do all the other checks.

Not really, I think. Not sure I follow though.

Quoted 3 lines

It's also just a change in one place: the tool, instead of evolving the language by adding ad-hoc restrictions that the compiler doesn't even know about, and requiring old code to change.

Uh, it's 2 tools. There's no way to know if the dtc has the right support in order to enable a schema or not. We'd need that on a per property basis. For example, where we have:

properties:
ranges:
minItems: 2
maxItems: 3

We'd have to process the schema to remove ranges if dtc version didn't support formatting ranges.

I would like to have more granular warnings with either levels or named checks, but there's not really any defined way to do that in json-schema. The easiest would be something at the file level. We have that somewhat in that we can run checks using a single schema file.

Quoted 11 lines

This way DTC could even warn/recommend bracketing per cell, when you give it the ability to parse/handle it.

Quoted 8 lines

Looking at it another way, do we really want to just allow anything? A device with 3 interrupts could be written as:

interrupts = <1>, <2>, <3>;
interrupts = <1 2 3>;
interrupts = <1>, <2 3>;
interrupts = [ 00 00 00 01 00 00 00 02 00 00 00 03 ];

Quoted 7 lines
Quoted 2 lines

Or can we have some coding standards that are no more onerous or pedantic than what we have everywhere else?

We're generally quite careful about applying new restrictions and expectations on coding standards all across the tree, and when we add new ones we usually don't require legacy code to change overnight, only when there are other relevant changes to those files.

But eventually we tend to make the changes. Can we at least agree the first form of bracketing is preferred over the 2nd and is what new dts files should use? If so, then most of the above is mute and it's a question of how to enable checks per dts file with new ones enabled. That was kind of what prompted this patch in the first place. I'm not really trying to be in the business of fixing dts files. I was looking at how to enable schema checks by default per platform (for 'make dtbs') with Marc's complaint about not having checks enabled by default[1]. There's a few platforms with a manageable number of warnings to fix, and I started looking at some of the PCI related warnings, fixed some false-positives in the schemas and did this patch along the way.

In any case, we can enable schema checks with something like this:

extra-y += $(patsubst %.dtb,%.dt.yaml,$(dtb-y))

Or maybe "extra-$(CONFIG_HAS_DT_SCHEMA)" based on some check for the tools, so I don't get yelled at for breaking everyone's make allmodconfig. On the flip side, if I don't break allmodconfig for missing schema tools, the warnings will just continue to be ignored. And who will check and enforce all new platforms get enabled for checks?

Rob

[1] https://lore.kernel.org/lkml/[email protected]/

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip