linux-phy.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Varadarajan Narayanan <quic_varada@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: <agross@kernel.org>, <andersson@kernel.org>,
	<konrad.dybcio@linaro.org>, <vkoul@kernel.org>,
	<kishon@kernel.org>, <robh+dt@kernel.org>,
	<krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>,
	<gregkh@linuxfoundation.org>, <catalin.marinas@arm.com>,
	<will@kernel.org>, <mturquette@baylibre.com>, <sboyd@kernel.org>,
	<p.zabel@pengutronix.de>, <arnd@arndb.de>,
	<geert+renesas@glider.be>, <neil.armstrong@linaro.org>,
	<nfraprado@collabora.com>, <broonie@kernel.org>,
	<rafal@milecki.pl>, <quic_srichara@quicinc.com>,
	<quic_varada@quicinc.org>, <quic_wcheng@quicinc.com>,
	<linux-arm-msm@vger.kernel.org>, <linux-phy@lists.infradead.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-usb@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-clk@vger.kernel.org>
Subject: Re: [PATCH 4/9] clk: qcom: ipq5332: Fix USB related clock defines
Date: Thu, 15 Jun 2023 11:32:40 +0530	[thread overview]
Message-ID: <20230615060239.GE22186@varda-linux.qualcomm.com> (raw)
In-Reply-To: <87810fde-c824-d494-17b3-b6ff34237bea@linaro.org>

On Wed, Jun 07, 2023 at 02:19:09PM +0300, Dmitry Baryshkov wrote:
> On 07/06/2023 13:56, Varadarajan Narayanan wrote:
> >Fix the USB related clock defines and add details
> >referenced by them
> >
> >Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> >---
> >  drivers/clk/qcom/gcc-ipq5332.c | 34 +++++++++++++++++++++++-----------
> >  1 file changed, 23 insertions(+), 11 deletions(-)
> >
> >diff --git a/drivers/clk/qcom/gcc-ipq5332.c b/drivers/clk/qcom/gcc-ipq5332.c
> >index a75ab88..2b58558 100644
> >--- a/drivers/clk/qcom/gcc-ipq5332.c
> >+++ b/drivers/clk/qcom/gcc-ipq5332.c
> >@@ -351,6 +351,16 @@ static const struct freq_tbl ftbl_gcc_adss_pwm_clk_src[] = {
> >  	{ }
> >  };
> >+static const struct clk_parent_data gcc_usb3phy_0_cc_pipe_clk_xo[] = {
> >+	{ .fw_name = "usb3phy_0_cc_pipe_clk" },
> >+	{ .fw_name = "xo" },
>
> gcc-ipq5332 uses DT indices, please don't mix that with .fw_name.
>
> >+};
> >+
> >+static const struct parent_map gcc_usb3phy_0_cc_pipe_clk_xo_map[] = {
> >+	{ P_USB3PHY_0_PIPE, 0 },
> >+	{ P_XO, 2 },
> >+};
> >+
> >  static struct clk_rcg2 gcc_adss_pwm_clk_src = {
> >  	.cmd_rcgr = 0x1c004,
> >  	.mnd_width = 0,
> >@@ -1101,16 +1111,18 @@ static struct clk_rcg2 gcc_usb0_mock_utmi_clk_src = {
> >  	},
> >  };
> >-static struct clk_regmap_phy_mux gcc_usb0_pipe_clk_src = {
> >+static struct clk_regmap_mux usb0_pipe_clk_src = {
> >  	.reg = 0x2c074,
> >+	.shift = 8,
> >+	.width = 2,
> >+	.parent_map = gcc_usb3phy_0_cc_pipe_clk_xo_map,
> >  	.clkr = {
> >-		.hw.init = &(struct clk_init_data) {
> >-			.name = "gcc_usb0_pipe_clk_src",
> >-			.parent_data = &(const struct clk_parent_data) {
> >-				.index = DT_USB_PCIE_WRAPPER_PIPE_CLK,
> >-			},
> >-			.num_parents = 1,
> >-			.ops = &clk_regmap_phy_mux_ops,
> >+		.hw.init = &(const struct clk_init_data){
> >+			.name = "usb0phy_0_cc_pipe_clk_src",
> >+			.parent_data = gcc_usb3phy_0_cc_pipe_clk_xo,
> >+			.num_parents = 2,
> >+			.ops = &clk_regmap_mux_closest_ops,
> >+			.flags = CLK_SET_RATE_PARENT,
> >  		},
>
> Soo... As you are reverting this. Is USB0 PIPE clock required to be parked
> to the XO? I was going to write 'before turning USB0_GDSC' off, but then I
> noticed that gcc-ipq5332 doesn't declare GDSCs. Does this platform have
> GDSCs?
>
> >  	},
> >  };
> >@@ -3041,8 +3053,8 @@ static struct clk_branch gcc_usb0_pipe_clk = {
> >  		.enable_mask = BIT(0),
> >  		.hw.init = &(const struct clk_init_data) {
> >  			.name = "gcc_usb0_pipe_clk",
> >-			.parent_hws = (const struct clk_hw*[]) {
> >-				&gcc_usb0_pipe_clk_src.clkr.hw,
> >+			.parent_names = (const char *[]){
> >+				"usb0_pipe_clk_src"
>
> complete and definitive NAK. Do not use parent_names, we have just stopped
> migrating from them.

Will drop changes to this file and post a new patch.

Thanks
Varada
> >  			},
> >  			.num_parents = 1,
> >  			.flags = CLK_SET_RATE_PARENT,
> >@@ -3580,7 +3592,7 @@ static struct clk_regmap *gcc_ipq5332_clocks[] = {
> >  	[GCC_PCIE3X2_PIPE_CLK_SRC] = &gcc_pcie3x2_pipe_clk_src.clkr,
> >  	[GCC_PCIE3X1_0_PIPE_CLK_SRC] = &gcc_pcie3x1_0_pipe_clk_src.clkr,
> >  	[GCC_PCIE3X1_1_PIPE_CLK_SRC] = &gcc_pcie3x1_1_pipe_clk_src.clkr,
> >-	[GCC_USB0_PIPE_CLK_SRC] = &gcc_usb0_pipe_clk_src.clkr,
> >+	[GCC_USB0_PIPE_CLK_SRC] = &usb0_pipe_clk_src.clkr,
> >  };
> >  static const struct qcom_reset_map gcc_ipq5332_resets[] = {
>
> --
> With best wishes
> Dmitry
>

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2023-06-15  6:03 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07 10:56 [PATCH 0/9] Enable IPQ5332 USB2 Varadarajan Narayanan
2023-06-07 10:56 ` [PATCH 1/9] dt-bindings: usb: dwc3: Add IPQ5332 compatible Varadarajan Narayanan
2023-06-07 18:33   ` Krzysztof Kozlowski
2023-06-15  4:15     ` Varadarajan Narayanan
2023-06-07 10:56 ` [PATCH 2/9] dt-bindings: phy: qcom,m31: Document qcom,m31 USB phy Varadarajan Narayanan
2023-06-07 11:37   ` Rob Herring
2023-06-07 18:31   ` Krzysztof Kozlowski
2023-06-15  5:27     ` Varadarajan Narayanan
2023-06-17  8:48       ` Krzysztof Kozlowski
2023-06-20  9:32         ` Varadarajan Narayanan
2023-06-21  8:43           ` Krzysztof Kozlowski
2023-06-21 10:12             ` Varadarajan Narayanan
2023-06-07 10:56 ` [PATCH 3/9] phy: qcom-m31: Introduce qcom,m31 USB phy driver Varadarajan Narayanan
2023-06-07 11:54   ` Konrad Dybcio
2023-06-07 12:29     ` Dmitry Baryshkov
2023-06-15  6:01       ` Varadarajan Narayanan
2023-06-15  5:49     ` Varadarajan Narayanan
2023-06-21 11:05     ` Vinod Koul
2023-06-07 10:56 ` [PATCH 4/9] clk: qcom: ipq5332: Fix USB related clock defines Varadarajan Narayanan
2023-06-07 11:19   ` Dmitry Baryshkov
2023-06-15  6:02     ` Varadarajan Narayanan [this message]
2023-06-07 10:56 ` [PATCH 5/9] phy: qcom-m31: Introduce qcom,m31 USB phy Varadarajan Narayanan
2023-06-07 11:20   ` Dmitry Baryshkov
2023-06-07 18:37     ` Krzysztof Kozlowski
2023-06-15  6:05       ` Varadarajan Narayanan
2023-06-07 10:56 ` [PATCH 6/9] phy: qcom: Add qcom,m31 USB phy driver Varadarajan Narayanan
2023-06-07 18:36   ` Krzysztof Kozlowski
2023-06-15  6:14     ` Varadarajan Narayanan
2023-06-07 10:56 ` [PATCH 7/9] arm64: dts: qcom: ipq5332: Add USB related nodes Varadarajan Narayanan
2023-06-07 11:23   ` Dmitry Baryshkov
2023-06-15  6:26     ` Varadarajan Narayanan
2023-06-07 18:24   ` Konrad Dybcio
2023-06-15  6:52     ` Varadarajan Narayanan
2023-06-07 18:35   ` Krzysztof Kozlowski
2023-06-15  7:17     ` Varadarajan Narayanan
2023-06-07 10:56 ` [PATCH 8/9] arm64: dts: qcom: ipq5332: Enable USB Varadarajan Narayanan
2023-06-07 10:56 ` [PATCH 9/9] arm64: defconfig: Enable QCOM M31 USB phy driver Varadarajan Narayanan
2023-06-07 18:36   ` Krzysztof Kozlowski
2023-06-15  8:37     ` Varadarajan Narayanan

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=20230615060239.GE22186@varda-linux.qualcomm.com \
    --to=quic_varada@quicinc.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=neil.armstrong@linaro.org \
    --cc=nfraprado@collabora.com \
    --cc=p.zabel@pengutronix.de \
    --cc=quic_srichara@quicinc.com \
    --cc=quic_varada@quicinc.org \
    --cc=quic_wcheng@quicinc.com \
    --cc=rafal@milecki.pl \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=vkoul@kernel.org \
    --cc=will@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).