Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/media/allwinner,sun4i-a10-csi.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Allwinner A10 CMOS Sensor Interface (CSI) Device Tree Bindings
0008 
0009 maintainers:
0010   - Chen-Yu Tsai <wens@csie.org>
0011   - Maxime Ripard <mripard@kernel.org>
0012 
0013 description: |-
0014   The Allwinner A10 and later has a CMOS Sensor Interface to retrieve
0015   frames from a parallel or BT656 sensor.
0016 
0017 properties:
0018   compatible:
0019     oneOf:
0020       - const: allwinner,sun4i-a10-csi1
0021       - const: allwinner,sun7i-a20-csi0
0022       - items:
0023           - const: allwinner,sun7i-a20-csi1
0024           - const: allwinner,sun4i-a10-csi1
0025       - items:
0026           - const: allwinner,sun8i-r40-csi0
0027           - const: allwinner,sun7i-a20-csi0
0028 
0029   reg:
0030     maxItems: 1
0031 
0032   interrupts:
0033     maxItems: 1
0034 
0035   clocks:
0036     oneOf:
0037       - items:
0038           - description: The CSI interface clock
0039           - description: The CSI DRAM clock
0040 
0041       - items:
0042           - description: The CSI interface clock
0043           - description: The CSI ISP clock
0044           - description: The CSI DRAM clock
0045 
0046   clock-names:
0047     oneOf:
0048       - items:
0049           - const: bus
0050           - const: ram
0051 
0052       - items:
0053           - const: bus
0054           - const: isp
0055           - const: ram
0056 
0057   resets:
0058     maxItems: 1
0059 
0060   # FIXME: This should be made required eventually once every SoC will
0061   # have the MBUS declared.
0062   interconnects:
0063     maxItems: 1
0064 
0065   # FIXME: This should be made required eventually once every SoC will
0066   # have the MBUS declared.
0067   interconnect-names:
0068     const: dma-mem
0069 
0070   port:
0071     $ref: /schemas/graph.yaml#/$defs/port-base
0072     additionalProperties: false
0073 
0074     properties:
0075       endpoint:
0076         $ref: video-interfaces.yaml#
0077         unevaluatedProperties: false
0078 
0079         properties:
0080           bus-width:
0081             enum: [8, 16]
0082 
0083           data-active: true
0084           hsync-active: true
0085           pclk-sample: true
0086           vsync-active: true
0087 
0088         required:
0089           - bus-width
0090           - data-active
0091           - hsync-active
0092           - pclk-sample
0093           - vsync-active
0094 
0095 required:
0096   - compatible
0097   - reg
0098   - interrupts
0099   - clocks
0100 
0101 additionalProperties: false
0102 
0103 examples:
0104   - |
0105     #include <dt-bindings/interrupt-controller/arm-gic.h>
0106     #include <dt-bindings/clock/sun7i-a20-ccu.h>
0107     #include <dt-bindings/reset/sun4i-a10-ccu.h>
0108 
0109     csi0: csi@1c09000 {
0110         compatible = "allwinner,sun7i-a20-csi0";
0111         reg = <0x01c09000 0x1000>;
0112         interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
0113         clocks = <&ccu CLK_AHB_CSI0>, <&ccu CLK_CSI_SCLK>, <&ccu CLK_DRAM_CSI0>;
0114         clock-names = "bus", "isp", "ram";
0115         resets = <&ccu RST_CSI0>;
0116 
0117         port {
0118             csi_from_ov5640: endpoint {
0119                 remote-endpoint = <&ov5640_to_csi>;
0120                 bus-width = <8>;
0121                 hsync-active = <1>; /* Active high */
0122                 vsync-active = <0>; /* Active low */
0123                 data-active = <1>;  /* Active high */
0124                 pclk-sample = <1>;  /* Rising */
0125             };
0126         };
0127     };
0128 
0129 ...