# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/himax,hx83121a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Himax HX83121A based DSI display Panels

maintainers:
  - Pengyu Luo <mitltlatltl@gmail.com>

description:
  The Himax HX83121A is a generic DSI Panel IC used to drive dsi
  panels. Support video mode panels from China Star Optoelectronics
  Technology (CSOT) and BOE Technology.

allOf:
  - $ref: panel-common-dual.yaml#

properties:
  compatible:
    items:
      - enum:
          - boe,ppc357db1-4
          - csot,ppc357db1-4
      - const: himax,hx83121a

  reg:
    maxItems: 1

  reset-gpios:
    maxItems: 1

  avdd-supply:
    description: analog positive supply for IC

  avee-supply:
    description: analog negative supply for IC

  vddi-supply:
    description: power supply for IC

  bl-supply:
    description: power supply for backlight, in case it's managed via DSC

  backlight: true
  ports: true

required:
  - compatible
  - reg
  - vddi-supply
  - reset-gpios
  - ports

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

    dsi {
        #address-cells = <1>;
        #size-cells = <0>;

        panel@0 {
            compatible = "csot,ppc357db1-4", "himax,hx83121a";
            reg = <0>;

            vddi-supply = <&vreg_l2b>;
            reset-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;

            ports {
                #address-cells = <1>;
                #size-cells = <0>;

                port@0 {
                    reg = <0>;
                    panel_in_0: endpoint {
                        remote-endpoint = <&dsi0_out>;
                    };
                };

                port@1{
                    reg = <1>;
                    panel_in_1: endpoint {
                        remote-endpoint = <&dsi1_out>;
                    };
                };
            };
        };
    };

...