Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp257537rdb; Tue, 5 Dec 2023 04:52:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlt6ONsNp11VXdd0wU/A5qZxCtvapQ4p2U3HL0JZP1oJCIA7LznCAMRi54D90plv5ISA7c X-Received: by 2002:a17:90b:1b07:b0:286:6cc0:8845 with SMTP id nu7-20020a17090b1b0700b002866cc08845mr751913pjb.50.1701780759099; Tue, 05 Dec 2023 04:52:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701780759; cv=none; d=google.com; s=arc-20160816; b=h7pHSwxAEHWS2gM+kA1n9IO+d7DBld852aF9aZ6b+f15ygyZfI8reUUwChIydDBuJI W3zTq7tiL75EF7evHof3lHUg/TTilUfLUGULpHZNi2bzkILAiyKwrSxAFOSKX9TkqpVw XlKnVqdvPUVKdyTZdepS3d9TOvSgTH2wL93J67Ts96yhSMkOZZJ3mr2oF7R3hf2+WLsI BA3qZNRWXCV6pu20g1HCniqwU5wVCZosaBJjqrjgrT6kg7efBolm8obP/wqszzJUF92Q SgRLSc0oAPbnBzLxFux8mcq4JCerYZhf1tgm9h/VQiH50Ykas//8FftVAxj007CfgCPh qOPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=agTpHN4oGgnH0LrPMu7Lf3PnSP45w6HB/Tmb/y9juk4=; fh=dYRn8nU9JzKNa/9SL5DEA5vNWjHxjO+b5rRGByJLBR0=; b=icwLQnV0mZSCZF3KCRWuxWBh06V9q/rMPNWwtCt7itj2YMj82TAmoNhL+4qNG/EyHX T4s8b+ZYdWBIFjfpkRZJgaaOgdPEaEyhvLZC15Z3Ege5edA93r2OHDsFVmPd0bAeEKXt /ZIEF2AKHd+YvePQp7KZKi8PtY9CT1OQEUPGwhUSHRZQ5feTofHtFJBRpSnkWvNPCBOE 2QIfXWFtC03/EjAZjkOL13Oo1CKHXUZZ1cHDii+xz0Fi+6GtqNbxx5GlHbBHRmoE1H34 usvOCoYKo9D/lROzTB+p0PYxzgLB3y3qDAjpdgo4Y8JZ/0b5lYDg0plaLQgKZlshhg3H +mdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dslG6bDO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id qi13-20020a17090b274d00b002860ab2ad3dsi9687597pjb.57.2023.12.05.04.52.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 04:52:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dslG6bDO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0376080C1119; Tue, 5 Dec 2023 04:52:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345320AbjLEMw2 (ORCPT + 99 others); Tue, 5 Dec 2023 07:52:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345280AbjLEMw0 (ORCPT ); Tue, 5 Dec 2023 07:52:26 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1ECEA0 for ; Tue, 5 Dec 2023 04:52:32 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B31E0C433C8; Tue, 5 Dec 2023 12:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701780752; bh=6OBtOvpyrx0wR/KfCMCttoDVEX6P49xuNZ+3YdQODp8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dslG6bDOrwrTyl6vp44aPHWUHLlJ/2JZtiQINypEYJ7wyuFWkCCmtiHLH1AgFPoJf 5PKDllxff8XfWof763DKBaWf50/QUTpxD0HO+Vc4LiFZTIX5BMlJ8MBAdIxfQSZXnZ YrMUEg+VcD7BOujNZwCHN0Og2q+lddUC7mHiX56hoh/yxuPxTD33C/5JPdVrYjvrL4 /2zKIez1jDnH6aWIzkOWPiAj/w6xCgoBMon/+6lcHkvdRHoLZnuAn8BtTXLE4Ji2xf sRegasgnca3c/1e38Awrn028ADeyKbMAKYQkTGmw7oa+Zruvse270rL7BgSH2dHEup vT6aTXveaUrsw== Date: Tue, 5 Dec 2023 18:22:16 +0530 From: Manivannan Sadhasivam To: Luca Weiss Cc: 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: <20231205125216.GA3208@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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 04:52:38 -0800 (PST) On Tue, Dec 05, 2023 at 08:51:05AM +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. > > Sounds reasonable (though I understand little how the SoC is wired up > internally). > I digged a bit more and found that the new SoCs (SM8550, etc,...) has separate GDSC for PHY and UFS HC. So for those SoCs, we should use the respective GDSC as the power domain. But for old SoCs like this one, we should use MX as the power domain. > > > > > 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. > > Great! > > So I'll send v6 with power-domains = <&rpmhpd SC7280_MX>; for the phy. > Sounds good. - Mani > 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"; > > > > > > > > > > > > > > -- மணிவண்ணன் சதாசிவம்