0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/leds/backlight/lm3630a-backlight.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: TI LM3630A High-Efficiency Dual-String White LED
0008
0009 maintainers:
0010 - Lee Jones <lee@kernel.org>
0011 - Daniel Thompson <daniel.thompson@linaro.org>
0012 - Jingoo Han <jingoohan1@gmail.com>
0013
0014 description: |
0015 The LM3630A is a current-mode boost converter which supplies the power and
0016 controls the current in up to two strings of 10 LEDs per string.
0017 https://www.ti.com/product/LM3630A
0018
0019 properties:
0020 compatible:
0021 const: ti,lm3630a
0022
0023 reg:
0024 maxItems: 1
0025
0026 '#address-cells':
0027 const: 1
0028
0029 '#size-cells':
0030 const: 0
0031
0032 enable-gpios:
0033 description: GPIO to use to enable/disable the backlight (HWEN pin).
0034 maxItems: 1
0035
0036 required:
0037 - compatible
0038 - reg
0039 - '#address-cells'
0040 - '#size-cells'
0041
0042 patternProperties:
0043 "^led@[01]$":
0044 type: object
0045 description: |
0046 Properties for a string of connected LEDs.
0047
0048 properties:
0049 reg:
0050 description: |
0051 The control bank that is used to program the two current sinks. The
0052 LM3630A has two control banks (A and B) and are represented as 0 or 1
0053 in this property. The two current sinks can be controlled
0054 independently with both banks, or bank A can be configured to control
0055 both sinks with the led-sources property.
0056 minimum: 0
0057 maximum: 1
0058
0059 label:
0060 maxItems: 1
0061
0062 led-sources:
0063 allOf:
0064 - minItems: 1
0065 maxItems: 2
0066 items:
0067 minimum: 0
0068 maximum: 1
0069
0070 default-brightness:
0071 description: Default brightness level on boot.
0072 minimum: 0
0073 maximum: 255
0074
0075 max-brightness:
0076 description: Maximum brightness that is allowed during runtime.
0077 minimum: 0
0078 maximum: 255
0079
0080 ti,linear-mapping-mode:
0081 description: |
0082 Enable linear mapping mode. If disabled, then it will use exponential
0083 mapping mode in which the ramp up/down appears to have a more uniform
0084 transition to the human eye.
0085 type: boolean
0086
0087 required:
0088 - reg
0089
0090 additionalProperties: false
0091
0092 additionalProperties: false
0093
0094 examples:
0095 - |
0096 #include <dt-bindings/gpio/gpio.h>
0097 i2c {
0098 #address-cells = <1>;
0099 #size-cells = <0>;
0100
0101 led-controller@38 {
0102 compatible = "ti,lm3630a";
0103 reg = <0x38>;
0104 enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
0105
0106 #address-cells = <1>;
0107 #size-cells = <0>;
0108
0109 led@0 {
0110 reg = <0>;
0111 led-sources = <0 1>;
0112 label = "lcd-backlight";
0113 default-brightness = <200>;
0114 max-brightness = <255>;
0115 };
0116 };
0117 };
0118 - |
0119 i2c {
0120 #address-cells = <1>;
0121 #size-cells = <0>;
0122
0123 led-controller@38 {
0124 compatible = "ti,lm3630a";
0125 reg = <0x38>;
0126
0127 #address-cells = <1>;
0128 #size-cells = <0>;
0129
0130 led@0 {
0131 reg = <0>;
0132 default-brightness = <150>;
0133 ti,linear-mapping-mode;
0134 };
0135
0136 led@1 {
0137 reg = <1>;
0138 default-brightness = <225>;
0139 ti,linear-mapping-mode;
0140 };
0141 };
0142 };