devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Aradhya Bhatia <a-bhatia1@ti.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: Samuel Holland <samuel@sholland.org>,
	Maxime Ripard <mripard@kernel.org>,
	Linux Clock List <linux-clk@vger.kernel.org>,
	Devicetree List <devicetree@vger.kernel.org>,
	Linux Kernel List <linux-kernel@vger.kernel.org>,
	Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
	Devarsh Thakkar <devarsht@ti.com>, Jai Luthra <j-luthra@ti.com>
Subject: Re: [PATCH 1/2] dt-bindings: clock: fixed-factor: Add TI AM62 SoC OLDI clock
Date: Wed, 25 Jan 2023 16:06:49 -0800	[thread overview]
Message-ID: <f324c845f0d291d041a13046a349ae95.sboyd@kernel.org> (raw)
In-Reply-To: <367fba29-bc08-1f27-249c-09e406adfbbb@ideasonboard.com>

Quoting Tomi Valkeinen (2023-01-17 01:40:24)
> On 16/01/2023 11:51, Aradhya Bhatia wrote:
> > Hi Stephen,
> > 
> > Thanks for taking a look at the patch.
> > 
> > On 12-Jan-23 01:14, Stephen Boyd wrote:
> >> Quoting Aradhya Bhatia (2022-12-26 01:57:44)
> >>> Add "ti,k3-am62-oldi-clk-div" to the fixed factor clock compatible enum
> >>> list.
> >>>
> >>> "ti,k3-am62-oldi-clk-div" is a fixed-factor clock that helps the TI
> >>> display subsystem request a pixel clock for itself and a corresponding
> >>> serial clock for its OLDI Transmitters. The serial clock is 7 times the
> >>> pixel clock. This clock needs the clock set rate request to be
> >>> propagated to the parent clock provider.
> >>>
> >>> Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
> >>> ---
> >>>   Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml | 1 +
> >>>   1 file changed, 1 insertion(+)
> >>>
> >>> diff --git 
> >>> a/Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml 
> >>> b/Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml
> >>> index 8f71ab300470..0696237530f7 100644
> >>> --- a/Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml
> >>> +++ b/Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml
> >>> @@ -14,6 +14,7 @@ properties:
> >>>     compatible:
> >>>       enum:
> >>>         - fixed-factor-clock
> >>> +      - ti,k3-am62-oldi-clk-div
> >>
> >> I don't see this compatible anywhere in the kernel tree. Is there a
> >> patch that adds a node using this? I wonder why the display subsystem
> >> can't add this fixed factor clk directly in the driver. Does the OLDI
> >> Transmitter send a clk to the display subsystem?
> >>
> >> I'm asking all these questions because we got rid of vendor compatibles
> >> here in hopes of simplifying the logic. Maybe the problem can be
> >> approached differently, but I don't know all the details.
> > 
> > 
> > +--------+                       +------------------+
> > |        |                       |                  |
> > |  PLL   +---+----+------------->| OLDI Transmitter |
> > |        |   |    |              |                  |
> > +--------+   |    |              +------------------+
> >               |    |
> >               |    |              +------------------+
> >               |    |              |                  |
> >               |    +------------->| OLDI Transmitter |
> >               |                   |                  |
> >               |                   +------------------+
> >               |
> >               |                   +------------------+
> >               |   +----------+    |                  |
> >               |   |    /7    |    |      Display     |
> >               +-->|   Clock  +--->| Sub-System (DSS) |
> >                   |    Div   |    |                  |
> >                   +----------+    +------------------+
> > 
> > This is how the the clock architecture for DSS looks like.
> > 
> > The clock divider is not a part of DSS, but outside it.

The divider is fixed as well? And presumably inside the SoC?

> > 
> > The clock request flow is initiated by the DSS driver because it has the
> > required timing parameter information. It requests a certain pixel
> > frequency. But the frequency required by the OLDI TXes is 7 times
> > that pixel frequency.
> > 
> > (Just for clarification, in some cases, the OLDI TX does require only
> > 3.5 times the pixel frequency, but in those situations there is another
> > divider in-front of OLDI TX that gets activated with a signal and
> > divides the incoming frequency by 2, thereby requiring the PLL to still
> > generate a 7x frequency.)
> > 
> > Hence, the idea is that the clock divider is able to propagate the set
> > rate request back to PLL, asking for a frequency 7 times more than the
> > DSS's asking rate.

Got it. Can the PLL driver provide a pll_div_7 clk that is used for the
DSS pixel clk?

> > 
> > If this is something less than ideal and should not go up, then I can
> > implement a new clock device with a separate but similar clock driver.
> > 
> > Let me know what you think!
> 
> As a clarification I would also add to the above that on other TI SoCs 
> with DSS, and also for the second video port on AM62, the clock 
> framework provides DSS a clock using the pclk frequency.
> 

Are you saying that adding a fixed div-7 clk in the DSS driver is wrong?

  reply	other threads:[~2023-01-26  0:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-26  9:57 [PATCH 0/2] Re-introduce parent clock-rate set for fixed-factor clock Aradhya Bhatia
2022-12-26  9:57 ` [PATCH 1/2] dt-bindings: clock: fixed-factor: Add TI AM62 SoC OLDI clock Aradhya Bhatia
2022-12-26 22:03   ` Rob Herring
2023-01-11 19:44   ` Stephen Boyd
2023-01-16  9:51     ` Aradhya Bhatia
2023-01-17  9:40       ` Tomi Valkeinen
2023-01-26  0:06         ` Stephen Boyd [this message]
2023-02-06  5:34           ` Aradhya Bhatia
2023-02-17 22:32             ` Stephen Boyd
2022-12-26  9:57 ` [PATCH 2/2] clk: fixed-factor: Re-introduce support for clocks to set parent clock-rate Aradhya Bhatia

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=f324c845f0d291d041a13046a349ae95.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=a-bhatia1@ti.com \
    --cc=devarsht@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=j-luthra@ti.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=nm@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=samuel@sholland.org \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=vigneshr@ti.com \
    /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).