brintos

brintos / linux-shallow public Read only

0
0
Text · 10.4 KiB · cf54176 Raw
362 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only2# Copyright (C) 2020 Renesas Electronics Corp.3%YAML 1.24---5$id: http://devicetree.org/schemas/media/renesas,vin.yaml#6$schema: http://devicetree.org/meta-schemas/core.yaml#7 8title: Renesas R-Car Video Input (VIN)9 10maintainers:11  - Niklas Söderlund <niklas.soderlund@ragnatech.se>12 13description:14  The R-Car Video Input (VIN) device provides video input capabilities for the15  Renesas R-Car family of devices.16 17  Each VIN instance has a single parallel input that supports RGB and YUV video,18  with both external synchronization and BT.656 synchronization for the latter.19  Depending on the instance the VIN input is connected to external SoC pins, or20  on Gen3 and RZ/G2 platforms to a CSI-2 receiver.21 22properties:23  compatible:24    oneOf:25      - items:26          - enum:27              - renesas,vin-r8a7742  # RZ/G1H28              - renesas,vin-r8a7743  # RZ/G1M29              - renesas,vin-r8a7744  # RZ/G1N30              - renesas,vin-r8a7745  # RZ/G1E31              - renesas,vin-r8a77470 # RZ/G1C32              - renesas,vin-r8a7790  # R-Car H233              - renesas,vin-r8a7791  # R-Car M2-W34              - renesas,vin-r8a7792  # R-Car V2H35              - renesas,vin-r8a7793  # R-Car M2-N36              - renesas,vin-r8a7794  # R-Car E237          - const: renesas,rcar-gen2-vin # Generic R-Car Gen2 or RZ/G138 39      - items:40          - enum:41              - renesas,vin-r8a774a1 # RZ/G2M42              - renesas,vin-r8a774b1 # RZ/G2N43              - renesas,vin-r8a774c0 # RZ/G2E44              - renesas,vin-r8a774e1 # RZ/G2H45              - renesas,vin-r8a7778  # R-Car M146              - renesas,vin-r8a7779  # R-Car H147              - renesas,vin-r8a7795  # R-Car H348              - renesas,vin-r8a7796  # R-Car M3-W49              - renesas,vin-r8a77961 # R-Car M3-W+50              - renesas,vin-r8a77965 # R-Car M3-N51              - renesas,vin-r8a77970 # R-Car V3M52              - renesas,vin-r8a77980 # R-Car V3H53              - renesas,vin-r8a77990 # R-Car E354              - renesas,vin-r8a77995 # R-Car D355      - items:56          - enum:57              - renesas,vin-r8a779a0 # R-Car V3U58              - renesas,vin-r8a779g0 # R-Car V4H59              - renesas,vin-r8a779h0 # R-Car V4M60          - const: renesas,rcar-gen4-vin # Generic R-Car Gen461 62  reg:63    maxItems: 164 65  interrupts:66    maxItems: 167 68  clocks:69    maxItems: 170 71  power-domains:72    maxItems: 173 74  resets:75    maxItems: 176 77  # The per-board settings for Gen2 and RZ/G1 platforms:78  port:79    $ref: /schemas/graph.yaml#/$defs/port-base80    unevaluatedProperties: false81    description:82      A node containing a parallel input83 84    properties:85      endpoint:86        $ref: video-interfaces.yaml#87        unevaluatedProperties: false88 89        properties:90          hsync-active:91            description:92              If both HSYNC and VSYNC polarities are not specified, embedded93              synchronization is selected.94            default: 195 96          vsync-active:97            description:98              If both HSYNC and VSYNC polarities are not specified, embedded99              synchronization is selected.100            default: 1101 102          field-even-active: true103 104          bus-width: true105 106          data-shift: true107 108          data-enable-active:109            description: Polarity of CLKENB signal110            default: 1111 112          pclk-sample: true113 114          data-active: true115 116  # The per-board settings for Gen3 and RZ/G2 platforms:117  renesas,id:118    description: VIN channel number119    $ref: /schemas/types.yaml#/definitions/uint32120    minimum: 0121    maximum: 31122 123  ports:124    $ref: /schemas/graph.yaml#/properties/ports125 126    properties:127      port@0:128        $ref: /schemas/graph.yaml#/$defs/port-base129        unevaluatedProperties: false130        description:131          Input port node, single endpoint describing a parallel input source.132 133        properties:134          endpoint:135            $ref: video-interfaces.yaml#136            unevaluatedProperties: false137 138            properties:139              hsync-active:140                description:141                  If both HSYNC and VSYNC polarities are not specified, embedded142                  synchronization is selected.143                default: 1144 145              vsync-active:146                description:147                  If both HSYNC and VSYNC polarities are not specified, embedded148                  synchronization is selected.149                default: 1150 151              field-even-active: true152 153              bus-width: true154 155              data-shift: true156 157              data-enable-active:158                description: Polarity of CLKENB signal159                default: 1160 161              pclk-sample: true162 163              data-active: true164 165      port@1:166        $ref: /schemas/graph.yaml#/properties/port167        description:168          Input port node, multiple endpoints describing all the R-Car CSI-2169          modules connected the VIN.170 171        properties:172          endpoint@0:173            $ref: /schemas/graph.yaml#/properties/endpoint174            description: Endpoint connected to CSI20.175 176          endpoint@1:177            $ref: /schemas/graph.yaml#/properties/endpoint178            description: Endpoint connected to CSI21.179 180          endpoint@2:181            $ref: /schemas/graph.yaml#/properties/endpoint182            description: Endpoint connected to CSI40.183 184          endpoint@3:185            $ref: /schemas/graph.yaml#/properties/endpoint186            description: Endpoint connected to CSI41.187 188        anyOf:189          - required:190              - endpoint@0191          - required:192              - endpoint@1193          - required:194              - endpoint@2195          - required:196              - endpoint@3197 198      port@2:199        $ref: /schemas/graph.yaml#/properties/port200        description:201          Input port node, multiple endpoints describing all the R-Car ISP202          modules connected the VIN.203 204        properties:205          endpoint@0:206            $ref: /schemas/graph.yaml#/properties/endpoint207            description: Endpoint connected to ISP0.208 209          endpoint@1:210            $ref: /schemas/graph.yaml#/properties/endpoint211            description: Endpoint connected to ISP1.212 213          endpoint@2:214            $ref: /schemas/graph.yaml#/properties/endpoint215            description: Endpoint connected to ISP2.216 217          endpoint@3:218            $ref: /schemas/graph.yaml#/properties/endpoint219            description: Endpoint connected to ISP3.220 221required:222  - compatible223  - reg224  - interrupts225  - clocks226  - power-domains227 228allOf:229  - if:230      not:231        properties:232          compatible:233            contains:234              enum:235                - renesas,vin-r8a7778236                - renesas,vin-r8a7779237    then:238      required:239        - resets240 241  - if:242      properties:243        compatible:244          contains:245            enum:246              - renesas,vin-r8a7778247              - renesas,vin-r8a7779248              - renesas,rcar-gen2-vin249    then:250      required:251        - port252    else:253      required:254        - renesas,id255        - ports256 257additionalProperties: false258 259examples:260  # Device node example for Gen2 platform261  - |262    #include <dt-bindings/clock/r8a7790-cpg-mssr.h>263    #include <dt-bindings/interrupt-controller/arm-gic.h>264    #include <dt-bindings/power/r8a7790-sysc.h>265 266    vin1: vin@e6ef1000 {267            compatible = "renesas,vin-r8a7790",268                         "renesas,rcar-gen2-vin";269            reg = <0xe6ef1000 0x1000>;270            interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>;271            clocks = <&cpg CPG_MOD 810>;272            power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;273            resets = <&cpg 810>;274 275            port {276                    vin1ep0: endpoint {277                            remote-endpoint = <&adv7180>;278                            bus-width = <8>;279                    };280            };281    };282 283  # Device node example for Gen3 platform with only CSI-2284  - |285    #include <dt-bindings/clock/r8a7795-cpg-mssr.h>286    #include <dt-bindings/interrupt-controller/arm-gic.h>287    #include <dt-bindings/power/r8a7795-sysc.h>288 289    vin0: video@e6ef0000 {290            compatible = "renesas,vin-r8a7795";291            reg = <0xe6ef0000 0x1000>;292            interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;293            clocks = <&cpg CPG_MOD 811>;294            power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;295            resets = <&cpg 811>;296            renesas,id = <0>;297 298            ports {299                    #address-cells = <1>;300                    #size-cells = <0>;301 302                    port@1 {303                            #address-cells = <1>;304                            #size-cells = <0>;305 306                            reg = <1>;307 308                            vin0csi20: endpoint@0 {309                                    reg = <0>;310                                    remote-endpoint = <&csi20vin0>;311                            };312                            vin0csi40: endpoint@2 {313                                    reg = <2>;314                                    remote-endpoint = <&csi40vin0>;315                            };316                    };317            };318    };319 320  # Device node example for Gen3 platform with CSI-2 and parallel321  - |322    #include <dt-bindings/clock/r8a77970-cpg-mssr.h>323    #include <dt-bindings/interrupt-controller/arm-gic.h>324    #include <dt-bindings/power/r8a77970-sysc.h>325 326    vin2: video@e6ef2000 {327            compatible = "renesas,vin-r8a77970";328            reg = <0xe6ef2000 0x1000>;329            interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;330            clocks = <&cpg CPG_MOD 809>;331            power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;332            resets = <&cpg 809>;333            renesas,id = <2>;334 335            ports {336                    #address-cells = <1>;337                    #size-cells = <0>;338 339                    port@0 {340                            reg = <0>;341 342                            vin2_in: endpoint {343                                    remote-endpoint = <&adv7612_out>;344                                    hsync-active = <0>;345                                    vsync-active = <0>;346                            };347                    };348 349                    port@1 {350                            #address-cells = <1>;351                            #size-cells = <0>;352 353                            reg = <1>;354 355                            vin2csi40: endpoint@2 {356                                    reg = <2>;357                                    remote-endpoint = <&csi40vin2>;358                            };359                    };360            };361    };362