linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: karthik poduval <karthik.poduval@gmail.com>
To: Helen Koike <helen@koikeco.de>
Cc: Robin Murphy <robin.murphy@arm.com>,
	Helen Koike <helen.koike@collabora.com>,
	Johan Jonker <jbx6244@gmail.com>, Rob Herring <robh@kernel.org>,
	heiko@sntech.de, devicetree@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	Ezequiel Garcia <ezequiel@collabora.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH v2 3/3] ARM: dts: rockchip: add rk3288 ISP and DPHY
Date: Thu, 2 Jul 2020 12:19:03 -0700	[thread overview]
Message-ID: <CAFP0Ok-cba3S+bSOf72VwWzye-mbcbOFizTKzuwgw+_4gsHbrQ@mail.gmail.com> (raw)
In-Reply-To: <1598ce27-2456-aaa6-0984-080fed778312@koikeco.de>

I like the suggestion from Robin, drivers care about board clock
categories and don't need to specify the SoC specific clocks. But it
still looks like we are putting a union of all clocks based on current
and future versions of the ISP IP in the yaml. Is it necessary to list
them out at all ? Can't driver's simply get them from the device tree
as indexes instead of names using "of_clk_get". In that case does the
dts yaml need to check for the number of clocks per SoC variant ?

--
Regards,
Karthik Poduval

On Thu, Jul 2, 2020 at 12:17 PM Helen Koike <helen@koikeco.de> wrote:
>
> Hi Robin,
>
> On 7/2/20 2:32 PM, Robin Murphy wrote:
> > On 2020-07-02 17:27, Helen Koike wrote:
> > [...]
> >> I suggest this:
> >>
> >>    clocks:
> >>      maxItems: 5
> >>      minItems: 3
> >>      description:
> >>        rk3288 clocks
> >>          ISP clock
> >>          ISP AXI clock
> >>          ISP AHB clock
> >>          ISP Pixel clock
> >>          ISP JPEG source clock
> >>        rk3399 isp0 clocks
> >>          ISP clock
> >>          ISP AXI wrapper clock
> >>          ISP AHB wrapper clock
> >>        rk3399 isp1 clocks
> >>          ISP clock
> >>          ISP AXI wrapper clock
> >>          ISP AHB wrapper clock
> >>          ISP Pixel wrapper clock
> >>
> >>    clock-names:
> >>      oneOf:
> >>        # rk3288 clocks
> >>        - items:
> >>          - const: clk_isp
> >>          - const: aclk_isp
> >>          - const: hclk_isp
> >>          - const: pclk_isp_in
> >>          - const: sclk_isp_jpe
> >>        # rk3399 isp0 clocks
> >>        - items:
> >>          - const: clk_isp
> >>          - const: aclk_isp_wrap
> >>          - const: hclk_isp_wrap
> >>        # rk3399 isp1 clocks
> >>        - items:
> >>          - const: clk_isp
> >>          - const: aclk_isp_wrap
> >>          - const: hclk_isp_wrap
> >>          - const: pclk_isp_wrap
> >
> > FWIW this looks a little more involved than it might need to be. Ideally we're describing things from the point of view of what inputs the device itself wants, so the details of exactly *how* a particular SoC's clock tree delivers them shouldn't matter to the binding, only to the actual clock specifier values ultimately given in the DT.
> >
> > From the ISP's PoV, it seems like we've got the fairly standard core clock, ACLK and HCLK trio, plus a pixel clock for RK3288 and RK3399 ISP1, plus a JPEG source clock for RK3288. I'd be inclined to model that as simply something like:
> >
> >     clock-names:
> >       minItems: 3
> >       maxItems: 5
> >       items:
> >       - const: isp
> >       - const: aclk
> >       - const: hclk
> >       - const: pclk
> >       - const: sclk_jpe
> >
> > Plus then not only do we have a nice clean binding, but we avoid all the unnecessary faff of having to deal with the "same" clocks by different names in drivers, and sidestep the conundrum of what to do when the next SoC comes along providing the basic ISP clocks from yet again slightly-differently-named branches of its clock tree.
>
> I agree this is cleaner, thanks for this suggestions, I just submitted a new version
> following this https://patchwork.linuxtv.org/project/linux-media/list/?series=2844
>
> Thanks
> Helen
>
> >
> > Robin.



-- 
Regards,
Karthik Poduval

      reply	other threads:[~2020-07-02 19:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06  7:30 [PATCH v2 0/3] Add Rockchip RK3288 support Karthik Poduval
2020-04-06  7:30 ` [PATCH v2 1/3] media: staging: phy-rockchip-dphy-rx0: add rk3288 support to DPHY driver Karthik Poduval
2020-04-06 16:56   ` Helen Koike
2020-04-07  0:27   ` Ezequiel Garcia
2020-04-06  7:30 ` [PATCH v2 2/3] media: staging: rkisp1: add rk3288 support Karthik Poduval
2020-04-06 16:57   ` Helen Koike
2020-04-06  7:30 ` [PATCH v2 3/3] ARM: dts: rockchip: add rk3288 ISP and DPHY Karthik Poduval
2020-04-06 16:57   ` Helen Koike
2020-04-09  1:19   ` Johan Jonker
2020-04-12  5:13     ` karthik poduval
     [not found]       ` <CAFP0Ok9XGzVbghbnOOyfXiOOc5-a94uFRu7sD5wXz9sr-+AYEA@mail.gmail.com>
2020-04-23 11:12         ` Johan Jonker
2020-05-14 13:19           ` karthik poduval
2020-07-02 16:27           ` Helen Koike
2020-07-02 17:32             ` Robin Murphy
2020-07-02 19:16               ` Helen Koike
2020-07-02 19:19                 ` karthik poduval [this message]

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=CAFP0Ok-cba3S+bSOf72VwWzye-mbcbOFizTKzuwgw+_4gsHbrQ@mail.gmail.com \
    --to=karthik.poduval@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ezequiel@collabora.com \
    --cc=heiko@sntech.de \
    --cc=helen.koike@collabora.com \
    --cc=helen@koikeco.de \
    --cc=jbx6244@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh@kernel.org \
    --cc=robin.murphy@arm.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).