Skip to contentSkip to conversation

dt-bindings: media: mediatek-jpeg-encoder: change max iommus count

PATCH Superseded Eugen Hristev 3 participants 4 messages Jan 2, 2024 – Jan 9, 2024

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 dt-bindings: media: mediatek-jpeg-encoder: change max iommus count

MT8186 has 4 iommus in the list, to cope with this situation, adjust the maxItems to 4 (instead of previous 2).
Add also minItems as 1 since iommus are mandatory, to avoid warning on the example.

---
Changes in v2:
fixed typo in subject

 .../devicetree/bindings/media/mediatek-jpeg-encoder.yaml       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/media/mediatek-jpeg-encoder.yaml +2 -1
index 37800e1908cc..60c75b9312e8 100644
@@ -38,7 +38,8 @@ properties:
     maxItems: 1
 
   iommus:
-    maxItems: 2
+    minItems: 1
+    maxItems: 4
     description: |
       Points to the respective IOMMU block with master port as argument, see
       Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details.
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 2/2 arm64: dts: mediatek: mt8186: Add jpgenc node

From: Allen-KH Cheng <[email protected]>

Add JPEG encoder node.

---
Changes in v2:
- renamed node
- reordered props

 arch/arm64/boot/dts/mediatek/mt8186.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/mediatek/mt8186.dtsi +13 -0
index e451b6c8cd9e..8e57a7be67ad 100644
@@ -2054,6 +2054,19 @@ venc: video-encoder@17020000 {
 			mediatek,scp = <&scp>;
 		};
 
+		jpgenc: jpeg-encoder@17030000 {
+			compatible = "mediatek,mt8186-jpgenc", "mediatek,mtk-jpgenc";
+			reg = <0 0x17030000 0 0x10000>;
+			interrupts = <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&vencsys CLK_VENC_CKE2_JPGENC>;
+			clock-names = "jpgenc";
+			iommus = <&iommu_mm IOMMU_PORT_L7_JPGENC_Y_RDMA>,
+				 <&iommu_mm IOMMU_PORT_L7_JPGENC_C_RDMA>,
+				 <&iommu_mm IOMMU_PORT_L7_JPGENC_Q_TABLE>,
+				 <&iommu_mm IOMMU_PORT_L7_JPGENC_BSDMA>;
+			power-domains = <&spm MT8186_POWER_DOMAIN_VENC>;
+		};
+
 		camsys: clock-controller@1a000000 {
 			compatible = "mediatek,mt8186-camsys";
 			reg = <0 0x1a000000 0 0x1000>;
Signature · 1 line
2.34.1
maintainer Reviewed-by on v2 2/2
#2 lore raw

Re: [PATCH v2 2/2] arm64: dts: mediatek: mt8186: Add jpgenc node

Il 02/01/24 11:38, Eugen Hristev ha scritto:

Quoted 11 lines

From: Allen-KH Cheng <[email protected]>

Add JPEG encoder node.

maintainer
#3 lore raw
In reply to Eugen Hristev
Quoted 4 lines · Eugen Hristev

MT8186 has 4 iommus in the list, to cope with this situation, adjust the maxItems to 4 (instead of previous 2).
Add also minItems as 1 since iommus are mandatory, to avoid warning on the example.

maxItems alone means minItems is the same size. If IOMMU is required, then 'required' is where that is defined. Is there a case where 1 IOMMU is valid? If so, what h/w has this case.

Rob