Message ID | 20230726162615.1270075-1-devarsht@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp541469vqo; Wed, 26 Jul 2023 10:08:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlFceA4ls7FR7YczLEDxzisBqToHV16eK6chZ413jKqhVIEpJQJpyPK2kwFxVSxWIhpcY03N X-Received: by 2002:a17:903:2443:b0:1b8:af5e:853c with SMTP id l3-20020a170903244300b001b8af5e853cmr111664pls.26.1690391311333; Wed, 26 Jul 2023 10:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690391311; cv=none; d=google.com; s=arc-20160816; b=tJ6X+jiG3ck1lVBHoufORf3FQvJSDW0Rj2ytgo9yQbXY8gp96V5LpsVfQNzXj7RVCU HrdRFl0XEhqtULc3zTJGFtXgUZrYFUdIwfG6eU0Mpr39fNgG83Hx5LRDbzJAfyOktH31 dNVq6l8vdH0TG46tSpix0rnSkUr9SwjOT+A23lNb3K2e4ZhySZ5YAW9uiM2LmeVlVgqI 9PiOrImS+F9yt5no4TxYcV/xwg0FPC72fg7RzMgYwxVIw0krPIcd7Oj9QeVUd4Web7D+ c3eLn2W3sGpIFJyzgynTbwaHmGQSnF4V+ilA/qPQG/Kr3R3whi5fXiXavhq7nWIETrQ9 R+GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MVdmp+gOoZlAhPHT4qa7hQWAupBLfXTDw707s4VDyrA=; fh=AeRqtFCkUqFMvq76jKrc6bOuloK0hMuKmGwDl2Vuds0=; b=fmYSakOFVoGX7GaCMolXWmlMRckKaGbIgf7NnI9KnAtPOUW4YFOYhoRQhCHcVQT+sV pH/n8DUxvyp/YizNapHaKHQm95DA1n1NwRPZvsUcFbl619zbGXj82AGNbGZp23K8trl3 eQ/r7+fvGvbPdH/zt1FLVaM5jEHyphNzrDtlDwOEgLFiA8fiSD9n/TI1ODAEWXzqESO6 XQ2MwRfHmHF9O2he4JqUd2lC1Lz8bFEZUHfD6r943rVkDxbky9yM7zLUJ3+fuHFfEjfK nMs1egjQn32kmXuTciwTrh0HLOt7/ZImsOkqtNO+F0WZvPVFPtFnGl6Zq24cfBwo325d FwNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=mn9gCRXk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p4-20020a170902bd0400b001b9d34dbf63si12812706pls.375.2023.07.26.10.08.16; Wed, 26 Jul 2023 10:08:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=mn9gCRXk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230480AbjGZQ1A (ORCPT <rfc822;kloczko.tomasz@gmail.com> + 99 others); Wed, 26 Jul 2023 12:27:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231357AbjGZQ06 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 12:26:58 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FD732D4F; Wed, 26 Jul 2023 09:26:31 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 36QGQH7e009437; Wed, 26 Jul 2023 11:26:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1690388777; bh=MVdmp+gOoZlAhPHT4qa7hQWAupBLfXTDw707s4VDyrA=; h=From:To:CC:Subject:Date; b=mn9gCRXkS8xbWmFJlFkauTNUAuNcDSnnZoeD+I8oI1UzVHso0fr1byxJzkyKrOvl4 0ifuSrl6fkucQSvx/DGkALB8XNvCHUlNr+Lsp3UJgVZK33eL0Ug/4OtnuMDOAWwKae bmYdH2Z4mOxc/ilHyM4+ycvucgaw+s0gi2Cr08KA= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 36QGQGbb014798 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 26 Jul 2023 11:26:16 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 26 Jul 2023 11:26:16 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 26 Jul 2023 11:26:16 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 36QGQF0Z015623; Wed, 26 Jul 2023 11:26:16 -0500 From: Devarsh Thakkar <devarsht@ti.com> To: <mchehab@kernel.org>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>, <linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org> CC: <praneeth@ti.com>, <nm@ti.com>, <vigneshr@ti.com>, <a-bhatia1@ti.com>, <j-luthra@ti.com>, <b-brnich@ti.com>, <detheridge@ti.com>, <p-mantena@ti.com>, <vijayp@ti.com>, <devarsht@ti.com> Subject: [PATCH] dt-bindings: media: Add bindings for Imagination E5010 JPEG Encoder driver Date: Wed, 26 Jul 2023 21:56:15 +0530 Message-ID: <20230726162615.1270075-1-devarsht@ti.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772503759311765788 X-GMAIL-MSGID: 1772503759311765788 |
Series |
dt-bindings: media: Add bindings for Imagination E5010 JPEG Encoder driver
|
|
Commit Message
Devarsh Thakkar
July 26, 2023, 4:26 p.m. UTC
Add dt-bindings for Imagination E5010 JPEG Encoder driver which is implemented as stateful V4L2 M2M driver. Co-developed-by: David Huang <d-huang@ti.com> Signed-off-by: David Huang <d-huang@ti.com> Signed-off-by: Devarsh Thakkar <devarsht@ti.com> --- .../bindings/media/img,e5010-jpeg-enc.yaml | 79 +++++++++++++++++++ MAINTAINERS | 5 ++ 2 files changed, 84 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml
Comments
On 26/07/2023 18:26, Devarsh Thakkar wrote: > Add dt-bindings for Imagination E5010 JPEG Encoder driver which is > implemented as stateful V4L2 M2M driver. > > Co-developed-by: David Huang <d-huang@ti.com> > Signed-off-by: David Huang <d-huang@ti.com> A nit, subject: drop second/last, redundant "bindings for". The "dt-bindings" prefix is already stating that these are bindings. Drop also "driver". Bindings are for hardware, not drivers. Prefix starts with media and then dt-bindings. > Signed-off-by: Devarsh Thakkar <devarsht@ti.com> > --- > .../bindings/media/img,e5010-jpeg-enc.yaml | 79 +++++++++++++++++++ > MAINTAINERS | 5 ++ > 2 files changed, 84 insertions(+) > create mode 100644 Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml > > diff --git a/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml b/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml > new file mode 100644 > index 000000000000..0060373eace7 > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml > @@ -0,0 +1,79 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/media/img,e5010-jpeg-enc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Imagination E5010 JPEG Encoder > + > +maintainers: > + - Devarsh Thakkar <devarsht@ti.com> > + > +description: | > + The E5010 is a JPEG encoder from Imagination Technologies implemented on > + TI's AM62A SoC. It is capable of real time encoding of YUV420 and YUV422 > + inputs to JPEG and M-JPEG. It supports baseline JPEG Encoding up to > + 8Kx8K resolution. > + > +properties: > + compatible: > + const: img,e5010-jpeg-enc Your description suggests that this is part of TI SoC. Pretty often licensed blocks cannot be used on their own and need some customizations. Are you sure your block does not need any customization thus no dedicated compatible is needed? > + > + reg: > + items: > + - description: The E5010 main register region > + - description: The E5010 mmu register region > + > + reg-names: > + items: > + - const: regjasper > + - const: regmmu > + Drop reg from both > + power-domains: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > + clocks: > + minItems: 1 > + maxItems: 2 You need to specify the items. Also, no variable number of clocks. Why would they vary if block is strictly defined? > + > + clock-names: > + minItems: 1 > + maxItems: 2 Instead list the names. > + > + interrupts: > + maxItems: 1 > + > +required: > + - compatible > + - reg > + - reg-names > + - interrupts > + - clocks > + - clock-names > + - power-domains > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/soc/ti,sci_pm_domain.h> > + #include <dt-bindings/interrupt-controller/arm-gic.h> > + #include <dt-bindings/interrupt-controller/irq.h> > + > + cbass_main { That's some weird name. Probably you meant soc. Anyway, underscores are not allowed. > + #address-cells = <2>; > + #size-cells = <2>; > + e5010: e5010@fd20000 { Node names should be generic. See also an explanation and list of examples (not exhaustive) in DT specification: https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation Drop the label. > + compatible = "img,e5010-jpeg-enc"; > + reg = <0x00 0xfd20000 0x00 0x100>, > + <0x00 0xfd20200 0x00 0x200>; > + reg-names = "regjasper", "regmmu"; > + clocks = <&k3_clks 201 0>; > + clock-names = "core_clk"; > + power-domains = <&k3_pds 201 TI_SCI_PD_EXCLUSIVE>; > + interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; > + }; > + }; Best regards, Krzysztof
Le mercredi 26 juillet 2023 à 18:33 +0200, Krzysztof Kozlowski a écrit : > On 26/07/2023 18:26, Devarsh Thakkar wrote: > > Add dt-bindings for Imagination E5010 JPEG Encoder driver which is > > implemented as stateful V4L2 M2M driver. > > > > Co-developed-by: David Huang <d-huang@ti.com> > > Signed-off-by: David Huang <d-huang@ti.com> > > A nit, subject: drop second/last, redundant "bindings for". The > "dt-bindings" prefix is already stating that these are bindings. > > Drop also "driver". Bindings are for hardware, not drivers. > > Prefix starts with media and then dt-bindings. That being said, I haven't seen any submission for the driver using these, is it common practice to upstream bindings for unsupported hardware ? Nicolas > > > > Signed-off-by: Devarsh Thakkar <devarsht@ti.com> > > --- > > .../bindings/media/img,e5010-jpeg-enc.yaml | 79 +++++++++++++++++++ > > MAINTAINERS | 5 ++ > > 2 files changed, 84 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml > > > > diff --git a/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml b/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml > > new file mode 100644 > > index 000000000000..0060373eace7 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml > > @@ -0,0 +1,79 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/media/img,e5010-jpeg-enc.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Imagination E5010 JPEG Encoder > > + > > +maintainers: > > + - Devarsh Thakkar <devarsht@ti.com> > > + > > +description: | > > + The E5010 is a JPEG encoder from Imagination Technologies implemented on > > + TI's AM62A SoC. It is capable of real time encoding of YUV420 and YUV422 > > + inputs to JPEG and M-JPEG. It supports baseline JPEG Encoding up to > > + 8Kx8K resolution. > > + > > +properties: > > + compatible: > > + const: img,e5010-jpeg-enc > > Your description suggests that this is part of TI SoC. Pretty often > licensed blocks cannot be used on their own and need some > customizations. Are you sure your block does not need any customization > thus no dedicated compatible is needed? > > > + > > + reg: > > + items: > > + - description: The E5010 main register region > > + - description: The E5010 mmu register region > > + > > + reg-names: > > + items: > > + - const: regjasper > > + - const: regmmu > > + > > Drop reg from both > > > + power-domains: > > + maxItems: 1 > > + > > + resets: > > + maxItems: 1 > > + > > + clocks: > > + minItems: 1 > > + maxItems: 2 > > You need to specify the items. Also, no variable number of clocks. Why > would they vary if block is strictly defined? > > > + > > + clock-names: > > + minItems: 1 > > + maxItems: 2 > > Instead list the names. > > > + > > + interrupts: > > + maxItems: 1 > > + > > +required: > > + - compatible > > + - reg > > + - reg-names > > + - interrupts > > + - clocks > > + - clock-names > > + - power-domains > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include <dt-bindings/soc/ti,sci_pm_domain.h> > > + #include <dt-bindings/interrupt-controller/arm-gic.h> > > + #include <dt-bindings/interrupt-controller/irq.h> > > + > > + cbass_main { > > That's some weird name. Probably you meant soc. Anyway, underscores are > not allowed. > > > + #address-cells = <2>; > > + #size-cells = <2>; > > + e5010: e5010@fd20000 { > > Node names should be generic. See also an explanation and list of > examples (not exhaustive) in DT specification: > https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > > > Drop the label. > > > + compatible = "img,e5010-jpeg-enc"; > > + reg = <0x00 0xfd20000 0x00 0x100>, > > + <0x00 0xfd20200 0x00 0x200>; > > + reg-names = "regjasper", "regmmu"; > > + clocks = <&k3_clks 201 0>; > > + clock-names = "core_clk"; > > + power-domains = <&k3_pds 201 TI_SCI_PD_EXCLUSIVE>; > > + interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; > > + }; > > + }; > > > Best regards, > Krzysztof >
On 26/07/2023 22:35, Nicolas Dufresne wrote: > Le mercredi 26 juillet 2023 à 18:33 +0200, Krzysztof Kozlowski a écrit : >> On 26/07/2023 18:26, Devarsh Thakkar wrote: >>> Add dt-bindings for Imagination E5010 JPEG Encoder driver which is >>> implemented as stateful V4L2 M2M driver. >>> >>> Co-developed-by: David Huang <d-huang@ti.com> >>> Signed-off-by: David Huang <d-huang@ti.com> >> >> A nit, subject: drop second/last, redundant "bindings for". The >> "dt-bindings" prefix is already stating that these are bindings. >> >> Drop also "driver". Bindings are for hardware, not drivers. >> >> Prefix starts with media and then dt-bindings. > > That being said, I haven't seen any submission for the driver using these, is it > common practice to upstream bindings for unsupported hardware ? I assumed I wasn't CC'ed on the user, but it seems there is no user. None, neither drivers, not DTS. Commit msg also doesn't explain it. No point op submit bindings where there are no users. Best regards, Krzysztof
Hi Krzysztof, Thanks for the quick review. On 26/07/23 22:03, Krzysztof Kozlowski wrote: > On 26/07/2023 18:26, Devarsh Thakkar wrote: >> Add dt-bindings for Imagination E5010 JPEG Encoder driver which is >> implemented as stateful V4L2 M2M driver. >> >> Co-developed-by: David Huang <d-huang@ti.com> >> Signed-off-by: David Huang <d-huang@ti.com> > > A nit, subject: drop second/last, redundant "bindings for". The > "dt-bindings" prefix is already stating that these are bindings. > > Drop also "driver". Bindings are for hardware, not drivers. > > Prefix starts with media and then dt-bindings. > Agreed. > >> Signed-off-by: Devarsh Thakkar <devarsht@ti.com> >> --- >> .../bindings/media/img,e5010-jpeg-enc.yaml | 79 +++++++++++++++++++ >> MAINTAINERS | 5 ++ >> 2 files changed, 84 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml >> >> diff --git a/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml b/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml >> new file mode 100644 >> index 000000000000..0060373eace7 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml >> @@ -0,0 +1,79 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/media/img,e5010-jpeg-enc.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Imagination E5010 JPEG Encoder >> + >> +maintainers: >> + - Devarsh Thakkar <devarsht@ti.com> >> + >> +description: | >> + The E5010 is a JPEG encoder from Imagination Technologies implemented on >> + TI's AM62A SoC. It is capable of real time encoding of YUV420 and YUV422 >> + inputs to JPEG and M-JPEG. It supports baseline JPEG Encoding up to >> + 8Kx8K resolution. >> + >> +properties: >> + compatible: >> + const: img,e5010-jpeg-enc > > Your description suggests that this is part of TI SoC. Pretty often > licensed blocks cannot be used on their own and need some > customizations. Are you sure your block does not need any customization > thus no dedicated compatible is needed? > There is a wrapper for interfacing this core with TI SoC, I will recheck this interfacing but I believe nothing changes from programming perspective as there is 1-to-1 maintained between the clocks and signals w.r.t actual E5010 core. >> + >> + reg: >> + items: >> + - description: The E5010 main register region >> + - description: The E5010 mmu register region >> + >> + reg-names: >> + items: >> + - const: regjasper >> + - const: regmmu >> + > > Drop reg from both > Agreed. >> + power-domains: >> + maxItems: 1 >> + >> + resets: >> + maxItems: 1 >> + >> + clocks: >> + minItems: 1 >> + maxItems: 2 > > You need to specify the items. Also, no variable number of clocks. Why > would they vary if block is strictly defined? > Agreed, I believe this version of E5010 core only supports single clock, so we can get rid of maxItems: 2. >> + >> + clock-names: >> + minItems: 1 >> + maxItems: 2 > > Instead list the names. > Agreed. >> + >> + interrupts: >> + maxItems: 1 >> + >> +required: >> + - compatible >> + - reg >> + - reg-names >> + - interrupts >> + - clocks >> + - clock-names >> + - power-domains >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include <dt-bindings/soc/ti,sci_pm_domain.h> >> + #include <dt-bindings/interrupt-controller/arm-gic.h> >> + #include <dt-bindings/interrupt-controller/irq.h> >> + >> + cbass_main { > > That's some weird name. Probably you meant soc. Anyway, underscores are > not allowed. Yes, I think I can put soc. cbass_main is specific to TI (soc interconnect bus). > >> + #address-cells = <2>; >> + #size-cells = <2>; >> + e5010: e5010@fd20000 { > > Node names should be generic. See also an explanation and list of > examples (not exhaustive) in DT specification: > https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > Yes, video-codec is the nearest one, but this is not really a codec as it only supports encoding, is it fine to name node as jpeg-enc ? > > Drop the label. > Agreed. Best Regards, Devarsh >> + compatible = "img,e5010-jpeg-enc"; >> + reg = <0x00 0xfd20000 0x00 0x100>, >> + <0x00 0xfd20200 0x00 0x200>; >> + reg-names = "regjasper", "regmmu"; >> + clocks = <&k3_clks 201 0>; >> + clock-names = "core_clk"; >> + power-domains = <&k3_pds 201 TI_SCI_PD_EXCLUSIVE>; >> + interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; >> + }; >> + }; > > > Best regards, > Krzysztof >
Hi Krzysztof, On 27/07/23 19:58, Devarsh Thakkar wrote: > Hi Krzysztof, > > Thanks for the quick review. > > On 26/07/23 22:03, Krzysztof Kozlowski wrote: >> On 26/07/2023 18:26, Devarsh Thakkar wrote: >>> Add dt-bindings for Imagination E5010 JPEG Encoder driver which is >>> implemented as stateful V4L2 M2M driver. >>> >>> Co-developed-by: David Huang <d-huang@ti.com> >>> Signed-off-by: David Huang <d-huang@ti.com> >> >> A nit, subject: drop second/last, redundant "bindings for". The >> "dt-bindings" prefix is already stating that these are bindings. >> >> Drop also "driver". Bindings are for hardware, not drivers. >> >> Prefix starts with media and then dt-bindings. >> > > Agreed. >> >>> Signed-off-by: Devarsh Thakkar <devarsht@ti.com> >>> --- >>> .../bindings/media/img,e5010-jpeg-enc.yaml | 79 +++++++++++++++++++ >>> MAINTAINERS | 5 ++ >>> 2 files changed, 84 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml >>> >>> diff --git a/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml b/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml >>> new file mode 100644 >>> index 000000000000..0060373eace7 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml >>> @@ -0,0 +1,79 @@ >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/media/img,e5010-jpeg-enc.yaml# >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>> + >>> +title: Imagination E5010 JPEG Encoder >>> + >>> +maintainers: >>> + - Devarsh Thakkar <devarsht@ti.com> >>> + >>> +description: | >>> + The E5010 is a JPEG encoder from Imagination Technologies implemented on >>> + TI's AM62A SoC. It is capable of real time encoding of YUV420 and YUV422 >>> + inputs to JPEG and M-JPEG. It supports baseline JPEG Encoding up to >>> + 8Kx8K resolution. >>> + >>> +properties: >>> + compatible: >>> + const: img,e5010-jpeg-enc >> >> Your description suggests that this is part of TI SoC. Pretty often >> licensed blocks cannot be used on their own and need some >> customizations. Are you sure your block does not need any customization >> thus no dedicated compatible is needed? >> > > There is a wrapper for interfacing this core with TI SoC, I will recheck this > interfacing but I believe nothing changes from programming perspective as > there is 1-to-1 maintained between the clocks and signals w.r.t actual E5010 > core. > Just to add to above, on a second thought we think it would be better to still have a separate compatible for TI as you suggested (since we have a wrapper) so that it allows any customization needed for future. So compatible enum would look like : oneOf: - items: - const: ti,e5010-jpeg-enc - const: img,e5010-jpeg-enc - const: img,e5010-jpeg-enc Thanks for the suggestion. Regards Devarsh >>> + >>> + reg: >>> + items: >>> + - description: The E5010 main register region >>> + - description: The E5010 mmu register region >>> + >>> + reg-names: >>> + items: >>> + - const: regjasper >>> + - const: regmmu >>> + >> >> Drop reg from both >> > > Agreed. > >>> + power-domains: >>> + maxItems: 1 >>> + >>> + resets: >>> + maxItems: 1 >>> + >>> + clocks: >>> + minItems: 1 >>> + maxItems: 2 >> >> You need to specify the items. Also, no variable number of clocks. Why >> would they vary if block is strictly defined? >> > > Agreed, I believe this version of E5010 core only supports single clock, so we > can get rid of maxItems: 2. > >>> + >>> + clock-names: >>> + minItems: 1 >>> + maxItems: 2 >> >> Instead list the names. >> > > Agreed. > >>> + >>> + interrupts: >>> + maxItems: 1 >>> + >>> +required: >>> + - compatible >>> + - reg >>> + - reg-names >>> + - interrupts >>> + - clocks >>> + - clock-names >>> + - power-domains >>> + >>> +additionalProperties: false >>> + >>> +examples: >>> + - | >>> + #include <dt-bindings/soc/ti,sci_pm_domain.h> >>> + #include <dt-bindings/interrupt-controller/arm-gic.h> >>> + #include <dt-bindings/interrupt-controller/irq.h> >>> + >>> + cbass_main { >> >> That's some weird name. Probably you meant soc. Anyway, underscores are >> not allowed. > > Yes, I think I can put soc. cbass_main is specific to TI (soc interconnect bus). > >> >>> + #address-cells = <2>; >>> + #size-cells = <2>; >>> + e5010: e5010@fd20000 { >> >> Node names should be generic. See also an explanation and list of >> examples (not exhaustive) in DT specification: >> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation >> > > Yes, video-codec is the nearest one, but this is not really a codec as it only > supports encoding, is it fine to name node as jpeg-enc ? > >> >> Drop the label. >> > > Agreed. > > Best Regards, > Devarsh > >>> + compatible = "img,e5010-jpeg-enc"; >>> + reg = <0x00 0xfd20000 0x00 0x100>, >>> + <0x00 0xfd20200 0x00 0x200>; >>> + reg-names = "regjasper", "regmmu"; >>> + clocks = <&k3_clks 201 0>; >>> + clock-names = "core_clk"; >>> + power-domains = <&k3_pds 201 TI_SCI_PD_EXCLUSIVE>; >>> + interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; >>> + }; >>> + }; >> >> >> Best regards, >> Krzysztof >>
On 08/08/2023 12:20, Devarsh Thakkar wrote: >>>> +properties: >>>> + compatible: >>>> + const: img,e5010-jpeg-enc >>> >>> Your description suggests that this is part of TI SoC. Pretty often >>> licensed blocks cannot be used on their own and need some >>> customizations. Are you sure your block does not need any customization >>> thus no dedicated compatible is needed? >>> >> >> There is a wrapper for interfacing this core with TI SoC, I will recheck this >> interfacing but I believe nothing changes from programming perspective as >> there is 1-to-1 maintained between the clocks and signals w.r.t actual E5010 >> core. >> > > Just to add to above, on a second thought we think it would be better to > still have a separate compatible for TI as you suggested (since we have a > wrapper) so that it allows any customization needed for future. So compatible > enum would look like : > > oneOf: > - items: > - const: ti,e5010-jpeg-enc > - const: img,e5010-jpeg-enc > - const: img,e5010-jpeg-enc > > Thanks for the suggestion. Yeah, it's fine, assuming block can be used as img,e5010-jpeg-enc on its own. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml b/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml new file mode 100644 index 000000000000..0060373eace7 --- /dev/null +++ b/Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml @@ -0,0 +1,79 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/img,e5010-jpeg-enc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Imagination E5010 JPEG Encoder + +maintainers: + - Devarsh Thakkar <devarsht@ti.com> + +description: | + The E5010 is a JPEG encoder from Imagination Technologies implemented on + TI's AM62A SoC. It is capable of real time encoding of YUV420 and YUV422 + inputs to JPEG and M-JPEG. It supports baseline JPEG Encoding up to + 8Kx8K resolution. + +properties: + compatible: + const: img,e5010-jpeg-enc + + reg: + items: + - description: The E5010 main register region + - description: The E5010 mmu register region + + reg-names: + items: + - const: regjasper + - const: regmmu + + power-domains: + maxItems: 1 + + resets: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 2 + + clock-names: + minItems: 1 + maxItems: 2 + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - reg-names + - interrupts + - clocks + - clock-names + - power-domains + +additionalProperties: false + +examples: + - | + #include <dt-bindings/soc/ti,sci_pm_domain.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/interrupt-controller/irq.h> + + cbass_main { + #address-cells = <2>; + #size-cells = <2>; + e5010: e5010@fd20000 { + compatible = "img,e5010-jpeg-enc"; + reg = <0x00 0xfd20000 0x00 0x100>, + <0x00 0xfd20200 0x00 0x200>; + reg-names = "regjasper", "regmmu"; + clocks = <&k3_clks 201 0>; + clock-names = "core_clk"; + power-domains = <&k3_pds 201 TI_SCI_PD_EXCLUSIVE>; + interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index a5c16bb92fe2..aab11219810f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10170,6 +10170,11 @@ S: Maintained F: Documentation/devicetree/bindings/auxdisplay/img,ascii-lcd.yaml F: drivers/auxdisplay/img-ascii-lcd.c +IMGTEC JPEG ENCODER DRIVER +M: Devarsh Thakkar <devarsht@ti.com> +S: Supported +F: Documentation/devicetree/bindings/media/img,e5010-jpeg-enc.yaml + IMGTEC IR DECODER DRIVER S: Orphan F: drivers/media/rc/img-ir/