Skip to contentSkip to conversation

media: nxp,imx8-jpeg: Add imx95 support

PATCH RESEND In review Frank Li 4 participants 13 messages May 21, 2025 – Jul 11, 2025

Subsystems (4)
lore
Share & tools
lore

Frank Li

author maintainer
#0 lore raw

cover media: nxp,imx8-jpeg: Add imx95 support

Update binding doc for imx95 support.
Update dts to support imx95

---
Frank Li (2):
media: dt-bindings: nxp,imx8-jpeg: Add compatible strings for IMX95 JPEG
arm64: dts: imx95: add jpeg encode and decode nodes

 .../devicetree/bindings/media/nxp,imx8-jpeg.yaml   | 28 ++++++++++++--
 arch/arm64/boot/dts/freescale/imx95.dtsi           | 44 ++++++++++++++++++++++
 2 files changed, 69 insertions(+), 3 deletions(-)

---
base-commit: f3df6ce76ecb8eb47f0d3198ab4b81df31217fa7
change-id: 20250221-95_jpeg-a4924523fff2

Best regards,
---
Frank Li <[email protected]>

Signature · 1 line
Frank Li <[email protected]>
author maintainer
#1 lore raw

PATCH RESEND 1/2 media: dt-bindings: nxp,imx8-jpeg: Add compatible strings for IMX95 JPEG

Add compatible strings "nxp,imx95-jpgdec" and "nxp,imx95-jpgenc", which are backward compatible with "nxp,imx8qxp-jpgdec" and "nxp,imx8qxp-jpegenc". i.MX95 just need one power domain which combine wrap and all slots together. Reduce minItems of power-domains to 1 for i.MX95 and keep the same restriction for others.

---
 .../bindings/media/nxp,imx8-jpeg.yaml         | 28 +++++++++++++++++--
 1 file changed, 25 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml +25 -3
index 2be30c5fdc839..4cba42ba7cf72 100644
@@ -22,10 +22,14 @@ properties:
             - nxp,imx8qxp-jpgdec
             - nxp,imx8qxp-jpgenc
       - items:
-          - const: nxp,imx8qm-jpgdec
+          - enum:
+              - nxp,imx8qm-jpgdec
+              - nxp,imx95-jpgdec
           - const: nxp,imx8qxp-jpgdec
       - items:
-          - const: nxp,imx8qm-jpgenc
+          - enum:
+              - nxp,imx8qm-jpgenc
+              - nxp,imx95-jpgenc
           - const: nxp,imx8qxp-jpgenc
 
   reg:
@@ -48,7 +52,7 @@ properties:
     description:
       List of phandle and PM domain specifier as documented in
       Documentation/devicetree/bindings/power/power_domain.txt
-    minItems: 2               # Wrapper and 1 slot
+    minItems: 1               # Wrapper and all slots
     maxItems: 5               # Wrapper and 4 slots
 
 required:
@@ -58,6 +62,24 @@ required:
   - interrupts
   - power-domains
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - nxp,imx95-jpgenc
+              - nxp,imx95-jpgdec
+    then:
+      properties:
+        power-domains:
+          maxItems: 1
+    else:
+      properties:
+        power-domains:
+          minItems: 2        # Wrapper and 1 slot
+
+
 additionalProperties: false
 
 examples:
Signature · 1 line
2.34.1
Acked-by on v1 1/2
#2 lore raw

Re: [PATCH RESEND 1/2] media: dt-bindings: nxp,imx8-jpeg: Add compatible strings for IMX95 JPEG

Hi,

Le mercredi 21 mai 2025 à 13:34 -0400, Frank Li a écrit :

Quoted 8 lines

Add compatible strings "nxp,imx95-jpgdec" and "nxp,imx95-jpgenc", which are backward compatible with "nxp,imx8qxp-jpgdec" and "nxp,imx8qxp-jpegenc". i.MX95 just need one power domain which combine wrap and all slots together. Reduce minItems of power-domains to 1 for i.MX95 and keep the same restriction for others.

Krzysztof, will you take this one once the DTS part is ready ?

regards,
Nicolas

Quoted 60 lines

---
 .../bindings/media/nxp,imx8-jpeg.yaml         | 28 +++++++++++++++++--

 1 file changed, 25 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml +0 -0
index 2be30c5fdc839..4cba42ba7cf72 100644
@@ -22,10 +22,14 @@ properties:

             - nxp,imx8qxp-jpgdec
             - nxp,imx8qxp-jpgenc
       - items:
-          - const: nxp,imx8qm-jpgdec
+          - enum:
+              - nxp,imx8qm-jpgdec
+              - nxp,imx95-jpgdec
           - const: nxp,imx8qxp-jpgdec
       - items:
-          - const: nxp,imx8qm-jpgenc
+          - enum:
+              - nxp,imx8qm-jpgenc
+              - nxp,imx95-jpgenc
           - const: nxp,imx8qxp-jpgenc

   reg:

Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml +0 -0
@@ -48,7 +52,7 @@ properties:

     description:
       List of phandle and PM domain specifier as documented in Documentation/devicetree/bindings/power/power_domain.txt -    minItems: 2               # Wrapper and 1 slot
+    minItems: 1               # Wrapper and all slots
     maxItems: 5               # Wrapper and 4 slots

 required:

Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml +0 -0
@@ -58,6 +62,24 @@ required:

   - interrupts
   - power-domains

Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml +18 -0
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - nxp,imx95-jpgenc
+              - nxp,imx95-jpgdec
+    then:
+      properties:
+        power-domains:
+          maxItems: 1
+    else:
+      properties:
+        power-domains:
+          minItems: 2        # Wrapper and 1 slot
+
+

 additionalProperties: false

 examples:

#3 lore raw

Re: [PATCH RESEND 1/2] media: dt-bindings: nxp,imx8-jpeg: Add compatible strings for IMX95 JPEG

Quoted 9 lines · Nicolas Dufresne

Hi,

Le mercredi 21 mai 2025 à 13:34 -0400, Frank Li a écrit :

Quoted 6 lines

Add compatible strings "nxp,imx95-jpgdec" and "nxp,imx95-jpgenc", which are backward compatible with "nxp,imx8qxp-jpgdec" and "nxp,imx8qxp-jpegenc". i.MX95 just need one power domain which combine wrap and all slots together. Reduce minItems of power-domains to 1 for i.MX95 and keep the same restriction for others.

Quoted 7 lines
Quoted 2 lines

Krzysztof, will you take this one once the DTS part is ready ?

No, that's a media patch, not a Samsung or any other subsystem I maintain. I do not have write access to media tree.

Best regards,
Krzysztof

#4 lore raw

Re: [PATCH RESEND 1/2] media: dt-bindings: nxp,imx8-jpeg: Add compatible strings for IMX95 JPEG

In reply to Nicolas Dufresne
Quoted 9 lines · Nicolas Dufresne

Hi,

Le mercredi 21 mai 2025 à 13:34 -0400, Frank Li a écrit :

Quoted 6 lines

Add compatible strings "nxp,imx95-jpgdec" and "nxp,imx95-jpgenc", which are backward compatible with "nxp,imx8qxp-jpgdec" and "nxp,imx8qxp-jpegenc". i.MX95 just need one power domain which combine wrap and all slots together. Reduce minItems of power-domains to 1 for i.MX95 and keep the same restriction for others.

Quoted 6 lines
Quoted 2 lines

Krzysztof, will you take this one once the DTS part is ready ?

dt-bindings is the prerequisite of DTS. DTS patch looks good to me and I'm waiting for dt-bindings part to be applied first.

Shawn

#5 lore raw

Re: [PATCH RESEND 1/2] media: dt-bindings: nxp,imx8-jpeg: Add compatible strings for IMX95 JPEG

Le jeudi 19 juin 2025 à 12:27 +0800, Shawn Guo a écrit :

Quoted 13 lines · Nicolas Dufresne
Quoted 12 lines

Hi,

Le mercredi 21 mai 2025 à 13:34 -0400, Frank Li a écrit :

Quoted 8 lines

Add compatible strings "nxp,imx95-jpgdec" and "nxp,imx95-jpgenc", which are backward compatible with "nxp,imx8qxp-jpgdec" and "nxp,imx8qxp-jpegenc". i.MX95 just need one power domain which combine wrap and all slots together. Reduce minItems of power-domains to 1 for i.MX95 and keep the same restriction for others.

Quoted 6 lines
Quoted 3 lines

Krzysztof, will you take this one once the DTS part is ready ?

dt-bindings is the prerequisite of DTS.  DTS patch looks good to me and I'm waiting for dt-bindings part to be applied first.

I was waiting for sign of life on the DTS part, we usually get some ack, which is good sign we can take the bindings.

Nicolas

#6 lore raw

Re: [PATCH RESEND 1/2] media: dt-bindings: nxp,imx8-jpeg: Add compatible strings for IMX95 JPEG

Quoted 16 lines · Nicolas Dufresne

Le jeudi 19 juin 2025 à 12:27 +0800, Shawn Guo a écrit :

Quoted 15 lines · Nicolas Dufresne
Quoted 14 lines

Hi,

Le mercredi 21 mai 2025 à 13:34 -0400, Frank Li a écrit :

Quoted 8 lines

Add compatible strings "nxp,imx95-jpgdec" and "nxp,imx95-jpgenc", which are backward compatible with "nxp,imx8qxp-jpgdec" and "nxp,imx8qxp-jpegenc". i.MX95 just need one power domain which combine wrap and all slots together. Reduce minItems of power-domains to 1 for i.MX95 and keep the same restriction for others.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Krzysztof, will you take this one once the DTS part is ready ?

dt-bindings is the prerequisite of DTS.  DTS patch looks good to me and I'm waiting for dt-bindings part to be applied first.

I was waiting for sign of life on the DTS part, we usually get some ack, which is good sign we can take the bindings.

Such process never happens. DT bindings are the prerequisite here and platform maintainers wait for bindings to be accepted before taking DTS or even sometimes reviewing DTS. Why even bother to review DTS if it follows entirely incorrect binding?

Best regards,
Krzysztof

#7 lore raw

Re: [PATCH RESEND 1/2] media: dt-bindings: nxp,imx8-jpeg: Add compatible strings for IMX95 JPEG

Le vendredi 20 juin 2025 à 07:54 +0200, Krzysztof Kozlowski a écrit :

Quoted 22 lines · Nicolas Dufresne
Quoted 21 lines

Le jeudi 19 juin 2025 à 12:27 +0800, Shawn Guo a écrit :

Quoted 19 lines · Nicolas Dufresne
Quoted 9 lines

Hi,

Le mercredi 21 mai 2025 à 13:34 -0400, Frank Li a écrit :

Quoted 6 lines

Add compatible strings "nxp,imx95-jpgdec" and "nxp,imx95-jpgenc", which are backward compatible with "nxp,imx8qxp-jpgdec" and "nxp,imx8qxp-jpegenc". i.MX95 just need one power domain which combine wrap and all slots together. Reduce minItems of power-domains to 1 for i.MX95 and keep the same restriction for others.

Quoted 6 lines
Quoted 2 lines

Krzysztof, will you take this one once the DTS part is ready ?

dt-bindings is the prerequisite of DTS.  DTS patch looks good to me and I'm waiting for dt-bindings part to be applied first.

Quoted 7 lines
Quoted 2 lines

I was waiting for sign of life on the DTS part, we usually get some ack, which is good sign we can take the bindings.

Such process never happens. DT bindings are the prerequisite here and platform maintainers wait for bindings to be accepted before taking DTS or even sometimes reviewing DTS. Why even bother to review DTS if it follows entirely incorrect binding?

You are the one requesting DTS with DT bindings for review purpose. You've done so regularly this year.

As for review process, Ack are a workaround to a black whole in our review process. Patches without any reply can either be un-reviewed due to lack of time, or accepted. You do whatever you like, I'm just saying that clarity can help to coordinate.

regards,
Nicolas

Quoted 3 lines

Best regards,
Krzysztof

#8 lore raw

Re: [PATCH RESEND 1/2] media: dt-bindings: nxp,imx8-jpeg: Add compatible strings for IMX95 JPEG

Quoted 26 lines · Nicolas Dufresne

Le vendredi 20 juin 2025 à 07:54 +0200, Krzysztof Kozlowski a écrit :

Quoted 25 lines · Nicolas Dufresne
Quoted 23 lines

Le jeudi 19 juin 2025 à 12:27 +0800, Shawn Guo a écrit :

Quoted 13 lines · Nicolas Dufresne
Quoted 12 lines

Hi,

Le mercredi 21 mai 2025 à 13:34 -0400, Frank Li a écrit :

Quoted 8 lines

Add compatible strings "nxp,imx95-jpgdec" and "nxp,imx95-jpgenc", which are backward compatible with "nxp,imx8qxp-jpgdec" and "nxp,imx8qxp-jpegenc". i.MX95 just need one power domain which combine wrap and all slots together. Reduce minItems of power-domains to 1 for i.MX95 and keep the same restriction for others.

Quoted 6 lines
Quoted 3 lines

Krzysztof, will you take this one once the DTS part is ready ?

dt-bindings is the prerequisite of DTS.  DTS patch looks good to me and I'm waiting for dt-bindings part to be applied first.

I was waiting for sign of life on the DTS part, we usually get some ack, which is good sign we can take the bindings.

Quoted 7 lines
Quoted 4 lines

Such process never happens. DT bindings are the prerequisite here and platform maintainers wait for bindings to be accepted before taking DTS or even sometimes reviewing DTS. Why even bother to review DTS if it follows entirely incorrect binding?

You are the one requesting DTS with DT bindings for review purpose. You've done so regularly this year.

Yes, I asked for DTS for before/while reviewing very questionable bindings and drivers. Was this reviewed already? Yes, it was. Therefore after my review, how is this relevant?

Best regards,
Krzysztof

author maintainer
#9 lore raw

PATCH RESEND 2/2 arm64: dts: imx95: add jpeg encode and decode nodes

In reply to Frank Li

Add jpeg encode\decode and related nodes for i.MX95.

---
 arch/arm64/boot/dts/freescale/imx95.dtsi | 44 ++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
arch/arm64/boot/dts/freescale/imx95.dtsi +44 -0
index 632631a291122..d38bbe8b16d7e 100644
@@ -3,6 +3,7 @@
  * Copyright 2024 NXP
  */
 
+#include <dt-bindings/clock/nxp,imx95-clock.h>
 #include <dt-bindings/dma/fsl-edma.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
@@ -1801,6 +1802,49 @@ pcie1_ep: pcie-ep@4c380000 {
 			status = "disabled";
 		};
 
+		vpu_blk_ctrl: clock-controller@4c410000 {
+			compatible = "nxp,imx95-vpu-csr", "syscon";
+			reg = <0x0 0x4c410000 0x0 0x10000>;
+			#clock-cells = <1>;
+			clocks = <&scmi_clk IMX95_CLK_VPUAPB>;
+			power-domains = <&scmi_devpd IMX95_PD_VPU>;
+			assigned-clocks = <&scmi_clk IMX95_CLK_VPUAPB>,
+					  <&scmi_clk IMX95_CLK_VPU>,
+					  <&scmi_clk IMX95_CLK_VPUJPEG>;
+			assigned-clock-parents = <&scmi_clk IMX95_CLK_SYSPLL1_PFD1_DIV2>,
+						 <&scmi_clk IMX95_CLK_SYSPLL1_PFD2>,
+						 <&scmi_clk IMX95_CLK_SYSPLL1_PFD0>;
+			assigned-clock-rates = <133333333>, <667000000>, <500000000>;
+		};
+
+		jpegdec: jpegdec@4c500000 {
+			compatible = "nxp,imx95-jpgdec", "nxp,imx8qxp-jpgdec";
+			reg = <0x0 0x4C500000 0x0 0x00050000>;
+			interrupts = <GIC_SPI 295 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 296 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 297 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 298 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&scmi_clk IMX95_CLK_VPU>,
+				 <&vpu_blk_ctrl IMX95_CLK_VPUBLK_JPEG_DEC>;
+			assigned-clocks = <&vpu_blk_ctrl IMX95_CLK_VPUBLK_JPEG_DEC>;
+			assigned-clock-parents = <&scmi_clk IMX95_CLK_VPUJPEG>;
+			power-domains = <&scmi_devpd IMX95_PD_VPU>;
+		};
+
+		jpegenc: jpegenc@4c550000 {
+			compatible = "nxp,imx95-jpgenc", "nxp,imx8qxp-jpgenc";
+			reg = <0x0 0x4C550000 0x0 0x00050000>;
+			interrupts = <GIC_SPI 291 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 292 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 293 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 294 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&scmi_clk IMX95_CLK_VPU>,
+				 <&vpu_blk_ctrl IMX95_CLK_VPUBLK_JPEG_ENC>;
+			assigned-clocks = <&vpu_blk_ctrl IMX95_CLK_VPUBLK_JPEG_DEC>;
+			assigned-clock-parents = <&scmi_clk IMX95_CLK_VPUJPEG>;
+			power-domains = <&scmi_devpd IMX95_PD_VPU>;
+		};
+
 		netcmix_blk_ctrl: syscon@4c810000 {
 			compatible = "nxp,imx95-netcmix-blk-ctrl", "syscon";
 			reg = <0x0 0x4c810000 0x0 0x8>;
Signature · 1 line
2.34.1
author maintainer
#10 lore raw

Re: [PATCH RESEND 2/2] arm64: dts: imx95: add jpeg encode and decode nodes

Quoted 1 line · Frank Li

Add jpeg encode\decode and related nodes for i.MX95.

shawn:
can you help check this?

Frank

Quoted 71 lines
---
 arch/arm64/boot/dts/freescale/imx95.dtsi | 44 ++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
arch/arm64/boot/dts/freescale/imx95.dtsi +44 -1
index 632631a291122..d38bbe8b16d7e 100644
@@ -3,6 +3,7 @@
  * Copyright 2024 NXP
  */
 
+#include <dt-bindings/clock/nxp,imx95-clock.h>
 #include <dt-bindings/dma/fsl-edma.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
@@ -1801,6 +1802,49 @@ pcie1_ep: pcie-ep@4c380000 {
 			status = "disabled";
 		};
 
+		vpu_blk_ctrl: clock-controller@4c410000 {
+			compatible = "nxp,imx95-vpu-csr", "syscon";
+			reg = <0x0 0x4c410000 0x0 0x10000>;
+			#clock-cells = <1>;
+			clocks = <&scmi_clk IMX95_CLK_VPUAPB>;
+			power-domains = <&scmi_devpd IMX95_PD_VPU>;
+			assigned-clocks = <&scmi_clk IMX95_CLK_VPUAPB>,
+					  <&scmi_clk IMX95_CLK_VPU>,
+					  <&scmi_clk IMX95_CLK_VPUJPEG>;
+			assigned-clock-parents = <&scmi_clk IMX95_CLK_SYSPLL1_PFD1_DIV2>,
+						 <&scmi_clk IMX95_CLK_SYSPLL1_PFD2>,
+						 <&scmi_clk IMX95_CLK_SYSPLL1_PFD0>;
+			assigned-clock-rates = <133333333>, <667000000>, <500000000>;
+		};
+
+		jpegdec: jpegdec@4c500000 {
+			compatible = "nxp,imx95-jpgdec", "nxp,imx8qxp-jpgdec";
+			reg = <0x0 0x4C500000 0x0 0x00050000>;
+			interrupts = <GIC_SPI 295 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 296 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 297 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 298 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&scmi_clk IMX95_CLK_VPU>,
+				 <&vpu_blk_ctrl IMX95_CLK_VPUBLK_JPEG_DEC>;
+			assigned-clocks = <&vpu_blk_ctrl IMX95_CLK_VPUBLK_JPEG_DEC>;
+			assigned-clock-parents = <&scmi_clk IMX95_CLK_VPUJPEG>;
+			power-domains = <&scmi_devpd IMX95_PD_VPU>;
+		};
+
+		jpegenc: jpegenc@4c550000 {
+			compatible = "nxp,imx95-jpgenc", "nxp,imx8qxp-jpgenc";
+			reg = <0x0 0x4C550000 0x0 0x00050000>;
+			interrupts = <GIC_SPI 291 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 292 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 293 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 294 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&scmi_clk IMX95_CLK_VPU>,
+				 <&vpu_blk_ctrl IMX95_CLK_VPUBLK_JPEG_ENC>;
+			assigned-clocks = <&vpu_blk_ctrl IMX95_CLK_VPUBLK_JPEG_DEC>;
+			assigned-clock-parents = <&scmi_clk IMX95_CLK_VPUJPEG>;
+			power-domains = <&scmi_devpd IMX95_PD_VPU>;
+		};
+
 		netcmix_blk_ctrl: syscon@4c810000 {
 			compatible = "nxp,imx95-netcmix-blk-ctrl", "syscon";
 			reg = <0x0 0x4c810000 0x0 0x8>;
--

2.34.1

#11 lore raw

Re: [PATCH RESEND 2/2] arm64: dts: imx95: add jpeg encode and decode nodes

Quoted 5 lines · Frank Li
Quoted 1 line · Frank Li

Add jpeg encode\decode and related nodes for i.MX95.

shawn:
can you help check this?

It looks good to me. But has the binding change been applied already?

Shawn

#12 lore raw

Re: [PATCH RESEND 2/2] arm64: dts: imx95: add jpeg encode and decode nodes

Quoted 8 lines · Shawn Guo
Quoted 5 lines · Frank Li
Quoted 1 line · Frank Li

Add jpeg encode\decode and related nodes for i.MX95.

shawn:
can you help check this?

It looks good to me. But has the binding change been applied already?

Ok, found the binding change on linux-next. Applied 2/2, thanks!