driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Helen Koike <helen.koike@collabora.com>
Cc: "open list:STAGING SUBSYSTEM" <devel@driverdev.osuosl.org>,
	devicetree@vger.kernel.org, Eddie Cai <eddie.cai.linux@gmail.com>,
	Tomasz Figa <tfiga@chromium.org>,
	Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
	"heiko@sntech.de" <heiko@sntech.de>,
	Shunqian Zheng <zhengsq@rock-chips.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	karthik.poduval@gmail.com,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Robin Murphy <robin.murphy@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Collabora Kernel ML <kernel@collabora.com>,
	Ezequiel Garcia <ezequiel@collabora.com>,
	Johan Jonker <jbx6244@gmail.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH v5 5/9] media: staging: rkisp1: remove unecessary clocks
Date: Tue, 22 Sep 2020 08:24:20 -0600	[thread overview]
Message-ID: <CAL_Jsq+qB=yUtHKKujiUWrsq+W-3ggM3B_SuuDzfYEheczn=8g@mail.gmail.com> (raw)
In-Reply-To: <20200722155533.252844-6-helen.koike@collabora.com>

On Wed, Jul 22, 2020 at 9:56 AM Helen Koike <helen.koike@collabora.com> wrote:
>
> aclk_isp_wrap is a child of aclk_isp, and hclk_isp_wrap is a child of
> hclk_isp, thus we can remove parents from the list.
>
> Also, for the isp0, we only need the ISP clock, ACLK and HCLK.
> In the future we'll need a pixel clock for RK3288 and RK3399, and a JPEG
> clock for RK3288.
>
> So with the goal to cleanup the dt-bindings and remove it from staging,
> simplify clock names to isp, aclk and hclk.
>
> Assigned clocks are meant to refer to the full path in the clock tree,
> i.e. the leaf in the tree.
> For instance, in RK3399, the clock responsible for ACLK (ISP AXI CLOCK)
> is aclk_isp0_wrapper.
>
> For reference, this is the isp clock topology on RK3399:
>
>  xin24m
>     pll_npll
>        npll
>           clk_isp1
>           clk_isp0
>     pll_cpll
>        cpll
>           aclk_isp1
>              aclk_isp1_noc
>              hclk_isp1
>                 aclk_isp1_wrapper
>                 hclk_isp1_noc
>           aclk_isp0
>              hclk_isp1_wrapper
>              aclk_isp0_wrapper
>              aclk_isp0_noc
>              hclk_isp0
>                 hclk_isp0_wrapper
>                 hclk_isp0_noc
>  pclkin_isp1_wrapper
>
> Signed-off-by: Helen Koike <helen.koike@collabora.com>
>
> ---
> Changes in V5:
> - Use if/then schema as suggested by Rob Herring on
> https://patchwork.linuxtv.org/project/linux-media/patch/20200702191322.2639681-6-helen.koike@collabora.com/#119729
>
> Changes in V4:
> - update binding according to suggestion by Robin Murphy
> on https://patchwork.kernel.org/patch/11475007/
>
> Changes in V3:
> - this is a new patch in the series
> ---
>  .../bindings/media/rockchip-isp1.yaml         | 50 ++++++++++++-------
>  drivers/staging/media/rkisp1/rkisp1-dev.c     |  8 ++-
>  2 files changed, 36 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
> index 62a6b9c959498..23c677d15037a 100644
> --- a/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
> +++ b/drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml
> @@ -24,20 +24,10 @@ properties:
>      maxItems: 1
>
>    clocks:
> -    items:
> -      - description: ISP clock
> -      - description: ISP AXI clock clock
> -      - description: ISP AXI clock  wrapper clock
> -      - description: ISP AHB clock clock
> -      - description: ISP AHB wrapper clock
> +    minItems: 3

You need maxItems here too or it will always be 3.

>
>    clock-names:
> -    items:
> -      - const: clk_isp
> -      - const: aclk_isp
> -      - const: aclk_isp_wrap
> -      - const: hclk_isp
> -      - const: hclk_isp_wrap
> +    minItems: 3
>
>    iommus:
>      maxItems: 1
> @@ -116,6 +106,34 @@ required:
>    - power-domains
>    - ports
>
> +if:
> +  properties:
> +    compatible:
> +      contains:
> +        const: rockchip,rk3399-cif-isp
> +then:
> +  properties:
> +    clocks:
> +      maxItems: 4
> +      minItems: 3

For a single compatible you shouldn't really have a variable number of clocks.

> +      items:
> +        # isp0 and isp1
> +        - description: ISP clock
> +        - description: ISP AXI clock
> +        - description: ISP AHB clock
> +        # only for isp1
> +        - description: ISP Pixel clock
> +    clock-names:
> +      maxItems: 4
> +      minItems: 3
> +      items:
> +        # isp0 and isp1
> +        - const: isp
> +        - const: aclk
> +        - const: hclk
> +        # only for isp1
> +        - const: pclk_isp

Don't you need an 'else' clause. For not rockchip,rk3399-cif-isp,
there's no definition of what clocks there are.

Rob
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2020-09-22 14:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22 15:55 [PATCH v5 0/9] move Rockchip ISP bindings out of staging / add ISP DT nodes for RK3399 Helen Koike
2020-07-22 15:55 ` [PATCH v5 1/9] media: staging: dt-bindings: rkisp1: add missing required nodes Helen Koike
2020-09-18 14:02   ` Rob Herring
2020-07-22 15:55 ` [PATCH v5 2/9] media: staging: dt-bindings: rkisp1: drop i2c unit address Helen Koike
2020-09-18 14:03   ` Rob Herring
2020-07-22 15:55 ` [PATCH v5 3/9] media: staging: dt-bindings: rkisp1: re-order properties Helen Koike
2020-07-22 15:55 ` [PATCH v5 4/9] media: staging: dt-bindings: rkisp1: drop parent unit address Helen Koike
2020-09-18 14:04   ` Rob Herring
2020-07-22 15:55 ` [PATCH v5 5/9] media: staging: rkisp1: remove unecessary clocks Helen Koike
2020-09-22 14:24   ` Rob Herring [this message]
2020-10-14 16:46     ` Helen Koike
2020-10-20 15:14       ` Rob Herring
2020-10-21 13:54         ` Helen Koike
2020-07-22 15:55 ` [PATCH v5 6/9] dt-bindings: media: rkisp1: move rockchip-isp1 bindings out of staging Helen Koike
2020-07-22 15:55 ` [PATCH v5 7/9] media: MAINTAINERS: rkisp1: add path to dt-bindings Helen Koike
2020-07-22 15:55 ` [PATCH v5 8/9] arm64: dts: rockchip: add isp0 node for rk3399 Helen Koike
2020-09-26 13:00   ` Tomasz Figa
2020-10-14 16:27     ` Helen Koike
2020-10-14 16:42       ` Robin Murphy
2020-10-14 16:43       ` Tomasz Figa
2020-10-14 16:52         ` Helen Koike
2020-07-22 15:55 ` [PATCH v5 9/9] arm64: dts: rockchip: add isp and sensors for Scarlet Helen Koike
2020-09-26 13:03 ` [PATCH v5 0/9] move Rockchip ISP bindings out of staging / add ISP DT nodes for RK3399 Tomasz Figa

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='CAL_Jsq+qB=yUtHKKujiUWrsq+W-3ggM3B_SuuDzfYEheczn=8g@mail.gmail.com' \
    --to=robh+dt@kernel.org \
    --cc=dafna.hirschfeld@collabora.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eddie.cai.linux@gmail.com \
    --cc=ezequiel@collabora.com \
    --cc=heiko@sntech.de \
    --cc=helen.koike@collabora.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jbx6244@gmail.com \
    --cc=karthik.poduval@gmail.com \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=robin.murphy@arm.com \
    --cc=tfiga@chromium.org \
    --cc=zhengsq@rock-chips.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).