xref: /openbmc/linux/Documentation/devicetree/bindings/media/ti,cal.yaml (revision e978d5271f7138b6d7c1dd90fe1b5492bc594b8b)
12099ef02SBenoit Parrot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
22099ef02SBenoit Parrot%YAML 1.2
32099ef02SBenoit Parrot---
42099ef02SBenoit Parrot$id: http://devicetree.org/schemas/media/ti,cal.yaml#
52099ef02SBenoit Parrot$schema: http://devicetree.org/meta-schemas/core.yaml#
62099ef02SBenoit Parrot
72099ef02SBenoit Parrottitle: Texas Instruments DRA72x CAMERA ADAPTATION LAYER (CAL) Device Tree Bindings
82099ef02SBenoit Parrot
92099ef02SBenoit Parrotmaintainers:
102099ef02SBenoit Parrot  - Benoit Parrot <bparrot@ti.com>
112099ef02SBenoit Parrot
122099ef02SBenoit Parrotdescription: |-
132099ef02SBenoit Parrot  The Camera Adaptation Layer (CAL) is a key component for image capture
142099ef02SBenoit Parrot  applications. The capture module provides the system interface and the
152099ef02SBenoit Parrot  processing capability to connect CSI2 image-sensor modules to the
162099ef02SBenoit Parrot  DRA72x device.
172099ef02SBenoit Parrot
18066a94e2SRob Herring  CAL supports 2 camera port nodes on MIPI bus.
192099ef02SBenoit Parrot
202099ef02SBenoit Parrotproperties:
212099ef02SBenoit Parrot  compatible:
222099ef02SBenoit Parrot    enum:
232099ef02SBenoit Parrot      # for DRA72 controllers
242099ef02SBenoit Parrot      - ti,dra72-cal
252099ef02SBenoit Parrot      # for DRA72 controllers pre ES2.0
262099ef02SBenoit Parrot      - ti,dra72-pre-es2-cal
272099ef02SBenoit Parrot      # for DRA76 controllers
282099ef02SBenoit Parrot      - ti,dra76-cal
292099ef02SBenoit Parrot      # for AM654 controllers
302099ef02SBenoit Parrot      - ti,am654-cal
312099ef02SBenoit Parrot
322099ef02SBenoit Parrot  reg:
332099ef02SBenoit Parrot    minItems: 2
342099ef02SBenoit Parrot    items:
352099ef02SBenoit Parrot      - description: The CAL main register region
362099ef02SBenoit Parrot      - description: The RX Core0 (DPHY0) register region
372099ef02SBenoit Parrot      - description: The RX Core1 (DPHY1) register region
382099ef02SBenoit Parrot
392099ef02SBenoit Parrot  reg-names:
402099ef02SBenoit Parrot    minItems: 2
412099ef02SBenoit Parrot    items:
422099ef02SBenoit Parrot      - const: cal_top
432099ef02SBenoit Parrot      - const: cal_rx_core0
442099ef02SBenoit Parrot      - const: cal_rx_core1
452099ef02SBenoit Parrot
462099ef02SBenoit Parrot  interrupts:
472099ef02SBenoit Parrot    maxItems: 1
482099ef02SBenoit Parrot
492099ef02SBenoit Parrot  ti,camerrx-control:
502099ef02SBenoit Parrot    $ref: "/schemas/types.yaml#/definitions/phandle-array"
512099ef02SBenoit Parrot    description:
522099ef02SBenoit Parrot      phandle to the device control module and offset to the
532099ef02SBenoit Parrot      control_camerarx_core register
542099ef02SBenoit Parrot
552099ef02SBenoit Parrot  clocks:
562099ef02SBenoit Parrot    maxItems: 1
572099ef02SBenoit Parrot
582099ef02SBenoit Parrot  clock-names:
592099ef02SBenoit Parrot    const: fck
602099ef02SBenoit Parrot
612099ef02SBenoit Parrot  power-domains:
622099ef02SBenoit Parrot    description:
632099ef02SBenoit Parrot      List of phandle and PM domain specifier as documented in
642099ef02SBenoit Parrot      Documentation/devicetree/bindings/power/power_domain.txt
652099ef02SBenoit Parrot    maxItems: 1
662099ef02SBenoit Parrot
672099ef02SBenoit Parrot  ports:
68066a94e2SRob Herring    $ref: /schemas/graph.yaml#/properties/ports
692099ef02SBenoit Parrot
702099ef02SBenoit Parrot    properties:
712099ef02SBenoit Parrot      port@0:
72066a94e2SRob Herring        $ref: /schemas/graph.yaml#/$defs/port-base
73066a94e2SRob Herring        unevaluatedProperties: false
742099ef02SBenoit Parrot        description: CSI2 Port #0
752099ef02SBenoit Parrot
76066a94e2SRob Herring        properties:
772099ef02SBenoit Parrot          endpoint:
78066a94e2SRob Herring            $ref: video-interfaces.yaml#
79066a94e2SRob Herring            unevaluatedProperties: false
802099ef02SBenoit Parrot
812099ef02SBenoit Parrot            properties:
822099ef02SBenoit Parrot              clock-lanes:
832099ef02SBenoit Parrot                maxItems: 1
842099ef02SBenoit Parrot
852099ef02SBenoit Parrot              data-lanes:
862099ef02SBenoit Parrot                minItems: 1
872099ef02SBenoit Parrot                maxItems: 4
882099ef02SBenoit Parrot
892099ef02SBenoit Parrot      port@1:
90066a94e2SRob Herring        $ref: /schemas/graph.yaml#/$defs/port-base
91066a94e2SRob Herring        unevaluatedProperties: false
922099ef02SBenoit Parrot        description: CSI2 Port #1
932099ef02SBenoit Parrot
94066a94e2SRob Herring        properties:
952099ef02SBenoit Parrot          endpoint:
96066a94e2SRob Herring            $ref: video-interfaces.yaml#
97066a94e2SRob Herring            unevaluatedProperties: false
982099ef02SBenoit Parrot
992099ef02SBenoit Parrot            properties:
1002099ef02SBenoit Parrot              clock-lanes:
1012099ef02SBenoit Parrot                maxItems: 1
1022099ef02SBenoit Parrot
1032099ef02SBenoit Parrot              data-lanes:
1042099ef02SBenoit Parrot                minItems: 1
1052099ef02SBenoit Parrot                maxItems: 4
1062099ef02SBenoit Parrot
1072099ef02SBenoit Parrot    required:
1082099ef02SBenoit Parrot      - port@0
1092099ef02SBenoit Parrot
1102099ef02SBenoit Parrotrequired:
1112099ef02SBenoit Parrot  - compatible
1122099ef02SBenoit Parrot  - reg
1132099ef02SBenoit Parrot  - reg-names
1142099ef02SBenoit Parrot  - interrupts
1152099ef02SBenoit Parrot  - ti,camerrx-control
1162099ef02SBenoit Parrot
1172099ef02SBenoit ParrotadditionalProperties: false
1182099ef02SBenoit Parrot
1192099ef02SBenoit Parrotexamples:
1202099ef02SBenoit Parrot  - |
1212099ef02SBenoit Parrot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1222099ef02SBenoit Parrot
1232099ef02SBenoit Parrot    cal: cal@4845b000 {
1242099ef02SBenoit Parrot        compatible = "ti,dra72-cal";
1252099ef02SBenoit Parrot        reg = <0x4845B000 0x400>,
1262099ef02SBenoit Parrot              <0x4845B800 0x40>,
1272099ef02SBenoit Parrot              <0x4845B900 0x40>;
1282099ef02SBenoit Parrot        reg-names = "cal_top",
1292099ef02SBenoit Parrot                    "cal_rx_core0",
1302099ef02SBenoit Parrot                    "cal_rx_core1";
1312099ef02SBenoit Parrot        interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
1322099ef02SBenoit Parrot        ti,camerrx-control = <&scm_conf 0xE94>;
1332099ef02SBenoit Parrot
1342099ef02SBenoit Parrot        ports {
1352099ef02SBenoit Parrot              #address-cells = <1>;
1362099ef02SBenoit Parrot              #size-cells = <0>;
1372099ef02SBenoit Parrot
1382099ef02SBenoit Parrot              csi2_0: port@0 {
1392099ef02SBenoit Parrot                    reg = <0>;
1402099ef02SBenoit Parrot                    csi2_phy0: endpoint {
1412099ef02SBenoit Parrot                           remote-endpoint = <&csi2_cam0>;
1422099ef02SBenoit Parrot                           clock-lanes = <0>;
1432099ef02SBenoit Parrot                           data-lanes = <1 2>;
1442099ef02SBenoit Parrot                    };
1452099ef02SBenoit Parrot              };
1462099ef02SBenoit Parrot        };
1472099ef02SBenoit Parrot    };
1482099ef02SBenoit Parrot
14951a21e0eSRob Herring    i2c {
1502099ef02SBenoit Parrot        clock-frequency = <400000>;
1512099ef02SBenoit Parrot        #address-cells = <1>;
1522099ef02SBenoit Parrot        #size-cells = <0>;
1532099ef02SBenoit Parrot
1542099ef02SBenoit Parrot        camera-sensor@3c {
1552099ef02SBenoit Parrot               compatible = "ovti,ov5640";
1562099ef02SBenoit Parrot               reg = <0x3c>;
157*e978d527SMaxime Ripard               AVDD-supply = <&reg_2p8v>;
158*e978d527SMaxime Ripard               DOVDD-supply = <&reg_1p8v>;
159*e978d527SMaxime Ripard               DVDD-supply = <&reg_1p5v>;
1602099ef02SBenoit Parrot               clocks = <&clk_ov5640_fixed>;
1612099ef02SBenoit Parrot               clock-names = "xclk";
1622099ef02SBenoit Parrot
1632099ef02SBenoit Parrot               port {
1642099ef02SBenoit Parrot                    csi2_cam0: endpoint {
1652099ef02SBenoit Parrot                            remote-endpoint = <&csi2_phy0>;
1662099ef02SBenoit Parrot                            clock-lanes = <0>;
1672099ef02SBenoit Parrot                            data-lanes = <1 2>;
1682099ef02SBenoit Parrot                    };
1692099ef02SBenoit Parrot               };
1702099ef02SBenoit Parrot        };
1712099ef02SBenoit Parrot    };
1722099ef02SBenoit Parrot
1732099ef02SBenoit Parrot...
174