0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/media/xilinx/xlnx,csi2rxss.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Xilinx MIPI CSI-2 Receiver Subsystem
0008
0009 maintainers:
0010 - Vishal Sagar <vishal.sagar@xilinx.com>
0011
0012 description: |
0013 The Xilinx MIPI CSI-2 Receiver Subsystem is used to capture MIPI CSI-2
0014 traffic from compliant camera sensors and send the output as AXI4 Stream
0015 video data for image processing.
0016 The subsystem consists of a MIPI D-PHY in slave mode which captures the
0017 data packets. This is passed along the MIPI CSI-2 Rx IP which extracts the
0018 packet data. The optional Video Format Bridge (VFB) converts this data to
0019 AXI4 Stream video data.
0020 For more details, please refer to PG232 Xilinx MIPI CSI-2 Receiver Subsystem.
0021 Please note that this bindings includes only the MIPI CSI-2 Rx controller
0022 and Video Format Bridge and not D-PHY.
0023
0024 properties:
0025 compatible:
0026 items:
0027 - enum:
0028 - xlnx,mipi-csi2-rx-subsystem-5.0
0029
0030 reg:
0031 maxItems: 1
0032
0033 interrupts:
0034 maxItems: 1
0035
0036 clocks:
0037 description: List of clock specifiers
0038 items:
0039 - description: AXI Lite clock
0040 - description: Video clock
0041
0042 clock-names:
0043 items:
0044 - const: lite_aclk
0045 - const: video_aclk
0046
0047 xlnx,csi-pxl-format:
0048 description: |
0049 This denotes the CSI Data type selected in hw design.
0050 Packets other than this data type (except for RAW8 and
0051 User defined data types) will be filtered out.
0052 Possible values are as below -
0053 0x1e - YUV4228B
0054 0x1f - YUV42210B
0055 0x20 - RGB444
0056 0x21 - RGB555
0057 0x22 - RGB565
0058 0x23 - RGB666
0059 0x24 - RGB888
0060 0x28 - RAW6
0061 0x29 - RAW7
0062 0x2a - RAW8
0063 0x2b - RAW10
0064 0x2c - RAW12
0065 0x2d - RAW14
0066 0x2e - RAW16
0067 0x2f - RAW20
0068 $ref: /schemas/types.yaml#/definitions/uint32
0069 oneOf:
0070 - minimum: 0x1e
0071 maximum: 0x24
0072 - minimum: 0x28
0073 maximum: 0x2f
0074
0075 xlnx,vfb:
0076 type: boolean
0077 description: Present when Video Format Bridge is enabled in IP configuration
0078
0079 xlnx,en-csi-v2-0:
0080 type: boolean
0081 description: Present if CSI v2 is enabled in IP configuration.
0082
0083 xlnx,en-vcx:
0084 type: boolean
0085 description: |
0086 When present, there are maximum 16 virtual channels, else only 4.
0087
0088 xlnx,en-active-lanes:
0089 type: boolean
0090 description: |
0091 Present if the number of active lanes can be re-configured at
0092 runtime in the Protocol Configuration Register. Otherwise all lanes,
0093 as set in IP configuration, are always active.
0094
0095 video-reset-gpios:
0096 description: Optional specifier for a GPIO that asserts video_aresetn.
0097 maxItems: 1
0098
0099 ports:
0100 $ref: /schemas/graph.yaml#/properties/ports
0101
0102 properties:
0103 port@0:
0104 $ref: /schemas/graph.yaml#/$defs/port-base
0105 description: |
0106 Input / sink port node, single endpoint describing the
0107 CSI-2 transmitter.
0108
0109 properties:
0110 endpoint:
0111 $ref: /schemas/media/video-interfaces.yaml#
0112 unevaluatedProperties: false
0113
0114 properties:
0115 data-lanes:
0116 description: |
0117 This is required only in the sink port 0 endpoint which
0118 connects to MIPI CSI-2 source like sensor.
0119 The possible values are -
0120 1 - For 1 lane enabled in IP.
0121 1 2 - For 2 lanes enabled in IP.
0122 1 2 3 - For 3 lanes enabled in IP.
0123 1 2 3 4 - For 4 lanes enabled in IP.
0124 items:
0125 - const: 1
0126 - const: 2
0127 - const: 3
0128 - const: 4
0129
0130 required:
0131 - data-lanes
0132
0133 unevaluatedProperties: false
0134
0135 port@1:
0136 $ref: /schemas/graph.yaml#/properties/port
0137 description: |
0138 Output / source port node, endpoint describing modules
0139 connected the CSI-2 receiver.
0140
0141 required:
0142 - compatible
0143 - reg
0144 - interrupts
0145 - clocks
0146 - clock-names
0147 - ports
0148
0149 allOf:
0150 - if:
0151 required:
0152 - xlnx,vfb
0153 then:
0154 required:
0155 - xlnx,csi-pxl-format
0156 else:
0157 properties:
0158 xlnx,csi-pxl-format: false
0159
0160 - if:
0161 not:
0162 required:
0163 - xlnx,en-csi-v2-0
0164 then:
0165 properties:
0166 xlnx,en-vcx: false
0167
0168 additionalProperties: false
0169
0170 examples:
0171 - |
0172 #include <dt-bindings/gpio/gpio.h>
0173 xcsi2rxss_1: csi2rx@a0020000 {
0174 compatible = "xlnx,mipi-csi2-rx-subsystem-5.0";
0175 reg = <0xa0020000 0x10000>;
0176 interrupt-parent = <&gic>;
0177 interrupts = <0 95 4>;
0178 xlnx,csi-pxl-format = <0x2a>;
0179 xlnx,vfb;
0180 xlnx,en-active-lanes;
0181 xlnx,en-csi-v2-0;
0182 xlnx,en-vcx;
0183 clock-names = "lite_aclk", "video_aclk";
0184 clocks = <&misc_clk_0>, <&misc_clk_1>;
0185 video-reset-gpios = <&gpio 86 GPIO_ACTIVE_LOW>;
0186
0187 ports {
0188 #address-cells = <1>;
0189 #size-cells = <0>;
0190
0191 port@0 {
0192 /* Sink port */
0193 reg = <0>;
0194 csiss_in: endpoint {
0195 data-lanes = <1 2 3 4>;
0196 /* MIPI CSI-2 Camera handle */
0197 remote-endpoint = <&camera_out>;
0198 };
0199 };
0200 port@1 {
0201 /* Source port */
0202 reg = <1>;
0203 csiss_out: endpoint {
0204 remote-endpoint = <&vproc_in>;
0205 };
0206 };
0207 };
0208 };
0209 ...