[PATCH v2 1/2] dt-bindings: backlight: Add MPS MP3309C
Conor Dooley
conor at kernel.org
Fri Sep 15 15:44:57 UTC 2023
Yo,
On Fri, Sep 15, 2023 at 04:05:15PM +0200, Flavio Suligoi wrote:
> The Monolithic Power (MPS) MP3309C is a WLED step-up converter, featuring a
> programmable switching frequency to optimize efficiency.
> The brightness can be controlled either by I2C commands (called "analog"
> mode) or by a PWM input signal (PWM mode).
> This driver supports both modes.
>
> For device driver details, please refer to:
> - drivers/video/backlight/mp3309c_bl.c
>
> The datasheet is available at:
> - https://www.monolithicpower.com/en/mp3309c.html
>
> Signed-off-by: Flavio Suligoi <f.suligoi at asem.it>
> ---
>
> v2:
> - remove useless properties (dimming-mode, pinctrl-names, pinctrl-0,
> switch-on-delay-ms, switch-off-delay-ms, reset-gpios, reset-on-delay-ms,
> reset-on-length-ms)
> - add common.yaml#
> - remove already included properties (default-brightness, max-brightness)
> - substitute three boolean properties, used for the overvoltage-protection
> values, with a single enum property
> - remove some conditional definitions
> - remove the 2nd example
> v1:
> - first version
>
> .../bindings/leds/backlight/mps,mp3309c.yaml | 73 +++++++++++++++++++
> 1 file changed, 73 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/leds/backlight/mps,mp3309c.yaml
>
> diff --git a/Documentation/devicetree/bindings/leds/backlight/mps,mp3309c.yaml b/Documentation/devicetree/bindings/leds/backlight/mps,mp3309c.yaml
> new file mode 100644
> index 000000000000..99ccdba2c08f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/backlight/mps,mp3309c.yaml
> @@ -0,0 +1,73 @@
> +# 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 at 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 (default)
> + - PWM controlled mode.
> +
> + 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). If missing, the
> + hardware default of 35.5V is used.
> + enum: [ 13500000, 24000000, 35500000 ]
You can add "default: 35500000" and drop the free form default as text
in the description.
Cheers,
Conor.
> +
> + mps,no-sync-mode:
> + description: disable synchronous rectification mode
> + type: boolean
> +
> +required:
> + - compatible
> + - reg
> + - max-brightness
> + - default-brightness
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + /* Backlight with PWM control */
> + backlight_pwm: backlight at 17 {
> + compatible = "mps,mp3309c-backlight";
As the bot pointed out, the compatible doesn't contain "backlight".
> + reg = <0x17>;
> + pwms = <&pwm1 0 3333333 0>; /* 300 Hz --> (1/f) * 1*10^9 */
> + max-brightness = <100>;
> + default-brightness = <80>;
> + overvoltage-protection-microvolt = <24000000>;
> + };
> + };
> --
> 2.34.1
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20230915/17681366/attachment.sig>
More information about the dri-devel
mailing list