mirror of
https://github.com/torvalds/linux.git
synced 2026-04-19 23:34:00 -04:00
The two properties:
- max-brightness
- default brightness
are not really required, so they can be removed from the "required"
section.
The "max-brightness" is no longer used in the current version
of the driver (it was used only in the first version).
The "default-brightness", if omitted in the DT, is managed by the
device driver, using a default value. This value depends on the dimming
mode used:
- for the "analog mode", via I2C commands, this value is fixed by
hardware (=31)
- while in case of pwm mode the default used is the last value of the
brightness-levels array.
Also the brightness-levels array is not required:
- in "analog mode", via I2C commands, the brightness-level array is
fixed by hardware (0..31).;
- in pwm dimming mode, the driver uses a default array of 0..255 and
the "default-brightness" is the last one, which is "255"
NOTE: there are no compatibility problems with the previous version,
since the device driver has not yet been included in any kernel.
Only this dt-binding yaml file is already included in the current
v6.7.0-rc1 kernel version.
No developer may have used it.
Other changes:
- improve the backlight working mode description, in the "description"
section
- update the example, removing the "max-brightness" and introducing the
"brightess-levels" property
Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20231116105319.957600-2-f.suligoi@asem.it
Signed-off-by: Lee Jones <lee@kernel.org>
72 lines
1.7 KiB
YAML
72 lines
1.7 KiB
YAML
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/leds/backlight/mps,mp3309c.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: MPS MP3309C backlight
|
|
|
|
maintainers:
|
|
- Flavio Suligoi <f.suligoi@asem.it>
|
|
|
|
description: |
|
|
The Monolithic Power (MPS) MP3309C is a WLED step-up converter, featuring a
|
|
programmable switching frequency to optimize efficiency.
|
|
It supports two different dimming modes:
|
|
|
|
- analog mode, via I2C commands, as default mode (32 dimming levels)
|
|
- PWM controlled mode (optional)
|
|
|
|
The datasheet is available at:
|
|
https://www.monolithicpower.com/en/mp3309c.html
|
|
|
|
allOf:
|
|
- $ref: common.yaml#
|
|
|
|
properties:
|
|
compatible:
|
|
const: mps,mp3309c
|
|
|
|
reg:
|
|
maxItems: 1
|
|
|
|
pwms:
|
|
description: if present, the backlight is controlled in PWM mode.
|
|
maxItems: 1
|
|
|
|
enable-gpios:
|
|
description: GPIO used to enable the backlight in "analog-i2c" dimming mode.
|
|
maxItems: 1
|
|
|
|
mps,overvoltage-protection-microvolt:
|
|
description: Overvoltage protection (13.5V, 24V or 35.5V).
|
|
enum: [ 13500000, 24000000, 35500000 ]
|
|
default: 35500000
|
|
|
|
mps,no-sync-mode:
|
|
description: disable synchronous rectification mode
|
|
type: boolean
|
|
|
|
required:
|
|
- compatible
|
|
- reg
|
|
|
|
unevaluatedProperties: false
|
|
|
|
examples:
|
|
- |
|
|
i2c {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
/* Backlight with PWM control */
|
|
backlight_pwm: backlight@17 {
|
|
compatible = "mps,mp3309c";
|
|
reg = <0x17>;
|
|
pwms = <&pwm1 0 3333333 0>; /* 300 Hz --> (1/f) * 1*10^9 */
|
|
brightness-levels = <0 4 8 16 32 64 128 255>;
|
|
default-brightness = <6>;
|
|
mps,overvoltage-protection-microvolt = <24000000>;
|
|
};
|
|
};
|