Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4617359ybl; Wed, 22 Jan 2020 01:19:22 -0800 (PST) X-Google-Smtp-Source: APXvYqwMRsyp6h9G9QGB3p1K6WN072zbQcWO31lzRe6lCDlxo0zambV00dF8Sdn7VSXVaeo37/pN X-Received: by 2002:a54:4896:: with SMTP id r22mr6215840oic.30.1579684761993; Wed, 22 Jan 2020 01:19:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579684761; cv=none; d=google.com; s=arc-20160816; b=pmbFLE8p3jiAt7m9LeCTZ8rh+CWdcjoXGeGDnXDFL4Pjw7a95hmOqWkCHzV+wg02fb cYRgvUs6Jol4A4HP9PcUtaFnQ3yp3SmdGFnvORodfX7AGFTgjWuATElzjYKQQGiV48GT VDJkd35BkrTm6J92YFzT6HW5i5mizZIUhGIJbZSGDBYBECvUzQwCtcj3ErDqqlPIQ9Cq pchGKqwgUIU8edKSul3Vh6ieNIruNxLDKfC2PCPnEtUGCRhUxumpml0d8eJ9BMZ8l7j4 EwlQrn4joChD/dwKHD6g5xhOQrxX1WXylWofd/+gJc/MfHJQxi23oHpmBQfkOF6E8rZ2 RhSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=oE/5GHIbwLzOUFvxZxRtLKPsBGrwOQ6WxB+AJ0eu3vM=; b=B04wgRIXyAVmJVO2t+nVWPEkPlMdgf+XlxGXfnQgXRpEuyUPnVqe6l/2N7s/+8qJ5X QIQmLCwAHzo1G1/nNgJseKKD6p5Y7iu+UvuHhfa7BsLgOW7t/UBUzi5eZuMnbRJIgs6t NLiQQXTGBx187/mC5lpekTUOauX9cfzpW8dU1rIYnEHICe5PK4wU/PLl+aR65IsD62h2 cGTGNI3UUmPfg6ppo4gim5DosKJxDNi3hnFEW//x7tHKxc8Ppdrc2SWQRoDKJe41fnm2 cvQVcz7n5P8u3mAsLbIS59B7M4iEev0e372u9gZ0zRqdTdSismzR9WjA5YMfP/S1ISSo AO1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o14si21261976oie.257.2020.01.22.01.19.10; Wed, 22 Jan 2020 01:19:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729138AbgAVJSO (ORCPT + 99 others); Wed, 22 Jan 2020 04:18:14 -0500 Received: from mga02.intel.com ([134.134.136.20]:11326 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbgAVJSO (ORCPT ); Wed, 22 Jan 2020 04:18:14 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2020 01:18:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,349,1574150400"; d="scan'208";a="244993465" Received: from sgsxdev004.isng.intel.com (HELO localhost) ([10.226.88.13]) by orsmga002.jf.intel.com with ESMTP; 22 Jan 2020 01:18:11 -0800 From: "Ramuthevar,Vadivel MuruganX" To: linux-kernel@vger.kernel.org, broonie@kernel.org, linux-spi@vger.kernel.org, vigneshr@ti.com Cc: robh+dt@kernel.org, dan.carpenter@oracle.com, cheol.yong.kim@intel.com, qi-ming.wu@intel.com, "Ramuthevar,Vadivel MuruganX" Subject: [PATCH v7 0/2] spi: cadence-quadpsi: Add support for the Cadence QSPI controller Date: Wed, 22 Jan 2020 17:18:07 +0800 Message-Id: <20200122091809.43069-1-vadivel.muruganx.ramuthevar@linux.intel.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for the Cadence QSPI controller. This controller is present in the Intel Lightning Mountain(LGM) SoCs, Altera and TI SoCs. This driver has been tested on the Intel LGM SoCs. This driver does not support generic SPI and also the implementation only supports spi-mem interface to replace the existing driver in mtd/spi-nor/cadence-quadspi.c, the existing driver only support SPI-NOR flash memory. Thanks Vignesh for the review, modify, test and confirm the patch which is based on spi-mem based cadence driver working on TI's platform. after few changes started working on Intel's platform as well. changes from v6: -- Add the Signed-off-by Vignesh in commit message -- bus_num, num_chipselect added to avoid the garbage bus number during the probe and spi_register. -- master mode bits updated -- address sequence is different from TI and Intel SoC Ip handling so modified as per Intel and differentiating by use_dac_mode variable. -- dummy cycles also different b/w two platforms, so keeping separate check -- checkpatch errors which are intentional left as is for better readability changes from v5: -- kbuild test robot warnings fixed -- Add Reported-By: Dan Carpenter changes from v4: -- kbuild test robot warnings fixed -- Add Reborted-by: tag changes from v3: spi-cadence-quadspi.c -- static to all functions wrt to local to the file. -- Prefix cqspi_ and make the function static -- cmd_ops, data_ops and dummy_ops dropped -- addr_ops kept since it is required for address calculation. -- devm_ used for supported functions , removed legacy API's -- removed "indirect" name from functions -- replaced by master->mode_bits = SPI_RX_QUAD | SPI_TX_DUAL | SPI_RX_DUAL | SPI_RX_OCTAL; as per Vignesh susggestion -- removed free functions since devm_ handles automatically. -- dropped all unused Macros YAML file update: -- cadence,qspi.yaml file name replace by cdns,qspi-nor.yaml -- compatible string updated as per Vignesh suggestion -- for single entry, removed descriptions -- removed optional parameters Build Result: linux$ make DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml dt_binding_check CHKDT Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml SCHEMA Documentation/devicetree/bindings/processed-schema.yaml DTC Documentation/devicetree/bindings/spi/cdns,qspi-nor.example.dt.yaml CHECK Documentation/devicetree/bindings/spi/cdns,qspi-nor.example.dt.yaml Ramuthevar Vadivel Murugan (2): dt-bindings: spi: Add schema for Cadence QSPI Controller driver spi: cadence-quadpsi: Add support for the Cadence QSPI controller .../devicetree/bindings/spi/cdns,qspi-nor.yaml | 147 ++ drivers/spi/Kconfig | 8 + drivers/spi/Makefile | 1 + drivers/spi/spi-cadence-quadspi.c | 1563 ++++++++++++++++++++ 4 files changed, 1719 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml create mode 100644 drivers/spi/spi-cadence-quadspi.c -- 2.11.0