0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/leds/issi,is31fl319x.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: ISSI LED controllers bindings for IS31FL319{0,1,3,6,9}
0008
0009 maintainers:
0010 - Vincent Knecht <vincent.knecht@mailoo.org>
0011
0012 description: |
0013 The IS31FL319X are LED controllers with I2C interface.
0014 Previously known as Si-En SN319{0,1,3,6,9}.
0015
0016 For more product information please see the links below:
0017 https://lumissil.com/assets/pdf/core/IS31FL3190_DS.pdf
0018 https://lumissil.com/assets/pdf/core/IS31FL3191_DS.pdf
0019 https://lumissil.com/assets/pdf/core/IS31FL3193_DS.pdf
0020 https://lumissil.com/assets/pdf/core/IS31FL3196_DS.pdf
0021 https://lumissil.com/assets/pdf/core/IS31FL3199_DS.pdf
0022
0023 properties:
0024 compatible:
0025 enum:
0026 - issi,is31fl3190
0027 - issi,is31fl3191
0028 - issi,is31fl3193
0029 - issi,is31fl3196
0030 - issi,is31fl3199
0031 - si-en,sn3190
0032 - si-en,sn3191
0033 - si-en,sn3193
0034 - si-en,sn3196
0035 - si-en,sn3199
0036
0037 reg:
0038 maxItems: 1
0039
0040 shutdown-gpios:
0041 maxItems: 1
0042 description: GPIO attached to the SDB pin.
0043
0044 audio-gain-db:
0045 $ref: /schemas/types.yaml#/definitions/uint32
0046 default: 0
0047 description: Audio gain selection for external analog modulation input.
0048 enum: [0, 3, 6, 9, 12, 15, 18, 21]
0049
0050 "#address-cells":
0051 const: 1
0052
0053 "#size-cells":
0054 const: 0
0055
0056 patternProperties:
0057 "^led@[1-9]$":
0058 type: object
0059 $ref: common.yaml#
0060
0061 properties:
0062 reg:
0063 description: Index of the LED.
0064 minimum: 1
0065 maximum: 9
0066
0067 led-max-microamp:
0068 description:
0069 Note that a driver will take the lowest of all LED limits
0070 since the chip has a single global setting. The lowest value
0071 will be chosen due to the PWM specificity, where lower
0072 brightness is achieved by reducing the duty-cycle of pulses
0073 and not the current, which will always have its peak value
0074 equal to led-max-microamp.
0075
0076 allOf:
0077 - if:
0078 properties:
0079 compatible:
0080 contains:
0081 enum:
0082 - issi,is31fl3190
0083 - issi,is31fl3191
0084 - issi,is31fl3193
0085 - si-en,sn3190
0086 - si-en,sn3191
0087 - si-en,sn3193
0088 then:
0089 properties:
0090 reg:
0091 enum: [0x68, 0x69, 0x6a, 0x6b]
0092
0093 audio-gain-db: false
0094
0095 patternProperties:
0096 "^led@[1-9]$":
0097 properties:
0098 led-max-microamp:
0099 default: 42000
0100 enum: [5000, 10000, 17500, 30000, 42000]
0101 else:
0102 properties:
0103 reg:
0104 enum: [0x64, 0x65, 0x66, 0x67]
0105
0106 patternProperties:
0107 "^led@[1-9]$":
0108 properties:
0109 led-max-microamp:
0110 default: 20000
0111 enum: [5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000]
0112 - if:
0113 properties:
0114 compatible:
0115 contains:
0116 enum:
0117 - issi,is31fl3190
0118 - issi,is31fl3191
0119 - si-en,sn3190
0120 - si-en,sn3191
0121 then:
0122 patternProperties:
0123 "^led@[1-9]$":
0124 properties:
0125 reg:
0126 maximum: 1
0127 - if:
0128 properties:
0129 compatible:
0130 contains:
0131 enum:
0132 - issi,is31fl3193
0133 - si-en,sn3193
0134 then:
0135 patternProperties:
0136 "^led@[1-9]$":
0137 properties:
0138 reg:
0139 maximum: 3
0140 - if:
0141 properties:
0142 compatible:
0143 contains:
0144 enum:
0145 - issi,is31fl3196
0146 - si-en,sn3196
0147 then:
0148 patternProperties:
0149 "^led@[1-9]$":
0150 properties:
0151 reg:
0152 maximum: 6
0153
0154 required:
0155 - compatible
0156 - reg
0157 - "#address-cells"
0158 - "#size-cells"
0159
0160 additionalProperties: false
0161
0162 examples:
0163 - |
0164 #include <dt-bindings/gpio/gpio.h>
0165 #include <dt-bindings/leds/common.h>
0166
0167 i2c0 {
0168 #address-cells = <1>;
0169 #size-cells = <0>;
0170
0171 led-controller@65 {
0172 compatible = "issi,is31fl3196";
0173 reg = <0x65>;
0174 #address-cells = <1>;
0175 #size-cells = <0>;
0176
0177 shutdown-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
0178
0179 led@1 {
0180 reg = <1>;
0181 label = "red:aux";
0182 led-max-microamp = <10000>;
0183 };
0184
0185 led@5 {
0186 reg = <5>;
0187 label = "green:power";
0188 linux,default-trigger = "default-on";
0189 };
0190 };
0191 };
0192 ...
0193