Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp425385lqc; Fri, 8 Mar 2024 01:18:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWMu7NIhlWfMHTfTTpmH5hWG+V7CDXHU8EcZ2Ju+8ts77x5qMCH/XVK/13yLKmTVV0G0Kvspx+joUS1wbs/wjuk4w8Zbv8DJph7zdbPEg== X-Google-Smtp-Source: AGHT+IEpJxcq19YiQxTOmduATK6zP8GdBqNnm3a92Bi62DnpxLK/DohWY7ozeMYs1tT08cJoNAN5 X-Received: by 2002:a05:6214:124:b0:690:914e:8312 with SMTP id w4-20020a056214012400b00690914e8312mr8366409qvs.61.1709889525570; Fri, 08 Mar 2024 01:18:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709889525; cv=pass; d=google.com; s=arc-20160816; b=kJ6FVd5USAjGbfs/PoL2zHxvjQwfIOUFDKIbtv6/mbxoukG7D8efVOfyD8rphn869V zwE5/bzTL7wwZJ5NPU3JILcbsaF2XzD7avnaVZGEtzU5OuIi06EtjIQBbUXcnZBVHKaT cc7kQAqtJuilz0jdIHrfcO5z3YYA7qX4WJOR1IjEG7lc1rQIrzU9N6a46RzrPzXFhKjk J4upugjU35HafMtMoKBbMdF/M+wO6JxKJJ2zVsCfKgWikr6vez5pNMuItIkJ5iUnmDmN JflZUAM1M6esoB9b5OSkldlEN/PVq/h99LRpCs2SH9LD2bXVoQGTNmO3kKt5S1MMtvUh 7dpg== 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=D+RFzb2YPQTn7zvcDOOyGbJ5kFpjgovmxPUyPLTrfkI=; fh=f71Lg4pnznQ5ZuAXnNQoQ6a38aFucJRF0FUBzmYAPu8=; b=iLrEOVVUl5TiQKIXI6KNqkiDLJ6Q32a5ydhbzJOnzaAw6yNKoNSuK7Yn9n1MZHh8RP NcQ9pCGv1PmTynxmHmRujrnR1o4TBQ9FJhpEYkXrUYScaO9hfbX2VtltDufXfRSWuo57 rIpoAcN2bEUCbI287khxmEDZC8+l29saGKMzz+rdT6Qctmam+Il5bGrwN81B7MkElI+3 6fuo0nVjRDGHdzaI5E2tf+7f17GAXbAlxwZ12srp0EHJZ1sWbbl8AXWFlxwHSNcK1fzt txTQOd1r3Gx3pAUVgLQ+yWR9xsnS+2qUzwXVoS6eRvG26Orl7niS5yuNRR+OrOXgreHx mTVQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="nnjq/cGt"; 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-96733-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96733-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id om7-20020a0562143d8700b0068fe7aac0c5si18870280qvb.163.2024.03.08.01.18.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 01:18:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96733-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="nnjq/cGt"; 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-96733-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96733-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1BFE11C2192A for ; Fri, 8 Mar 2024 09:18:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17E84535BD; Fri, 8 Mar 2024 09:18:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="nnjq/cGt" 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 920EE3BBDB; Fri, 8 Mar 2024 09:18:25 +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=1709889507; cv=none; b=E+5X9phPkN/rz7lXnOiLG5l7S34LjpehM3JwisAIrRZyoJVcTxxQv5XbmTUIUSSI2c+K1Q6Whk+mcPX6Lt8L6Ys5duxi0ggEgTPS2dXaWMLgVxJpCcFxvymje6kMRDOu7sm7zmH4376w4pQ9rAn2vpvfV4qecWX9aLK6G/5P0UA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709889507; c=relaxed/simple; bh=sGf1NUFn2ibKQ8PotTvQih5UE8OeaSbpEcXpiBqmXVg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jM4YjbFGGBbCr1/wgarW/d/xZt6AEvXkQZy8OoGAYBFiuQHjpP7UEusHkSggW4JJEUPdP8nbGkUGC4NYbO6lbWA48EQ2eJ89IJ+4gatlKcfy1IP1jJM1xwokQqiEL3YgbKp4fruR1/qTAUdHzvwgwjBM39/5dcy58C5RCUUVR+M= 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=nnjq/cGt; 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 (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4283I2UT010007; Fri, 8 Mar 2024 09:18:00 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=D+RFzb2 YPQTn7zvcDOOyGbJ5kFpjgovmxPUyPLTrfkI=; b=nnjq/cGtcc5NvlvMElgvWNj bShlzQQA8NkuNiuIbpW2QCLyH0KNIdOoxqD2Jsu5aX2tCiAWhMvJr6/vsYzoG/xx eNCDvw2jiJ2SnyT/PwS0kj7YPhGQiMixpfckRSMolbDBmUulKs7DOh24xZq6h3sB +cVJGWBS+ZKjVBkryYA4M4TDhFmv7pWRpEh0yJbTHf6Er38mUBTgtM3sf16vta6v KQu8aPzHSJEmbGXrmcWGZRGMAq8Qe8yn/xFP/aXqHn/JKLnR2xwGqUWQpydP9m79 z6Den8gqHqjHv8Ga+UE6+GOkzkepYIIrqTvaL9xUMKgGOWQ0/83FIJ7RorIhnYA= = Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wqn8m1bn5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Mar 2024 09:17:59 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 4289Huif000799; Fri, 8 Mar 2024 09:17:56 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3wkw6m3h0u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Mar 2024 09:17:56 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 4289HuEr000774; Fri, 8 Mar 2024 09:17:56 GMT Received: from hu-devc-blr-u22-a.qualcomm.com (hu-mdalam-blr.qualcomm.com [10.131.36.157]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 4289HucT000747 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Mar 2024 09:17:56 +0000 Received: by hu-devc-blr-u22-a.qualcomm.com (Postfix, from userid 466583) id 04185414B7; Fri, 8 Mar 2024 14:47:55 +0530 (+0530) From: Md Sadre Alam To: andersson@kernel.org, konrad.dybcio@linaro.org, broonie@kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, manivannan.sadhasivam@linaro.org, neil.armstrong@linaro.org, daniel@makrotopia.org, arnd@arndb.de, chris.packham@alliedtelesis.co.nz, christophe.kerello@foss.st.com, 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 v4 4/5] arm64: dts: qcom: ipq9574: Add SPI nand support Date: Fri, 8 Mar 2024 14:47:51 +0530 Message-Id: <20240308091752.16136-5-quic_mdalam@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240308091752.16136-1-quic_mdalam@quicinc.com> References: <20240308091752.16136-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: ntxQoPXBUQCKfMHjnRu17AHNONuduYnh X-Proofpoint-ORIG-GUID: ntxQoPXBUQCKfMHjnRu17AHNONuduYnh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-08_06,2024-03-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 impostorscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2403080073 Add SPI NAND support for ipq9574 SoC. Signed-off-by: Md Sadre Alam --- 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