1ea4407faSLuca Weiss# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2ea4407faSLuca Weiss%YAML 1.2 3ea4407faSLuca Weiss--- 4ea4407faSLuca Weiss$id: http://devicetree.org/schemas/leds/leds-sgm3140.yaml# 5ea4407faSLuca Weiss$schema: http://devicetree.org/meta-schemas/core.yaml# 6ea4407faSLuca Weiss 7ea4407faSLuca Weisstitle: SGMICRO SGM3140 500mA Buck/Boost Charge Pump LED Driver 8ea4407faSLuca Weiss 9ea4407faSLuca Weissmaintainers: 10ea4407faSLuca Weiss - Luca Weiss <luca@z3ntu.xyz> 11ea4407faSLuca Weiss 12ea4407faSLuca Weissdescription: | 13ea4407faSLuca Weiss The SGM3140 is a current-regulated charge pump which can regulate two current 14ea4407faSLuca Weiss levels for Flash and Torch modes. 15ea4407faSLuca Weiss 16ea4407faSLuca Weiss The data sheet can be found at: 17ea4407faSLuca Weiss http://www.sg-micro.com/uploads/soft/20190626/1561535688.pdf 18ea4407faSLuca Weiss 19ea4407faSLuca Weissproperties: 20ea4407faSLuca Weiss compatible: 21642bb6a7SAndré Apitzsch enum: 22642bb6a7SAndré Apitzsch - ocs,ocp8110 23*2a5724a0SRaymond Hackley - richtek,rt5033-led 24642bb6a7SAndré Apitzsch - sgmicro,sgm3140 25ea4407faSLuca Weiss 26ea4407faSLuca Weiss enable-gpios: 27ea4407faSLuca Weiss maxItems: 1 28ea4407faSLuca Weiss description: A connection to the 'EN' pin. 29ea4407faSLuca Weiss 30ea4407faSLuca Weiss flash-gpios: 31ea4407faSLuca Weiss maxItems: 1 32ea4407faSLuca Weiss description: A connection to the 'FLASH' pin. 33ea4407faSLuca Weiss 34ea4407faSLuca Weiss vin-supply: 35ea4407faSLuca Weiss description: Regulator providing power to the 'VIN' pin. 36ea4407faSLuca Weiss 37ea4407faSLuca Weiss led: 38ea4407faSLuca Weiss type: object 39086e9074SRob Herring $ref: common.yaml# 40fe469e83SKrzysztof Kozlowski unevaluatedProperties: false 41ea4407faSLuca Weiss 42ea4407faSLuca Weissrequired: 43ea4407faSLuca Weiss - compatible 44ea4407faSLuca Weiss - flash-gpios 45ea4407faSLuca Weiss - enable-gpios 46ea4407faSLuca Weiss 47ea4407faSLuca WeissadditionalProperties: false 48ea4407faSLuca Weiss 49ea4407faSLuca Weissexamples: 50ea4407faSLuca Weiss - | 51ea4407faSLuca Weiss #include <dt-bindings/gpio/gpio.h> 52ea4407faSLuca Weiss #include <dt-bindings/leds/common.h> 53ea4407faSLuca Weiss 54ea4407faSLuca Weiss led-controller { 55ea4407faSLuca Weiss compatible = "sgmicro,sgm3140"; 56ea4407faSLuca Weiss flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */ 57ea4407faSLuca Weiss enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */ 58ea4407faSLuca Weiss vin-supply = <®_dcdc1>; 59ea4407faSLuca Weiss 60ea4407faSLuca Weiss sgm3140_flash: led { 61ea4407faSLuca Weiss function = LED_FUNCTION_FLASH; 62ea4407faSLuca Weiss color = <LED_COLOR_ID_WHITE>; 63ea4407faSLuca Weiss flash-max-timeout-us = <250000>; 64ea4407faSLuca Weiss }; 65ea4407faSLuca Weiss }; 66