From patchwork Thu Dec 16 22:49:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 524718 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04814C433F5 for ; Thu, 16 Dec 2021 22:49:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232778AbhLPWtR (ORCPT ); Thu, 16 Dec 2021 17:49:17 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:36088 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232439AbhLPWtR (ORCPT ); Thu, 16 Dec 2021 17:49:17 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1033EB82656 for ; Thu, 16 Dec 2021 22:49:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19A18C36AEA; Thu, 16 Dec 2021 22:49:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639694954; bh=pXa6QAtvL3D45U6/sIsAWYph7P8xSuGk1YzqjNguGio=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J2l9W+1DiyRA0LtAB5X5UolzhmXoWVPENBnfP5JLwfty4P4eR256gWcxM1bg+CUvk xi00d4OD/FqG1O8cLuFZApmZDSOozVddDQjLVEFjXiC86ZclawuvWopKIEHLcLq7y3 zwuNdfFl80xfWoyvUhTCFO4eKxpb/s3gR7VrmR9e1NwYZf6ntICLRLpDV4PPQdTa3x WrnD1rGDBru2Tzp4SCEuIU5oP7xYUeygaGmwliHRN0b+Y3mlIRIURYMilaRqrNh1Xw YrYIaHHFC+HnZJrE3FU9ZkYldEAhQwcoTJQIzribkCMSyN0L4S5Kg2RNBIc7jWMcn3 NbFgtqiFSvEDQ== From: Dinh Nguyen To: devicetree@vger.kernel.org Cc: dinguyen@kernel.org, robh+dt@kernel.org, p.yadav@ti.com Subject: [PATCHv3 1/2] dt-bindings: spi: cadence-quadspi: document "intel,socfpga-qspi" Date: Thu, 16 Dec 2021 16:49:01 -0600 Message-Id: <20211216224902.374403-2-dinguyen@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211216224902.374403-1-dinguyen@kernel.org> References: <20211216224902.374403-1-dinguyen@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 compatible "intel,socfpga-qspi" to differentiate the hardware. Signed-off-by: Dinh Nguyen Acked-by: Pratyush Yadav Reviewed-by: Rob Herring --- v3: revert to "intel,socfpga-qspi" v2: change binding to "cdns,qspi-nor-0010" to be more generic for other platforms --- Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml index ca155abbda7a..037f41f58503 100644 --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml @@ -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 From patchwork Thu Dec 16 22:49:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 525282 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99826C433FE for ; Thu, 16 Dec 2021 22:49:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231958AbhLPWtR (ORCPT ); Thu, 16 Dec 2021 17:49:17 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:56770 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232778AbhLPWtQ (ORCPT ); Thu, 16 Dec 2021 17:49:16 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 81CCD61F7C for ; Thu, 16 Dec 2021 22:49:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22F83C36AE2; Thu, 16 Dec 2021 22:49:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639694956; bh=f33BSFUTFzCkW5L3iBzfWPVfso2duIgKfzGCdqlSpKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uf4LannlCUCFFMFrNegEkchjFmRbPOublrRDviRUritrXnygDvn7LcdQHTULRJ26X QdcRPqyKZQCiwEhJV1FktYYOgPIZevJ4AWbAPKhtGxRECp4QMnrvbBQ6zSbhkGHTmm rzBYuL9YTjohglIjLOPDjFX2qxacvh6Ny+uOvKYc3zPUd3p9RbtN07SJvSROeBKJDj H+eVtrV1/IQ8Jn0iMIB3thkbhvhefp28Pz3+hPa9eID3Nqq0pP9kd/j8jvW1nR/IiV NqDFXq2PmoAvMqTjNi0o+eD7uKr90rUU4WyU9RTu7LKr80E3HRm2ouJwCUkWpdCL3O WWY3LkNc+mezw== From: Dinh Nguyen To: devicetree@vger.kernel.org Cc: dinguyen@kernel.org, robh+dt@kernel.org, p.yadav@ti.com Subject: [PATCHv3 2/2] ARM: dts: socfpga: change qspi to "intel,socfpga-qspi" Date: Thu, 16 Dec 2021 16:49:02 -0600 Message-Id: <20211216224902.374403-3-dinguyen@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211216224902.374403-1-dinguyen@kernel.org> References: <20211216224902.374403-1-dinguyen@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 patch 98d948eb833 ("spi: cadence-quadspi: fix write completion support"), which adds the dts compatible "intel,socfpga-qspi" that is specific for versions that doesn't have the CQSPI_REG_WR_COMPLETION_CTRL register implemented. Signed-off-by: Dinh Nguyen --- v3: revert back to "intel,socfpga-qspi" v2: use both "cdns,qspi-nor" and "cdns,qspi-nor-0010" --- 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(-) diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi index 0b021eef0b53..7c1d6423d7f8 100644 --- a/arch/arm/boot/dts/socfpga.dtsi +++ b/arch/arm/boot/dts/socfpga.dtsi @@ -782,7 +782,7 @@ ocram: sram@ffff0000 { }; qspi: spi@ff705000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qspi", "cdns,qspi-nor"; #address-cells = <1>; #size-cells = <0>; reg = <0xff705000 0x1000>, diff --git a/arch/arm/boot/dts/socfpga_arria10.dtsi b/arch/arm/boot/dts/socfpga_arria10.dtsi index a574ea91d9d3..3ba431dfa8c9 100644 --- a/arch/arm/boot/dts/socfpga_arria10.dtsi +++ b/arch/arm/boot/dts/socfpga_arria10.dtsi @@ -756,7 +756,7 @@ usb0-ecc@ff8c8800 { }; qspi: spi@ff809000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qspi", "cdns,qspi-nor"; #address-cells = <1>; #size-cells = <0>; reg = <0xff809000 0x100>, diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi index d301ac0d406b..3ec301bd08a9 100644 --- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi @@ -594,7 +594,7 @@ emac0-tx-ecc@ff8c0400 { }; qspi: spi@ff8d2000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qspi", "cdns,qspi-nor"; #address-cells = <1>; #size-cells = <0>; reg = <0xff8d2000 0x100>, diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex.dtsi b/arch/arm64/boot/dts/intel/socfpga_agilex.dtsi index 163f33b46e4f..0dd2d2ee765a 100644 --- a/arch/arm64/boot/dts/intel/socfpga_agilex.dtsi +++ b/arch/arm64/boot/dts/intel/socfpga_agilex.dtsi @@ -628,7 +628,7 @@ sdmmca-ecc@ff8c8c00 { }; qspi: spi@ff8d2000 { - compatible = "cdns,qspi-nor"; + compatible = "intel,socfpga-qspi", "cdns,qspi-nor"; #address-cells = <1>; #size-cells = <0>; reg = <0xff8d2000 0x100>,