From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Nitin Rawat <quic_nitirawa@quicinc.com>,
Manivannan Sadhasivam <mani@kernel.org>,
Luca Weiss <luca.weiss@fairphone.com>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
Bart Van Assche <bvanassche@acm.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
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
Date: Tue, 5 Dec 2023 13:00:33 +0200 [thread overview]
Message-ID: <2d791b1c-283c-4f24-80e0-efaf3756955f@linaro.org> (raw)
In-Reply-To: <2c996304-f82f-5311-3d88-d459c07ef741@quicinc.com>
On 05/12/2023 10:45, Nitin Rawat wrote:
>
>
> On 12/4/2023 10:58 PM, 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 <quic_nitirawa@quicinc.com>
>>>>>
>>>>> Add UFS host controller and PHY nodes for sc7280 soc.
>>>>>
>>>>> Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
>>>>> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>>>>> Tested-by: Konrad Dybcio <konrad.dybcio@linaro.org> # QCM6490 FP5
>>>>> [luca: various cleanups and additions as written in the cover letter]
>>>>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
>>>>> ---
>>>>> 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 <dt-bindings/dma/qcom-gpi.h>
>>>>> #include <dt-bindings/firmware/qcom,scm.h>
>>>>> #include <dt-bindings/gpio/gpio.h>
>>>>> +#include <dt-bindings/interconnect/qcom,icc.h>
>>>>> #include <dt-bindings/interconnect/qcom,osm-l3.h>
>>>>> #include <dt-bindings/interconnect/qcom,sc7280.h>
>>>>> #include <dt-bindings/interrupt-controller/arm-gic.h>
>>>>> @@ -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 = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
>>>>> + 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.
>>
>> - Mani
>>
>
> Hi Mani,
>
> UFS Phy is a passive driver and its resource enable/disable is
> controlled by UFS controller driver.
>
> Since PHY belongs to MX domain which is always on. IMO, there is no need
> for explicitly voting for MX domain for sc7280 and older targets.
>
> Only starting SM8550, we have a separate UFS PHY GDSC which needs to be
> voted for enabling or disabling and hence we need to have power-domain
> property for SM8550.
>
> Hence, I feel updating the binding to reflect that power-domains is not
> a required field would be more correct.
The bindings should describe the hardware. We model the MX domain, so
the MX domain should be used in cases where the device is powered by
that domain.
>
>
> Regards,
> Nitin
>
>
>
>>> 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";
>>>>>
>>>
>>
>
--
With best wishes
Dmitry
next prev parent reply other threads:[~2023-12-05 11:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-04 10:24 [PATCH v5 0/3] Add UFS host controller and Phy nodes for sc7280 Luca Weiss
2023-12-04 10:24 ` [PATCH v5 1/3] scsi: ufs: qcom: dt-bindings: Add SC7280 compatible string Luca Weiss
2023-12-04 10:24 ` [PATCH v5 2/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 soc Luca Weiss
2023-12-04 12:15 ` Nitin Rawat
2023-12-04 12:21 ` Luca Weiss
2023-12-04 17:27 ` Nitin Rawat
2023-12-04 17:28 ` Manivannan Sadhasivam
2023-12-05 7:51 ` Luca Weiss
2023-12-05 12:52 ` Manivannan Sadhasivam
2023-12-05 8:45 ` Nitin Rawat
2023-12-05 11:00 ` Dmitry Baryshkov [this message]
2024-03-22 7:59 ` Luca Weiss
2024-04-02 4:06 ` Manivannan Sadhasivam
2023-12-04 10:24 ` [PATCH v5 3/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 IDP board Luca Weiss
2023-12-04 12:15 ` [PATCH v5 0/3] Add UFS host controller and Phy nodes for sc7280 Nitin Rawat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2d791b1c-283c-4f24-80e0-efaf3756955f@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=andersson@kernel.org \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=conor+dt@kernel.org \
--cc=cros-qcom-dts-watchers@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=luca.weiss@fairphone.com \
--cc=mani@kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=quic_nitirawa@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®