xref: /linux/Documentation/devicetree/bindings/media/amlogic,c3-mipi-csi2.yaml (revision e78f70bad29c5ae1e1076698b690b15794e9b81e)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/media/amlogic,c3-mipi-csi2.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Amlogic C3 MIPI CSI-2 receiver
8
9maintainers:
10  - Keke Li <keke.li@amlogic.com>
11
12description:
13  MIPI CSI-2 receiver contains CSI-2 RX PHY and host controller.
14  It receives the MIPI data from the image sensor and sends MIPI data
15  to MIPI adapter.
16
17properties:
18  compatible:
19    enum:
20      - amlogic,c3-mipi-csi2
21
22  reg:
23    maxItems: 3
24
25  reg-names:
26    items:
27      - const: aphy
28      - const: dphy
29      - const: host
30
31  power-domains:
32    maxItems: 1
33
34  clocks:
35    maxItems: 2
36
37  clock-names:
38    items:
39      - const: vapb
40      - const: phy0
41
42  ports:
43    $ref: /schemas/graph.yaml#/properties/ports
44
45    properties:
46      port@0:
47        $ref: /schemas/graph.yaml#/$defs/port-base
48        unevaluatedProperties: false
49        description: input port node, connected to sensor.
50
51        properties:
52          endpoint:
53            $ref: video-interfaces.yaml#
54            unevaluatedProperties: false
55
56            properties:
57              data-lanes:
58                minItems: 1
59                maxItems: 4
60
61            required:
62              - data-lanes
63
64      port@1:
65        $ref: /schemas/graph.yaml#/properties/port
66        description: output port node
67
68    required:
69      - port@0
70      - port@1
71
72required:
73  - compatible
74  - reg
75  - reg-names
76  - power-domains
77  - clocks
78  - clock-names
79  - ports
80
81additionalProperties: false
82
83examples:
84  - |
85    #include <dt-bindings/clock/amlogic,c3-peripherals-clkc.h>
86    #include <dt-bindings/power/amlogic,c3-pwrc.h>
87
88    soc {
89        #address-cells = <2>;
90        #size-cells = <2>;
91
92        csi: csi@ff018000 {
93            compatible = "amlogic,c3-mipi-csi2";
94            reg = <0x0 0xff018000 0x0 0x400>,
95                  <0x0 0xff019000 0x0 0x300>,
96                  <0x0 0xff01a000 0x0 0x100>;
97            reg-names = "aphy", "dphy", "host";
98            power-domains = <&pwrc PWRC_C3_MIPI_ISP_WRAP_ID>;
99            clocks =  <&clkc_periphs CLKID_VAPB>,
100                      <&clkc_periphs CLKID_CSI_PHY0>;
101            clock-names = "vapb", "phy0";
102            assigned-clocks = <&clkc_periphs CLKID_VAPB>,
103                              <&clkc_periphs CLKID_CSI_PHY0>;
104            assigned-clock-rates = <0>, <200000000>;
105
106            ports {
107                #address-cells = <1>;
108                #size-cells = <0>;
109
110                port@0 {
111                    reg = <0>;
112                    c3_mipi_csi_in: endpoint {
113                        remote-endpoint = <&imx290_out>;
114                        data-lanes = <1 2 3 4>;
115                    };
116                };
117
118                port@1 {
119                    reg = <1>;
120                    c3_mipi_csi_out: endpoint {
121                        remote-endpoint = <&c3_adap_in>;
122                    };
123                };
124            };
125        };
126    };
127...
128