Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp259346ybf; Thu, 27 Feb 2020 20:38:54 -0800 (PST) X-Google-Smtp-Source: APXvYqzoB9CbgtvCE5GkdS8CsYjyojG6epSkaOjODSDbbUtZApezS0N6CeKbnUE1ZTK+mQvWVjOf X-Received: by 2002:a05:6830:114c:: with SMTP id x12mr1883131otq.324.1582864734559; Thu, 27 Feb 2020 20:38:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582864734; cv=none; d=google.com; s=arc-20160816; b=dGIloDaABbknf4Yd8ILRwTI27SXNwTFznAKoiYZM56miQfl2wowpDzLpX9utlxXlrN Hihlj+BzffSWdUAlAszhDYfFOQU79wguK3JN0M/o9aLFqKSRp+fNnkSyIyuPAwvpu5c2 wqA/q2oxdP9KC67+/lHGRzldUmdc5xT3aK6SZ54yw5p1DuzUQJ3IvMvt4VzmcRtr4X0D m6nZakwuNW5F6ll/MrtOvmPkOxWv8mcObsboL4YvUCpdTMA3kjWsdA4Lv23rvC1+T1Xb 3sUjS0Jbvm06mlfEujAZcLkfgC8n4WBZb7iozZ9xnbHfmrrj6y5g6PNStw5fXdHkUu6g FeXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=srFQTDpYVngqG0eYKY8zeXeTxEow1+Q6Yy9to892+K8=; b=XAyIYvo4MnzutWZzw48JXWOJ1jzfSJrUfcAY5D4/AXVKAFlJ9hsQqzIhYPdoHD8VgO BbhgsxukfDJhwVVtlD5d/SGmygjvDk64drQCjUvl5hD589WDciq8OcleZYWyt2iB6nD2 PiZGy1L6fpj6A44epMwWXNLDjLn0N7vScJNf6Lj3pZkJOLkTP4qWZW4qibFbcbOCX8YX 3uNvT6FiL1uK4cgouJq+TrLouFXxcKg8fzLY3g+O0mDbDXPqzi3TglBQIUHtM3t87JUp XkZfTOrAbuQ/pdCtIwgQOLT76KbHQjFgFCvsGpp2Yub0aMndbpw30ex+p+pTGHCyWyiP GfqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OGuISWEl; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x80si1168781oif.111.2020.02.27.20.38.42; Thu, 27 Feb 2020 20:38:54 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OGuISWEl; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730925AbgB1EiZ (ORCPT + 99 others); Thu, 27 Feb 2020 23:38:25 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:46253 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730800AbgB1EiZ (ORCPT ); Thu, 27 Feb 2020 23:38:25 -0500 Received: by mail-pl1-f196.google.com with SMTP id y8so715891pll.13; Thu, 27 Feb 2020 20:38:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=srFQTDpYVngqG0eYKY8zeXeTxEow1+Q6Yy9to892+K8=; b=OGuISWEli9eLWMchX3FyKGExfAxWPgMbRqfnKQ71+WgTo0dAEu2wLJuIhrKoGocX7C NgR5sxtUyB2qc+ar05E0dailbAMsC/Kwdrk8MOBfQ4vYqgtPKQVDCZtupwPoBDBSJaHY 5N3TV62amf+JgPDxaRZ8kRVzgFexamdDBZnLMUd4UHpeSeFtwRVdcFnfvP7jDC5JxKXB GprPn9waSFKdqTuaDbE50CEKUjlPN4vQKSkRzh1HrfX0oIkzMyIVOEFMVnYflBo8FWGe ldlX01IUa/AEq4++DIRco4fmEed+VmzvnXwDP4sNJG4uEuNpeZa3AdkdoTFZjyMu7OSo lYNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=srFQTDpYVngqG0eYKY8zeXeTxEow1+Q6Yy9to892+K8=; b=Pvqt70CAE30X5SEstTqe/AoHXrntr5wiFDRDQWsFO/s/n/UGPMuvzvBU558YBSAJoa Nw5+hiU0mLazPgN8Y5/yBYI+haBkBmWL26g4AyO/tgHQq9tpmSksdTb4os28j1A3o4cY xxp3jTo9F9zuK1QOwaY6BJ609BhJvXXinQ1IQz/oCmM7RBpR7IU+qIvaD9PjWZV2Wbia 88tpx4Ivy3RHq0mFpj51yCzk3mjI/1v7kqByvtNXD7B1LBYOn11RZT6U2ES6eVubuABL j0zWAg48d9LLLCyX2izeKXTn2/KbWspRRhe+PSeRKbIiB6Y/SuIoOcAgChpfRZ4Z2rK/ a1YQ== X-Gm-Message-State: APjAAAXMsVnTooazmTR59kQ1n9uno1WxP78I40PfxhcUfnd/rgFwFTQk uVu3UvGHmG1GomfXTSOtrlM= X-Received: by 2002:a17:90a:aa83:: with SMTP id l3mr2715072pjq.5.1582864703657; Thu, 27 Feb 2020 20:38:23 -0800 (PST) Received: from localhost.localdomain ([240e:379:962:6595:7b84:9990:1a82:371c]) by smtp.gmail.com with ESMTPSA id 196sm9069047pfy.86.2020.02.27.20.37.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 20:38:22 -0800 (PST) From: Chuanhong Guo To: linux-mediatek@lists.infradead.org, linux-spi@vger.kernel.org, linux-mtd@lists.infradead.org, devicetree@vger.kernel.org Cc: Chuanhong Guo , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Matthias Brugger , Mark Brown , Tudor Ambarus , linux-arm-kernel@lists.infradead.org (moderated list:ARM/Mediatek SoC support), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 0/4] rewrite mtk-quadspi spi-nor driver with spi-mem Date: Fri, 28 Feb 2020 12:36:32 +0800 Message-Id: <20200228043636.559915-1-gch981213@gmail.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset adds a spi-mem driver for Mediatek SPI-NOR controller, which already has limited support by mtk-quadspi. This new driver can make use of full quadspi capability of this controller. 1st new commit makes spi-max-frequency optional to match current binding doc and make this new driver compatible with old driver dt bindings. Changes since v1: two new commits. Chuanhong Guo (4): spi: make spi-max-frequency optional spi: add support for mediatek spi-nor controller dt-bindings: convert mtk-quadspi binding doc for spi-mtk-nor mtd: spi-nor: remove mtk-quadspi driver .../mtk-quadspi.txt => spi/spi-mtk-nor.txt} | 34 +- drivers/mtd/spi-nor/Kconfig | 8 - drivers/mtd/spi-nor/Makefile | 1 - drivers/mtd/spi-nor/mtk-quadspi.c | 565 -------------- drivers/spi/Kconfig | 10 + drivers/spi/Makefile | 1 + drivers/spi/spi-mtk-nor.c | 689 ++++++++++++++++++ drivers/spi/spi.c | 9 +- 8 files changed, 717 insertions(+), 600 deletions(-) rename Documentation/devicetree/bindings/{mtd/mtk-quadspi.txt => spi/spi-mtk-nor.txt} (62%) delete mode 100644 drivers/mtd/spi-nor/mtk-quadspi.c create mode 100644 drivers/spi/spi-mtk-nor.c -- 2.24.1