public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: "Yunfei Dong (董云飞)" <Yunfei.Dong@mediatek.com>
To: "robh@kernel.org" <robh@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"Tiffany Lin (林慧珊)" <tiffany.lin@mediatek.com>,
	"wenst@chromium.org" <wenst@chromium.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"stevecho@chromium.org" <stevecho@chromium.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	"hsinyi@chromium.org" <hsinyi@chromium.org>,
	"benjamin.gaignard@collabora.com"
	<benjamin.gaignard@collabora.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"hverkuil-cisco@xs4all.nl" <hverkuil-cisco@xs4all.nl>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>
Subject: Re: [PATCH v2,1/3] media: dt-bindings: media: mediatek: vcodec: Fix clock num not correctly
Date: Thu, 17 Nov 2022 02:16:49 +0000	[thread overview]
Message-ID: <b31b0928147804323149ced94fe284cc595ffca1.camel@mediatek.com> (raw)
In-Reply-To: <20221116172952.GA461876-robh@kernel.org>

Hi Rob,

Thanks for your comments.
On Wed, 2022-11-16 at 11:29 -0600, Rob Herring wrote:
> On Thu, Nov 10, 2022 at 06:28:32PM +0800, Yunfei Dong wrote:
> > mt8195 and mt8192 have different clock numbers, can't write
> > 'clocks' and
> > 'clock-names' with const value.
> 
> Not a compatible change. Explain why that is okay if it is.
> 
This change is used for mt8195 platform for some architecture changed.
Need to separate vcodec-lat with vcodec-lat-soc into different child
node.

At the same time, vcodec-lat-soc don't have interrupt, but having power
domain and clks.
> > 
> > Move 'assigned-clocks' and 'assigned-clock-parents' to parent node.
> > 
> > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
> > ---
> >  .../media/mediatek,vcodec-subdev-decoder.yaml | 119 +++++++++++---
> > ----
> >  1 file changed, 72 insertions(+), 47 deletions(-)
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-
> > decoder.yaml
> > b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-
> > decoder.yaml
> > index c4f20acdc1f8..794012853834 100644
> > --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-
> > subdev-decoder.yaml
> > +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-
> > subdev-decoder.yaml
> > @@ -89,23 +89,33 @@ properties:
> >  
> >    ranges: true
> >  
> > +  clocks:
> > +    minItems: 1
> > +    maxItems: 5
> > +
> > +  clock-names:
> > +    minItems: 1
> > +    maxItems: 5
> 
> Why do both the parent and child have clocks?
> 
If move assigned-clock-parents to child node, need to add 'ssigned-
clock-parents' and 'assigned-clocks' for each child node. Only need to
add one in parent node, child node no need to add if add 'ssigned-
clock-parents' and 'assigned-clocks' in parent node.

Adding 'assigned-clock-parents' and 'assigned-clocks' need to add
'clocks' and 'clock-names', or will check fail.
> > +
> > +  assigned-clocks:
> > +    maxItems: 1
> > +
> > +  assigned-clock-parents:
> > +    maxItems: 1
> 
> You can just drop assigned-clock properties. They are allowed in any 
> node with 'clocks'.
> 
Only need to add one in parent node, or need to add for each child
node.
> > +
> >  # Required child node:
> >  patternProperties:
> > -  '^vcodec-lat@[0-9a-f]+$':
> > +  '^vcodec-lat-soc@[0-9a-f]+$':
> >      type: object
> >  
> >      properties:
> >        compatible:
> >          enum:
> > -          - mediatek,mtk-vcodec-lat
> >            - mediatek,mtk-vcodec-lat-soc
> >  
> >        reg:
> >          maxItems: 1
> >  
> > -      interrupts:
> > -        maxItems: 1
> > -
> 
> Dropping interrupts? Not explained in the commit msg (why?).
> 
vcodec-lat-soc no need interrupts, will add detail commit message in
next patch.
> >        iommus:
> >          minItems: 1
> >          maxItems: 32
> > @@ -114,22 +124,55 @@ patternProperties:
> >            Refer to bindings/iommu/mediatek,iommu.yaml.
> >  
> >        clocks:
> > +        minItems: 1
> >          maxItems: 5
> >  
> >        clock-names:
> > -        items:
> > -          - const: sel
> > -          - const: soc-vdec
> > -          - const: soc-lat
> > -          - const: vdec
> > -          - const: top
> > +        minItems: 1
> > +        maxItems: 5
> 
> We had names defined and now we don't. That's a step backwards.
> 
Mt8195/mt8192/mt8186/mt8188 have different clock number and clock
names, so change it like this, do you have any other suggestion?
> >  
> > -      assigned-clocks:
> > +      power-domains:
> 
> Adding power-domains?
Vcodec-lat-soc need power domain and add one new child node vcodec-lat-
soc.

Best Regards,
Yunfei Dong
> 
> Rob

  reply	other threads:[~2022-11-17  2:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 10:28 [PATCH v2,1/3] media: dt-bindings: media: mediatek: vcodec: Fix clock num not correctly Yunfei Dong
2022-11-10 10:28 ` [PATCH v2,2/3] media: dt-bindings: media: mediatek: vcodec: Adding racing control register base Yunfei Dong
2022-11-16 17:30   ` Rob Herring
2022-11-10 10:28 ` [PATCH v2,3/3] arm64: dts: mt8195: Add video decoder node Yunfei Dong
2022-11-23 18:06   ` Nícolas F. R. A. Prado
2022-11-16 17:29 ` [PATCH v2,1/3] media: dt-bindings: media: mediatek: vcodec: Fix clock num not correctly Rob Herring
2022-11-17  2:16   ` Yunfei Dong (董云飞) [this message]
2022-11-22  2:15     ` Yunfei Dong (董云飞)

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=b31b0928147804323149ced94fe284cc595ffca1.camel@mediatek.com \
    --to=yunfei.dong@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=hsinyi@chromium.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=robh@kernel.org \
    --cc=stevecho@chromium.org \
    --cc=tiffany.lin@mediatek.com \
    --cc=wenst@chromium.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