Qualcomm Light Pulse Generator

Schema identifier ($id): "http://devicetree.org/schemas/leds/leds-qcom-lpg.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Bjorn Andersson <bjorn.andersson@linaro.org>"

The Qualcomm Light Pulse Generator consists of three different hardware blocks; a ramp generator with lookup table (LUT), the light pulse generator and a three channel current sink. These blocks are found in a wide range of Qualcomm PMICs. The light pulse generator (LPG) can also be used independently to output PWM signal for standard PWM applications. In this scenario, the LPG output should be routed to a specific PMIC GPIO by setting the GPIO pin mux to the special functions indicated in the datasheet, the TRILED driver for the channel will not be enabled in this configuration.

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Allowed values (enum): "qcom,pm660l-lpg", "qcom,pm8150b-lpg", "qcom,pm8150l-lpg", "qcom,pm8350c-pwm", "qcom,pm8916-pwm", "qcom,pm8941-lpg", "qcom,pm8994-lpg", "qcom,pmc8180c-lpg", "qcom,pmi632-lpg", "qcom,pmi8950-pwm", "qcom,pmi8994-lpg", "qcom,pmi8998-lpg", "qcom,pmk8550-pwm"

Rule 2

Array item rules (items)

Item 1

Allowed values (enum): "qcom,pm6150l-lpg"

Item 2

Exact value (const): "qcom,pm8150l-lpg"

Rule 3

Array item rules (items)

Item 1

Allowed values (enum): "qcom,pm8550-pwm", "qcom,pmh0101-pwm"

Item 2

Exact value (const): "qcom,pm8350c-pwm"

Rule 4

Array item rules (items)

Item 1

Allowed values (enum): "qcom,pm8937-pwm"

Item 2

Exact value (const): "qcom,pm8916-pwm"

#pwm-cells — not listed as required here #

Exact value (const): 2

#address-cells — not listed as required here #

Exact value (const): 1

#size-cells — not listed as required here #

Exact value (const): 0

qcom,power-source — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

power-source used to drive the output, as defined in the datasheet. Should be specified if the TRILED block is present

Allowed values (enum): 0, 1, 3

qcom,dtest — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-matrix

A list of integer pairs, where each pair represent the dtest line the particular channel should be connected to and the flags denoting how the value should be outputted, as defined in the datasheet. The number of pairs should be the same as the number of channels.

Array item rules (items) #

Array item rules (items)

Item 1

dtest line to attach

Item 2

flags for the attachment

nvmem — not listed as required here #

This property is required for PMICs that supports PPG, which is when a PMIC stores LPG per-channel data and pattern LUT in SDAM modules instead of in a LUT peripheral. For PMICs, such as PM8350C, per-channel data and pattern LUT is separated into 2 SDAM modules. In that case, phandles to both SDAM modules need to be specified.

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

nvmem-names — not listed as required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

Exact value (const): "lpg_chan_sdam"

Item 2

Exact value (const): "lut_sdam"

qcom,pbs — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

Phandle of the Qualcomm Programmable Boot Sequencer node (PBS). PBS node is used to trigger LPG pattern sequences for PMICs that support single SDAM PPG.

multi-led — not listed as required here #

Value type (type): "object"

Shared schema rule ($ref): leds-class-multicolor.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

#address-cells — not listed as required here

Exact value (const): 1

#size-cells — not listed as required here

Exact value (const): 0

Properties matching a name pattern (patternProperties) #

^led@[0-9a-f]$ — name matches this regular expression

Value type (type): "object"

Shared schema rule ($ref): common.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties)

false

Not allowed by this rule.

Properties and child nodes (properties)

reg — required here

Maximum number of items (maxItems): 1

Required in this object (required): "reg"

Properties matching a name pattern (patternProperties) #

^led@[0-9a-f]$ — name matches this regular expression #

Value type (type): "object"

Shared schema rule ($ref): common.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

reg — required here

Maximum number of items (maxItems): 1

Required in this object (required): "reg"

Required in this object (required): "compatible"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pm660l-lpg", "qcom,pm8150b-lpg", "qcom,pm8150l-lpg", "qcom,pm8916-pwm", "qcom,pm8941-lpg", "qcom,pm8994-lpg", "qcom,pmc8180c-lpg", "qcom,pmi8950-pwm", "qcom,pmi8994-lpg", "qcom,pmi8998-lpg", "qcom,pmk8550-pwm"

When the condition matches (then) #

Properties and child nodes (properties)

nvmem — not listed as required here

false — Not permitted by this property rule.

nvmem-names — not listed as required here

false — Not permitted by this property rule.

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "qcom,pmi632-lpg"

When the condition matches (then) #

Properties and child nodes (properties)

nvmem — not listed as required here

Maximum number of items (maxItems): 1

nvmem-names — not listed as required here

Maximum number of items (maxItems): 1

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,pm8350c-pwm"

When the condition matches (then) #

Properties and child nodes (properties)

nvmem — not listed as required here

Minimum number of items (minItems): 2

nvmem-names — not listed as required here

Minimum number of items (minItems): 2

Examples (examples) #

#include <dt-bindings/leds/common.h>

led-controller {
  compatible = "qcom,pmi8994-lpg";

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

  qcom,power-source = <1>;

  qcom,dtest = <0 0>,
               <0 0>,
               <0 0>,
               <4 1>;

  led@1 {
    reg = <1>;
    color = <LED_COLOR_ID_GREEN>;
    function = LED_FUNCTION_INDICATOR;
    function-enumerator = <1>;
  };

  led@2 {
    reg = <2>;
    color = <LED_COLOR_ID_GREEN>;
    function = LED_FUNCTION_INDICATOR;
    function-enumerator = <0>;
    default-state = "on";
  };

  led@3 {
    reg = <3>;
    color = <LED_COLOR_ID_GREEN>;
    function = LED_FUNCTION_INDICATOR;
    function-enumerator = <2>;
  };

  led@4 {
    reg = <4>;
    color = <LED_COLOR_ID_GREEN>;
    function = LED_FUNCTION_INDICATOR;
    function-enumerator = <3>;
  };
};
#include <dt-bindings/leds/common.h>

led-controller {
  compatible = "qcom,pmi8994-lpg";

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

  qcom,power-source = <1>;

  multi-led {
    color = <LED_COLOR_ID_RGB>;
    function = LED_FUNCTION_STATUS;

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

    led@1 {
      reg = <1>;
      color = <LED_COLOR_ID_RED>;
    };

    led@2 {
      reg = <2>;
      color = <LED_COLOR_ID_GREEN>;
    };

    led@3 {
      reg = <3>;
      color = <LED_COLOR_ID_BLUE>;
    };
  };
};
pwm-controller {
  compatible = "qcom,pm8916-pwm";
  #pwm-cells = <2>;
};
#include <dt-bindings/leds/common.h>

led-controller {
  compatible = "qcom,pmi632-lpg";
  #address-cells = <1>;
  #size-cells = <0>;
  #pwm-cells = <2>;
  nvmem-names = "lpg_chan_sdam";
  nvmem = <&pmi632_sdam_7>;
  qcom,pbs = <&pmi632_pbs_client3>;

  led@1 {
    reg = <1>;
    color = <LED_COLOR_ID_RED>;
    label = "red";
  };

  led@2 {
    reg = <2>;
    color = <LED_COLOR_ID_GREEN>;
    label = "green";
  };

  led@3 {
    reg = <3>;
    color = <LED_COLOR_ID_BLUE>;
    label = "blue";
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page