Documentation / devicetree / bindings / display / rockchip / rockchip,dw-mipi-dsi.yaml


Based on kernel version 6.11. Page generated on 2024-09-24 08:21 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/rockchip/rockchip,dw-mipi-dsi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Rockchip specific extensions to the Synopsys Designware MIPI DSI

maintainers:
  - Sandy Huang <hjc@rock-chips.com>
  - Heiko Stuebner <heiko@sntech.de>

properties:
  compatible:
    items:
      - enum:
          - rockchip,px30-mipi-dsi
          - rockchip,rk3128-mipi-dsi
          - rockchip,rk3288-mipi-dsi
          - rockchip,rk3399-mipi-dsi
          - rockchip,rk3568-mipi-dsi
          - rockchip,rv1126-mipi-dsi
      - const: snps,dw-mipi-dsi

  interrupts:
    maxItems: 1

  clocks:
    minItems: 1
    maxItems: 4

  clock-names:
    oneOf:
      - minItems: 2
        items:
          - const: ref
          - const: pclk
          - const: phy_cfg
          - const: grf
      - const: pclk

  rockchip,grf:
    $ref: /schemas/types.yaml#/definitions/phandle
    description:
      This SoC uses GRF regs to switch between vopl/vopb.

  phys:
    maxItems: 1

  phy-names:
    const: dphy
 
  "#phy-cells":
    const: 0
    description:
      Defined when in use as ISP phy.

  power-domains:
    maxItems: 1
 
  "#address-cells":
    const: 1
 
  "#size-cells":
    const: 0

required:
  - compatible
  - clocks
  - clock-names
  - rockchip,grf

allOf:
  - $ref: /schemas/display/bridge/snps,dw-mipi-dsi.yaml#
  - if:
      properties:
        compatible:
          contains:
            enum:
              - rockchip,px30-mipi-dsi
              - rockchip,rk3128-mipi-dsi
              - rockchip,rk3568-mipi-dsi
              - rockchip,rv1126-mipi-dsi

    then:
      properties:
        clocks:
          maxItems: 1

        clock-names:
          maxItems: 1

      required:
        - phys
        - phy-names

  - if:
      properties:
        compatible:
          contains:
            const: rockchip,rk3288-mipi-dsi

    then:
      properties:
        clocks:
          maxItems: 2

        clock-names:
          maxItems: 2

  - if:
      properties:
        compatible:
          contains:
            const: rockchip,rk3399-mipi-dsi

    then:
      properties:
        clocks:
          minItems: 4

        clock-names:
          minItems: 4

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/rk3288-cru.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>
 
    mipi_dsi: dsi@ff960000 {
      compatible = "rockchip,rk3288-mipi-dsi", "snps,dw-mipi-dsi";
      reg = <0xff960000 0x4000>;
      interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
      clocks = <&cru SCLK_MIPIDSI_24M>, <&cru PCLK_MIPI_DSI0>;
      clock-names = "ref", "pclk";
      resets = <&cru SRST_MIPIDSI0>;
      reset-names = "apb";
      rockchip,grf = <&grf>;
 
      ports {
        #address-cells = <1>;
        #size-cells = <0>;
 
        mipi_in: port@0 {
          reg = <0>;
          #address-cells = <1>;
          #size-cells = <0>;
 
          mipi_in_vopb: endpoint@0 {
            reg = <0>;
            remote-endpoint = <&vopb_out_mipi>;
          };
          mipi_in_vopl: endpoint@1 {
            reg = <1>;
            remote-endpoint = <&vopl_out_mipi>;
          };
        };
 
        mipi_out: port@1 {
          reg = <1>;
 
          mipi_out_panel: endpoint {
            remote-endpoint = <&panel_in_mipi>;
          };
        };
      };
    };