diff mbox series

[v2,3/3] dt-bindings: media: imx-jpeg: Add clocks property

Message ID 20230724122101.2903318-3-alexander.stein@ew.tq-group.com
State New
Headers show
Series [v2,1/3] dt-bindings: media: amphion: Fix subnode pattern | expand

Commit Message

Alexander Stein July 24, 2023, 12:21 p.m. UTC
i.MX8 and i.MX8X both use two clocks for accessing the periphery.
Add clocks and clock-names properties accordingly.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
Changes in v2:
* None

 .../devicetree/bindings/media/nxp,imx8-jpeg.yaml          | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Conor Dooley July 24, 2023, 6:26 p.m. UTC | #1
On Mon, Jul 24, 2023 at 02:21:00PM +0200, Alexander Stein wrote:
> i.MX8 and i.MX8X both use two clocks for accessing the periphery.
> Add clocks and clock-names properties accordingly.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> Changes in v2:
> * None
> 
>  .../devicetree/bindings/media/nxp,imx8-jpeg.yaml          | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> index 3d9d1db37040..2533e16720f2 100644
> --- a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> +++ b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> @@ -46,6 +46,14 @@ properties:
>      minItems: 2               # Wrapper and 1 slot
>      maxItems: 5               # Wrapper and 4 slots
>  
> +  clocks:
> +    maxItems: 2
> +
> +  clock-names:
> +    items:
> +      - const: per
> +      - const: ipg

What do "per" and "ipg" mean? I assume "per" is peripheral?

> +
>  required:
>    - compatible
>    - reg
> -- 
> 2.34.1
>
Conor Dooley July 25, 2023, 7:14 p.m. UTC | #2
On Tue, Jul 25, 2023 at 07:31:55AM +0200, Alexander Stein wrote:
> Am Montag, 24. Juli 2023, 20:26:15 CEST schrieb Conor Dooley:
> > On Mon, Jul 24, 2023 at 02:21:00PM +0200, Alexander Stein wrote:
> > > i.MX8 and i.MX8X both use two clocks for accessing the periphery.
> > > Add clocks and clock-names properties accordingly.
> > > 
> > > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > > ---
> > > Changes in v2:
> > > * None
> > > 
> > >  .../devicetree/bindings/media/nxp,imx8-jpeg.yaml          | 8 ++++++++
> > >  1 file changed, 8 insertions(+)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> > > b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml index
> > > 3d9d1db37040..2533e16720f2 100644
> > > --- a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> > > +++ b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> > > 
> > > @@ -46,6 +46,14 @@ properties:
> > >      minItems: 2               # Wrapper and 1 slot
> > >      maxItems: 5               # Wrapper and 4 slots
> > > 
> > > +  clocks:
> > > +    maxItems: 2
> > > +
> > > +  clock-names:
> > > +    items:
> > > +      - const: per
> > > +      - const: ipg
> > 
> > What do "per" and "ipg" mean? I assume "per" is peripheral?
> 
> Actually I don't know what "ipg" stands for. It's a quite common name on i.MX 
> platforms though. I opted for the names currently used in the DT. The driver 
> doesn't care for the names currently.

FWIW, my motivation was wondering how someone would know which clock to
put in which.

> But cross-checking the reference manual these clocks seems to be called "jpeg" 
> and "ips", individually for both jpeg encoder and decoder.

Hm, that seems confusing TBH. The reference manual is where I would be
going to try and figure out the numbers.

> Mirela (added to recipients): As the original author of the DT nodes, could 
> you provide additional information regarding the clock names?

That'd be great, thanks.
Hans Verkuil Oct. 5, 2023, 8:19 a.m. UTC | #3
On 02/10/2023 13:16, Conor Dooley wrote:
> On Mon, Oct 02, 2023 at 11:18:56AM +0200, Hans Verkuil wrote:
>> Rob, Conor,
>>
>> On 09/08/2023 22:43, Mirela Rabulea wrote:
>>>> -----Original Message-----
>>>> From: Rob Herring <robh@kernel.org>
>>>> Sent: Wednesday, July 26, 2023 8:02 PM
>>>> To: Alexander Stein <alexander.stein@ew.tq-group.com>
>>>> Cc: Conor Dooley <conor@kernel.org>; Mirela Rabulea
>>>> <mirela.rabulea@nxp.com>; Ming Qian <ming.qian@nxp.com>; Shijie Qin
>>>> <shijie.qin@nxp.com>; Eagle Zhou <eagle.zhou@nxp.com>; Mauro Carvalho
>>>> Chehab <mchehab@kernel.org>; Krzysztof Kozlowski
>>>> <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley <conor+dt@kernel.org>;
>>>> Shawn Guo <shawnguo@kernel.org>; Sascha Hauer <s.hauer@pengutronix.de>;
>>>> Fabio Estevam <festevam@gmail.com>; Mark Brown <broonie@kernel.org>;
>>>> Anson Huang <Anson.Huang@nxp.com>; dl-linux-imx <linux-imx@nxp.com>;
>>>> Pengutronix Kernel Team <kernel@pengutronix.de>; linux-
>>>> media@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
>>>> kernel@lists.infradead.org; linux-spi@vger.kernel.org
>>>> Subject: [EXT] Re: [PATCH v2 3/3] dt-bindings: media: imx-jpeg: Add clocks
>>>> property
>>>>
>>>> Caution: This is an external email. Please take care when clicking links or
>>>> opening attachments. When in doubt, report the message using the 'Report this
>>>> email' button
>>>>
>>>>
>>>> On Tue, Jul 25, 2023 at 07:31:55AM +0200, Alexander Stein wrote:
>>>>> Am Montag, 24. Juli 2023, 20:26:15 CEST schrieb Conor Dooley:
>>>>>> On Mon, Jul 24, 2023 at 02:21:00PM +0200, Alexander Stein wrote:
>>>>>>> i.MX8 and i.MX8X both use two clocks for accessing the periphery.
>>>>>>> Add clocks and clock-names properties accordingly.
>>>>>>>
>>>>>>> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
>>
>> Is this patch OK or do you want changes?
>>
>> It's a bit unclear.
> 
> It's unclear to me too at this point, but I wonder if the names should
> just be removed and replaced by descriptions in the clocks property?
> 
> One of the responses here mentioned that the names aren't even needed by
> hardware.

Right, I'm marking this as "Obsoleted" based on Mirela's reply. Alexander,
if you believe this is still needed, then please post a v2.

Regards,

	Hans
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
index 3d9d1db37040..2533e16720f2 100644
--- a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
+++ b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
@@ -46,6 +46,14 @@  properties:
     minItems: 2               # Wrapper and 1 slot
     maxItems: 5               # Wrapper and 4 slots
 
+  clocks:
+    maxItems: 2
+
+  clock-names:
+    items:
+      - const: per
+      - const: ipg
+
 required:
   - compatible
   - reg