ARM: dts: socfpga: change qspi to "intel,socfpga-qspi"
Subsystems (3)
Dinh Nguyen
maintainerPATCH 1/2 ARM: dts: socfpga: change qspi to "intel,socfpga-qspi"
Because of commit 9cb2ff111712 ("spi: cadence-quadspi: Disable Auto-HW polling"), which does a write to the CQSPI_REG_WR_COMPLETION_CTRL register regardless of any condition. Well, the Cadence QuadSPI controller on Intel's SoCFPGA platforms does not implement the CQSPI_REG_WR_COMPLETION_CTRL register, thus a write to this register results in a crash!
So starting with v5.16, I introduced the patch98d948eb833 ("spi: cadence-quadspi: fix write completion support"), which adds the dts property "intel,socfpga-qspi" that is specific for the QSPI on SoCFPGA that doesn't have the CQSPI_REG_WR_COMPLETION_CTRL register implemented.
--- arch/arm/boot/dts/socfpga.dtsi | 2 +- arch/arm/boot/dts/socfpga_arria10.dtsi | 2 +- arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 2 +- arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/socfpga.dtsi +1 -1
@@ -782,7 +782,7 @@ ocram: sram@ffff0000 { }; qspi: spi@ff705000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qpsi"; #address-cells = <1>; #size-cells = <0>; reg = <0xff705000 0x1000>,
arch/arm/boot/dts/socfpga_arria10.dtsi +1 -1
@@ -756,7 +756,7 @@ usb0-ecc@ff8c8800 { }; qspi: spi@ff809000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qspi"; #address-cells = <1>; #size-cells = <0>; reg = <0xff809000 0x100>,
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +1 -1
@@ -594,7 +594,7 @@ emac0-tx-ecc@ff8c0400 { }; qspi: spi@ff8d2000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qspi"; #address-cells = <1>; #size-cells = <0>; reg = <0xff8d2000 0x100>,
arch/arm64/boot/dts/intel/socfpga_agilex.dtsi +1 -1
@@ -628,7 +628,7 @@ sdmmca-ecc@ff8c8c00 { }; qspi: spi@ff8d2000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qspi"; #address-cells = <1>; #size-cells = <0>; reg = <0xff8d2000 0x100>,
Signature · 1 line
2.25.1
Dinh Nguyen
maintainerPATCH 2/2 dt-bindings: spi: cadence-quadspi: document "intel,socfpga-qspi"
The QSPI controller on Intel's SoCFPGA platform does not implement the CQSPI_REG_WR_COMPLETION_CTRL register, thus a write to this register results in a crash.
Introduce the dts binding "intel,socfpga-qspi" to differentiate the hardware.
--- Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +1 -0
@@ -29,6 +29,7 @@ properties: - ti,am654-ospi - intel,lgm-qspi - xlnx,versal-ospi-1.0 + - intel,socfpga-qspi - const: cdns,qspi-nor - const: cdns,qspi-nor
Signature · 1 line
2.25.1
Rob Herring
maintainerRe: [PATCH 2/2] dt-bindings: spi: cadence-quadspi: document "intel,socfpga-qspi"
Quoted 17 lines · Dinh Nguyen
The QSPI controller on Intel's SoCFPGA platform does not implement the
CQSPI_REG_WR_COMPLETION_CTRLregister, thus a write to this register results in a crash.Introduce the dts binding "intel,socfpga-qspi" to differentiate the hardware.
Signed-off-by Dinh Nguyen <[email protected]>--- Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +0
-0
Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml properties: · line 33
Quoted 5 lines
Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +1
-0@@ -29,6 +29,7 @@ properties: - ti,am654-ospi - intel,lgm-qspi - xlnx,versal-ospi-1.0 + - intel,socfpga-qspi - const: cdns,qspi-nor
Doesn't match what you changed in the dts files.
Please run schema validation so YOU find this issue and typos instead of me.
Rob
Rob Herring
maintainerQuoted 10 lines · Dinh Nguyen
Because of commit
9cb2ff111712("spi: cadence-quadspi: Disable Auto-HW polling"), which does a write to theCQSPI_REG_WR_COMPLETION_CTRLregister regardless of any condition. Well, the Cadence QuadSPI controller on Intel's SoCFPGA platforms does not implement theCQSPI_REG_WR_COMPLETION_CTRLregister, thus a write to this register results in a crash!So starting with v5.16, I introduced the patch
98d948eb833("spi: cadence-quadspi: fix write completion support"), which adds the dts property "intel,socfpga-qspi" that is specific for
'intel,socfpga-qspi' is not a DT property. It's a value for 'compatible'.
Is this change going to stable? That would at least fix old kernels with new DT (assuming they get stable updates). But new kernels with old DT are still broken. Not a great story here.
Quoted 16 lines
the QSPI on SoCFPGA that doesn't have the
CQSPI_REG_WR_COMPLETION_CTRLregister implemented.Signed-off-by Dinh Nguyen <[email protected]>--- arch/arm/boot/dts/socfpga.dtsi | 2 +- arch/arm/boot/dts/socfpga_arria10.dtsi | 2 +- arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 2 +- arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)arch/arm/boot/dts/socfpga.dtsi +0
-0
arch/arm/boot/dts/socfpga.dtsi ocram: sram@ffff0000 { · line 785
Quoted 5 lines
arch/arm/boot/dts/socfpga.dtsi +1
-1@@ -782,7 +782,7 @@ ocram: sram@ffff0000 { }; qspi: spi@ff705000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qpsi";
Obviously not tested.
Quoted 46 lines
arch/arm/boot/dts/socfpga.dtsi +0
-0#address-cells = <1>; #size-cells = <0>; reg = <0xff705000 0x1000>,arch/arm/boot/dts/socfpga_arria10.dtsi +1
-1@@ -756,7 +756,7 @@ usb0-ecc@ff8c8800 { }; qspi: spi@ff809000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qspi"; #address-cells = <1>; #size-cells = <0>; reg = <0xff809000 0x100>,arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +1
-1@@ -594,7 +594,7 @@ emac0-tx-ecc@ff8c0400 { }; qspi: spi@ff8d2000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qspi"; #address-cells = <1>; #size-cells = <0>; reg = <0xff8d2000 0x100>,arch/arm64/boot/dts/intel/socfpga_agilex.dtsi +1
-1@@ -628,7 +628,7 @@ sdmmca-ecc@ff8c8c00 { }; qspi: spi@ff8d2000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qspi"; #address-cells = <1>; #size-cells = <0>; reg = <0xff8d2000 0x100>,Signature · 1 line
2.25.1
Rob Herring
maintainerQuoted 65 lines · Dinh Nguyen
Because of commit
9cb2ff111712("spi: cadence-quadspi: Disable Auto-HW polling"), which does a write to theCQSPI_REG_WR_COMPLETION_CTRLregister regardless of any condition. Well, the Cadence QuadSPI controller on Intel's SoCFPGA platforms does not implement theCQSPI_REG_WR_COMPLETION_CTRLregister, thus a write to this register results in a crash!So starting with v5.16, I introduced the patch
98d948eb833("spi: cadence-quadspi: fix write completion support"), which adds the dts property "intel,socfpga-qspi" that is specific for the QSPI on SoCFPGA that doesn't have theCQSPI_REG_WR_COMPLETION_CTRLregister implemented.Signed-off-by Dinh Nguyen <[email protected]>--- arch/arm/boot/dts/socfpga.dtsi | 2 +- arch/arm/boot/dts/socfpga_arria10.dtsi | 2 +- arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 2 +- arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)arch/arm/boot/dts/socfpga.dtsi +1
-1@@ -782,7 +782,7 @@ ocram: sram@ffff0000 { }; qspi: spi@ff705000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qpsi"; #address-cells = <1>; #size-cells = <0>; reg = <0xff705000 0x1000>,arch/arm/boot/dts/socfpga_arria10.dtsi +1
-1@@ -756,7 +756,7 @@ usb0-ecc@ff8c8800 { }; qspi: spi@ff809000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qspi"; #address-cells = <1>; #size-cells = <0>; reg = <0xff809000 0x100>,arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +1
-1@@ -594,7 +594,7 @@ emac0-tx-ecc@ff8c0400 { }; qspi: spi@ff8d2000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qspi"; #address-cells = <1>; #size-cells = <0>; reg = <0xff8d2000 0x100>,arch/arm64/boot/dts/intel/socfpga_agilex.dtsi +0
-0
arch/arm64/boot/dts/intel/socfpga_agilex.dtsi sdmmca-ecc@ff8c8c00 { · line 631
Quoted 5 lines
arch/arm64/boot/dts/intel/socfpga_agilex.dtsi +1
-1@@ -628,7 +628,7 @@ sdmmca-ecc@ff8c8c00 { }; qspi: spi@ff8d2000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qspi";
A few more comments...
Now instead of reusing the same generic compatible, you are reusing the same compatible across 4 different SoCs and setting yourself up for the same compatibility breakage again if there is some difference among these SoCs.
Also, keep "cdns,qspi-nor" as a fall back and you will solve the new DT
+ old kernel combination and the schema errors.
Rob