Skip to contentSkip to conversation

mips: bmips: fix brcm,spi-bcm-qspi devicetree usage

PATCH In review Jonas Gorski 2 participants 8 messages Dec 25, 2025

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover mips: bmips: fix brcm,spi-bcm-qspi devicetree usage

Currently running dtbs_check for BMIPS produces a lot of warnings. Start addressing those by cleaning up the {q,m}spi nodes:

* allow the in-use hif_mspi as alternative register name
* fix compatible order from most to least specific
* reorder interrupt names matching the binding
* reorder register names matching the binding

This fixes all warnings issues by dtbs_check for the {q,m}spi nodes themselves, and reduces the total amount of warnings generated from 416 to 368. I plan to address more in subsequent submissions.

No functional changes intended (I can't test them, since I don't have any BCM7XXX boards at hand).

Jonas Gorski (4):
dt-bindings: brcm,spi-bcm-qspi: allow hif_mspi as alternative for mspi
mips: bmips: dts: fix {m,q}spi compatible order
mips: bmips: dts: fix qspi interrupt order
mips: bmips: dts: fix qspi register order

 .../bindings/spi/brcm,spi-bcm-qspi.yaml       |  2 +-
 arch/mips/boot/dts/brcm/bcm7125.dtsi          | 22 +++++++++----------
 arch/mips/boot/dts/brcm/bcm7346.dtsi          | 22 +++++++++----------
 arch/mips/boot/dts/brcm/bcm7358.dtsi          | 22 +++++++++----------
 arch/mips/boot/dts/brcm/bcm7360.dtsi          | 22 +++++++++----------
 arch/mips/boot/dts/brcm/bcm7362.dtsi          | 22 +++++++++----------
 arch/mips/boot/dts/brcm/bcm7420.dtsi          | 22 +++++++++----------
 arch/mips/boot/dts/brcm/bcm7425.dtsi          | 22 +++++++++----------
 arch/mips/boot/dts/brcm/bcm7435.dtsi          | 22 +++++++++----------
 9 files changed, 89 insertions(+), 89 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/4 dt-bindings: brcm,spi-bcm-qspi: allow hif_mspi as alternative for mspi

Add "hif_mspi" as an alternative reg-name for brcm,spi-bcm-qspi, as it is in use by BCM7xxx (BMIPS) device trees.

---
 Documentation/devicetree/bindings/spi/brcm,spi-bcm-qspi.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/spi/brcm,spi-bcm-qspi.yaml +1 -1
index 45975f40d943..ffe8d7f8dd4a 100644
@@ -57,7 +57,7 @@ properties:
   reg-names:
     minItems: 1
     items:
-      - const: mspi
+      - enum: [ hif_mspi, mspi ]
       - const: bspi
       - enum: [ intr_regs, intr_status_reg, cs_reg ]
       - enum: [ intr_regs, intr_status_reg, cs_reg ]
Signature · 1 line
2.43.0
#2 lore raw

Re: [PATCH 1/4] dt-bindings: brcm,spi-bcm-qspi: allow hif_mspi as alternative for mspi

Quoted 4 lines · Jonas Gorski

Add "hif_mspi" as an alternative reg-name for brcm,spi-bcm-qspi, as it is in use by BCM7xxx (BMIPS) device trees.

Rather fix the DTS or provide reason why they cannot/should not be fixed.

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH 1/4] dt-bindings: brcm,spi-bcm-qspi: allow hif_mspi as alternative for mspi

In reply to Jonas Gorski
Quoted 4 lines · Jonas Gorski

Add "hif_mspi" as an alternative reg-name for brcm,spi-bcm-qspi, as it is in use by BCM7xxx (BMIPS) device trees.

Also:

Please use subject prefixes matching the subsystem. You can get them for example with git log --oneline -- DIRECTORY_OR_FILE on the directory your patch is touching. For bindings, the preferred subjects are explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters

Best regards,
Krzysztof

#4 lore raw

PATCH 2/4 mips: bmips: dts: fix {m,q}spi compatible order

In reply to Jonas Gorski

The compatible order should be from most specific to least specific, but the {m,q}spi controller nodes had theirs reversed.

The actual order does not matter, as the brcmmstb-qspi driver matches both, which than calls bcm_qspi_probe(), which only checks for the presence of the *-qspi compatible.

Fixes warnings like:

arch/mips/boot/dts/brcm/bcm97425svmb.dtb: spi@409200 (brcm,spi-bcm-qspi): compatible: 'oneOf' conditional failed, one must be fixed:
['brcm,spi-bcm-qspi', 'brcm,spi-brcmstb-mspi'] is too short
'brcm,spi-bcm-qspi' is not one of ['brcm,spi-bcm7425-qspi', 'brcm,spi-bcm7429-qspi', 'brcm,spi-bcm7435-qspi', 'brcm,spi-bcm7445-qspi', 'brcm,spi-bcm7216-qspi', 'brcm,spi-bcm7278-qspi'] 'brcm,spi-bcm-qspi' is not one of ['brcm,spi-brcmstb-qspi', 'brcm,spi-brcmstb-mspi', 'brcm,spi-nsp-qspi', 'brcm,spi-ns2-qspi']
'brcm,spi-bcm-qspi' was expected
from schema $id: http://devicetree.org/schemas/spi/brcm,spi-bcm-qspi.yaml

---
 arch/mips/boot/dts/brcm/bcm7125.dtsi | 8 ++++----
 arch/mips/boot/dts/brcm/bcm7346.dtsi | 8 ++++----
 arch/mips/boot/dts/brcm/bcm7358.dtsi | 8 ++++----
 arch/mips/boot/dts/brcm/bcm7360.dtsi | 8 ++++----
 arch/mips/boot/dts/brcm/bcm7362.dtsi | 8 ++++----
 arch/mips/boot/dts/brcm/bcm7420.dtsi | 8 ++++----
 arch/mips/boot/dts/brcm/bcm7425.dtsi | 8 ++++----
 arch/mips/boot/dts/brcm/bcm7435.dtsi | 8 ++++----
 8 files changed, 32 insertions(+), 32 deletions(-)
arch/mips/boot/dts/brcm/bcm7125.dtsi +4 -4
index 5bf77b6fcceb..92963a1998b7 100644
@@ -247,8 +247,8 @@ spi_l2_intc: interrupt-controller@411d00 {
 		qspi: spi@443000 {
 			#address-cells = <0x1>;
 			#size-cells = <0x0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-qspi";
+			compatible = "brcm,spi-brcmstb-qspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x440920 0x4 0x443200 0x188 0x443000 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
@@ -267,8 +267,8 @@ qspi: spi@443000 {
 		mspi: spi@406400 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-mspi";
+			compatible = "brcm,spi-brcmstb-mspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x406400 0x180>;
 			reg-names = "mspi";
arch/mips/boot/dts/brcm/bcm7346.dtsi +4 -4
index 9d6f97e02ff9..42125684b523 100644
@@ -471,8 +471,8 @@ spi_l2_intc: interrupt-controller@411d00 {
 		qspi: spi@413000 {
 			#address-cells = <0x1>;
 			#size-cells = <0x0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-qspi";
+			compatible = "brcm,spi-brcmstb-qspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
@@ -491,8 +491,8 @@ qspi: spi@413000 {
 		mspi: spi@408a00 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-mspi";
+			compatible = "brcm,spi-brcmstb-mspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x408a00 0x180>;
 			reg-names = "mspi";
arch/mips/boot/dts/brcm/bcm7358.dtsi +4 -4
index 6375fc77f389..fdc52acab8c8 100644
@@ -339,8 +339,8 @@ spi_l2_intc: interrupt-controller@411d00 {
 		qspi: spi@413000 {
 			#address-cells = <0x1>;
 			#size-cells = <0x0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-qspi";
+			compatible = "brcm,spi-brcmstb-qspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
@@ -359,8 +359,8 @@ qspi: spi@413000 {
 		mspi: spi@408a00 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-mspi";
+			compatible = "brcm,spi-brcmstb-mspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x408a00 0x180>;
 			reg-names = "mspi";
arch/mips/boot/dts/brcm/bcm7360.dtsi +4 -4
index a7f60f059e50..e8b0b0ff7588 100644
@@ -390,8 +390,8 @@ spi_l2_intc: interrupt-controller@411d00 {
 		qspi: spi@413000 {
 			#address-cells = <0x1>;
 			#size-cells = <0x0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-qspi";
+			compatible = "brcm,spi-brcmstb-qspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
@@ -410,8 +410,8 @@ qspi: spi@413000 {
 		mspi: spi@408a00 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-mspi";
+			compatible = "brcm,spi-brcmstb-mspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x408a00 0x180>;
 			reg-names = "mspi";
arch/mips/boot/dts/brcm/bcm7362.dtsi +4 -4
index 2d483cbf254f..a1ed0b193389 100644
@@ -386,8 +386,8 @@ spi_l2_intc: interrupt-controller@411d00 {
 		qspi: spi@413000 {
 			#address-cells = <0x1>;
 			#size-cells = <0x0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-qspi";
+			compatible = "brcm,spi-brcmstb-qspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
@@ -406,8 +406,8 @@ qspi: spi@413000 {
 		mspi: spi@408a00 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-mspi";
+			compatible = "brcm,spi-brcmstb-mspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x408a00 0x180>;
 			reg-names = "mspi";
arch/mips/boot/dts/brcm/bcm7420.dtsi +4 -4
index 9540c27f12e7..62e7e1602d4e 100644
@@ -308,8 +308,8 @@ spi_l2_intc: interrupt-controller@411d00 {
 		qspi: spi@443000 {
 			#address-cells = <0x1>;
 			#size-cells = <0x0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-qspi";
+			compatible = "brcm,spi-brcmstb-qspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x440920 0x4 0x443200 0x188 0x443000 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
@@ -328,8 +328,8 @@ qspi: spi@443000 {
 		mspi: spi@406400 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-mspi";
+			compatible = "brcm,spi-brcmstb-mspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x406400 0x180>;
 			reg-names = "mspi";
arch/mips/boot/dts/brcm/bcm7425.dtsi +4 -4
index c3bb020ff2b5..71422fd2ecc9 100644
@@ -482,8 +482,8 @@ spi_l2_intc: interrupt-controller@41ad00 {
 		qspi: spi@41c000 {
 			#address-cells = <0x1>;
 			#size-cells = <0x0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-qspi";
+			compatible = "brcm,spi-brcmstb-qspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x419920 0x4 0x41c200 0x188 0x41c000 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
@@ -502,8 +502,8 @@ qspi: spi@41c000 {
 		mspi: spi@409200 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-mspi";
+			compatible = "brcm,spi-brcmstb-mspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x409200 0x180>;
 			reg-names = "mspi";
arch/mips/boot/dts/brcm/bcm7435.dtsi +4 -4
index 60cfa4074cce..38eea5373b66 100644
@@ -498,8 +498,8 @@ spi_l2_intc: interrupt-controller@41bd00 {
 		qspi: spi@41d200 {
 			#address-cells = <0x1>;
 			#size-cells = <0x0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-qspi";
+			compatible = "brcm,spi-brcmstb-qspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x41a920 0x4 0x41d400 0x188 0x41d200 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
@@ -518,8 +518,8 @@ qspi: spi@41d200 {
 		mspi: spi@409200 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-			compatible = "brcm,spi-bcm-qspi",
-				     "brcm,spi-brcmstb-mspi";
+			compatible = "brcm,spi-brcmstb-mspi",
+				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
 			reg = <0x409200 0x180>;
 			reg-names = "mspi";
Signature · 1 line
2.43.0
#5 lore raw

PATCH 3/4 mips: bmips: dts: fix qspi interrupt order

In reply to Jonas Gorski

The binding for brcm,spi-bcm-qspi requires the interrupt-names in a certain order, so reorder the interrupts to match it.

Fixes warnings like:

arch/mips/boot/dts/brcm/bcm97435svmb.dtb: spi@41d200 (brcm,spi-brcmstb-qspi): interrupt-names: 'oneOf' conditional failed, one must be fixed:
['spi_lr_fullness_reached', 'spi_lr_session_aborted', 'spi_lr_impatient', 'spi_lr_session_done', 'spi_lr_overread', 'mspi_done', 'mspi_halted'] is too long 'mspi_done' was expected
'spi_l1_intr' was expected
'mspi_halted' was expected
'spi_lr_fullness_reached' was expected
'spi_lr_session_aborted' was expected
'spi_lr_impatient' was expected
'spi_lr_session_done' was expected
'spi_lr_overread' was expected
from schema $id: http://devicetree.org/schemas/spi/brcm,spi-bcm-qspi.yaml

---
 arch/mips/boot/dts/brcm/bcm7125.dtsi | 10 +++++-----
 arch/mips/boot/dts/brcm/bcm7346.dtsi | 10 +++++-----
 arch/mips/boot/dts/brcm/bcm7358.dtsi | 10 +++++-----
 arch/mips/boot/dts/brcm/bcm7360.dtsi | 10 +++++-----
 arch/mips/boot/dts/brcm/bcm7362.dtsi | 10 +++++-----
 arch/mips/boot/dts/brcm/bcm7420.dtsi | 10 +++++-----
 arch/mips/boot/dts/brcm/bcm7425.dtsi | 10 +++++-----
 arch/mips/boot/dts/brcm/bcm7435.dtsi | 10 +++++-----
 8 files changed, 40 insertions(+), 40 deletions(-)
arch/mips/boot/dts/brcm/bcm7125.dtsi +5 -5
index 92963a1998b7..dd1cc3cda694 100644
@@ -252,15 +252,15 @@ qspi: spi@443000 {
 			clocks = <&upg_clk>;
 			reg = <0x440920 0x4 0x443200 0x188 0x443000 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
-			interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
-			interrupt-names = "spi_lr_fullness_reached",
+			interrupt-names = "mspi_done",
+					  "mspi_halted",
+					  "spi_lr_fullness_reached",
 					  "spi_lr_session_aborted",
 					  "spi_lr_impatient",
 					  "spi_lr_session_done",
-					  "spi_lr_overread",
-					  "mspi_done",
-					  "mspi_halted";
+					  "spi_lr_overread";
 			status = "disabled";
 		};
 
arch/mips/boot/dts/brcm/bcm7346.dtsi +5 -5
index 42125684b523..21c7418aaf0d 100644
@@ -476,15 +476,15 @@ qspi: spi@413000 {
 			clocks = <&upg_clk>;
 			reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
-			interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
-			interrupt-names = "spi_lr_fullness_reached",
+			interrupt-names = "mspi_done",
+					  "mspi_halted",
+					  "spi_lr_fullness_reached",
 					  "spi_lr_session_aborted",
 					  "spi_lr_impatient",
 					  "spi_lr_session_done",
-					  "spi_lr_overread",
-					  "mspi_done",
-					  "mspi_halted";
+					  "spi_lr_overread";
 			status = "disabled";
 		};
 
arch/mips/boot/dts/brcm/bcm7358.dtsi +5 -5
index fdc52acab8c8..63b3a42a8dc6 100644
@@ -344,15 +344,15 @@ qspi: spi@413000 {
 			clocks = <&upg_clk>;
 			reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
-			interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
-			interrupt-names = "spi_lr_fullness_reached",
+			interrupt-names = "mspi_done",
+					  "mspi_halted",
+					  "spi_lr_fullness_reached",
 					  "spi_lr_session_aborted",
 					  "spi_lr_impatient",
 					  "spi_lr_session_done",
-					  "spi_lr_overread",
-					  "mspi_done",
-					  "mspi_halted";
+					  "spi_lr_overread";
 			status = "disabled";
 		};
 
arch/mips/boot/dts/brcm/bcm7360.dtsi +5 -5
index e8b0b0ff7588..9d89da400104 100644
@@ -395,15 +395,15 @@ qspi: spi@413000 {
 			clocks = <&upg_clk>;
 			reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
-			interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
-			interrupt-names = "spi_lr_fullness_reached",
+			interrupt-names = "mspi_done",
+					  "mspi_halted",
+					  "spi_lr_fullness_reached",
 					  "spi_lr_session_aborted",
 					  "spi_lr_impatient",
 					  "spi_lr_session_done",
-					  "spi_lr_overread",
-					  "mspi_done",
-					  "mspi_halted";
+					  "spi_lr_overread";
 			status = "disabled";
 		};
 
arch/mips/boot/dts/brcm/bcm7362.dtsi +5 -5
index a1ed0b193389..a0d15fcd3b81 100644
@@ -391,15 +391,15 @@ qspi: spi@413000 {
 			clocks = <&upg_clk>;
 			reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
-			interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
-			interrupt-names = "spi_lr_fullness_reached",
+			interrupt-names = "mspi_done",
+					  "mspi_halted",
+					  "spi_lr_fullness_reached",
 					  "spi_lr_session_aborted",
 					  "spi_lr_impatient",
 					  "spi_lr_session_done",
-					  "spi_lr_overread",
-					  "mspi_done",
-					  "mspi_halted";
+					  "spi_lr_overread";
 			status = "disabled";
 		};
 
arch/mips/boot/dts/brcm/bcm7420.dtsi +5 -5
index 62e7e1602d4e..a38041451faf 100644
@@ -313,15 +313,15 @@ qspi: spi@443000 {
 			clocks = <&upg_clk>;
 			reg = <0x440920 0x4 0x443200 0x188 0x443000 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
-			interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
-			interrupt-names = "spi_lr_fullness_reached",
+			interrupt-names = "mspi_done",
+					  "mspi_halted",
+					  "spi_lr_fullness_reached",
 					  "spi_lr_session_aborted",
 					  "spi_lr_impatient",
 					  "spi_lr_session_done",
-					  "spi_lr_overread",
-					  "mspi_done",
-					  "mspi_halted";
+					  "spi_lr_overread";
 			status = "disabled";
 		};
 
arch/mips/boot/dts/brcm/bcm7425.dtsi +5 -5
index 71422fd2ecc9..c2b3ea21410d 100644
@@ -487,15 +487,15 @@ qspi: spi@41c000 {
 			clocks = <&upg_clk>;
 			reg = <0x419920 0x4 0x41c200 0x188 0x41c000 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
-			interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
-			interrupt-names = "spi_lr_fullness_reached",
+			interrupt-names = "mspi_done",
+					  "mspi_halted",
+					  "spi_lr_fullness_reached",
 					  "spi_lr_session_aborted",
 					  "spi_lr_impatient",
 					  "spi_lr_session_done",
-					  "spi_lr_overread",
-					  "mspi_done",
-					  "mspi_halted";
+					  "spi_lr_overread";
 			status = "disabled";
 		};
 
arch/mips/boot/dts/brcm/bcm7435.dtsi +5 -5
index 38eea5373b66..826731515f0b 100644
@@ -503,15 +503,15 @@ qspi: spi@41d200 {
 			clocks = <&upg_clk>;
 			reg = <0x41a920 0x4 0x41d400 0x188 0x41d200 0x50>;
 			reg-names = "cs_reg", "hif_mspi", "bspi";
-			interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
+			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
-			interrupt-names = "spi_lr_fullness_reached",
+			interrupt-names = "mspi_done",
+					  "mspi_halted",
+					  "spi_lr_fullness_reached",
 					  "spi_lr_session_aborted",
 					  "spi_lr_impatient",
 					  "spi_lr_session_done",
-					  "spi_lr_overread",
-					  "mspi_done",
-					  "mspi_halted";
+					  "spi_lr_overread";
 			status = "disabled";
 		};
 
Signature · 1 line
2.43.0
#6 lore raw

PATCH 4/4 mips: bmips: dts: fix qspi register order

In reply to Jonas Gorski

Align the register order to the schema. Fixes warnings like:

arch/mips/boot/dts/brcm/bcm97435svmb.dtb: spi@41d200 (brcm,spi-brcmstb-qspi): reg-names:0: 'cs_reg' is not one of ['hif_mspi', 'mspi']
from schema $id: http://devicetree.org/schemas/spi/brcm,spi-bcm-qspi.yaml
arch/mips/boot/dts/brcm/bcm97435svmb.dtb: spi@41d200 (brcm,spi-brcmstb-qspi): reg-names:1: 'bspi' was expected
from schema $id: http://devicetree.org/schemas/spi/brcm,spi-bcm-qspi.yaml
arch/mips/boot/dts/brcm/bcm97435svmb.dtb: spi@41d200 (brcm,spi-brcmstb-qspi): reg-names:2: 'bspi' is not one of ['intr_regs', 'intr_status_reg', 'cs_reg']
from schema $id: http://devicetree.org/schemas/spi/brcm,spi-bcm-qspi.yaml

---
 arch/mips/boot/dts/brcm/bcm7125.dtsi | 4 ++--
 arch/mips/boot/dts/brcm/bcm7346.dtsi | 4 ++--
 arch/mips/boot/dts/brcm/bcm7358.dtsi | 4 ++--
 arch/mips/boot/dts/brcm/bcm7360.dtsi | 4 ++--
 arch/mips/boot/dts/brcm/bcm7362.dtsi | 4 ++--
 arch/mips/boot/dts/brcm/bcm7420.dtsi | 4 ++--
 arch/mips/boot/dts/brcm/bcm7425.dtsi | 4 ++--
 arch/mips/boot/dts/brcm/bcm7435.dtsi | 4 ++--
 8 files changed, 16 insertions(+), 16 deletions(-)
arch/mips/boot/dts/brcm/bcm7125.dtsi +2 -2
index dd1cc3cda694..81ee0f49b645 100644
@@ -250,8 +250,8 @@ qspi: spi@443000 {
 			compatible = "brcm,spi-brcmstb-qspi",
 				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
-			reg = <0x440920 0x4 0x443200 0x188 0x443000 0x50>;
-			reg-names = "cs_reg", "hif_mspi", "bspi";
+			reg = <0x443200 0x188 0x443000 0x50 0x440920 0x4>;
+			reg-names = "hif_mspi", "bspi", "cs_reg";
 			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
 			interrupt-names = "mspi_done",
arch/mips/boot/dts/brcm/bcm7346.dtsi +2 -2
index 21c7418aaf0d..6efb6347a2e4 100644
@@ -474,8 +474,8 @@ qspi: spi@413000 {
 			compatible = "brcm,spi-brcmstb-qspi",
 				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
-			reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
-			reg-names = "cs_reg", "hif_mspi", "bspi";
+			reg = <0x413200 0x188 0x413000 0x50 0x410920 0x4>;
+			reg-names = "hif_mspi", "bspi", "cs_reg";
 			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
 			interrupt-names = "mspi_done",
arch/mips/boot/dts/brcm/bcm7358.dtsi +2 -2
index 63b3a42a8dc6..527406a5fa4d 100644
@@ -342,8 +342,8 @@ qspi: spi@413000 {
 			compatible = "brcm,spi-brcmstb-qspi",
 				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
-			reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
-			reg-names = "cs_reg", "hif_mspi", "bspi";
+			reg = <0x413200 0x188 0x413000 0x50 0x410920 0x4>;
+			reg-names = "hif_mspi", "bspi", "cs_reg";
 			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
 			interrupt-names = "mspi_done",
arch/mips/boot/dts/brcm/bcm7360.dtsi +2 -2
index 9d89da400104..7ed6dbd145bf 100644
@@ -393,8 +393,8 @@ qspi: spi@413000 {
 			compatible = "brcm,spi-brcmstb-qspi",
 				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
-			reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
-			reg-names = "cs_reg", "hif_mspi", "bspi";
+			reg = <0x413200 0x188 0x413000 0x50 0x410920 0x4>;
+			reg-names = "hif_mspi", "bspi", "cs_reg";
 			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
 			interrupt-names = "mspi_done",
arch/mips/boot/dts/brcm/bcm7362.dtsi +2 -2
index a0d15fcd3b81..194b6dd34eab 100644
@@ -389,8 +389,8 @@ qspi: spi@413000 {
 			compatible = "brcm,spi-brcmstb-qspi",
 				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
-			reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
-			reg-names = "cs_reg", "hif_mspi", "bspi";
+			reg = <0x413200 0x188 0x413000 0x50 0x410920 0x4>;
+			reg-names = "hif_mspi", "bspi", "cs_reg";
 			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
 			interrupt-names = "mspi_done",
arch/mips/boot/dts/brcm/bcm7420.dtsi +2 -2
index a38041451faf..be4c9ba3d509 100644
@@ -311,8 +311,8 @@ qspi: spi@443000 {
 			compatible = "brcm,spi-brcmstb-qspi",
 				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
-			reg = <0x440920 0x4 0x443200 0x188 0x443000 0x50>;
-			reg-names = "cs_reg", "hif_mspi", "bspi";
+			reg = <0x443200 0x188 0x443000 0x50 0x440920 0x4>;
+			reg-names = "hif_mspi", "bspi", "cs_reg";
 			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
 			interrupt-names = "mspi_done",
arch/mips/boot/dts/brcm/bcm7425.dtsi +2 -2
index c2b3ea21410d..8c476a20aea5 100644
@@ -485,8 +485,8 @@ qspi: spi@41c000 {
 			compatible = "brcm,spi-brcmstb-qspi",
 				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
-			reg = <0x419920 0x4 0x41c200 0x188 0x41c000 0x50>;
-			reg-names = "cs_reg", "hif_mspi", "bspi";
+			reg = <0x41c200 0x188 0x41c000 0x50 0x419920 0x4>;
+			reg-names = "hif_mspi", "bspi", "cs_reg";
 			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
 			interrupt-names = "mspi_done",
arch/mips/boot/dts/brcm/bcm7435.dtsi +2 -2
index 826731515f0b..328fafe7519b 100644
@@ -501,8 +501,8 @@ qspi: spi@41d200 {
 			compatible = "brcm,spi-brcmstb-qspi",
 				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
-			reg = <0x41a920 0x4 0x41d400 0x188 0x41d200 0x50>;
-			reg-names = "cs_reg", "hif_mspi", "bspi";
+			reg = <0x41d400 0x188 0x41d200 0x50 0x41a920 0x4>;
+			reg-names = "hif_mspi", "bspi", "cs_reg";
 			interrupts = <0x5 0x6 0x0 0x1 0x2 0x3 0x4>;
 			interrupt-parent = <&spi_l2_intc>;
 			interrupt-names = "mspi_done",
Signature · 1 line
2.43.0
#7 lore raw

Re: [PATCH 4/4] mips: bmips: dts: fix qspi register order

Quoted 8 lines · Jonas Gorski

Align the register order to the schema. Fixes warnings like:

arch/mips/boot/dts/brcm/bcm97435svmb.dtb: spi@41d200 (brcm,spi-brcmstb-qspi): reg-names:0: 'cs_reg' is not one of ['hif_mspi', 'mspi']
from schema $id: http://devicetree.org/schemas/spi/brcm,spi-bcm-qspi.yaml
arch/mips/boot/dts/brcm/bcm97435svmb.dtb: spi@41d200 (brcm,spi-brcmstb-qspi): reg-names:1: 'bspi' was expected
from schema $id: http://devicetree.org/schemas/spi/brcm,spi-bcm-qspi.yaml
arch/mips/boot/dts/brcm/bcm97435svmb.dtb: spi@41d200 (brcm,spi-brcmstb-qspi): reg-names:2: 'bspi' is not one of ['intr_regs', 'intr_status_reg', 'cs_reg']
from schema $id: http://devicetree.org/schemas/spi/brcm,spi-bcm-qspi.yaml

Trim redundant parts. You do not need to paste schema path every time. Full path to DTB also is not really necessary, IMO.

Quoted 18 lines
---
 arch/mips/boot/dts/brcm/bcm7125.dtsi | 4 ++--
 arch/mips/boot/dts/brcm/bcm7346.dtsi | 4 ++--
 arch/mips/boot/dts/brcm/bcm7358.dtsi | 4 ++--
 arch/mips/boot/dts/brcm/bcm7360.dtsi | 4 ++--
 arch/mips/boot/dts/brcm/bcm7362.dtsi | 4 ++--
 arch/mips/boot/dts/brcm/bcm7420.dtsi | 4 ++--
 arch/mips/boot/dts/brcm/bcm7425.dtsi | 4 ++--
 arch/mips/boot/dts/brcm/bcm7435.dtsi | 4 ++--
 8 files changed, 16 insertions(+), 16 deletions(-)
arch/mips/boot/dts/brcm/bcm7125.dtsi +0 -0
index dd1cc3cda694..81ee0f49b645 100644

arch/mips/boot/dts/brcm/bcm7125.dtsi qspi: spi@443000 { · line 254

Quoted 7 lines
arch/mips/boot/dts/brcm/bcm7125.dtsi +2 -2
@@ -250,8 +250,8 @@ qspi: spi@443000 {
 			compatible = "brcm,spi-brcmstb-qspi",
 				     "brcm,spi-bcm-qspi";
 			clocks = <&upg_clk>;
-			reg = <0x440920 0x4 0x443200 0x188 0x443000 0x50>;
-			reg-names = "cs_reg", "hif_mspi", "bspi";
+			reg = <0x443200 0x188 0x443000 0x50 0x440920 0x4>;
+			reg-names = "hif_mspi", "bspi", "cs_reg";

So order is anyway broken by this change, thus you can as well rename it to mspi, right?

Best regards,
Krzysztof