Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2996567lqo; Tue, 21 May 2024 03:57:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVWcsBEsblVp+y07JeWX3GUPK3Kgcr1khR1CcF/sBQt1KyJX5c/+yaWtdo8zTXuBK+SrtKD4iREh1M/m4YqyY0Tmf06MVYGMSrQV0aT9A== X-Google-Smtp-Source: AGHT+IEtTyq1VQxwlDafWzARJ7Cnp4O0hqQCia8KCzFiZdz8/6LGWKwh95b5VC+3hpAqPZ4w561V X-Received: by 2002:a05:6a20:394a:b0:1b1:d402:a93d with SMTP id adf61e73a8af0-1b1d402aa5amr7782003637.19.1716289021934; Tue, 21 May 2024 03:57:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716289021; cv=pass; d=google.com; s=arc-20160816; b=Lm0wBkFic1pota2gUMc/YYyQn0Ef8aKHAhSBz7z359yJTTKO9yxYOd0R3rQeTBqbpy u7OYjcVHZ+/LCZKfOMBSB7OHQTK2uODFj0cCI9wFMg2A7I4GOS5SPi3d5NUDdu4qAF59 nmQgfcTyJnL16FQtAq6KESUMWScjK0cZFL83EJevuWshrSD8VWxZ5g8DKUluLVtvGJuB duWWysTcdE7NOSkCP13oTJIJFXu6H3w7dk4pjDODsrV3NgM92blKBlZ4Sd9CYL2asUr5 z1wyOI07XTcK2c4CRGnQnRGOovgMAQvRfD1rqLYXDLADogfV12Pt1bnTHvYtWWT6+xQt yNwQ== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=83KbFWh55Cqey/ImOyvYhV18NvEbJceoX4PIMpyhfoo=; fh=taM+Wg7/X9pM9LN6nhN/vkCvYeuaRj0wuEuDaH60A14=; b=P5YmS7guH4TQTtCVGDEw6oqfIPYJUuza7Mq1yIVzRL7b/gpE3u+64nOBkXjieAoAXu hvwec3X4Qr1eB+kgGcvhBiH6iEJMunrEzoelPMqXziwmj95calO/b6ntgH6k5OflaA0l IECDOgNC+Wmq39OkP1gbb1MZnAFmxRIdo2CKeuEeCo63/5tc64yfF0Bjbs9l3hDQbx59 Dag3mE9YaDERu2YLEMyFFwiwbKVrJ5KElpqI3w/0za1j9RVpAiVXFkwQZJyR3bvM5FvU Cwd6D9IIyMWyxkWl9/Sj3vMss0pB34D6/5O3+7xmWTqwVEqLKNwP2WuJ6OPXPL1HJT34 Cx/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=YPMIrwrW; 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-184839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184839-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f30b23e27esi11052715ad.650.2024.05.21.03.57.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 03:57:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=YPMIrwrW; 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-184839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184839-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8E75428551B for ; Tue, 21 May 2024 10:57:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D1F277114; Tue, 21 May 2024 10:56:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="YPMIrwrW" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 DA7B775803; Tue, 21 May 2024 10:55:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716288961; cv=none; b=JPjru/zOW85kXhpS1FiVJBmpZWK+PWpKN7WXSVhD/vReWtoOf0q9aLXnHFXebefKrqU91mi7DW/5XfD/E14KE0Ejc8ernGb43/Fi5ZvNDnSfZws9BK1LkjGiGfT9spYtHJFl3BqezyZUQT9DY63EKlKcBboB7XB9dHz1LV9KGz4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716288961; c=relaxed/simple; bh=Y7sc14p2FsTnkdV3f9EUmDg7KbULLHLw3ys1dgXFHiM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ozVkDYgM6sRAwmnhuTv+NVMFmun7ohGCr+aCUkhu7YleaLh8IGtMz6qOiaMYFrk9wJqEHkPksuFYN4YLUeHGMyTlFUJ6VuN1TjLmw91Cx27KjTYdkaDMNmfuBIHeQFsVhrh6wgUVHCsH5tvSvCKQQMxpRnM1A6dDoUYziJ1Ej/U= 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=YPMIrwrW; arc=none smtp.client-ip=205.220.168.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 (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44L5U57w015385; Tue, 21 May 2024 10:55:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=qcppdkim1; bh=83KbFWh 55Cqey/ImOyvYhV18NvEbJceoX4PIMpyhfoo=; b=YPMIrwrWR8O9AU7nqoHc7FT /S30cb4wlsYq+J2WoZZ8X8m3yLWrcTk0fEsM1Rx1hvKBgPnCUdyLRXBUDlPX6V7U IXJaYWW97knSdFl1iPOj/peziqNjYLfIVELc5fKc2hehLtaH7EhW1dz8NpqoVPbE gsZeYCrucVYOn0CyF4QG96v4kp7tkzZKabPvFjBi63VmCsZVpkIIH6YizF+BVvsz SqPaq/WjGG3gudRd1VdTcw3QcI9SUNU+lt8qO1PHC7iRwD9URdjXx4bnnLeGpQYG qb3UNEJVLCfXh40fkVn4e9w4x/HXTMLwwFNJArOdlOtQg96999wUkf4cViT+mzA= = 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 3y6pqc5er7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 May 2024 10:55:40 +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 44LAtaCb024655; Tue, 21 May 2024 10:55:37 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 3y6ndkytmw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 May 2024 10:55:37 +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 44LAtaLq024636; Tue, 21 May 2024 10:55:36 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 44LAtaAi024628 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 May 2024 10:55:36 +0000 Received: by hu-devc-blr-u22-a.qualcomm.com (Postfix, from userid 466583) id 3A18741662; Tue, 21 May 2024 16:25:34 +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 v6 7/8] arm64: dts: qcom: ipq9574: Add SPI nand support Date: Tue, 21 May 2024 16:25:31 +0530 Message-Id: <20240521105532.1537845-8-quic_mdalam@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240521105532.1537845-1-quic_mdalam@quicinc.com> References: <20240521105532.1537845-1-quic_mdalam@quicinc.com> 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-ORIG-GUID: IzFZUfkaW1uX0iaauTcQWBgF2PMy5Aba X-Proofpoint-GUID: IzFZUfkaW1uX0iaauTcQWBgF2PMy5Aba X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-21_06,2024-05-21_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 mlxlogscore=999 impostorscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 suspectscore=0 mlxscore=0 clxscore=1015 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405210082 Add SPI NAND support for ipq9574 SoC. Signed-off-by: Md Sadre Alam --- Change in [v6] * No change Change in [v5] * No change Change in [v4] * No change Change in [v3] * Updated gpio number as per pin control driver * Fixed alignment issue Change in [v2] * Added initial enablement for spi-nand Change in [v1] * Posted as RFC patch for design review .../boot/dts/qcom/ipq9574-rdp-common.dtsi | 43 +++++++++++++++++++ arch/arm64/boot/dts/qcom/ipq9574.dtsi | 27 ++++++++++++ 2 files changed, 70 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi index 91e104b0f865..6429a6b3b903 100644 --- a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi @@ -139,6 +139,49 @@ gpio_leds_default: gpio-leds-default-state { drive-strength = <8>; bias-pull-up; }; + + qpic_snand_default_state: qpic-snand-default-state { + clock-pins { + pins = "gpio5"; + function = "qspi_clk"; + drive-strength = <8>; + bias-disable; + }; + + cs-pins { + pins = "gpio4"; + function = "qspi_cs"; + drive-strength = <8>; + bias-disable; + }; + + data-pins { + pins = "gpio0", "gpio1", "gpio2", "gpio3"; + function = "qspi_data"; + drive-strength = <8>; + bias-disable; + }; + }; +}; + +&qpic_bam { + status = "okay"; +}; + +&qpic_nand { + pinctrl-0 = <&qpic_snand_default_state>; + pinctrl-names = "default"; + status = "okay"; + + flash@0 { + compatible = "spi-nand"; + reg = <0>; + #address-cells = <1>; + #size-cells = <1>; + nand-ecc-engine = <&qpic_nand>; + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + }; }; &usb_0_dwc3 { diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi index 7f2e5cbf3bbb..786bb3540d6c 100644 --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi @@ -319,6 +319,33 @@ tcsr: syscon@1937000 { reg = <0x01937000 0x21000>; }; + qpic_bam: dma-controller@7984000 { + compatible = "qcom,bam-v1.7.0"; + reg = <0x7984000 0x1c000>; + interrupts = ; + clocks = <&gcc GCC_QPIC_AHB_CLK>; + clock-names = "bam_clk"; + #dma-cells = <1>; + qcom,ee = <0>; + status = "disabled"; + }; + + qpic_nand: spi@79b0000 { + compatible = "qcom,spi-qpic-snand"; + reg = <0x79b0000 0x10000>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&gcc GCC_QPIC_CLK>, + <&gcc GCC_QPIC_AHB_CLK>, + <&gcc GCC_QPIC_IO_MACRO_CLK>; + clock-names = "core", "aon", "iom"; + dmas = <&qpic_bam 0>, + <&qpic_bam 1>, + <&qpic_bam 2>; + dma-names = "tx", "rx", "cmd"; + status = "disabled"; + }; + sdhc_1: mmc@7804000 { compatible = "qcom,ipq9574-sdhci", "qcom,sdhci-msm-v5"; reg = <0x07804000 0x1000>, -- 2.34.1