Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp355399lqo; Wed, 8 May 2024 01:38:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXGwbRwvguWkn0SF0RTl2l3XAJxHD2vGsx5y4AycaLWlm0pODXoQcKC0CUPObs9WtcSVJprl++w6NF5sRNep+ua+KJv76X9Xro4Iv38nw== X-Google-Smtp-Source: AGHT+IEtzhfvzVKgFXICzSzRXRNLKjLLMIco+GqBoj0RTRvvm8E5w4s6KR7yYNY7Aq47q7KfNQgY X-Received: by 2002:a17:906:da0a:b0:a59:9eab:1632 with SMTP id a640c23a62f3a-a59fb94bab7mr121034766b.15.1715157510356; Wed, 08 May 2024 01:38:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715157510; cv=pass; d=google.com; s=arc-20160816; b=XS75jyo0uWFOp2EpfuX9/d/qeZgUvyrGAtqwi9cElippP8sPeHQpDBbWE3zbr0V/OA sAJbHDyHbXzSBwQa0CK4euVeIfi7MHevt8SVpel0ep0Zw1ALwe/j+DezZlq8H9BOd+Tf 1e+mt7yJi9ZcA4ifFjs0oqxZ9o2fz7y7DWm3rdxypmcq30A/ELPRX7Fbj7VcA29kuCdl zWar61fuRENT2XuJBq1XkIscjmODDoifN7vvoBfVpbO0PZgpOWjW81/SHdjHMwydLuIw D3dP8emxC/A5rbWFaLWwMPXjr8eSw3813bGIs2vDNqVT0+BDKcOA99E/Atgs6QlbJ5q5 vDPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=l/ZPy/NScZS1QnKjOaWM3P4DZKYqM4mnhWvfYuSNg9g=; fh=taM+Wg7/X9pM9LN6nhN/vkCvYeuaRj0wuEuDaH60A14=; b=NqdZItDno7vvt8mwm3dnOKhqAM61GSatZViAKJBZuHVFsD0v0emsqpIcMDCNvEONhq OhcQJ6hBYt7kRVHLP6iq03kxI60+WtWI30LbCTtWsMoZuziLvTqMt5sr1mJFH73wKq0E gJ0cZi6B1/SDq63OT9x40S0ehmuG9zAHqbkfsyCJuuz9vT7yC3XesaaJx1YTIWDW+GWw aXk3vggT5aOXLE1RsMY/4wvQAZucS6GMjreGHxK6+1V/uAUwFdAiYZ9PH470G7MIRcL5 WIEeiJFp9tiIlf1boyWFKMJ1kluVyTI96r/MADgSXAk5rDYuAgBUSiLDfh1/FBOZPD46 CvbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=FjgIpiiy; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-172923-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172923-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id dr14-20020a170907720e00b00a59e0fe3d64si2380188ejc.351.2024.05.08.01.38.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 01:38:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172923-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=FjgIpiiy; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-172923-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172923-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E5CB71F22427 for ; Wed, 8 May 2024 08:38:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E897E6F510; Wed, 8 May 2024 08:37:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="FjgIpiiy" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8406A54672; Wed, 8 May 2024 08:37:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715157439; cv=none; b=WsAz2fko21tm5czMdZ+l9BDYFZm2c7PZ8RY4yCAZjnc0GJAAJsZB2QDaDB4hJ2UHOqPrCJ5ISQJ1uv8vwmNsK8TOWfdpFJUnBoRAOjC50T7jfmipNtlIbLxBRCdFl4S0uJjvxFidtKLddtwJwEryZEEBE4Gk6eGlrI5kyPNzfQo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715157439; c=relaxed/simple; bh=ZluKxCDKvH5ioOgbdfHZITry1LfiTu7c1pdB8iLDQcg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=iRaUaJjZvkJ3RKkI8ahQr+ZdJViZ68UYq6195ydMba1kwwn9g0HBWAh6+1Y+nfPepQpNpved6ZdP+2dTTgpH7Q8pwaUoX5Xv4VsiqtKIXLcb3BbUNKPFmOYCYpm3pq/HUNRledSEvC2baY/4e1B4BYigcUnOh8wkBNhvAgEQiKQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=FjgIpiiy; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4486kWQZ027280; Wed, 8 May 2024 08:36:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=qcppdkim1; bh=l/ZPy/NScZS1QnKjOaWM 3P4DZKYqM4mnhWvfYuSNg9g=; b=FjgIpiiyNBnKZDuwemXx40J7qUVrdu+BKfjV 7UmSF/DbQwn82Z+5nyOxuPwpR/kipT8vS/TkdKvSsQuyThUaC9OOXrCsGH+btBCv pEcZY+v8NUhJ12S/kTf6CkwxaiMJOTb+4+Nq0XxSb8vVfSDcOdONwVNcfFH9TZeA VEcVC83a+nVmBTXL3FCYr/734SD4Hc7n3LBQJf2mGmnHEJ3P9nlo5Z48zHAqjJs9 YztJodp2ytxGp+Rtm1E3yBQVkejTqJc7dD8/Ds8SozFzO+oHGMnYsESOYuakTTLS C+9RBUPebga9OrMpe0Ii1RUDo9GabMGXfIU+fy/1yVaik8Xl6Q== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xyspmsata-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 May 2024 08:36:45 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 4488afsS001204; Wed, 8 May 2024 08:36:41 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 3xwe3kwch4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 May 2024 08:36:41 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 4488ae3Y001173; Wed, 8 May 2024 08:36:41 GMT Received: from hu-devc-blr-u22-a.qualcomm.com (hu-mdalam-blr.qualcomm.com [10.131.36.157]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 4488aePJ001168 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 May 2024 08:36:40 +0000 Received: by hu-devc-blr-u22-a.qualcomm.com (Postfix, from userid 466583) id 094C44119C; Wed, 8 May 2024 14:06:40 +0530 (+0530) From: Md Sadre Alam To: broonie@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, manivannan.sadhasivam@linaro.org, linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Cc: quic_srichara@quicinc.com, quic_varada@quicinc.com, quic_mdalam@quicinc.com Subject: [PATCH v5 0/7] Add QPIC SPI NAND driver Date: Wed, 8 May 2024 14:06:30 +0530 Message-Id: <20240508083637.3744003-1-quic_mdalam@quicinc.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 4HFbH_7SKiWm3_Dx9Y_UA5mywC0q2kOq X-Proofpoint-ORIG-GUID: 4HFbH_7SKiWm3_Dx9Y_UA5mywC0q2kOq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-08_04,2024-05-08_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 phishscore=0 suspectscore=0 mlxscore=0 impostorscore=0 spamscore=0 adultscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 mlxlogscore=417 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405080060 v5: * Fixes nandbiterr issue * Added raw_read() and raw_write() API * Added qcom_ prefix to all the common API * Removed register indirection * Following tests for SPI-NAND devices passed - mtd_oobtest - mtd_pagetest - mtd_readtest - mtd_speedtest - mtd_stresstest - mtd_subpagetest - mtd_nandbiterrs - nandtest - nanddump - nandwrite - nandbiterr -i - mtd erase - mtd write - dd - hexddump v4: * In this patch series fixes kernel doc for all the cmmon api * Also fixes dm-binding commit message * Fix qpic_common.c compilation based on config v3: * In this patch series fixes multiple things like added clock-name, added _alloc_controller api instead of alloc_master, made common apis more generic etc. * Addressed all the comment from v2 patch series v2: * https://lore.kernel.org/linux-arm-msm/20240215134856.1313239-1-quic_mdalam@quicinc.com/ * In this series of patchs we have added basic working QPIC SPI NAND driver with READ, WRITE, ERASE etc functionality * Addressed all the comments given in RFC [v1] patch v1: * https://lore.kernel.org/linux-arm-msm/20231031120307.1600689-1-quic_mdalam@quicinc.com/ * Initial set of patches for handling QPIC SPI NAND. Md Sadre Alam (7): spi: dt-bindings: Introduce qcom,spi-qpic-snand mtd: rawnand: qcom: cleanup qcom_nandc driver mtd: rawnand: qcom: Add qcom prefix to common api drivers: mtd: nand: Add qpic_common API file spi: spi-qpic: add driver for QCOM SPI NAND flash Interface arm64: dts: qcom: ipq9574: Add SPI nand support arm64: dts: qcom: ipq9574: Disable eMMC node .../bindings/spi/qcom,spi-qpic-snand.yaml | 83 + .../boot/dts/qcom/ipq9574-rdp-common.dtsi | 43 + arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts | 2 +- arch/arm64/boot/dts/qcom/ipq9574.dtsi | 27 + drivers/mtd/nand/Kconfig | 8 + drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/qpic_common.c | 741 ++++++++ drivers/mtd/nand/raw/qcom_nandc.c | 1621 +++-------------- drivers/spi/Kconfig | 8 + drivers/spi/Makefile | 1 + drivers/spi/spi-qpic-snand.c | 1423 +++++++++++++++ include/linux/mtd/nand-qpic-common.h | 531 ++++++ 12 files changed, 3113 insertions(+), 1376 deletions(-) create mode 100644 Documentation/devicetree/bindings/spi/qcom,spi-qpic-snand.yaml create mode 100644 drivers/mtd/nand/qpic_common.c create mode 100644 drivers/spi/spi-qpic-snand.c create mode 100644 include/linux/mtd/nand-qpic-common.h -- 2.34.1