From: Stephen Boyd <sboyd@kernel.org>
To: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: agross@kernel.org, bjorn.andersson@linaro.org,
marc.w.gonzalez@free.fr, mturquette@baylibre.com,
robh+dt@kernel.org, mark.rutland@arm.com,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v6 4/6] dt-bindings: clock: Add support for the MSM8998 mmcc
Date: Thu, 07 Nov 2019 22:42:07 -0800 [thread overview]
Message-ID: <20191108064207.E978C21D7E@mail.kernel.org> (raw)
In-Reply-To: <7f3697ae-2e12-f306-b288-4dec19544275@codeaurora.org>
Quoting Jeffrey Hugo (2019-11-07 14:35:21)
> On 11/7/2019 2:55 PM, Stephen Boyd wrote:
> > Quoting Jeffrey Hugo (2019-10-01 12:57:22)
> >> diff --git a/Documentation/devicetree/bindings/clock/qcom,mmcc.txt b/Documentation/devicetree/bindings/clock/qcom,mmcc.txt
> >> index 8b0f7841af8d..a92f3cbc9736 100644
> >> --- a/Documentation/devicetree/bindings/clock/qcom,mmcc.txt
> >> +++ b/Documentation/devicetree/bindings/clock/qcom,mmcc.txt
> >
> >>
> >> - reg : shall contain base register location and length
> >> - #clock-cells : shall contain 1
> >> - #reset-cells : shall contain 1
> >>
> >> +For MSM8998 only:
> >> + - clocks: a list of phandles and clock-specifier pairs,
> >> + one for each entry in clock-names.
> >> + - clock-names: "xo" for the xo clock.
> >> + "gpll0" for the global pll 0 clock.
> >> + "dsi0dsi" for the dsi0 pll dsi clock (required if dsi is
> >> + enabled, optional otherwise).
> >> + "dsi0byte" for the dsi0 pll byte clock (required if dsi
> >> + is enabled, optional otherwise).
> >> + "dsi1dsi" for the dsi1 pll dsi clock (required if dsi is
> >> + enabled, optional otherwise).
> >> + "dsi1byte" for the dsi1 pll byte clock (required if dsi
> >> + is enabled, optional otherwise).
> >> + "hdmipll" for the hdmi pll clock (required if hdmi is
> >> + enabled, optional otherwise).
> >> + "dpvco" for the displayport pll vco clock (required if
> >> + dp is enabled, optional otherwise).
> >> + "dplink" for the displayport pll link clock (required if
> >> + dp is enabled, optional otherwise).
> >
> > I'm not sure why it's optional. The hardware is "fixed" in the sense
> > that the dp phy is always there and connected to this hardware block.
> > From a driver perspective I agree it's optional to be used, but from a
> > DT perspective it's always there so it should be required.
> >
>
> Sure, the DP phy is technically always there, but does a particular
> platform have an actual DP output connected to the phy? If not, why
> bother describing something that isn't even used?
If the DP phy isn't connected then having it be marked as status =
"disabled" is the typical approach to the problem. I agree it may not be
used on some particular board using the SoC, but this is an SoC that is
made once so we should be able to describe it regardless of how it's
used by some board.
>
> From a more practical sense its undefined how to actually get the DP
> clocks - the DP binding is implicitly a clock provider since it has
> #clock-cells, but it doesn't specify how to actually get the clocks.
> The DSI binding tells you which index is the dsi clock, and which is the
> byte clock.
>
> The HDMI binding is not a clock provider at all. Needs to be revised,
> which didn't appear trivial when I took a quick look while working on mmcc.
>
> I want to do the right thing here by specifying all the external clocks
> up front, and not have to worry about backwards compatibility with
> pre-existing DTs later on, but I also would like to focus on one problem
> at a time, and not go dig into all the problems with DP/HDMI before
> landing this, particularly as those components also rely on the mmcc.
>
> Is that justification enough for you? If not, how would you like to
> proceed? Make them required in the binding, and just have an invalid
> (per the binding) DT until all the problems get sorted out?
>
If we can make the clks 'required' and not cause the DTS checker system
to blow up then I'll be happy.
I hope we can have a property like:
clocks = <&gcc KNOWN_CLK>, <0>, <0>, <&dp_phy 1>;
where <0> means "I don't know right now", and that will be enough to
please the checker and can be filled in later on when we sort out the
HDMI and DP bindings. If this doesn't work then I guess I'll just have
to get over it and complain to Rob Herring.
next prev parent reply other threads:[~2019-11-08 6:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-01 19:54 [PATCH v6 0/6] MSM8998 Multimedia Clock Controller Jeffrey Hugo
2019-10-01 19:55 ` [PATCH v6 1/6] dt-bindings: clock: Document external clocks for MSM8998 gcc Jeffrey Hugo
2019-11-07 21:47 ` Stephen Boyd
2019-11-07 22:21 ` Jeffrey Hugo
2019-10-01 19:56 ` [PATCH v6 2/6] arm64: dts: msm8998: Add xo clock to gcc node Jeffrey Hugo
2019-10-01 19:57 ` [PATCH v6 3/6] clk: qcom: smd: Add XO clock for MSM8998 Jeffrey Hugo
2019-11-07 21:50 ` Stephen Boyd
2019-10-01 19:57 ` [PATCH v6 4/6] dt-bindings: clock: Add support for the MSM8998 mmcc Jeffrey Hugo
2019-11-07 21:55 ` Stephen Boyd
2019-11-07 22:35 ` Jeffrey Hugo
2019-11-08 6:42 ` Stephen Boyd [this message]
2019-10-01 19:57 ` [PATCH v6 5/6] clk: qcom: Add MSM8998 Multimedia Clock Controller (MMCC) driver Jeffrey Hugo
2019-10-01 19:58 ` [PATCH v6 6/6] arm64: dts: qcom: msm8998: Add mmcc node Jeffrey Hugo
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=20191108064207.E978C21D7E@mail.kernel.org \
--to=sboyd@kernel.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=jhugo@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.w.gonzalez@free.fr \
--cc=mark.rutland@arm.com \
--cc=mturquette@baylibre.com \
--cc=robh+dt@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).