| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/leds/ams,as3645a.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Analog Devices AS3645A LED Controller |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Sakari Ailus <[email protected]> |
| 11 |
|
| 12 |
description: |
| 13 |
The AS3645A flash LED controller can drive two LEDs, one |
| 14 |
high current flash LED and one indicator LED. The high |
| 15 |
current flash LED can be used in torch mode as well. |
| 16 |
|
| 17 |
properties: |
| 18 |
compatible: |
| 19 |
const: ams,as3645a |
| 20 |
|
| 21 |
"#address-cells": |
| 22 |
const: 1 |
| 23 |
|
| 24 |
"#size-cells": |
| 25 |
const: 0 |
| 26 |
|
| 27 |
reg: |
| 28 |
maxItems: 1 |
| 29 |
|
| 30 |
led@0: |
| 31 |
description: led0 describes the 'flash' feature |
| 32 |
type: object |
| 33 |
$ref: common.yaml# |
| 34 |
unevaluatedProperties: false |
| 35 |
|
| 36 |
properties: |
| 37 |
reg: |
| 38 |
const: 0 |
| 39 |
|
| 40 |
flash-timeout-us: |
| 41 |
minimum: 100000 |
| 42 |
maximum: 850000 |
| 43 |
multipleOf: 50000 |
| 44 |
|
| 45 |
flash-max-microamp: |
| 46 |
minimum: 200000 |
| 47 |
maximum: 500000 |
| 48 |
multipleOf: 20000 |
| 49 |
|
| 50 |
led-max-microamp: |
| 51 |
minimum: 20000 |
| 52 |
maximum: 160000 |
| 53 |
multipleOf: 20000 |
| 54 |
description: |
| 55 |
Maximum current when in torch (assist) mode. |
| 56 |
|
| 57 |
ams,input-max-microamp: |
| 58 |
minimum: 1250000 |
| 59 |
maximum: 2000000 |
| 60 |
multipleOf: 50000 |
| 61 |
|
| 62 |
required: |
| 63 |
- reg |
| 64 |
- flash-timeout-us |
| 65 |
- flash-max-microamp |
| 66 |
- led-max-microamp |
| 67 |
- ams,input-max-microamp |
| 68 |
|
| 69 |
led@1: |
| 70 |
description: led1 describes the 'indicator' feature |
| 71 |
type: object |
| 72 |
$ref: common.yaml# |
| 73 |
unevaluatedProperties: false |
| 74 |
|
| 75 |
properties: |
| 76 |
reg: |
| 77 |
const: 1 |
| 78 |
|
| 79 |
led-max-microamp: |
| 80 |
enum: |
| 81 |
- 2500 |
| 82 |
- 5000 |
| 83 |
- 7500 |
| 84 |
- 10000 |
| 85 |
description: |
| 86 |
Maximum indicator current. |
| 87 |
|
| 88 |
required: |
| 89 |
- reg |
| 90 |
- led-max-microamp |
| 91 |
|
| 92 |
required: |
| 93 |
- compatible |
| 94 |
- reg |
| 95 |
- "#size-cells" |
| 96 |
- "#address-cells" |
| 97 |
|
| 98 |
additionalProperties: false |
| 99 |
|
| 100 |
examples: |
| 101 |
- | |
| 102 |
#include <dt-bindings/leds/common.h> |
| 103 |
|
| 104 |
i2c{ |
| 105 |
#address-cells = <1>; |
| 106 |
#size-cells = <0>; |
| 107 |
|
| 108 |
led-controller@30 { |
| 109 |
compatible = "ams,as3645a"; |
| 110 |
#address-cells = <1>; |
| 111 |
#size-cells = <0>; |
| 112 |
reg = <0x30>; |
| 113 |
|
| 114 |
led@0 { |
| 115 |
reg = <0>; |
| 116 |
flash-timeout-us = <150000>; |
| 117 |
flash-max-microamp = <320000>; |
| 118 |
led-max-microamp = <60000>; |
| 119 |
ams,input-max-microamp = <1750000>; |
| 120 |
function = LED_FUNCTION_FLASH; |
| 121 |
}; |
| 122 |
|
| 123 |
led@1 { |
| 124 |
reg = <1>; |
| 125 |
led-max-microamp = <10000>; |
| 126 |
function = LED_FUNCTION_INDICATOR; |
| 127 |
}; |
| 128 |
}; |
| 129 |
}; |
| 130 |
... |