Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1836360lqz; Mon, 1 Apr 2024 21:09:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUyRijDfoIRidXAU0sIKVZ0Mk5VeTu2cGLrFTA/BEWvNrTAo2kmclpG2RBdz5BHXwDUhj4LTbRBHngI73WQ3sQJj9JPfqZiKbU3Q5Dyrw== X-Google-Smtp-Source: AGHT+IGgd2PXLiYqGLhcyeBcDcGy2jj8XLb1vz8TDa55eZRMPm0jYbopxEk+J3FmZ7isKd4MbHzj X-Received: by 2002:a05:6359:410f:b0:17e:76a1:4dd3 with SMTP id kh15-20020a056359410f00b0017e76a14dd3mr14708103rwc.4.1712030949584; Mon, 01 Apr 2024 21:09:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712030949; cv=pass; d=google.com; s=arc-20160816; b=w8NfEev1oceQKN8EK8XJIb+ytkwew6Vio1NFWzgZ/hKqoIz6h/W1x9bO4WbjGGzbyS d2PAuGoLgDany0ncvgmyOP1vROAOfeWPz54F1+sm7bnz/fM+OT09YN8o5BSkH3kl6Hvv /p547SCC4BiWzZp1HttvatssYOMc8ifsZm+L4xoPJ5mXp9ugNc6KyH95eSECnQCkQeI0 Y1I3nqjMenFiBdAg7baFg9CLHGw55+b7NutBIFbbrzU8jN0TXDewZMrP0LIHoeKW+WiA 6ZPjHMNAZ/D42wlP6kl1ed5Ikl5DAljs8KlQ9JLWPYycaGWmGicHU2X5CP3bJ8vs4Rwr GVFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DKNxMn/Z5JzOo/jR2jDJChmF/ctJ5SWPN1RCccn9UBk=; fh=IgkjGutiZkVnmqMnx5A/kmb6mxC8n5B7pgsh0+A5oj0=; b=PZ3qj2wcOZzHJIMLVAVOBTsG78XLi3T+0amS9RL+0HmKDqaJYyq3SgJfgVyYaZYFTu VZ1+W5elZRCwsJlK+lurwlZL5UTLd0G5w5BiFMD8MmFfKLW6eBn6xFhkE/R4klFLg2i+ 9BelMFQvrdZvG7gCU8nbijgYy/jtXE6yBWGjJoBW6ayOKymAQt8wB0u8iq/io37Zq3Sp lS4H/reth+NSXnvBZ7WikaeQzE1lMhD4s+1zWtv2kgnCtEEHfKAY/vulrIScxMZ3J/Vs DPasHE7/Z7Hdpf40QBUUxloeR0ZFEUnACsphXKRGMnZ0/LxRfIwxdz8NukIuLp2A2bBZ gTZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NnXJMWyD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-127357-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127357-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y30-20020a63181e000000b005f0a525e9a9si5632113pgl.541.2024.04.01.21.09.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 21:09:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127357-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NnXJMWyD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-127357-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127357-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E631BB23C12 for ; Tue, 2 Apr 2024 04:06:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 87FCD17BB6; Tue, 2 Apr 2024 04:06:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NnXJMWyD" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6DC47179A8; Tue, 2 Apr 2024 04:06:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712030810; cv=none; b=YuHyhNijLa1A2TQDgj482LAGJxzERgWHfCR88lCR4ODlZxexISnOAAY+/1hWmp75PaSyKMgjKTVkKCOAesvSA1M60p2QiaaIU+VYySzwI1JcsAo2M6X7oaPpKd7p6Cf4ZjshhEpf1xx+kRuXkZmImYaEUxb/IGeC9e5Vp1Czbf8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712030810; c=relaxed/simple; bh=cqq0rX5kfGKvJZHle23cnOIeKwCuzcmQ47251nGGIZs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VsYB7sOjtH9P2OHP5EMEl6aWlVlACu4wfUfqjeggEi6CSVmir5VSR4oa6zoNM8Bg10v+OH4oPt0qHerqehk0F2xuLxbyJ58WHcX/p20OS1OsBSy7LWl/MDeCEkGgOHi0knL6UmL1VwGfVQQf7AU0vcqKWo3HoCxY9H8npyQNeTA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NnXJMWyD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A80DBC433C7; Tue, 2 Apr 2024 04:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712030810; bh=cqq0rX5kfGKvJZHle23cnOIeKwCuzcmQ47251nGGIZs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NnXJMWyD3zzSj5MO91Jf5eMslBoHsCI3QFd3NSVN4tQ83JY42I/bvsHWIU2/J2gxT YIMUbvdBuL8SoQb0YbB5aTlvVLYQ6BMZGjMHWiusYkVHIdJeTIc37LIjyQOpq89FfT QR4PU8JG/TITIs0y3F5qdNwYz5xnOk7IGkvVvl8dHwDrsfEuneieYm9vNT7La5RXoW a968jf/Ut5QJxhvFMLSyDRQey1/SzUYG2pQRjR7o8baseln3wkaM4yWiB2K3vArFHv c5c0p3AJ7+Jps3jIetlTKyBLGJsfs4pyPEZ/ErIFqaUgglVSnQalPfbTE+cilrpdJP 2v+RTGLtnddCg== Date: Tue, 2 Apr 2024 09:36:41 +0530 From: Manivannan Sadhasivam To: Luca Weiss Cc: Manivannan Sadhasivam , Nitin Rawat , Andy Gross , Bjorn Andersson , Konrad Dybcio , Alim Akhtar , Avri Altman , Bart Van Assche , Rob Herring , Krzysztof Kozlowski , Conor Dooley , cros-qcom-dts-watchers@chromium.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 soc Message-ID: <20240402040641.GA2933@thinkpad> References: <20231204-sc7280-ufs-v5-0-926ceed550da@fairphone.com> <20231204-sc7280-ufs-v5-2-926ceed550da@fairphone.com> <621388b9-dcee-4af2-9763-e5d623d722b7@quicinc.com> <20231204172829.GA69580@thinkpad> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Mar 22, 2024 at 08:59:12AM +0100, Luca Weiss wrote: > On Mon Dec 4, 2023 at 6:28 PM CET, Manivannan Sadhasivam wrote: > > On Mon, Dec 04, 2023 at 01:21:42PM +0100, Luca Weiss wrote: > > > On Mon Dec 4, 2023 at 1:15 PM CET, Nitin Rawat wrote: > > > > > > > > > > > > On 12/4/2023 3:54 PM, Luca Weiss wrote: > > > > > From: Nitin Rawat > > > > > > > > > > Add UFS host controller and PHY nodes for sc7280 soc. > > > > > > > > > > Signed-off-by: Nitin Rawat > > > > > Reviewed-by: Konrad Dybcio > > > > > Tested-by: Konrad Dybcio # QCM6490 FP5 > > > > > [luca: various cleanups and additions as written in the cover letter] > > > > > Signed-off-by: Luca Weiss > > > > > --- > > > > > arch/arm64/boot/dts/qcom/sc7280.dtsi | 74 +++++++++++++++++++++++++++++++++++- > > > > > 1 file changed, 73 insertions(+), 1 deletion(-) > > > > > > > > > > diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi > > > > > index 04bf85b0399a..8b08569f2191 100644 > > > > > --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi > > > > > +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi > > > > > @@ -15,6 +15,7 @@ > > > > > #include > > > > > #include > > > > > #include > > > > > +#include > > > > > #include > > > > > #include > > > > > #include > > > > > @@ -906,7 +907,7 @@ gcc: clock-controller@100000 { > > > > > clocks = <&rpmhcc RPMH_CXO_CLK>, > > > > > <&rpmhcc RPMH_CXO_CLK_A>, <&sleep_clk>, > > > > > <0>, <&pcie1_phy>, > > > > > - <0>, <0>, <0>, > > > > > + <&ufs_mem_phy 0>, <&ufs_mem_phy 1>, <&ufs_mem_phy 2>, > > > > > <&usb_1_qmpphy QMP_USB43DP_USB3_PIPE_CLK>; > > > > > clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk", > > > > > "pcie_0_pipe_clk", "pcie_1_pipe_clk", > > > > > @@ -2238,6 +2239,77 @@ pcie1_phy: phy@1c0e000 { > > > > > status = "disabled"; > > > > > }; > > > > > > > > > > + ufs_mem_hc: ufs@1d84000 { > > > > > + compatible = "qcom,sc7280-ufshc", "qcom,ufshc", > > > > > + "jedec,ufs-2.0"; > > > > > + reg = <0x0 0x01d84000 0x0 0x3000>; > > > > > + interrupts = ; > > > > > + phys = <&ufs_mem_phy>; > > > > > + phy-names = "ufsphy"; > > > > > + lanes-per-direction = <2>; > > > > > + #reset-cells = <1>; > > > > > + resets = <&gcc GCC_UFS_PHY_BCR>; > > > > > + reset-names = "rst"; > > > > > + > > > > > + power-domains = <&gcc GCC_UFS_PHY_GDSC>; > > > > > + required-opps = <&rpmhpd_opp_nom>; > > > > > + > > > > > + iommus = <&apps_smmu 0x80 0x0>; > > > > > + dma-coherent; > > > > > + > > > > > + interconnects = <&aggre1_noc MASTER_UFS_MEM QCOM_ICC_TAG_ALWAYS > > > > > + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, > > > > > + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS > > > > > + &cnoc2 SLAVE_UFS_MEM_CFG QCOM_ICC_TAG_ALWAYS>; > > > > > + interconnect-names = "ufs-ddr", "cpu-ufs"; > > > > > + > > > > > + clocks = <&gcc GCC_UFS_PHY_AXI_CLK>, > > > > > + <&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>, > > > > > + <&gcc GCC_UFS_PHY_AHB_CLK>, > > > > > + <&gcc GCC_UFS_PHY_UNIPRO_CORE_CLK>, > > > > > + <&rpmhcc RPMH_CXO_CLK>, > > > > > + <&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>, > > > > > + <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>, > > > > > + <&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>; > > > > > + clock-names = "core_clk", > > > > > + "bus_aggr_clk", > > > > > + "iface_clk", > > > > > + "core_clk_unipro", > > > > > + "ref_clk", > > > > > + "tx_lane0_sync_clk", > > > > > + "rx_lane0_sync_clk", > > > > > + "rx_lane1_sync_clk"; > > > > > + freq-table-hz = > > > > > + <75000000 300000000>, > > > > > + <0 0>, > > > > > + <0 0>, > > > > > + <75000000 300000000>, > > > > > + <0 0>, > > > > > + <0 0>, > > > > > + <0 0>, > > > > > + <0 0>; > > > > > + status = "disabled"; > > > > > + }; > > > > > + > > > > > + ufs_mem_phy: phy@1d87000 { > > > > > + compatible = "qcom,sc7280-qmp-ufs-phy"; > > > > > + reg = <0x0 0x01d87000 0x0 0xe00>; > > > > > + clocks = <&rpmhcc RPMH_CXO_CLK>, > > > > > + <&gcc GCC_UFS_PHY_PHY_AUX_CLK>, > > > > > + <&gcc GCC_UFS_1_CLKREF_EN>; > > > > > + clock-names = "ref", "ref_aux", "qref"; > > > > > + > > > > > + power-domains = <&gcc GCC_UFS_PHY_GDSC>; > > > > > > Hi Nitin, > > > > > > > > > > > GCC_UFS_PHY_GDSC is UFS controller GDSC. For sc7280 Phy we don't need this. > > > > > > In the current dt-bindings the power-domains property is required. > > > > > > Is there another power-domain for the PHY to use, or do we need to > > > adjust the bindings to not require power-domains property for ufs phy on > > > sc7280? > > > > > > > PHYs are backed by MX power domain. So you should use that. > > > > > Also, with "PHY" in the name, it's interesting that this is not for the > > > phy ;) > > > > > > > Yes, confusing indeed. But the controllers (PCIe, UFS, USB etc...) are backed by > > GDSCs and all the analog components (PHYs) belong to MX domain since it is kind > > of always ON. > > > > I'll submit a series to fix this for the rest of the SoCs. > > Hi Mani, > > Did you get around to sending such series? > Sorry not yet. I wanted to send this series after the cleanup of AUX_CLK, but that got stalled due to different reasons. Let me try to send this one asap. - Mani > This would also fix some binding warnings, e.g. on SM6350. > > arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dtb: phy@1d87000: 'power-domains' is a required property > from schema $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-ufs-phy.yaml# > > Regards > Luca > > > > > > - Mani > > > > > Regards > > > Luca > > > > > > > > > > > > + > > > > > + resets = <&ufs_mem_hc 0>; > > > > > + reset-names = "ufsphy"; > > > > > + > > > > > + #clock-cells = <1>; > > > > > + #phy-cells = <0>; > > > > > + > > > > > + status = "disabled"; > > > > > + }; > > > > > + > > > > > ipa: ipa@1e40000 { > > > > > compatible = "qcom,sc7280-ipa"; > > > > > > > > > > > > > > -- மணிவண்ணன் சதாசிவம்