Re: [PATCH v1 5/5] dt-bindings: leds: Document TI LM3560 Synchronous Boost Flash Driver

From: Sakari Ailus

Date: Fri Apr 17 2026 - 08:13:59 EST


Hi Svyatoslav,

Thanks for the set.

This patch should be the first one in the set, or at least before those
using the bindings defined here.

On Fri, Apr 17, 2026 at 02:42:26PM +0300, Svyatoslav Ryhel wrote:
> Document TI LM3560 Synchronous Boost Flash Driver used for camera flash
> LEDs.
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> ---
> .../devicetree/bindings/leds/ti,lm3560.yaml | 134 ++++++++++++++++++
> 1 file changed, 134 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/leds/ti,lm3560.yaml
>
> diff --git a/Documentation/devicetree/bindings/leds/ti,lm3560.yaml b/Documentation/devicetree/bindings/leds/ti,lm3560.yaml
> new file mode 100644
> index 000000000000..460ea1fbc1e5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/ti,lm3560.yaml
> @@ -0,0 +1,134 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/ti,lm3560.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: TI LM3560 Synchronous Boost Flash Driver
> +
> +maintainers:
> + - Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> +
> +description:
> + The LM3560 is a 2-MHz fixed frequency synchronous boost converter with two
> + 1000-mA constant current drivers for high-current white LEDs. The dual high-
> + side current sources allow for grounded cathode LED operation and can be
> + tied together for providing flash currents at up to 2 A through a single LED.
> + An adaptive regulation method ensures the current for each LED remains in
> + regulation and maximizes efficiency.
> +
> +properties:
> + compatible:
> + enum:
> + - ti,lm3559
> + - ti,lm3560
> +
> + reg:
> + maxItems: 1
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> + enable-gpios:
> + description: GPIO connected to the HWEN pin.
> + maxItems: 1
> +
> + vin-supply:
> + description: Supply connected to the IN line.
> +
> + ti,peak-current-microamp:
> + description:
> + The LM3560 features 4 selectable current limits 1.6A, 2.3A, 3A, and 3.6A.
> + When the current limit is reached, the LM3560 stops switching for the
> + remainder of the switching cycle.
> + enum: [16000000, 23000000, 30000000, 36000000]
> + default: 36000000
> +
> + ti,max-flash-timeout-ms:
> + description:
> + Maximum flash timeout in ms with step 32ms.
> + minimum: 32
> + maximum: 1024
> + default: 1024
> +
> +patternProperties:
> + '^led@[01]$':
> + description: LED control bank nodes.
> + $ref: /schemas/leds/common.yaml#
> + unevaluatedProperties: false
> +
> + properties:
> + reg:
> + description: Control bank selection (0 = bank A, 1 = bank B).
> + maximum: 1
> +
> + ti,max-flash-current-microamp:
> + description:
> + Maximum flash current in uA with step 62500uA.
> + minimum: 62500
> + maximum: 1000000
> + default: 1000000
> +
> + ti,max-torch-current-microamp:

Don't the LED flash bindings already have standardised properties for
these?

> + description:
> + Maximum flash current in uA with step 31250uA.
> + minimum: 31250
> + maximum: 250000
> + default: 250000
> +
> + required:
> + - reg

I'd say the max current properties are required as well, same for the
timeouts. Or make the lowest the default. The lowest values are very seldom
used in practice though.

> +
> +required:
> + - compatible
> + - reg
> + - '#address-cells'
> + - '#size-cells'
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + led-controller@53 {
> + compatible = "ti,lm3560";
> + reg = <0x53>;
> +
> + enable-gpios = <&gpio 28 GPIO_ACTIVE_HIGH>;
> + vin-supply = <&vdd_3v3_sys>;
> +
> + ti,peak-current-microamp = <16000000>;
> + ti,max-flash-timeout-ms = <1024>;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + led@0 {
> + reg = <0>;
> +
> + label = "white::flash";
> + linux,default-trigger = "flash";
> +
> + ti,max-flash-current-microamp = <562500>;
> + ti,max-torch-current-microamp = <156250>;
> + };
> +
> + led@1 {
> + reg = <1>;
> +
> + label = "yellow::flash";
> + linux,default-trigger = "flash";
> +
> + ti,max-flash-current-microamp = <562500>;
> + ti,max-torch-current-microamp = <156250>;
> + };
> + };
> + };

--
Kind regards,

Sakari Ailus