xref: /freebsd-src/sys/contrib/device-tree/Bindings/media/imx7-mipi-csi2.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotFreescale i.MX7 Mipi CSI2
2*c66ec88fSEmmanuel Vadot=========================
3*c66ec88fSEmmanuel Vadot
4*c66ec88fSEmmanuel Vadotmipi_csi2 node
5*c66ec88fSEmmanuel Vadot--------------
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel VadotThis is the device node for the MIPI CSI-2 receiver core in i.MX7 SoC. It is
8*c66ec88fSEmmanuel Vadotcompatible with previous version of Samsung D-phy.
9*c66ec88fSEmmanuel Vadot
10*c66ec88fSEmmanuel VadotRequired properties:
11*c66ec88fSEmmanuel Vadot
12*c66ec88fSEmmanuel Vadot- compatible    : "fsl,imx7-mipi-csi2";
13*c66ec88fSEmmanuel Vadot- reg           : base address and length of the register set for the device;
14*c66ec88fSEmmanuel Vadot- interrupts    : should contain MIPI CSIS interrupt;
15*c66ec88fSEmmanuel Vadot- clocks        : list of clock specifiers, see
16*c66ec88fSEmmanuel Vadot        Documentation/devicetree/bindings/clock/clock-bindings.txt for details;
17*c66ec88fSEmmanuel Vadot- clock-names   : must contain "pclk", "wrap" and "phy" entries, matching
18*c66ec88fSEmmanuel Vadot                  entries in the clock property;
19*c66ec88fSEmmanuel Vadot- power-domains : a phandle to the power domain, see
20*c66ec88fSEmmanuel Vadot          Documentation/devicetree/bindings/power/power_domain.txt for details.
21*c66ec88fSEmmanuel Vadot- reset-names   : should include following entry "mrst";
22*c66ec88fSEmmanuel Vadot- resets        : a list of phandle, should contain reset entry of
23*c66ec88fSEmmanuel Vadot                  reset-names;
24*c66ec88fSEmmanuel Vadot- phy-supply    : from the generic phy bindings, a phandle to a regulator that
25*c66ec88fSEmmanuel Vadot	          provides power to MIPI CSIS core;
26*c66ec88fSEmmanuel Vadot
27*c66ec88fSEmmanuel VadotOptional properties:
28*c66ec88fSEmmanuel Vadot
29*c66ec88fSEmmanuel Vadot- clock-frequency : The IP's main (system bus) clock frequency in Hz, default
30*c66ec88fSEmmanuel Vadot		    value when this property is not specified is 166 MHz;
31*c66ec88fSEmmanuel Vadot- fsl,csis-hs-settle : differential receiver (HS-RX) settle time;
32*c66ec88fSEmmanuel Vadot
33*c66ec88fSEmmanuel VadotThe device node should contain two 'port' child nodes with one child 'endpoint'
34*c66ec88fSEmmanuel Vadotnode, according to the bindings defined in:
35*c66ec88fSEmmanuel Vadot Documentation/devicetree/bindings/ media/video-interfaces.txt.
36*c66ec88fSEmmanuel Vadot The following are properties specific to those nodes.
37*c66ec88fSEmmanuel Vadot
38*c66ec88fSEmmanuel Vadotport node
39*c66ec88fSEmmanuel Vadot---------
40*c66ec88fSEmmanuel Vadot
41*c66ec88fSEmmanuel Vadot- reg		  : (required) can take the values 0 or 1, where 0 shall be
42*c66ec88fSEmmanuel Vadot                     related to the sink port and port 1 shall be the source
43*c66ec88fSEmmanuel Vadot                     one;
44*c66ec88fSEmmanuel Vadot
45*c66ec88fSEmmanuel Vadotendpoint node
46*c66ec88fSEmmanuel Vadot-------------
47*c66ec88fSEmmanuel Vadot
48*c66ec88fSEmmanuel Vadot- data-lanes    : (required) an array specifying active physical MIPI-CSI2
49*c66ec88fSEmmanuel Vadot		    data input lanes and their mapping to logical lanes; this
50*c66ec88fSEmmanuel Vadot                    shall only be applied to port 0 (sink port), the array's
51*c66ec88fSEmmanuel Vadot                    content is unused only its length is meaningful,
52*c66ec88fSEmmanuel Vadot                    in this case the maximum length supported is 2;
53*c66ec88fSEmmanuel Vadot
54*c66ec88fSEmmanuel Vadotexample:
55*c66ec88fSEmmanuel Vadot
56*c66ec88fSEmmanuel Vadot        mipi_csi: mipi-csi@30750000 {
57*c66ec88fSEmmanuel Vadot                #address-cells = <1>;
58*c66ec88fSEmmanuel Vadot                #size-cells = <0>;
59*c66ec88fSEmmanuel Vadot
60*c66ec88fSEmmanuel Vadot                compatible = "fsl,imx7-mipi-csi2";
61*c66ec88fSEmmanuel Vadot                reg = <0x30750000 0x10000>;
62*c66ec88fSEmmanuel Vadot                interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
63*c66ec88fSEmmanuel Vadot                clocks = <&clks IMX7D_IPG_ROOT_CLK>,
64*c66ec88fSEmmanuel Vadot                                <&clks IMX7D_MIPI_CSI_ROOT_CLK>,
65*c66ec88fSEmmanuel Vadot                                <&clks IMX7D_MIPI_DPHY_ROOT_CLK>;
66*c66ec88fSEmmanuel Vadot                clock-names = "pclk", "wrap", "phy";
67*c66ec88fSEmmanuel Vadot                clock-frequency = <166000000>;
68*c66ec88fSEmmanuel Vadot                power-domains = <&pgc_mipi_phy>;
69*c66ec88fSEmmanuel Vadot                phy-supply = <&reg_1p0d>;
70*c66ec88fSEmmanuel Vadot                resets = <&src IMX7_RESET_MIPI_PHY_MRST>;
71*c66ec88fSEmmanuel Vadot                reset-names = "mrst";
72*c66ec88fSEmmanuel Vadot                fsl,csis-hs-settle = <3>;
73*c66ec88fSEmmanuel Vadot
74*c66ec88fSEmmanuel Vadot                port@0 {
75*c66ec88fSEmmanuel Vadot                        reg = <0>;
76*c66ec88fSEmmanuel Vadot
77*c66ec88fSEmmanuel Vadot                        mipi_from_sensor: endpoint {
78*c66ec88fSEmmanuel Vadot                                remote-endpoint = <&ov2680_to_mipi>;
79*c66ec88fSEmmanuel Vadot                                data-lanes = <1>;
80*c66ec88fSEmmanuel Vadot                        };
81*c66ec88fSEmmanuel Vadot                };
82*c66ec88fSEmmanuel Vadot
83*c66ec88fSEmmanuel Vadot                port@1 {
84*c66ec88fSEmmanuel Vadot                        reg = <1>;
85*c66ec88fSEmmanuel Vadot
86*c66ec88fSEmmanuel Vadot                        mipi_vc0_to_csi_mux: endpoint {
87*c66ec88fSEmmanuel Vadot                                remote-endpoint = <&csi_mux_from_mipi_vc0>;
88*c66ec88fSEmmanuel Vadot                        };
89*c66ec88fSEmmanuel Vadot                };
90*c66ec88fSEmmanuel Vadot        };
91