Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp355103lqo; Wed, 8 May 2024 01:37:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVsqyBynOOSjKFeRZgQh5gbQmBq8RXS3QqfGwpR0tsaIjFQZghmC+raSezB0jpJFCbZRnMMpv8gJQ3Qli+U1Ao6JLijBnYwuut+r2GPfw== X-Google-Smtp-Source: AGHT+IGn7GpNy6VFLl0EYvXxrC7PJGz5yLDeURxHc1jfdoABbsPlgqtamKtGgGDzKKTQ7OXarypY X-Received: by 2002:a17:90a:6303:b0:2b6:228a:3d83 with SMTP id 98e67ed59e1d1-2b6228a3df1mr1266906a91.39.1715157459315; Wed, 08 May 2024 01:37:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715157459; cv=pass; d=google.com; s=arc-20160816; b=SoyxzfXvvMNg7lRTAZbWW4T7yuHMeb5iX6HOHHws5e/rCcCUHHih+xnOsO6YAaxQTK FkLp6kjr0I4l7+PGWhKBX9MU+BIEKVblhr6AUutuyfQNsoU2daMld0YDWeXf44dnSMXi IB+j5Neg9EHZidHWqUBFfA13k8yyzKLWRmVxaP+69kvrY2UoPPe9eeFrqiZ1oArhkwn1 JiqB0bV1Udeq8ZwOYq/7MiSoae2RGljF1GUjdWBN8KySiK4oxwnff+umvNPkHdqb8VyO 6FJUhx7AUme6/yBhj6oH1y37XX/+uqOnokTTIWU+87F6byd5/HiIW6+pFtiTkmc9kl+m jzaA== 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=09XWPo3dhB2z587wFHRvQrXMTRWemTcuUmjBL9xNZs0=; fh=OuNOXhuNiF9ks20XGioy+5hfSknA55TYpy5Lsjw8OHU=; b=vwwwA50nc36zyznb7YTzGqJJa94zZ0zsETgnXDLsUQY5kcJNQNil6TuHWW/lPkl1Fm nYU8OkCGFrukHXGckJxgaihQj1/PaHOBaIeDBkMvBokm1E7p1N3pt8GfgMtfrd+O3Y8l 7N33hPEnTP3lE+Y106n8AYnB/EpUcBNkqT+vx/rvBtM06+BpCeOOwHKcAzAn3D24rRxm NwsEYzki1UeN+DU5VHJ0rSkNmeN1XdBRvwur9G6tl4CiuJBJOrgeVc+UOTac6oGtK5Nz 15z4X7Cku/nFLqLn+g497Y+xHLpDFzYTKEVWe9YyE0HP2D1/BH8WRzICrkC01pJMHASy 4Pxw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QZIhJHAH; 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-172919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172919-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 qe11-20020a17090b4f8b00b002ac02f64696si975617pjb.68.2024.05.08.01.37.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 01:37:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172919-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=QZIhJHAH; 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-172919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172919-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 E2094285D4D for ; Wed, 8 May 2024 08:37:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6CB2A53E11; Wed, 8 May 2024 08:37:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="QZIhJHAH" 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 16D382E417; Wed, 8 May 2024 08:37:09 +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=1715157431; cv=none; b=QFuzK5EB/nUhhzzhSbsDqcYXj7GcICD1ZtPDHjn4pqVGZD1XKjeyFP359b+2I/CO+yNrluhnjkgMBdgE38VlD9In7fx4oY0COOwazq7GknG8nA5JVnpzfHY2GdLWui9b6FXsaDlHBfZhVX2H6z3VggUaxlkcrJcUuz9/dYAdSRY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715157431; c=relaxed/simple; bh=DNMksP2JGqRLc2B/AKc1iJw9se3DQTrl7J1lYRapSB8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=c3n2LN30S6o8X0LVexPyefMBvpVbuko9lV0kgNzIlf9FC1O+NNjFRNkuLww68WCU+sd60Nk56bVPQaQctprJA9JvlxH4zmgA5mrViZRRFsBSYY1BpCXeDN4HbWAFinU/L2qwaUuN4guiknwe9Vnk7Z2eCeJuVt+AWTT1U5CHsuA= 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=QZIhJHAH; 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 (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4481VZHL021265; Wed, 8 May 2024 08:36:46 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=09XWPo3 dhB2z587wFHRvQrXMTRWemTcuUmjBL9xNZs0=; b=QZIhJHAHyJWYE13OwVf4xjz cI42e3lTDI2Ul5GL/cfuu7foI6cYj4vv07DjVQW0TTwDE/sZ+ul8XPvnTgj41c9S +W7Bwk+hilF1VPgolPBcfZtRy6DC5rAjJSFQT5lNKUmzwJEKw3Ksktm1WQyy1LHD 0W59ChPw1RlrFE9UgLyoTgrvr+D24FHNR3afjnAwH2zZp7L0/A/rLmbTGZAkUw9B 5J4SwUMBessFyOauPJyRrr9ifg3eIveQ8zOeRnhkwQV9CJQRrgoIoNWe4n0pa1J/ dd0ZGf5TeECz6HfyXKoVS8UagVvHWX+nCgVWdOM16EIaSAfZwffkALZ0s8HdaeA= = 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 3xysg41d0p-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 4488agWQ001273; Wed, 8 May 2024 08:36:42 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 3xwe3kwcht-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 May 2024 08:36:42 +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 4488agpW001259; Wed, 8 May 2024 08:36:42 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 4488afhD001258 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 May 2024 08:36:42 +0000 Received: by hu-devc-blr-u22-a.qualcomm.com (Postfix, from userid 466583) id 20BA641646; 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, Alexandru Gagniuc Subject: [PATCH v5 6/7] arm64: dts: qcom: ipq9574: Add SPI nand support Date: Wed, 8 May 2024 14:06:36 +0530 Message-Id: <20240508083637.3744003-7-quic_mdalam@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240508083637.3744003-1-quic_mdalam@quicinc.com> References: <20240508083637.3744003-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-GUID: c5R9mp8T2c5DatXpp--P-onCQ-2nGSLz X-Proofpoint-ORIG-GUID: c5R9mp8T2c5DatXpp--P-onCQ-2nGSLz 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 adultscore=0 phishscore=0 spamscore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405080060 Add SPI NAND support for ipq9574 SoC. Tested-by: Alexandru Gagniuc Signed-off-by: Md Sadre Alam --- 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