Skip to contentSkip to conversation

dt-bindings: imx8-jpeg: Add clocks entries

PATCH In review Fabio Estevam 2 participants 6 messages Sep 12, 2023 – Sep 13, 2023

Subsystems (4)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH v3 1/3 dt-bindings: imx8-jpeg: Add clocks entries

From: Fabio Estevam <[email protected]>

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#

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

 .../devicetree/bindings/media/nxp,imx8-jpeg.yaml         | 9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml +9 -0
index 3d9d1db37040..3383a275c94a 100644
@@ -31,6 +31,9 @@ properties:
   reg:
     maxItems: 1
 
+  clocks:
+    maxItems: 2
+
   interrupts:
     description: |
       There are 4 slots available in the IP, which the driver may use
@@ -49,6 +52,7 @@ properties:
 required:
   - compatible
   - reg
+  - clocks
   - interrupts
   - power-domains
 
@@ -56,12 +60,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 +83,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>,
Signature · 1 line
2.34.1
author reviewer
#1 lore raw

PATCH v3 2/3 arm64: dts: Remove JPEG clock-names

From: Fabio Estevam <[email protected]>

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

Remove them.

---
Changes since v2:
- Newly introduced.

 arch/arm64/boot/dts/freescale/imx8-ss-img.dtsi | 2 --
 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/freescale/imx8-ss-img.dtsi +0 -2
index a90654155a88..39577071e1d3 100644
@@ -24,7 +24,6 @@ jpegdec: jpegdec@58400000 {
 			     <GIC_SPI 312 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>;
@@ -43,7 +42,6 @@ jpegenc: jpegenc@58450000 {
 			     <GIC_SPI 308 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>;
Signature · 1 line
2.34.1
author reviewer
#3 lore raw

PATCH v3 3/3 arm64: imx8qm-ss-img: Fix jpegenc compatible entry

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

The first compatible entry for the jpegenc should be 'nxp,imx8qm-jpgenc'.

Change it accordingly to fix the following schema warning:

imx8qm-apalis-eval.dtb: jpegenc@58450000: compatible: 'oneOf' conditional failed, one must be fixed:
'nxp,imx8qm-jpgdec' is not one of ['nxp,imx8qxp-jpgdec', 'nxp,imx8qxp-jpgenc'] 'nxp,imx8qm-jpgenc' was expected
'nxp,imx8qxp-jpgdec' was expected

Fixes 5bb279171afc ("arm64: dts: imx8: Add jpeg encoder/decoder nodes")

---
Changes since v2:
- Collected Reviewed-by tags.

 arch/arm64/boot/dts/freescale/imx8qm-ss-img.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8qm-ss-img.dtsi +1 -1
index 7764b4146e0a..2bbdacb1313f 100644
@@ -8,5 +8,5 @@ &jpegdec {
 };
 
 &jpegenc {
-	compatible = "nxp,imx8qm-jpgdec", "nxp,imx8qxp-jpgenc";
+	compatible = "nxp,imx8qm-jpgenc", "nxp,imx8qxp-jpgenc";
 };
Signature · 1 line
2.34.1
#4 lore raw
In reply to Fabio Estevam
Quoted 23 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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#

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

 .../devicetree/bindings/media/nxp,imx8-jpeg.yaml         | 9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml +0 -0
index 3d9d1db37040..3383a275c94a 100644

Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml properties: · line 35

Quoted 5 lines
Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml +2 -0
@@ -31,6 +31,9 @@ properties:
   reg:
     maxItems: 1
 
+  clocks:
+    maxItems: 2

You need to describe the clocks, so "items" with descriptions instead of maxItems.

Best regards,
Krzysztof

#5 lore raw
Quoted 27 lines · Krzysztof Kozlowski
Quoted 26 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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#

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

 .../devicetree/bindings/media/nxp,imx8-jpeg.yaml         | 9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml +0 -0
index 3d9d1db37040..3383a275c94a 100644
@@ -31,6 +31,9 @@ properties:
   reg:
     maxItems: 1
 
Quoted 5 lines

Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml properties: · line 35

Quoted 2 lines
Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml +2 -0
+  clocks:
+    maxItems: 2

You need to describe the clocks, so "items" with descriptions instead of maxItems.

And to be clear: such description was in your previous version, so it's the problem introduced now in v3...

Best regards,
Krzysztof