Skip to contentSkip to conversation

qspi binding and DTS fixes

PATCH In review Florian Fainelli 5 participants 12 messages Aug 27, 2020 – Sep 9, 2020

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

cover qspi binding and DTS fixes

Hi all,

This patch series fixes incorrectly defined compatible strings for the Broadcom QSPI controller which resulted in the strings not being ordered from most to least compatible.

We will need to apply some changes to the spi-bcm-qspi.c driver in the future to assume no revision register exist, and these patches are a preliminary step towards that goal.

Florian Fainelli (5):
dt-bindings: spi: Fix spi-bcm-qspi compatible ordering
ARM: dts: bcm: HR2: Fixed QSPI compatible string
ARM: dts: NSP: Fixed QSPI compatible string
ARM: dts: BCM5301X: Fixed QSPI compatible string
arm64: dts: ns2: Fixed QSPI compatible string

 .../bindings/spi/brcm,spi-bcm-qspi.txt           | 16 ++++++++--------
 arch/arm/boot/dts/bcm-hr2.dtsi                   |  2 +-
 arch/arm/boot/dts/bcm-nsp.dtsi                   |  2 +-
 arch/arm/boot/dts/bcm5301x.dtsi                  |  2 +-
 arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi |  2 +-
 5 files changed, 12 insertions(+), 12 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/5 dt-bindings: spi: Fix spi-bcm-qspi compatible ordering

The binding is currently incorrectly defining the compatible strings from least specific to most specific instead of the converse. Re-order them from most specific (left) to least specific (right) and fix the examples as well.

Fixes 5fc78f4c842a ("spi: Broadcom BRCMSTB, NSP, NS2 SoC bindings")
---
 .../bindings/spi/brcm,spi-bcm-qspi.txt           | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Documentation/devicetree/bindings/spi/brcm,spi-bcm-qspi.txt +8 -8
index f5e518d099f2..62d4ed2d7fd7 100644
@@ -23,8 +23,8 @@ Required properties:
 
 - compatible:
     Must be one of :
-    "brcm,spi-bcm-qspi", "brcm,spi-brcmstb-qspi" : MSPI+BSPI on BRCMSTB SoCs
-    "brcm,spi-bcm-qspi", "brcm,spi-brcmstb-mspi" : Second Instance of MSPI
+    "brcm,spi-brcmstb-qspi", "brcm,spi-bcm-qspi" : MSPI+BSPI on BRCMSTB SoCs
+    "brcm,spi-brcmstb-mspi", "brcm,spi-bcm-qspi" : Second Instance of MSPI
 						   BRCMSTB  SoCs
     "brcm,spi-bcm7425-qspi", "brcm,spi-bcm-qspi", "brcm,spi-brcmstb-mspi" : Second Instance of MSPI
     			     			  			    BRCMSTB  SoCs
@@ -36,8 +36,8 @@ Required properties:
     			     			  			    BRCMSTB  SoCs
     "brcm,spi-bcm7278-qspi", "brcm,spi-bcm-qspi", "brcm,spi-brcmstb-mspi" : Second Instance of MSPI
     			     			  			    BRCMSTB  SoCs
-    "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi"     : MSPI+BSPI on Cygnus, NSP
-    "brcm,spi-bcm-qspi", "brcm,spi-ns2-qspi"     : NS2 SoCs
+    "brcm,spi-nsp-qspi", "brcm,spi-bcm-qspi"     : MSPI+BSPI on Cygnus, NSP
+    "brcm,spi-ns2-qspi", "brcm,spi-bcm-qspi"     : NS2 SoCs
 
 - reg:
     Define the bases and ranges of the associated I/O address spaces.
@@ -86,7 +86,7 @@ BRCMSTB SoC Example:
     spi@f03e3400 {
 		#address-cells = <0x1>;
 		#size-cells = <0x0>;
-		compatible = "brcm,spi-brcmstb-qspi", "brcm,spi-brcmstb-qspi";
+		compatible = "brcm,spi-brcmstb-qspi", "brcm,spi-bcm-qspi";
 		reg = <0xf03e0920 0x4 0xf03e3400 0x188 0xf03e3200 0x50>;
 		reg-names = "cs_reg", "mspi", "bspi";
 		interrupts = <0x6 0x5 0x4 0x3 0x2 0x1 0x0>;
@@ -149,7 +149,7 @@ BRCMSTB SoC Example:
 		#address-cells = <1>;
 		#size-cells = <0>;
 		clocks = <&upg_fixed>;
-		compatible = "brcm,spi-brcmstb-qspi", "brcm,spi-brcmstb-mspi";
+		compatible = "brcm,spi-brcmstb-mspi", "brcm,spi-bcm-qspi";
 		reg = <0xf0416000 0x180>;
 		reg-names = "mspi";
 		interrupts = <0x14>;
@@ -160,7 +160,7 @@ BRCMSTB SoC Example:
 iProc SoC Example:
 
     qspi: spi@18027200 {
-	compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
+	compatible = "brcm,spi-nsp-qspi", "brcm,spi-bcm-qspi";
 	reg = <0x18027200 0x184>,
 	      <0x18027000 0x124>,
 	      <0x1811c408 0x004>,
@@ -191,7 +191,7 @@ iProc SoC Example:
  NS2 SoC Example:
 
 	       qspi: spi@66470200 {
-		       compatible = "brcm,spi-bcm-qspi", "brcm,spi-ns2-qspi";
+		       compatible = "brcm,spi-ns2-qspi", "brcm,spi-bcm-qspi";
 		       reg = <0x66470200 0x184>,
 			     <0x66470000 0x124>,
 			     <0x67017408 0x004>,
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 1/5
#2 lore raw

Re: [PATCH 1/5] dt-bindings: spi: Fix spi-bcm-qspi compatible ordering

Quoted 11 lines · Florian Fainelli

The binding is currently incorrectly defining the compatible strings from least specific to most specific instead of the converse. Re-order them from most specific (left) to least specific (right) and fix the examples as well.

Fixes 5fc78f4c842a ("spi: Broadcom BRCMSTB, NSP, NS2 SoC bindings")
---
 .../bindings/spi/brcm,spi-bcm-qspi.txt           | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
#3 lore raw

Re: [PATCH 1/5] dt-bindings: spi: Fix spi-bcm-qspi compatible ordering

Quoted 6 lines · Rob Herring
Quoted 5 lines · Florian Fainelli

The binding is currently incorrectly defining the compatible strings from least specific to most specific instead of the converse. Re-order them from most specific (left) to least specific (right) and fix the examples as well.

Quoted 9 lines
Quoted 6 lines
Fixes 5fc78f4c842a ("spi: Broadcom BRCMSTB, NSP, NS2 SoC bindings")
---
  .../bindings/spi/brcm,spi-bcm-qspi.txt           | 16 ++++++++--------
  1 file changed, 8 insertions(+), 8 deletions(-)

Thanks, and sorry about the nagging on IRC :)

Signature · 1 line
Florian
#4 lore raw

PATCH 2/5 ARM: dts: bcm: HR2: Fixed QSPI compatible string

In reply to Florian Fainelli

The string was incorrectly defined before from least to most specific, swap the compatible strings accordingly.

Fixes b9099ec754b5 ("ARM: dts: Add Broadcom Hurricane 2 DTS include file")
---
 arch/arm/boot/dts/bcm-hr2.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/bcm-hr2.dtsi +1 -1
index cbebed5f050e..e8df458aad39 100644
@@ -217,7 +217,7 @@ rng: rng@33000 {
 		};
 
 		qspi: spi@27200 {
-			compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
+			compatible = "brcm,spi-nsp-qspi", "brcm,spi-bcm-qspi";
 			reg = <0x027200 0x184>,
 			      <0x027000 0x124>,
 			      <0x11c408 0x004>,
Signature · 1 line
2.25.1
#5 lore raw

PATCH 3/5 ARM: dts: NSP: Fixed QSPI compatible string

In reply to Florian Fainelli

The string was incorrectly defined before from least to most specific, swap the compatible strings accordingly.

Fixes 329f98c1974e ("ARM: dts: NSP: Add QSPI nodes to NSPI and bcm958625k DTSes")
---
 arch/arm/boot/dts/bcm-nsp.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/bcm-nsp.dtsi +1 -1
index 0346ea621f0f..c846fa3c244d 100644
@@ -284,7 +284,7 @@ nand: nand@26000 {
 		};
 
 		qspi: spi@27200 {
-			compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
+			compatible = "brcm,spi-nsp-qspi", "brcm,spi-bcm-qspi";
 			reg = <0x027200 0x184>,
 			      <0x027000 0x124>,
 			      <0x11c408 0x004>,
Signature · 1 line
2.25.1
#6 lore raw

PATCH 4/5 ARM: dts: BCM5301X: Fixed QSPI compatible string

In reply to Florian Fainelli

The string was incorrectly defined before from least to most specific, swap the compatible strings accordingly.

Fixes 1c8f40650723 ("ARM: dts: BCM5301X: convert to iProc QSPI")
---
 arch/arm/boot/dts/bcm5301x.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/bcm5301x.dtsi +1 -1
index 2d9b4dd05830..0016720ce530 100644
@@ -488,7 +488,7 @@ nand: nand@18028000 {
 	};
 
 	spi@18029200 {
-		compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
+		compatible = "brcm,spi-nsp-qspi", "brcm,spi-bcm-qspi";
 		reg = <0x18029200 0x184>,
 		      <0x18029000 0x124>,
 		      <0x1811b408 0x004>,
Signature · 1 line
2.25.1
#7 lore raw

PATCH 5/5 arm64: dts: ns2: Fixed QSPI compatible string

In reply to Florian Fainelli

The string was incorrectly defined before from least to most specific, swap the compatible strings accordingly.

Fixes ff73917d38a6 ("ARM64: dts: Add QSPI Device Tree node for NS2")
---
 arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi +1 -1
index 15f7b0ed3836..39802066232e 100644
@@ -745,7 +745,7 @@ nand: nand@66460000 {
 		};
 
 		qspi: spi@66470200 {
-			compatible = "brcm,spi-bcm-qspi", "brcm,spi-ns2-qspi";
+			compatible = "brcm,spi-ns2-qspi", "brcm,spi-bcm-qspi";
 			reg = <0x66470200 0x184>,
 				<0x66470000 0x124>,
 				<0x67017408 0x004>,
Signature · 1 line
2.25.1
Acked-by on the v1 series
#8 lore raw
In reply to Florian Fainelli

Patch series looks good.

Quoted 24 lines · Florian Fainelli

Hi all,

This patch series fixes incorrectly defined compatible strings for the Broadcom QSPI controller which resulted in the strings not being ordered from most to least compatible.

We will need to apply some changes to the spi-bcm-qspi.c driver in the future to assume no revision register exist, and these patches are a preliminary step towards that goal.

Florian Fainelli (5):
dt-bindings: spi: Fix spi-bcm-qspi compatible ordering
ARM: dts: bcm: HR2: Fixed QSPI compatible string
ARM: dts: NSP: Fixed QSPI compatible string
ARM: dts: BCM5301X: Fixed QSPI compatible string
arm64: dts: ns2: Fixed QSPI compatible string

 .../bindings/spi/brcm,spi-bcm-qspi.txt           | 16 ++++++++--------
 arch/arm/boot/dts/bcm-hr2.dtsi                   |  2 +-
 arch/arm/boot/dts/bcm-nsp.dtsi                   |  2 +-
 arch/arm/boot/dts/bcm5301x.dtsi                  |  2 +-
 arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi |  2 +-
 5 files changed, 12 insertions(+), 12 deletions(-)
#9 lore raw

Looks good to me.

Quoted 31 lines · Scott Branden

Patch series looks good.

Quoted 24 lines · Florian Fainelli

Hi all,

This patch series fixes incorrectly defined compatible strings for the Broadcom QSPI controller which resulted in the strings not being ordered from most to least compatible.

We will need to apply some changes to the spi-bcm-qspi.c driver in the future to assume no revision register exist, and these patches are a preliminary step towards that goal.

Florian Fainelli (5):
dt-bindings: spi: Fix spi-bcm-qspi compatible ordering
ARM: dts: bcm: HR2: Fixed QSPI compatible string
ARM: dts: NSP: Fixed QSPI compatible string
ARM: dts: BCM5301X: Fixed QSPI compatible string
arm64: dts: ns2: Fixed QSPI compatible string

 .../bindings/spi/brcm,spi-bcm-qspi.txt           | 16 ++++++++--------
 arch/arm/boot/dts/bcm-hr2.dtsi                   |  2 +-
 arch/arm/boot/dts/bcm-nsp.dtsi                   |  2 +-
 arch/arm/boot/dts/bcm5301x.dtsi                  |  2 +-
 arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi |  2 +-
 5 files changed, 12 insertions(+), 12 deletions(-)
#10 lore raw
In reply to Florian Fainelli
Quoted 9 lines · Florian Fainelli

Hi all,

This patch series fixes incorrectly defined compatible strings for the Broadcom QSPI controller which resulted in the strings not being ordered from most to least compatible.

We will need to apply some changes to the spi-bcm-qspi.c driver in the future to assume no revision register exist, and these patches are a preliminary step towards that goal.

Rob, can I get your tag for this patch series so it can be sent out? Thanks!

Quoted 15 lines

Florian Fainelli (5):
dt-bindings: spi: Fix spi-bcm-qspi compatible ordering
ARM: dts: bcm: HR2: Fixed QSPI compatible string
ARM: dts: NSP: Fixed QSPI compatible string
ARM: dts: BCM5301X: Fixed QSPI compatible string
arm64: dts: ns2: Fixed QSPI compatible string

  .../bindings/spi/brcm,spi-bcm-qspi.txt           | 16 ++++++++--------
  arch/arm/boot/dts/bcm-hr2.dtsi                   |  2 +-
  arch/arm/boot/dts/bcm-nsp.dtsi                   |  2 +-
  arch/arm/boot/dts/bcm5301x.dtsi                  |  2 +-
  arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi |  2 +-
  5 files changed, 12 insertions(+), 12 deletions(-)
Signature · 1 line
Florian
#11 lore raw
In reply to Florian Fainelli
Quoted 9 lines · Florian Fainelli

Hi all,

This patch series fixes incorrectly defined compatible strings for the Broadcom QSPI controller which resulted in the strings not being ordered from most to least compatible.

We will need to apply some changes to the spi-bcm-qspi.c driver in the future to assume no revision register exist, and these patches are a preliminary step towards that goal.

Series applied to devicetree/fixes, sending the PR shortly.

Signature · 1 line
Florian