1*37255747SMartin Kepplinger# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*37255747SMartin Kepplinger%YAML 1.2 3*37255747SMartin Kepplinger--- 4*37255747SMartin Kepplinger$id: http://devicetree.org/schemas/media/nxp,imx8mq-mipi-csi2.yaml# 5*37255747SMartin Kepplinger$schema: http://devicetree.org/meta-schemas/core.yaml# 6*37255747SMartin Kepplinger 7*37255747SMartin Kepplingertitle: NXP i.MX8MQ MIPI CSI-2 receiver 8*37255747SMartin Kepplinger 9*37255747SMartin Kepplingermaintainers: 10*37255747SMartin Kepplinger - Martin Kepplinger <martin.kepplinger@puri.sm> 11*37255747SMartin Kepplinger 12*37255747SMartin Kepplingerdescription: |- 13*37255747SMartin Kepplinger This binding covers the CSI-2 RX PHY and host controller included in the 14*37255747SMartin Kepplinger NXP i.MX8MQ SoC. It handles the sensor/image input and process for all the 15*37255747SMartin Kepplinger input imaging devices. 16*37255747SMartin Kepplinger 17*37255747SMartin Kepplingerproperties: 18*37255747SMartin Kepplinger compatible: 19*37255747SMartin Kepplinger enum: 20*37255747SMartin Kepplinger - fsl,imx8mq-mipi-csi2 21*37255747SMartin Kepplinger 22*37255747SMartin Kepplinger reg: 23*37255747SMartin Kepplinger maxItems: 1 24*37255747SMartin Kepplinger 25*37255747SMartin Kepplinger clocks: 26*37255747SMartin Kepplinger items: 27*37255747SMartin Kepplinger - description: core is the RX Controller Core Clock input. This clock 28*37255747SMartin Kepplinger must be exactly equal to or faster than the receive 29*37255747SMartin Kepplinger byteclock from the RX DPHY. 30*37255747SMartin Kepplinger - description: esc is the Rx Escape Clock. This must be the same escape 31*37255747SMartin Kepplinger clock that the RX DPHY receives. 32*37255747SMartin Kepplinger - description: ui is the pixel clock (phy_ref up to 333Mhz). 33*37255747SMartin Kepplinger See the reference manual for details. 34*37255747SMartin Kepplinger 35*37255747SMartin Kepplinger clock-names: 36*37255747SMartin Kepplinger items: 37*37255747SMartin Kepplinger - const: core 38*37255747SMartin Kepplinger - const: esc 39*37255747SMartin Kepplinger - const: ui 40*37255747SMartin Kepplinger 41*37255747SMartin Kepplinger power-domains: 42*37255747SMartin Kepplinger maxItems: 1 43*37255747SMartin Kepplinger 44*37255747SMartin Kepplinger resets: 45*37255747SMartin Kepplinger items: 46*37255747SMartin Kepplinger - description: CORE_RESET reset register bit definition 47*37255747SMartin Kepplinger - description: PHY_REF_RESET reset register bit definition 48*37255747SMartin Kepplinger - description: ESC_RESET reset register bit definition 49*37255747SMartin Kepplinger 50*37255747SMartin Kepplinger fsl,mipi-phy-gpr: 51*37255747SMartin Kepplinger description: | 52*37255747SMartin Kepplinger The phandle to the imx8mq syscon iomux-gpr with the register 53*37255747SMartin Kepplinger for setting RX_ENABLE for the mipi receiver. 54*37255747SMartin Kepplinger 55*37255747SMartin Kepplinger The format should be as follows: 56*37255747SMartin Kepplinger <gpr req_gpr> 57*37255747SMartin Kepplinger gpr is the phandle to general purpose register node. 58*37255747SMartin Kepplinger req_gpr is the gpr register offset of RX_ENABLE for the mipi phy. 59*37255747SMartin Kepplinger $ref: /schemas/types.yaml#/definitions/phandle-array 60*37255747SMartin Kepplinger items: 61*37255747SMartin Kepplinger items: 62*37255747SMartin Kepplinger - description: The 'gpr' is the phandle to general purpose register node. 63*37255747SMartin Kepplinger - description: The 'req_gpr' is the gpr register offset containing 64*37255747SMartin Kepplinger CSI2_1_RX_ENABLE or CSI2_2_RX_ENABLE respectively. 65*37255747SMartin Kepplinger maximum: 0xff 66*37255747SMartin Kepplinger 67*37255747SMartin Kepplinger interconnects: 68*37255747SMartin Kepplinger maxItems: 1 69*37255747SMartin Kepplinger 70*37255747SMartin Kepplinger interconnect-names: 71*37255747SMartin Kepplinger const: dram 72*37255747SMartin Kepplinger 73*37255747SMartin Kepplinger ports: 74*37255747SMartin Kepplinger $ref: /schemas/graph.yaml#/properties/ports 75*37255747SMartin Kepplinger 76*37255747SMartin Kepplinger properties: 77*37255747SMartin Kepplinger port@0: 78*37255747SMartin Kepplinger $ref: /schemas/graph.yaml#/$defs/port-base 79*37255747SMartin Kepplinger unevaluatedProperties: false 80*37255747SMartin Kepplinger description: 81*37255747SMartin Kepplinger Input port node, single endpoint describing the CSI-2 transmitter. 82*37255747SMartin Kepplinger 83*37255747SMartin Kepplinger properties: 84*37255747SMartin Kepplinger endpoint: 85*37255747SMartin Kepplinger $ref: video-interfaces.yaml# 86*37255747SMartin Kepplinger unevaluatedProperties: false 87*37255747SMartin Kepplinger 88*37255747SMartin Kepplinger properties: 89*37255747SMartin Kepplinger data-lanes: 90*37255747SMartin Kepplinger items: 91*37255747SMartin Kepplinger minItems: 1 92*37255747SMartin Kepplinger maxItems: 4 93*37255747SMartin Kepplinger items: 94*37255747SMartin Kepplinger - const: 1 95*37255747SMartin Kepplinger - const: 2 96*37255747SMartin Kepplinger - const: 3 97*37255747SMartin Kepplinger - const: 4 98*37255747SMartin Kepplinger 99*37255747SMartin Kepplinger required: 100*37255747SMartin Kepplinger - data-lanes 101*37255747SMartin Kepplinger 102*37255747SMartin Kepplinger port@1: 103*37255747SMartin Kepplinger $ref: /schemas/graph.yaml#/properties/port 104*37255747SMartin Kepplinger description: 105*37255747SMartin Kepplinger Output port node 106*37255747SMartin Kepplinger 107*37255747SMartin Kepplinger required: 108*37255747SMartin Kepplinger - port@0 109*37255747SMartin Kepplinger - port@1 110*37255747SMartin Kepplinger 111*37255747SMartin Kepplingerrequired: 112*37255747SMartin Kepplinger - compatible 113*37255747SMartin Kepplinger - reg 114*37255747SMartin Kepplinger - clocks 115*37255747SMartin Kepplinger - clock-names 116*37255747SMartin Kepplinger - power-domains 117*37255747SMartin Kepplinger - resets 118*37255747SMartin Kepplinger - fsl,mipi-phy-gpr 119*37255747SMartin Kepplinger - ports 120*37255747SMartin Kepplinger 121*37255747SMartin KepplingeradditionalProperties: false 122*37255747SMartin Kepplinger 123*37255747SMartin Kepplingerexamples: 124*37255747SMartin Kepplinger - | 125*37255747SMartin Kepplinger #include <dt-bindings/clock/imx8mq-clock.h> 126*37255747SMartin Kepplinger #include <dt-bindings/interconnect/imx8mq.h> 127*37255747SMartin Kepplinger #include <dt-bindings/reset/imx8mq-reset.h> 128*37255747SMartin Kepplinger 129*37255747SMartin Kepplinger csi@30a70000 { 130*37255747SMartin Kepplinger compatible = "fsl,imx8mq-mipi-csi2"; 131*37255747SMartin Kepplinger reg = <0x30a70000 0x1000>; 132*37255747SMartin Kepplinger clocks = <&clk IMX8MQ_CLK_CSI1_CORE>, 133*37255747SMartin Kepplinger <&clk IMX8MQ_CLK_CSI1_ESC>, 134*37255747SMartin Kepplinger <&clk IMX8MQ_CLK_CSI1_PHY_REF>; 135*37255747SMartin Kepplinger clock-names = "core", "esc", "ui"; 136*37255747SMartin Kepplinger assigned-clocks = <&clk IMX8MQ_CLK_CSI1_CORE>, 137*37255747SMartin Kepplinger <&clk IMX8MQ_CLK_CSI1_PHY_REF>, 138*37255747SMartin Kepplinger <&clk IMX8MQ_CLK_CSI1_ESC>; 139*37255747SMartin Kepplinger assigned-clock-rates = <266000000>, <200000000>, <66000000>; 140*37255747SMartin Kepplinger assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_266M>, 141*37255747SMartin Kepplinger <&clk IMX8MQ_SYS2_PLL_1000M>, 142*37255747SMartin Kepplinger <&clk IMX8MQ_SYS1_PLL_800M>; 143*37255747SMartin Kepplinger power-domains = <&pgc_mipi_csi1>; 144*37255747SMartin Kepplinger resets = <&src IMX8MQ_RESET_MIPI_CSI1_CORE_RESET>, 145*37255747SMartin Kepplinger <&src IMX8MQ_RESET_MIPI_CSI1_PHY_REF_RESET>, 146*37255747SMartin Kepplinger <&src IMX8MQ_RESET_MIPI_CSI1_ESC_RESET>; 147*37255747SMartin Kepplinger fsl,mipi-phy-gpr = <&iomuxc_gpr 0x88>; 148*37255747SMartin Kepplinger interconnects = <&noc IMX8MQ_ICM_CSI1 &noc IMX8MQ_ICS_DRAM>; 149*37255747SMartin Kepplinger interconnect-names = "dram"; 150*37255747SMartin Kepplinger 151*37255747SMartin Kepplinger ports { 152*37255747SMartin Kepplinger #address-cells = <1>; 153*37255747SMartin Kepplinger #size-cells = <0>; 154*37255747SMartin Kepplinger 155*37255747SMartin Kepplinger port@0 { 156*37255747SMartin Kepplinger reg = <0>; 157*37255747SMartin Kepplinger 158*37255747SMartin Kepplinger imx8mm_mipi_csi_in: endpoint { 159*37255747SMartin Kepplinger remote-endpoint = <&imx477_out>; 160*37255747SMartin Kepplinger data-lanes = <1 2 3 4>; 161*37255747SMartin Kepplinger }; 162*37255747SMartin Kepplinger }; 163*37255747SMartin Kepplinger 164*37255747SMartin Kepplinger port@1 { 165*37255747SMartin Kepplinger reg = <1>; 166*37255747SMartin Kepplinger 167*37255747SMartin Kepplinger imx8mm_mipi_csi_out: endpoint { 168*37255747SMartin Kepplinger remote-endpoint = <&csi_in>; 169*37255747SMartin Kepplinger }; 170*37255747SMartin Kepplinger }; 171*37255747SMartin Kepplinger }; 172*37255747SMartin Kepplinger }; 173*37255747SMartin Kepplinger 174*37255747SMartin Kepplinger... 175