]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - Bindings/media/allwinner,sun4i-a10-csi.yaml
Import DTS from Linux 5.8
[FreeBSD/FreeBSD.git] / Bindings / media / allwinner,sun4i-a10-csi.yaml
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/media/allwinner,sun4i-a10-csi.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Allwinner A10 CMOS Sensor Interface (CSI) Device Tree Bindings
8
9 maintainers:
10   - Chen-Yu Tsai <wens@csie.org>
11   - Maxime Ripard <mripard@kernel.org>
12
13 description: |-
14   The Allwinner A10 and later has a CMOS Sensor Interface to retrieve
15   frames from a parallel or BT656 sensor.
16
17 properties:
18   compatible:
19     oneOf:
20       - const: allwinner,sun4i-a10-csi1
21       - const: allwinner,sun7i-a20-csi0
22       - items:
23           - const: allwinner,sun7i-a20-csi1
24           - const: allwinner,sun4i-a10-csi1
25       - items:
26           - const: allwinner,sun8i-r40-csi0
27           - const: allwinner,sun7i-a20-csi0
28
29   reg:
30     maxItems: 1
31
32   interrupts:
33     maxItems: 1
34
35   clocks:
36     oneOf:
37       - items:
38           - description: The CSI interface clock
39           - description: The CSI DRAM clock
40
41       - items:
42           - description: The CSI interface clock
43           - description: The CSI ISP clock
44           - description: The CSI DRAM clock
45
46   clock-names:
47     oneOf:
48       - items:
49           - const: bus
50           - const: ram
51
52       - items:
53           - const: bus
54           - const: isp
55           - const: ram
56
57   resets:
58     maxItems: 1
59
60   # FIXME: This should be made required eventually once every SoC will
61   # have the MBUS declared.
62   interconnects:
63     maxItems: 1
64
65   # FIXME: This should be made required eventually once every SoC will
66   # have the MBUS declared.
67   interconnect-names:
68     const: dma-mem
69
70   # See ./video-interfaces.txt for details
71   port:
72     type: object
73     additionalProperties: false
74
75     properties:
76       endpoint:
77         type: object
78
79         properties:
80           bus-width:
81             enum: [8, 16]
82
83           data-active: true
84           hsync-active: true
85           pclk-sample: true
86           remote-endpoint: true
87           vsync-active: true
88
89         required:
90           - bus-width
91           - data-active
92           - hsync-active
93           - pclk-sample
94           - remote-endpoint
95           - vsync-active
96
97     required:
98       - endpoint
99
100 required:
101   - compatible
102   - reg
103   - interrupts
104   - clocks
105
106 additionalProperties: false
107
108 examples:
109   - |
110     #include <dt-bindings/interrupt-controller/arm-gic.h>
111     #include <dt-bindings/clock/sun7i-a20-ccu.h>
112     #include <dt-bindings/reset/sun4i-a10-ccu.h>
113
114     csi0: csi@1c09000 {
115         compatible = "allwinner,sun7i-a20-csi0";
116         reg = <0x01c09000 0x1000>;
117         interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
118         clocks = <&ccu CLK_AHB_CSI0>, <&ccu CLK_CSI_SCLK>, <&ccu CLK_DRAM_CSI0>;
119         clock-names = "bus", "isp", "ram";
120         resets = <&ccu RST_CSI0>;
121
122         port {
123             csi_from_ov5640: endpoint {
124                 remote-endpoint = <&ov5640_to_csi>;
125                 bus-width = <8>;
126                 hsync-active = <1>; /* Active high */
127                 vsync-active = <0>; /* Active low */
128                 data-active = <1>;  /* Active high */
129                 pclk-sample = <1>;  /* Rising */
130             };
131         };
132     };
133
134 ...