# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/boe,th101mb31ig002-28a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: BOE TH101MB31IG002-28A WXGA DSI Display Panel

maintainers:
  - Manuel Traut <manut@mecka.net>

properties:
  compatible:
    enum:
        # BOE TH101MB31IG002-28A 10.1" WXGA TFT LCD panel
      - boe,th101mb31ig002-28a
        # The Starry-er88577 is a 10.1" WXGA TFT-LCD panel
      - starry,er88577

  reg:
    maxItems: 1

  backlight: true
  enable-gpios: true
  reset-gpios: true
  power-supply: true
  port: true
  rotation: true

required:
  - compatible
  - reg
  - enable-gpios
  - power-supply

allOf:
  - $ref: panel-common.yaml#
  - if:
      properties:
        compatible:
          # The Starry-er88577 is a 10.1" WXGA TFT-LCD panel
          const: starry,er88577
    then:
      properties:
        reset-gpios: false
    else:
      required:
        - reset-gpios

additionalProperties: false

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

    dsi {
        #address-cells = <1>;
        #size-cells = <0>;
        panel@0 {
            compatible = "boe,th101mb31ig002-28a";
            reg = <0>;
            backlight = <&backlight_lcd0>;
            enable-gpios = <&gpio 45 GPIO_ACTIVE_HIGH>;
            reset-gpios = <&gpio 55 GPIO_ACTIVE_LOW>;
            rotation = <90>;
            power-supply = <&vcc_3v3>;
            port {
                panel_in_dsi: endpoint {
                    remote-endpoint = <&dsi_out_con>;
                };
            };
        };
    };

...
