devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 1/2] dt-bindings: media: imx8-jpeg: Add clocks entries
@ 2024-04-08  3:07 Mirela Rabulea
  2024-04-08  3:07 ` [PATCH v4 2/2] arm64: dts: imx8-ss-img: Remove JPEG clock-names Mirela Rabulea
  2024-04-08  6:38 ` [PATCH v4 1/2] dt-bindings: media: imx8-jpeg: Add clocks entries Krzysztof Kozlowski
  0 siblings, 2 replies; 4+ messages in thread
From: Mirela Rabulea @ 2024-04-08  3:07 UTC (permalink / raw)
  To: shawnguo, robh+dt, krzysztof.kozlowski+dt, festevam, festevam,
	alexander.stein, Frank.li, ming.qian
  Cc: conor+dt, devicetree, linux-arm-kernel, s.hauer, kernel, mchehab,
	hverkuil, linux-media, imx, linux-kernel

From: Fabio Estevam <festevam@gmail.com>

The JPEG decoder/encoder present in iMX8QXP and iMX8QM SoCs need
the PER and IPG clocks to be functional, so add the clock entries.

This also fixes the following schema warning:

imx8qm-apalis-eval.dtb: jpegdec@58400000: 'assigned-clock-rates', 'assigned-clocks', 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+'
        from schema $id: http://devicetree.org/schemas/media/nxp,imx8-jpeg.yaml#

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
---

Changes since v3:
- Add items for clocks (per Krzysztof's feddback)
- Add description for clocks (per Conor's feddback to the other similar patch from Alexander)
- Add "media:" to the subject
- Add Mirela's signed-off
- For the similar patches that were sent for this issue, should Co-developed-by/Signed-off-by be added? Alexander Stein? Frank Li?

Changes since v2:
- Remove clock-names. (Mirela)

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

diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
index 3d9d1db37040..cc040feb77d7 100644
--- a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
+++ b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
@@ -31,6 +31,14 @@ properties:
   reg:
     maxItems: 1
 
+  clocks:
+    description:
+      The JPEG decoder/encoder requires two clocks for it's wrapper (AXI and APB),
+      and one clock for it's core engine (AXI, same source as for the wrapper)
+    items:
+      - description: AXI DMA engine clock for fetching JPEG bitstream from memory (per)
+      - description: IP bus clock for register access (ipg)
+
   interrupts:
     description: |
       There are 4 slots available in the IP, which the driver may use
@@ -49,6 +57,7 @@ properties:
 required:
   - compatible
   - reg
+  - clocks
   - interrupts
   - power-domains
 
@@ -56,12 +65,15 @@ additionalProperties: false
 
 examples:
   - |
+    #include <dt-bindings/clock/imx8-lpcg.h>
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/firmware/imx/rsrc.h>
 
     jpegdec: jpegdec@58400000 {
         compatible = "nxp,imx8qxp-jpgdec";
         reg = <0x58400000 0x00050000 >;
+        clocks = <&img_jpeg_dec_lpcg IMX_LPCG_CLK_0>,
+                 <&img_jpeg_dec_lpcg IMX_LPCG_CLK_4>;
         interrupts = <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
                      <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>,
                      <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>,
@@ -76,6 +88,8 @@ examples:
     jpegenc: jpegenc@58450000 {
         compatible = "nxp,imx8qm-jpgenc", "nxp,imx8qxp-jpgenc";
         reg = <0x58450000 0x00050000 >;
+        clocks = <&img_jpeg_enc_lpcg IMX_LPCG_CLK_0>,
+                 <&img_jpeg__lpcg IMX_LPCG_CLK_4>;
         interrupts = <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>,
                      <GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>,
                      <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v4 2/2] arm64: dts: imx8-ss-img: Remove JPEG clock-names
  2024-04-08  3:07 [PATCH v4 1/2] dt-bindings: media: imx8-jpeg: Add clocks entries Mirela Rabulea
@ 2024-04-08  3:07 ` Mirela Rabulea
  2024-04-08  6:38 ` [PATCH v4 1/2] dt-bindings: media: imx8-jpeg: Add clocks entries Krzysztof Kozlowski
  1 sibling, 0 replies; 4+ messages in thread
From: Mirela Rabulea @ 2024-04-08  3:07 UTC (permalink / raw)
  To: shawnguo, robh+dt, krzysztof.kozlowski+dt, festevam, festevam,
	alexander.stein, Frank.li, ming.qian
  Cc: conor+dt, devicetree, linux-arm-kernel, s.hauer, kernel, mchehab,
	hverkuil, linux-media, imx, linux-kernel

From: Fabio Estevam <festevam@gmail.com>

Per nxp,imx8-jpeg.yaml, the clock-names entry is not valid.

Remove them.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---

Changes since v3:
- Just added "imx8-ss-img:" in the subject

Changes since v2:
- Newly introduced.

 arch/arm64/boot/dts/freescale/imx8-ss-img.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-img.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-img.dtsi
index e7783cc2d830..77d2928997b4 100644
--- a/arch/arm64/boot/dts/freescale/imx8-ss-img.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8-ss-img.dtsi
@@ -21,7 +21,6 @@ jpegdec: jpegdec@58400000 {
 		interrupts = <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&img_jpeg_dec_lpcg IMX_LPCG_CLK_0>,
 			 <&img_jpeg_dec_lpcg IMX_LPCG_CLK_4>;
-		clock-names = "per", "ipg";
 		assigned-clocks = <&img_jpeg_dec_lpcg IMX_LPCG_CLK_0>,
 				  <&img_jpeg_dec_lpcg IMX_LPCG_CLK_4>;
 		assigned-clock-rates = <200000000>, <200000000>;
@@ -35,7 +34,6 @@ jpegenc: jpegenc@58450000 {
 		interrupts = <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&img_jpeg_enc_lpcg IMX_LPCG_CLK_0>,
 			 <&img_jpeg_enc_lpcg IMX_LPCG_CLK_4>;
-		clock-names = "per", "ipg";
 		assigned-clocks = <&img_jpeg_enc_lpcg IMX_LPCG_CLK_0>,
 				  <&img_jpeg_enc_lpcg IMX_LPCG_CLK_4>;
 		assigned-clock-rates = <200000000>, <200000000>;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 1/2] dt-bindings: media: imx8-jpeg: Add clocks entries
  2024-04-08  3:07 [PATCH v4 1/2] dt-bindings: media: imx8-jpeg: Add clocks entries Mirela Rabulea
  2024-04-08  3:07 ` [PATCH v4 2/2] arm64: dts: imx8-ss-img: Remove JPEG clock-names Mirela Rabulea
@ 2024-04-08  6:38 ` Krzysztof Kozlowski
  2024-04-08  7:50   ` Mirela Rabulea
  1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-04-08  6:38 UTC (permalink / raw)
  To: Mirela Rabulea, shawnguo, robh+dt, krzysztof.kozlowski+dt,
	festevam, festevam, alexander.stein, Frank.li, ming.qian
  Cc: conor+dt, devicetree, linux-arm-kernel, s.hauer, kernel, mchehab,
	hverkuil, linux-media, imx, linux-kernel

On 08/04/2024 05:07, Mirela Rabulea wrote:
> From: Fabio Estevam <festevam@gmail.com>
> 
> The JPEG decoder/encoder present in iMX8QXP and iMX8QM SoCs need
> the PER and IPG clocks to be functional, so add the clock entries.
> 
> This also fixes the following schema warning:
> 
> imx8qm-apalis-eval.dtb: jpegdec@58400000: 'assigned-clock-rates', 'assigned-clocks', 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+'
>         from schema $id: http://devicetree.org/schemas/media/nxp,imx8-jpeg.yaml#
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
> ---
> 

Please correct subject. You already got comments on this.
https://lore.kernel.org/linux-devicetree/2fb8c43c-c079-e04e-f727-3bc1dc29996e@linaro.org/

> Changes since v3:
> - Add items for clocks (per Krzysztof's feddback)
> - Add description for clocks (per Conor's feddback to the other similar patch from Alexander)
> - Add "media:" to the subject

Where? It was there before, so what did you change?


> - Add Mirela's signed-off
> - For the similar patches that were sent for this issue, should Co-developed-by/Signed-off-by be added? Alexander Stein? Frank Li?
> 
> Changes since v2:
> - Remove clock-names. (Mirela)
> 
>  .../devicetree/bindings/media/nxp,imx8-jpeg.yaml   | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> index 3d9d1db37040..cc040feb77d7 100644
> --- a/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> +++ b/Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml
> @@ -31,6 +31,14 @@ properties:
>    reg:
>      maxItems: 1
>  
> +  clocks:
> +    description:
> +      The JPEG decoder/encoder requires two clocks for it's wrapper (AXI and APB),
> +      and one clock for it's core engine (AXI, same source as for the wrapper)

Description is now redundant, drop it.

> +    items:
> +      - description: AXI DMA engine clock for fetching JPEG bitstream from memory (per)
> +      - description: IP bus clock for register access (ipg)
> +
>    interrupts:
>      description: |
>        There are 4 slots available in the IP, which the driver may use
> @@ -49,6 +57,7 @@ properties:
>  required:
>    - compatible
>    - reg
> +  - clocks
>    - interrupts
>    - power-domains

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: [PATCH v4 1/2] dt-bindings: media: imx8-jpeg: Add clocks entries
  2024-04-08  6:38 ` [PATCH v4 1/2] dt-bindings: media: imx8-jpeg: Add clocks entries Krzysztof Kozlowski
@ 2024-04-08  7:50   ` Mirela Rabulea
  0 siblings, 0 replies; 4+ messages in thread
From: Mirela Rabulea @ 2024-04-08  7:50 UTC (permalink / raw)
  To: Krzysztof Kozlowski, shawnguo, robh+dt, krzysztof.kozlowski+dt,
	festevam, festevam, alexander.stein, Frank.li, ming.qian
  Cc: conor+dt, devicetree, linux-arm-kernel, s.hauer, kernel, mchehab,
	hverkuil, linux-media, imx, linux-kernel

Hi Krzysztof,

On 08.04.2024 09:38, Krzysztof Kozlowski wrote:
> Please correct subject. You already got comments on this.
> https://lore.kernel.org/linux-devicetree/2fb8c43c-c079-e04e-f727-3bc1dc29996e@linaro.org/

Sorry I missed that.

I will update the prefix to "media: dt-bindings: nxp,imx8-jpeg:". as you 
suggested in v2.
>> Changes since v3:
>> - Add items for clocks (per Krzysztof's feddback)
>> - Add description for clocks (per Conor's feddback to the other similar patch from Alexander)
>> - Add "media:" to the subject
> Where? It was there before, so what did you change?

I started from v3 here: 
https://lore.kernel.org/linux-devicetree/20230912163810.1750488-1-festevam@gmail.com/

The subject was: "[PATCH v3 1/3] dt-bindings: imx8-jpeg: Add clocks 
entries", I had just added "media:". Anyways, will update it again.

>> +  clocks:
>> +    description:
>> +      The JPEG decoder/encoder requires two clocks for it's wrapper (AXI and APB),
>> +      and one clock for it's core engine (AXI, same source as for the wrapper)
> Description is now redundant, drop it.

Ok, I will do so in v5.

Thanks a lot for feedback,

Mirela



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-08  7:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-08  3:07 [PATCH v4 1/2] dt-bindings: media: imx8-jpeg: Add clocks entries Mirela Rabulea
2024-04-08  3:07 ` [PATCH v4 2/2] arm64: dts: imx8-ss-img: Remove JPEG clock-names Mirela Rabulea
2024-04-08  6:38 ` [PATCH v4 1/2] dt-bindings: media: imx8-jpeg: Add clocks entries Krzysztof Kozlowski
2024-04-08  7:50   ` Mirela Rabulea

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).