brintos

brintos / linux-shallow public Read only

0
0
Text · 11.9 KiB · a374472 Raw
417 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2# Copyright (C) 2019 Renesas Electronics Corp.3%YAML 1.24---5$id: http://devicetree.org/schemas/media/i2c/maxim,max9286.yaml#6$schema: http://devicetree.org/meta-schemas/core.yaml#7 8title: Maxim Integrated Quad GMSL Deserializer9 10maintainers:11  - Jacopo Mondi <jacopo+renesas@jmondi.org>12  - Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>13  - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>14  - Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>15 16description: |17  The MAX9286 deserializer receives video data on up to 4 Gigabit Multimedia18  Serial Links (GMSL) and outputs them on a CSI-2 D-PHY port using up to 4 data19  lanes.20 21  In addition to video data, the GMSL links carry a bidirectional control22  channel that encapsulates I2C messages. The MAX9286 forwards all I2C traffic23  not addressed to itself to the other side of the links, where a GMSL24  serializer will output it on a local I2C bus. In the other direction all I2C25  traffic received over GMSL by the MAX9286 is output on the local I2C bus.26 27properties:28  '#address-cells':29    const: 130 31  '#size-cells':32    const: 033 34  compatible:35    const: maxim,max928636 37  reg:38    description: I2C device address39    maxItems: 140 41  poc-supply:42    description: Regulator providing Power over Coax to all the ports43 44  enable-gpios:45    description: GPIO connected to the \#PWDN pin with inverted polarity46    maxItems: 147 48  gpio-controller: true49 50  '#gpio-cells':51    const: 252 53  maxim,bus-width:54    $ref: /schemas/types.yaml#/definitions/uint3255    enum: [ 24, 27, 32 ]56    description: |57      The GMSL serial data bus width. This setting is normally controlled by58      the BWS pin, but may be overridden with this property. The value must59      match the configuration of the remote serializers.60 61  maxim,i2c-remote-bus-hz:62    enum: [ 8470, 28300, 84700, 105000, 173000, 339000, 533000, 837000 ]63    default: 10500064    description: |65      The I2C clock frequency for the remote I2C buses. The value must match66      the configuration of the remote serializers.67 68  maxim,reverse-channel-microvolt:69    minimum: 3000070    maximum: 20000071    default: 17000072    description: |73      Initial amplitude of the reverse control channel, in micro volts.74 75      The initial amplitude shall be adjusted to a value compatible with the76      configuration of the connected remote serializer.77 78      Some camera modules (for example RDACM20) include an on-board MCU that79      pre-programs the embedded serializer with power supply noise immunity80      (high-threshold) enabled. A typical value of the deserializer's reverse81      channel amplitude to communicate with pre-programmed serializers is82      170000 micro volts.83 84      A typical value for the reverse channel amplitude to communicate with85      a remote serializer whose high-threshold noise immunity is not enabled86      is 100000 micro volts87 88  maxim,gpio-poc:89    $ref: /schemas/types.yaml#/definitions/uint32-array90    minItems: 291    maxItems: 292    description: |93      Index of the MAX9286 gpio output line (0 or 1) that controls Power over94      Coax to the cameras and its associated polarity flag.95 96      The property accepts an array of two unsigned integers, the first being97      the gpio line index (0 or 1) and the second being the gpio line polarity98      flag (GPIO_ACTIVE_HIGH or GPIO_ACTIVE_LOW) as defined in99      <include/dt-bindings/gpio/gpio.h>.100 101      When the remote cameras power is controlled by one of the MAX9286 gpio102      lines, this property has to be used to specify which line among the two103      available ones controls the remote camera power enablement.104 105      When this property is used it is not possible to register a gpio106      controller as the gpio lines are controlled directly by the MAX9286 and107      not available for consumers, nor the 'poc-supply' property should be108      specified.109 110  ports:111    $ref: /schemas/graph.yaml#/properties/ports112 113    properties:114      port@0:115        $ref: /schemas/graph.yaml#/properties/port116        description: GMSL Input 0117 118      port@1:119        $ref: /schemas/graph.yaml#/properties/port120        description: GMSL Input 1121 122      port@2:123        $ref: /schemas/graph.yaml#/properties/port124        description: GMSL Input 2125 126      port@3:127        $ref: /schemas/graph.yaml#/properties/port128        description: GMSL Input 3129 130      port@4:131        $ref: /schemas/graph.yaml#/$defs/port-base132        unevaluatedProperties: false133        description: CSI-2 Output134 135        properties:136          endpoint:137            $ref: /schemas/media/video-interfaces.yaml#138            unevaluatedProperties: false139 140            properties:141              data-lanes: true142 143            required:144              - data-lanes145 146    required:147      - port@4148 149  i2c-mux:150    type: object151    $ref: /schemas/i2c/i2c-mux.yaml#152    unevaluatedProperties: false153    description: |154      Each GMSL link is modelled as a child bus of an i2c bus multiplexer/switch.155 156    patternProperties:157      "^i2c@[0-3]$":158        type: object159        additionalProperties: false160        description: |161          Child node of the i2c bus multiplexer which represents a GMSL link.162          Each serializer device on the GMSL link remote end is represented with163          an i2c-mux child node. The MAX9286 chip supports up to 4 GMSL164          channels.165 166        properties:167          reg:168            description: The index of the GMSL channel.169            maxItems: 1170 171          '#address-cells':172            const: 1173 174          '#size-cells':175            const: 0176 177        patternProperties:178          "^camera@[a-f0-9]+$":179            type: object180            description: |181              The remote camera device, composed by a GMSL serializer and a182              connected video source.183 184            properties:185              compatible:186                description: The remote device compatible string.187 188              reg:189                minItems: 2190                maxItems: 3191                description: |192                  The I2C addresses to be assigned to the remote devices through193                  address reprogramming. The number of entries depends on the194                  requirements of the currently connected remote device.195 196              port:197                $ref: /schemas/graph.yaml#/properties/port198                description: Connection to the MAX9286 sink.199 200            required:201              - compatible202              - reg203              - port204 205            additionalProperties: false206 207patternProperties:208  "^port[0-3]-poc-supply$":209    description: Regulator providing Power over Coax for a particular port210 211required:212  - compatible213  - reg214  - ports215  - i2c-mux216 217allOf:218  # Only one way of specifying power supplies is allowed: 'maxim,gpio-poc',219  # 'poc-supply' or per-port poc-supply. Additionally, if 'maxim,gpio-poc' is220  # present, then 'gpio-controller' isn't allowed.221  - if:222      required:223        - maxim,gpio-poc224    then:225      properties:226        poc-supply: false227        gpio-controller: false228      patternProperties:229        "^port[0-3]-poc-supply$": false230 231  - if:232      required:233        - poc-supply234    then:235      patternProperties:236        "^port[0-3]-poc-supply$": false237 238additionalProperties: false239 240examples:241  - |242    #include <dt-bindings/gpio/gpio.h>243 244    i2c@e66d8000 {245        #address-cells = <1>;246        #size-cells = <0>;247 248        reg = <0 0xe66d8000>;249 250        gmsl-deserializer@2c {251            compatible = "maxim,max9286";252            reg = <0x2c>;253            poc-supply = <&camera_poc_12v>;254            enable-gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;255 256            gpio-controller;257            #gpio-cells = <2>;258 259            maxim,i2c-remote-bus-hz = <339000>;260            maxim,reverse-channel-microvolt = <170000>;261 262            ports {263                #address-cells = <1>;264                #size-cells = <0>;265 266                port@0 {267                    reg = <0>;268 269                    max9286_in0: endpoint {270                        remote-endpoint = <&rdacm20_out0>;271                    };272                };273 274                port@1 {275                    reg = <1>;276 277                    max9286_in1: endpoint {278                        remote-endpoint = <&rdacm20_out1>;279                    };280                };281 282                port@2 {283                    reg = <2>;284 285                    max9286_in2: endpoint {286                        remote-endpoint = <&rdacm20_out2>;287                    };288                };289 290                port@3 {291                    reg = <3>;292 293                    max9286_in3: endpoint {294                        remote-endpoint = <&rdacm20_out3>;295                    };296                };297 298                port@4 {299                    reg = <4>;300 301                    max9286_out: endpoint {302                        data-lanes = <1 2 3 4>;303                        remote-endpoint = <&csi40_in>;304                    };305                };306            };307 308            i2c-mux {309                #address-cells = <1>;310                #size-cells = <0>;311 312                i2c@0 {313                    #address-cells = <1>;314                    #size-cells = <0>;315                    reg = <0>;316 317                    camera@51 {318                        compatible = "imi,rdacm20";319                        reg = <0x51>, <0x61>;320 321                        port {322                            rdacm20_out0: endpoint {323                                remote-endpoint = <&max9286_in0>;324                            };325                        };326 327                    };328                };329 330                i2c@1 {331                    #address-cells = <1>;332                    #size-cells = <0>;333                    reg = <1>;334 335                    camera@52 {336                        compatible = "imi,rdacm20";337                        reg = <0x52>, <0x62>;338 339                        port {340                            rdacm20_out1: endpoint {341                                remote-endpoint = <&max9286_in1>;342                            };343                        };344                    };345                };346 347                i2c@2 {348                    #address-cells = <1>;349                    #size-cells = <0>;350                    reg = <2>;351 352                    camera@53 {353                        compatible = "imi,rdacm20";354                        reg = <0x53>, <0x63>;355 356                        port {357                            rdacm20_out2: endpoint {358                                remote-endpoint = <&max9286_in2>;359                            };360                        };361                    };362                };363 364                i2c@3 {365                    #address-cells = <1>;366                    #size-cells = <0>;367                    reg = <3>;368 369                    camera@54 {370                        compatible = "imi,rdacm20";371                        reg = <0x54>, <0x64>;372 373                        port {374                            rdacm20_out3: endpoint {375                                remote-endpoint = <&max9286_in3>;376                            };377                        };378                    };379                };380            };381        };382 383        /*384        * Example of a deserializer that controls the camera Power over Coax385        * through one of its gpio lines.386        */387        gmsl-deserializer@6c {388            compatible = "maxim,max9286";389            reg = <0x6c>;390            enable-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;391 392            /*393            * The remote camera power is controlled by MAX9286 GPIO line #0.394            * No 'poc-supply' nor 'gpio-controller' are specified.395            */396            maxim,gpio-poc = <0 GPIO_ACTIVE_LOW>;397 398            /*399            * Do not describe connections as they're the same as in the previous400            * example.401            */402            ports {403                #address-cells = <1>;404                #size-cells = <0>;405 406                port@4 {407                    reg = <4>;408                };409            };410 411            i2c-mux {412                #address-cells = <1>;413                #size-cells = <0>;414            };415        };416    };417