Documentation / devicetree / bindings / media / samsung,s5p-mfc.yaml


Based on kernel version 6.8. Page generated on 2024-03-11 21:26 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/samsung,s5p-mfc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung Exynos Multi Format Codec (MFC)

maintainers:
  - Marek Szyprowski <m.szyprowski@samsung.com>
  - Aakarsh Jain <aakarsh.jain@samsung.com>

description:
  Multi Format Codec (MFC) is the IP present in Samsung SoCs which
  supports high resolution decoding and encoding functionalities.

properties:
  compatible:
    oneOf:
      - enum:
          - samsung,exynos5433-mfc        # Exynos5433
          - samsung,mfc-v5                # Exynos4
          - samsung,mfc-v6                # Exynos5
          - samsung,mfc-v7                # Exynos5420
          - samsung,mfc-v8                # Exynos5800
          - samsung,mfc-v10               # Exynos7880
          - tesla,fsd-mfc                 # Tesla FSD
      - items:
          - enum:
              - samsung,exynos3250-mfc    # Exynos3250
          - const: samsung,mfc-v7         # Fall back for Exynos3250

  reg:
    maxItems: 1

  clocks:
    minItems: 1
    maxItems: 3

  clock-names:
    minItems: 1
    maxItems: 3

  interrupts:
    maxItems: 1

  iommus:
    minItems: 1
    maxItems: 2

  iommu-names:
    minItems: 1
    items:
      - const: left
      - const: right

  power-domains:
    maxItems: 1

  memory-region:
    minItems: 1
    maxItems: 2

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - interrupts

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,exynos3250-mfc
    then:
      properties:
        clocks:
          maxItems: 2
        clock-names:
          items:
            - const: mfc
            - const: sclk_mfc
        iommus:
          maxItems: 1
        iommu-names: false

  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,exynos5433-mfc
    then:
      properties:
        clocks:
          maxItems: 3
        clock-names:
          items:
            - const: pclk
            - const: aclk
            - const: aclk_xiu
        iommus:
          minItems: 2
        iommu-names:
          minItems: 2

  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,mfc-v5
    then:
      properties:
        clocks:
          maxItems: 2
        clock-names:
          items:
            - const: mfc
            - const: sclk_mfc
        iommus:
          minItems: 2
        iommu-names:
          minItems: 2

  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,mfc-v6
              - samsung,mfc-v8
    then:
      properties:
        clocks:
          maxItems: 1
        clock-names:
          items:
            - const: mfc
        iommus:
          minItems: 2
        iommu-names:
          minItems: 2

  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,mfc-v7
    then:
      properties:
        clocks:
          minItems: 1
          maxItems: 2

  - if:
      properties:
        compatible:
          contains:
            enum:
              - tesla,fsd-mfc
    then:
      properties:
        clocks:
          maxItems: 1
        clock-names:
          items:
            - const: mfc
        iommus:
          maxItems: 2
        iommus-names: false

examples:
  - |
    #include <dt-bindings/clock/exynos4.h>
    #include <dt-bindings/clock/exynos-audss-clk.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>
 
    codec@13400000 {
        compatible = "samsung,mfc-v5";
        reg = <0x13400000 0x10000>;
        interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
        power-domains = <&pd_mfc>;
        clocks = <&clock CLK_MFC>, <&clock CLK_SCLK_MFC>;
        clock-names = "mfc", "sclk_mfc";
        iommus = <&sysmmu_mfc_l>, <&sysmmu_mfc_r>;
        iommu-names = "left", "right";
    };