Message ID | 20230929-wave5_v13_media_master-v13-6-5ac60ccbf2ce@collabora.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Hans Verkuil |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1qqtTX-00DTsE-Ok; Thu, 12 Oct 2023 11:03:32 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378092AbjJLLDY (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Thu, 12 Oct 2023 07:03:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347210AbjJLLDU (ORCPT <rfc822;linux-media@vger.kernel.org>); Thu, 12 Oct 2023 07:03:20 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88CBBE9; Thu, 12 Oct 2023 04:03:17 -0700 (PDT) Received: from localhost (dynamic-002-247-255-251.2.247.pool.telefonica.de [2.247.255.251]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sebastianfricke) by madras.collabora.co.uk (Postfix) with ESMTPSA id BD5CA6607342; Thu, 12 Oct 2023 12:03:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1697108596; bh=3IBNmgNSjLBe+41FoTO/Yu/kCxc8MxQ85xcHsJpioWg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=LzxB/ajIMQSfxtNw8E2NI2uITSgDafgG+P0IAZ519x9yks79zFo18yKnPU0/EUCSa jLeajxYV7sKlIGaIh8QqfBJuy4cY6wi9zY5pfM4EOszNRyJH2PwPiKHhmch3QMN0yq uNNCC4PvhtDTIIrSmZmrvqDGLLGFYFis2EGWK82efa+BaOlkmHPi6a/XpuOGGlpKJ7 FEJ4wMvtAD2d2BL0dXaNcPI3yMvfARUGU6OEuRY7zxmMQXD+PPq2ZgivwzYZE9FjI9 OV/u11oIgOfzCusdz+YWENBPUnzvXw40i4S5W8FsC24BEzMaSSOpT2LdNaQBYFVF2x 5l0Sl7K0wX+6g== From: Sebastian Fricke <sebastian.fricke@collabora.com> Date: Thu, 12 Oct 2023 13:01:04 +0200 Subject: [PATCH v13 6/8] media: dt-bindings: wave5: add Chips&Media 521c codec IP support MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230929-wave5_v13_media_master-v13-6-5ac60ccbf2ce@collabora.com> References: <20230929-wave5_v13_media_master-v13-0-5ac60ccbf2ce@collabora.com> In-Reply-To: <20230929-wave5_v13_media_master-v13-0-5ac60ccbf2ce@collabora.com> To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, NXP Linux Team <linux-imx@nxp.com>, Conor Dooley <conor+dt@kernel.org>, Mauro Carvalho Chehab <mchehab@kernel.org>, Jackson Lee <jackson.lee@chipsnmedia.com>, Hans Verkuil <hverkuil@xs4all.nl>, Sascha Hauer <s.hauer@pengutronix.de>, Rob Herring <robh+dt@kernel.org>, Pengutronix Kernel Team <kernel@pengutronix.de>, Shawn Guo <shawnguo@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>, Nas Chung <nas.chung@chipsnmedia.com>, Fabio Estevam <festevam@gmail.com> Cc: linux-media@vger.kernel.org, Tomasz Figa <tfiga@chromium.org>, linux-kernel@vger.kernel.org, Sebastian Fricke <sebastian.fricke@collabora.com>, Nicolas Dufresne <nicolas.dufresne@collabora.com>, kernel@collabora.com, Robert Beckett <bob.beckett@collabora.com>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Darren Etheridge <detheridge@ti.com> X-Mailer: b4 0.11.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1697108536; l=1984; i=sebastian.fricke@collabora.com; s=linux-media; h=from:subject:message-id; bh=k/Ho+ZvJoCouf5wFCVjx83CbzUbCzzLnzkHkqDw/UIo=; b=pvcmVfRNEaByRT0iocDsV6kYIBaV58qwnc8SsnVCzM20tcbC1t+uw1duNDMYcV1UrojKQNC7R2wD /14WSznQCK5c2lugQYzV9ytiiMrf/jWtb/gfejT4z0GZsu0NlHe0 X-Developer-Key: i=sebastian.fricke@collabora.com; a=ed25519; pk=pYXedPwrTtErcj7ERYeo/IpTrpe4QbJuEzSB52fslBg= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -4.8 (----) X-LSpam-Report: No, score=-4.8 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3 autolearn=ham autolearn_force=no |
Series |
Wave5 codec driver
|
|
Commit Message
sebastian.fricke@collabora.com
Oct. 12, 2023, 11:01 a.m. UTC
From: Robert Beckett <bob.beckett@collabora.com> Add bindings for the chips&media wave5 codec driver Signed-off-by: Robert Beckett <bob.beckett@collabora.com> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> --- .../devicetree/bindings/media/cnm,wave5.yaml | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+)
Comments
On 12/10/2023 13:01, Sebastian Fricke wrote: > From: Robert Beckett <bob.beckett@collabora.com> > > Add bindings for the chips&media wave5 codec driver > > Signed-off-by: Robert Beckett <bob.beckett@collabora.com> > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> > Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> > --- > .../devicetree/bindings/media/cnm,wave5.yaml | 60 ++++++++++++++++++++++ > 1 file changed, 60 insertions(+) > > diff --git a/Documentation/devicetree/bindings/media/cnm,wave5.yaml b/Documentation/devicetree/bindings/media/cnm,wave5.yaml > new file mode 100644 > index 000000000000..b31d34aec05b > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/cnm,wave5.yaml > @@ -0,0 +1,60 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/media/cnm,wave5.yaml# Filename matching compatible, so: cnm,cm521c-vpu.yaml > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Chips&Media Wave 5 Series multi-standard codec IP > + > +maintainers: > + - Nas Chung <nas.chung@chipsnmedia.com> > + - Jackson Lee <jackson.lee@chipsnmedia.com> > + > +description: > + The Chips&Media WAVE codec IP is a multi format video encoder/decoder > + > +properties: > + compatible: > + enum: > + - cnm,cm521c-vpu Can this device be anything else? Why VPU suffix? > + > + reg: > + maxItems: 1 > + Best regards, Krzysztof
On Thu, Oct 12, 2023 at 03:24:12PM +0200, Krzysztof Kozlowski wrote: > On 12/10/2023 13:01, Sebastian Fricke wrote: > > From: Robert Beckett <bob.beckett@collabora.com> > > > > Add bindings for the chips&media wave5 codec driver > > > > Signed-off-by: Robert Beckett <bob.beckett@collabora.com> > > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> > > Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> > > --- > > .../devicetree/bindings/media/cnm,wave5.yaml | 60 ++++++++++++++++++++++ > > 1 file changed, 60 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/media/cnm,wave5.yaml b/Documentation/devicetree/bindings/media/cnm,wave5.yaml > > new file mode 100644 > > index 000000000000..b31d34aec05b > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/media/cnm,wave5.yaml > > @@ -0,0 +1,60 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/media/cnm,wave5.yaml# > > Filename matching compatible, so: cnm,cm521c-vpu.yaml > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Chips&Media Wave 5 Series multi-standard codec IP > > + > > +maintainers: > > + - Nas Chung <nas.chung@chipsnmedia.com> > > + - Jackson Lee <jackson.lee@chipsnmedia.com> > > + > > +description: > > + The Chips&Media WAVE codec IP is a multi format video encoder/decoder > > + > > +properties: > > + compatible: > > + enum: > > + - cnm,cm521c-vpu > > Can this device be anything else? Why VPU suffix? It needs an SoC specific compatible (TI something...) as well (or instead). Unless there's a public spec with details on how many clocks, resets, interrupts, etc. there are. Rob
Hi Sebastian, Krzysztof, Rob, On 12/10/23 16:31, Sebastian Fricke wrote: > From: Robert Beckett <bob.beckett@collabora.com> > > Add bindings for the chips&media wave5 codec driver > > Signed-off-by: Robert Beckett <bob.beckett@collabora.com> > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> > Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> > --- > .../devicetree/bindings/media/cnm,wave5.yaml | 60 ++++++++++++++++++++++ > 1 file changed, 60 insertions(+) > > diff --git a/Documentation/devicetree/bindings/media/cnm,wave5.yaml b/Documentation/devicetree/bindings/media/cnm,wave5.yaml > new file mode 100644 > index 000000000000..b31d34aec05b > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/cnm,wave5.yaml > @@ -0,0 +1,60 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/media/cnm,wave5.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Chips&Media Wave 5 Series multi-standard codec IP > + > +maintainers: > + - Nas Chung <nas.chung@chipsnmedia.com> > + - Jackson Lee <jackson.lee@chipsnmedia.com> > + > +description: > + The Chips&Media WAVE codec IP is a multi format video encoder/decoder > + > +properties: > + compatible: > + enum: > + - cnm,cm521c-vpu > + > + reg: > + maxItems: 1 > + > + clocks: > + items: > + - description: VCODEC clock > + > + interrupts: > + maxItems: 1 > + > + power-domains: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > + sram: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + The VPU uses the SRAM to store some of the reference data instead of > + storing it on DMA memory. It is mainly used for the purpose of reducing > + bandwidth. > + > +required: > + - compatible > + - reg > + - clocks > + - interrupts > + Is it possible to keep interrupts property as optional given HW can still work without it if SW does polling of ISR using registers? The reason to ask is in TI AM62A SoC (which also uses this codec) there is an SoC errata of missing interrupt line to A53 and we are using SW based polling locally to run the driver. We were planning to upstream that SW based polling support patch in CnM driver once this base initial driver patch series gets merged, but just wanted to check if upfront it is possible to have interrupts property as optional so that we don't have to change the binding doc again to make it optional later on. Also note that the polling patch won't be specific to AM62A, other SoC's too which use this wave5 hardware if they want can enable polling by choice (by removing interrupt property) Could you please share your opinion on this ? Regards Devarsh > +additionalProperties: false > + > +examples: > + - | > + vpu: video-codec@12345678 { > + compatible = "cnm,cm521c-vpu"; > + reg = <0x12345678 0x1000>; > + clocks = <&clks 42>; > + interrupts = <42>; > + sram = <&sram>; > + }; >
Hello Krzysztof and Rob, this question is quite important for our next version and for the overall direction of the DT bindings, could you have a look at this? Thank you and Regards, Sebastian On 17.10.2023 19:09, Devarsh Thakkar wrote: >Hi Sebastian, Krzysztof, Rob, > >On 12/10/23 16:31, Sebastian Fricke wrote: >> From: Robert Beckett <bob.beckett@collabora.com> >> >> Add bindings for the chips&media wave5 codec driver >> >> Signed-off-by: Robert Beckett <bob.beckett@collabora.com> >> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> >> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> >> --- >> .../devicetree/bindings/media/cnm,wave5.yaml | 60 ++++++++++++++++++++++ >> 1 file changed, 60 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/media/cnm,wave5.yaml b/Documentation/devicetree/bindings/media/cnm,wave5.yaml >> new file mode 100644 >> index 000000000000..b31d34aec05b >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/media/cnm,wave5.yaml >> @@ -0,0 +1,60 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/media/cnm,wave5.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Chips&Media Wave 5 Series multi-standard codec IP >> + >> +maintainers: >> + - Nas Chung <nas.chung@chipsnmedia.com> >> + - Jackson Lee <jackson.lee@chipsnmedia.com> >> + >> +description: >> + The Chips&Media WAVE codec IP is a multi format video encoder/decoder >> + >> +properties: >> + compatible: >> + enum: >> + - cnm,cm521c-vpu >> + >> + reg: >> + maxItems: 1 >> + >> + clocks: >> + items: >> + - description: VCODEC clock >> + >> + interrupts: >> + maxItems: 1 >> + >> + power-domains: >> + maxItems: 1 >> + >> + resets: >> + maxItems: 1 >> + >> + sram: >> + $ref: /schemas/types.yaml#/definitions/phandle >> + description: >> + The VPU uses the SRAM to store some of the reference data instead of >> + storing it on DMA memory. It is mainly used for the purpose of reducing >> + bandwidth. >> + >> +required: >> + - compatible >> + - reg >> + - clocks >> + - interrupts >> + > >Is it possible to keep interrupts property as optional given HW can still work >without it if SW does polling of ISR using registers? > >The reason to ask is in TI AM62A SoC (which also uses this codec) there is an >SoC errata of missing interrupt line to A53 and we are using SW based polling >locally to run the driver. > >We were planning to upstream that SW based polling support patch in CnM driver >once this base initial driver patch series gets merged, but just wanted to >check if upfront it is possible to have interrupts property as optional so >that we don't have to change the binding doc again to make it optional later on. > >Also note that the polling patch won't be specific to AM62A, other SoC's too >which use this wave5 hardware if they want can enable polling by choice (by >removing interrupt property) > >Could you please share your opinion on this ? > >Regards >Devarsh > >> +additionalProperties: false >> + >> +examples: >> + - | >> + vpu: video-codec@12345678 { >> + compatible = "cnm,cm521c-vpu"; >> + reg = <0x12345678 0x1000>; >> + clocks = <&clks 42>; >> + interrupts = <42>; >> + sram = <&sram>; >> + }; >> >_______________________________________________ >Kernel mailing list -- kernel@mailman.collabora.com >To unsubscribe send an email to kernel-leave@mailman.collabora.com
Hey Rob and Krzysztof, On 16.10.2023 08:47, Rob Herring wrote: >On Thu, Oct 12, 2023 at 03:24:12PM +0200, Krzysztof Kozlowski wrote: >> On 12/10/2023 13:01, Sebastian Fricke wrote: >> > From: Robert Beckett <bob.beckett@collabora.com> >> > >> > Add bindings for the chips&media wave5 codec driver >> > >> > Signed-off-by: Robert Beckett <bob.beckett@collabora.com> >> > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> >> > Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> >> > --- >> > .../devicetree/bindings/media/cnm,wave5.yaml | 60 ++++++++++++++++++++++ >> > 1 file changed, 60 insertions(+) >> > >> > diff --git a/Documentation/devicetree/bindings/media/cnm,wave5.yaml b/Documentation/devicetree/bindings/media/cnm,wave5.yaml >> > new file mode 100644 >> > index 000000000000..b31d34aec05b >> > --- /dev/null >> > +++ b/Documentation/devicetree/bindings/media/cnm,wave5.yaml >> > @@ -0,0 +1,60 @@ >> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> > +%YAML 1.2 >> > +--- >> > +$id: http://devicetree.org/schemas/media/cnm,wave5.yaml# >> >> Filename matching compatible, so: cnm,cm521c-vpu.yaml With which compatible should the filename match? (see below) And just to be sure, this means that I rename the file to: `.../devicetree/bindings/media/cnm,wave521c.yaml` >> >> > +$schema: http://devicetree.org/meta-schemas/core.yaml# >> > + >> > +title: Chips&Media Wave 5 Series multi-standard codec IP >> > + >> > +maintainers: >> > + - Nas Chung <nas.chung@chipsnmedia.com> >> > + - Jackson Lee <jackson.lee@chipsnmedia.com> >> > + >> > +description: >> > + The Chips&Media WAVE codec IP is a multi format video encoder/decoder >> > + >> > +properties: >> > + compatible: >> > + enum: >> > + - cnm,cm521c-vpu >> >> Can this device be anything else? Why VPU suffix? > >It needs an SoC specific compatible (TI something...) as well (or >instead). Unless there's a public spec with details on how many >clocks, resets, interrupts, etc. there are. Okay so how about this, a bit similar to the Coda driver supplying both a general option and a SoC specific version: properties: compatible: enum: - ti,k3-j721sX-wave521c - cnm,wave521c (ti,k3-j721sX-wave521c = manufacturer,SoC-codec) (tested on j721s2 but should work on other variations as well) Another alternative could be: ti,k3-wave521c (less specific on a single SoC series but connected to a bigger range of devices) > >Rob Regards, Sebastian >_______________________________________________ >Kernel mailing list -- kernel@mailman.collabora.com >To unsubscribe send an email to kernel-leave@mailman.collabora.com
On 21/10/2023 14:05, Sebastian Fricke wrote: > Hey Rob and Krzysztof, > > On 16.10.2023 08:47, Rob Herring wrote: >> On Thu, Oct 12, 2023 at 03:24:12PM +0200, Krzysztof Kozlowski wrote: >>> On 12/10/2023 13:01, Sebastian Fricke wrote: >>>> From: Robert Beckett <bob.beckett@collabora.com> >>>> >>>> Add bindings for the chips&media wave5 codec driver >>>> >>>> Signed-off-by: Robert Beckett <bob.beckett@collabora.com> >>>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> >>>> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> >>>> --- >>>> .../devicetree/bindings/media/cnm,wave5.yaml | 60 ++++++++++++++++++++++ >>>> 1 file changed, 60 insertions(+) >>>> >>>> diff --git a/Documentation/devicetree/bindings/media/cnm,wave5.yaml b/Documentation/devicetree/bindings/media/cnm,wave5.yaml >>>> new file mode 100644 >>>> index 000000000000..b31d34aec05b >>>> --- /dev/null >>>> +++ b/Documentation/devicetree/bindings/media/cnm,wave5.yaml >>>> @@ -0,0 +1,60 @@ >>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>>> +%YAML 1.2 >>>> +--- >>>> +$id: http://devicetree.org/schemas/media/cnm,wave5.yaml# >>> >>> Filename matching compatible, so: cnm,cm521c-vpu.yaml > > With which compatible should the filename match? (see below) > And just to be sure, this means that I rename the file to: > `.../devicetree/bindings/media/cnm,wave521c.yaml` With the fallback compatible. > >>> >>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>> + >>>> +title: Chips&Media Wave 5 Series multi-standard codec IP >>>> + >>>> +maintainers: >>>> + - Nas Chung <nas.chung@chipsnmedia.com> >>>> + - Jackson Lee <jackson.lee@chipsnmedia.com> >>>> + >>>> +description: >>>> + The Chips&Media WAVE codec IP is a multi format video encoder/decoder >>>> + >>>> +properties: >>>> + compatible: >>>> + enum: >>>> + - cnm,cm521c-vpu >>> >>> Can this device be anything else? Why VPU suffix? >> >> It needs an SoC specific compatible (TI something...) as well (or >> instead). Unless there's a public spec with details on how many >> clocks, resets, interrupts, etc. there are. > > Okay so how about this, a bit similar to the Coda driver supplying both > a general option and a SoC specific version: Can generic compatible be used alone in board designs? If it is licensed block, then most likely you want a fallback. > > properties: > compatible: > enum: > - ti,k3-j721sX-wave521c > - cnm,wave521c > > (ti,k3-j721sX-wave521c = manufacturer,SoC-codec) > (tested on j721s2 but should work on other variations as well) > > Another alternative could be: ti,k3-wave521c (less specific on a single > SoC series but connected to a bigger range of devices) Best regards, Krzysztof
On 17/10/2023 15:39, Devarsh Thakkar wrote: >> +required: >> + - compatible >> + - reg >> + - clocks >> + - interrupts >> + > > Is it possible to keep interrupts property as optional given HW can still work > without it if SW does polling of ISR using registers? > > The reason to ask is in TI AM62A SoC (which also uses this codec) there is an > SoC errata of missing interrupt line to A53 and we are using SW based polling > locally to run the driver. > > We were planning to upstream that SW based polling support patch in CnM driver > once this base initial driver patch series gets merged, but just wanted to > check if upfront it is possible to have interrupts property as optional so > that we don't have to change the binding doc again to make it optional later on. > > Also note that the polling patch won't be specific to AM62A, other SoC's too > which use this wave5 hardware if they want can enable polling by choice (by > removing interrupt property) > > Could you please share your opinion on this ? You know, if you do not have interrupt line connected, how could it be required, right? If the hardware does not require interrupt to be connected then bindings should not require it. Best regards, Krzysztof
Hey Krzysztof, On 22.10.2023 18:01, Krzysztof Kozlowski wrote: >On 21/10/2023 14:05, Sebastian Fricke wrote: >> Hey Rob and Krzysztof, >> >> On 16.10.2023 08:47, Rob Herring wrote: >>> On Thu, Oct 12, 2023 at 03:24:12PM +0200, Krzysztof Kozlowski wrote: >>>> On 12/10/2023 13:01, Sebastian Fricke wrote: >>>>> From: Robert Beckett <bob.beckett@collabora.com> >>>>> >>>>> Add bindings for the chips&media wave5 codec driver >>>>> >>>>> Signed-off-by: Robert Beckett <bob.beckett@collabora.com> >>>>> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> >>>>> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> >>>>> --- >>>>> .../devicetree/bindings/media/cnm,wave5.yaml | 60 ++++++++++++++++++++++ >>>>> 1 file changed, 60 insertions(+) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/media/cnm,wave5.yaml b/Documentation/devicetree/bindings/media/cnm,wave5.yaml >>>>> new file mode 100644 >>>>> index 000000000000..b31d34aec05b >>>>> --- /dev/null >>>>> +++ b/Documentation/devicetree/bindings/media/cnm,wave5.yaml >>>>> @@ -0,0 +1,60 @@ >>>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>>>> +%YAML 1.2 >>>>> +--- >>>>> +$id: http://devicetree.org/schemas/media/cnm,wave5.yaml# >>>> >>>> Filename matching compatible, so: cnm,cm521c-vpu.yaml >> >> With which compatible should the filename match? (see below) >> And just to be sure, this means that I rename the file to: >> `.../devicetree/bindings/media/cnm,wave521c.yaml` > >With the fallback compatible. > >> >>>> >>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>>> + >>>>> +title: Chips&Media Wave 5 Series multi-standard codec IP >>>>> + >>>>> +maintainers: >>>>> + - Nas Chung <nas.chung@chipsnmedia.com> >>>>> + - Jackson Lee <jackson.lee@chipsnmedia.com> >>>>> + >>>>> +description: >>>>> + The Chips&Media WAVE codec IP is a multi format video encoder/decoder >>>>> + >>>>> +properties: >>>>> + compatible: >>>>> + enum: >>>>> + - cnm,cm521c-vpu >>>> >>>> Can this device be anything else? Why VPU suffix? >>> >>> It needs an SoC specific compatible (TI something...) as well (or >>> instead). Unless there's a public spec with details on how many >>> clocks, resets, interrupts, etc. there are. >> >> Okay so how about this, a bit similar to the Coda driver supplying both >> a general option and a SoC specific version: > >Can generic compatible be used alone in board designs? If it is licensed >block, then most likely you want a fallback. Alright, so a fallback seems appropriate, how do you like this? properties: compatible: items: - enum: - const: ti,k3-j721sX-wave521c - const: cnm,wave521c Providing a fallback and adding a enum which can be extended later on. > >> >> properties: >> compatible: >> enum: >> - ti,k3-j721sX-wave521c >> - cnm,wave521c >> >> (ti,k3-j721sX-wave521c = manufacturer,SoC-codec) >> (tested on j721s2 but should work on other variations as well) >> >> Another alternative could be: ti,k3-wave521c (less specific on a single >> SoC series but connected to a bigger range of devices) > >Best regards, >Krzysztof Greetings, Sebastian > >_______________________________________________ >Kernel mailing list -- kernel@mailman.collabora.com >To unsubscribe send an email to kernel-leave@mailman.collabora.com
On 24/10/2023 07:17, Sebastian Fricke wrote: >>>> It needs an SoC specific compatible (TI something...) as well (or >>>> instead). Unless there's a public spec with details on how many >>>> clocks, resets, interrupts, etc. there are. >>> >>> Okay so how about this, a bit similar to the Coda driver supplying both >>> a general option and a SoC specific version: >> >> Can generic compatible be used alone in board designs? If it is licensed >> block, then most likely you want a fallback. > > Alright, so a fallback seems appropriate, how do you like this? > > properties: > compatible: > items: > - enum: > - const: ti,k3-j721sX-wave521c > - const: cnm,wave521c > > Providing a fallback and adding a enum which can be extended later on. This looks almost good. I wonder what is "j721sX" - Google does not find it. There is thouhg j721se. Best regards, Krzysztof
Hey Krzysztof, On 24.10.2023 09:24, Krzysztof Kozlowski wrote: >On 24/10/2023 07:17, Sebastian Fricke wrote: > >>>>> It needs an SoC specific compatible (TI something...) as well (or >>>>> instead). Unless there's a public spec with details on how many >>>>> clocks, resets, interrupts, etc. there are. >>>> >>>> Okay so how about this, a bit similar to the Coda driver supplying both >>>> a general option and a SoC specific version: >>> >>> Can generic compatible be used alone in board designs? If it is licensed >>> block, then most likely you want a fallback. >> >> Alright, so a fallback seems appropriate, how do you like this? >> >> properties: >> compatible: >> items: >> - enum: >> - const: ti,k3-j721sX-wave521c >> - const: cnm,wave521c >> >> Providing a fallback and adding a enum which can be extended later on. > >This looks almost good. I wonder what is "j721sX" - Google does not find >it. There is thouhg j721se. Well that was a misunderstanding from my side I thought that both j721se and j721s2 have the Wave5 IP block and wanted to describe both with j721sX. But as it turns out the IP block isn't present on j721se. Additionally, I was only able to test the codec on j721s2 for now and so I would opt for calling it: `ti,k3-j721s2-wave521c` > >Best regards, >Krzysztof Sincerely, Sebastian > >_______________________________________________ >Kernel mailing list -- kernel@mailman.collabora.com >To unsubscribe send an email to kernel-leave@mailman.collabora.com
On 25/10/2023 08:17, Sebastian Fricke wrote: > Hey Krzysztof, > > On 24.10.2023 09:24, Krzysztof Kozlowski wrote: >> On 24/10/2023 07:17, Sebastian Fricke wrote: >> >>>>>> It needs an SoC specific compatible (TI something...) as well (or >>>>>> instead). Unless there's a public spec with details on how many >>>>>> clocks, resets, interrupts, etc. there are. >>>>> >>>>> Okay so how about this, a bit similar to the Coda driver supplying both >>>>> a general option and a SoC specific version: >>>> >>>> Can generic compatible be used alone in board designs? If it is licensed >>>> block, then most likely you want a fallback. >>> >>> Alright, so a fallback seems appropriate, how do you like this? >>> >>> properties: >>> compatible: >>> items: >>> - enum: >>> - const: ti,k3-j721sX-wave521c >>> - const: cnm,wave521c >>> >>> Providing a fallback and adding a enum which can be extended later on. >> >> This looks almost good. I wonder what is "j721sX" - Google does not find >> it. There is thouhg j721se. > > Well that was a misunderstanding from my side I thought that both j721se > and j721s2 have the Wave5 IP block and wanted to describe both with > j721sX. But as it turns out the IP block isn't present on j721se. It does not matter. You must not have wildcards in compatibles. > Additionally, I was only able to test the codec on j721s2 for now and so > I would opt for calling it: `ti,k3-j721s2-wave521c` Best regards, Krzysztof
Hey Krzysztof, On 22.10.2023 18:12, Krzysztof Kozlowski wrote: >On 17/10/2023 15:39, Devarsh Thakkar wrote: >>> +required: >>> + - compatible >>> + - reg >>> + - clocks >>> + - interrupts >>> + >> >> Is it possible to keep interrupts property as optional given HW can still work >> without it if SW does polling of ISR using registers? >> >> The reason to ask is in TI AM62A SoC (which also uses this codec) there is an >> SoC errata of missing interrupt line to A53 and we are using SW based polling >> locally to run the driver. >> >> We were planning to upstream that SW based polling support patch in CnM driver >> once this base initial driver patch series gets merged, but just wanted to >> check if upfront it is possible to have interrupts property as optional so >> that we don't have to change the binding doc again to make it optional later on. >> >> Also note that the polling patch won't be specific to AM62A, other SoC's too >> which use this wave5 hardware if they want can enable polling by choice (by >> removing interrupt property) >> >> Could you please share your opinion on this ? > >You know, if you do not have interrupt line connected, how could it be >required, right? If the hardware does not require interrupt to be >connected then bindings should not require it. Alright, so I will make the interrupt optional in the DT binding. By simply removing it from this list: required: - compatible - reg - clocks - interrupts Is it possible to make it required later on for certain SoC by adding something along the lines of: allOf: - if: properties: compatible: contains: enum: - soc_compatible... ... then: properties: interrupts: true ? > >Best regards, >Krzysztof Sincerely, Sebastian > >_______________________________________________ >Kernel mailing list -- kernel@mailman.collabora.com >To unsubscribe send an email to kernel-leave@mailman.collabora.com
On 26/10/2023 18:33, Sebastian Fricke wrote: > required: > - compatible > - reg > - clocks > - interrupts > > Is it possible to make it required later on for certain SoC by adding > something along the lines of: > > allOf: > - if: > properties: > compatible: > contains: > enum: > - soc_compatible... > ... > then: > properties: > interrupts: true See example schema: https://elixir.bootlin.com/linux/v5.19/source/Documentation/devicetree/bindings/example-schema.yaml#L212 Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/media/cnm,wave5.yaml b/Documentation/devicetree/bindings/media/cnm,wave5.yaml new file mode 100644 index 000000000000..b31d34aec05b --- /dev/null +++ b/Documentation/devicetree/bindings/media/cnm,wave5.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/cnm,wave5.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Chips&Media Wave 5 Series multi-standard codec IP + +maintainers: + - Nas Chung <nas.chung@chipsnmedia.com> + - Jackson Lee <jackson.lee@chipsnmedia.com> + +description: + The Chips&Media WAVE codec IP is a multi format video encoder/decoder + +properties: + compatible: + enum: + - cnm,cm521c-vpu + + reg: + maxItems: 1 + + clocks: + items: + - description: VCODEC clock + + interrupts: + maxItems: 1 + + power-domains: + maxItems: 1 + + resets: + maxItems: 1 + + sram: + $ref: /schemas/types.yaml#/definitions/phandle + description: + The VPU uses the SRAM to store some of the reference data instead of + storing it on DMA memory. It is mainly used for the purpose of reducing + bandwidth. + +required: + - compatible + - reg + - clocks + - interrupts + +additionalProperties: false + +examples: + - | + vpu: video-codec@12345678 { + compatible = "cnm,cm521c-vpu"; + reg = <0x12345678 0x1000>; + clocks = <&clks 42>; + interrupts = <42>; + sram = <&sram>; + };