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

title: Anbernic TD4310 Based Panels

maintainers:
  - Chris Morgan <macromorgan@hotmail.com>

description:
  Anbernic TD4310 Based Panels, such as the RG-Vita-Pro panel
  (a 1080x1920 5.5 inch panel).

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

properties:
  compatible:
    items:
      - enum:
          - anbernic,panel-vita-pro
      - const: anbernic,td4310

  reg:
    maxItems: 1

  vdd-supply:
    description: Panel power supply

required:
  - compatible
  - port
  - reg
  - reset-gpios
  - vdd-supply

unevaluatedProperties: false

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

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

        panel@0 {
            compatible = "anbernic,panel-vita-pro", "anbernic,td4310";
            reg = <0>;
            backlight = <&backlight>;
            enable-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
            reset-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
            rotation = <270>;
            vdd-supply = <&vdd_lcd>;

            port {
                endpoint {
                    remote-endpoint = <&dsi_out>;
                };
            };
        };
    };

...