pwm-backlight

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

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

Maintainers (maintainers): "Lee Jones <lee@kernel.org>", "Daniel Thompson <daniel.thompson@linaro.org>", "Jingoo Han <jingoohan1@gmail.com>"

All of these rules must match (allOf) #

Rule 1 #

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

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "pwm-backlight"

pwms — required here #

Maximum number of items (maxItems): 1

pwm-names — not listed as required here #

true — No constraints added by this property rule.

power-supply — not listed as required here #

regulator for supply voltage

enable-gpios — not listed as required here #

Contains a single GPIO specifier for the GPIO which enables and disables the backlight.

Maximum number of items (maxItems): 1

post-pwm-on-delay-ms — not listed as required here #

Delay in ms between setting an initial (non-zero) PWM and enabling the backlight using GPIO.

pwm-off-delay-ms — not listed as required here #

Delay in ms between disabling the backlight using GPIO and setting PWM value to 0.

num-interpolated-steps — not listed as required here #

Number of interpolated steps between each value of brightness-levels table. This way a high resolution pwm duty cycle can be used without having to list out every possible value in the brightness-level array.

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

Property dependencies (dependencies) #

default-brightness-level — applies when this property is present #

Also requires: "brightness-levels"

num-interpolated-steps — applies when this property is present #

Also requires: "brightness-levels"

Required in this object (required): "compatible", "pwms"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

backlight {
    compatible = "pwm-backlight";
    pwms = <&pwm 0 5000000>;

    brightness-levels = <0 4 8 16 32 64 128 255>;
    default-brightness-level = <6>;

    power-supply = <&vdd_bl_reg>;
    enable-gpios = <&gpio 58 0>;
    post-pwm-on-delay-ms = <10>;
    pwm-off-delay-ms = <10>;
};
// Example using num-interpolation-steps:
backlight {
    compatible = "pwm-backlight";
    pwms = <&pwm 0 5000000>;

    brightness-levels = <0 2048 4096 8192 16384 65535>;
    num-interpolated-steps = <2048>;
    default-brightness-level = <4096>;

    power-supply = <&vdd_bl_reg>;
    enable-gpios = <&gpio 58 0>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only

Edit this page