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

title: Nexperia NEX10000UB dual output LCD bias power supply

maintainers:
  - Neil Armstrong <neil.armstrong@linaro.org>

description:
  The NEX10000UB is designed to supply positive/negative supplies for display Panels.

properties:
  compatible:
    enum:
      - nexperia,nex10000ub

  reg:
    maxItems: 1

  vin-supply: true

patternProperties:
  "^(vpos|vneg)$":
    type: object
    $ref: regulator.yaml#
    unevaluatedProperties: false

    properties:
      enable-gpios:
        maxItems: 1

    required:
      - enable-gpios

required:
  - compatible
  - reg

additionalProperties: false

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

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

        regulator@3e {
            compatible = "nexperia,nex10000ub";
            reg = <0x3e>;
            vin-supply = <&supply>;

            vpos {
                regulator-name = "outp";
                regulator-boot-on;
                enable-gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
            };

            vneg {
                regulator-name = "outn";
                regulator-boot-on;
                enable-gpios = <&gpio 40 GPIO_ACTIVE_HIGH>;
            };
        };
    };