1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/leds/issi,is31fl319x.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: ISSI LED Controllers for IS31FL319{0,1,3,6,9} 8 9maintainers: 10 - Vincent Knecht <vincent.knecht@mailoo.org> 11 12description: | 13 The IS31FL319X are LED controllers with I2C interface. 14 Previously known as Si-En SN319{0,1,3,6,9}. 15 16 For more product information please see the links below: 17 https://lumissil.com/assets/pdf/core/IS31FL3190_DS.pdf 18 https://lumissil.com/assets/pdf/core/IS31FL3191_DS.pdf 19 https://lumissil.com/assets/pdf/core/IS31FL3193_DS.pdf 20 https://lumissil.com/assets/pdf/core/IS31FL3196_DS.pdf 21 https://lumissil.com/assets/pdf/core/IS31FL3199_DS.pdf 22 23properties: 24 compatible: 25 enum: 26 - issi,is31fl3190 27 - issi,is31fl3191 28 - issi,is31fl3193 29 - issi,is31fl3196 30 - issi,is31fl3199 31 - si-en,sn3190 32 - si-en,sn3191 33 - si-en,sn3193 34 - si-en,sn3196 35 - si-en,sn3199 36 37 reg: 38 maxItems: 1 39 40 shutdown-gpios: 41 maxItems: 1 42 description: GPIO attached to the SDB pin. 43 44 audio-gain-db: 45 $ref: /schemas/types.yaml#/definitions/uint32 46 default: 0 47 description: Audio gain selection for external analog modulation input. 48 enum: [0, 3, 6, 9, 12, 15, 18, 21] 49 50 "#address-cells": 51 const: 1 52 53 "#size-cells": 54 const: 0 55 56patternProperties: 57 "^led@[1-9]$": 58 type: object 59 $ref: common.yaml# 60 unevaluatedProperties: false 61 62 properties: 63 reg: 64 description: Index of the LED. 65 minimum: 1 66 maximum: 9 67 68 led-max-microamp: 69 description: 70 Note that a driver will take the lowest of all LED limits 71 since the chip has a single global setting. The lowest value 72 will be chosen due to the PWM specificity, where lower 73 brightness is achieved by reducing the duty-cycle of pulses 74 and not the current, which will always have its peak value 75 equal to led-max-microamp. 76 77allOf: 78 - if: 79 properties: 80 compatible: 81 contains: 82 enum: 83 - issi,is31fl3190 84 - issi,is31fl3191 85 - issi,is31fl3193 86 - si-en,sn3190 87 - si-en,sn3191 88 - si-en,sn3193 89 then: 90 properties: 91 reg: 92 enum: [0x68, 0x69, 0x6a, 0x6b] 93 94 audio-gain-db: false 95 96 patternProperties: 97 "^led@[1-9]$": 98 properties: 99 led-max-microamp: 100 default: 42000 101 enum: [5000, 10000, 17500, 30000, 42000] 102 else: 103 properties: 104 reg: 105 enum: [0x64, 0x65, 0x66, 0x67] 106 107 patternProperties: 108 "^led@[1-9]$": 109 properties: 110 led-max-microamp: 111 default: 20000 112 enum: [5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000] 113 - if: 114 properties: 115 compatible: 116 contains: 117 enum: 118 - issi,is31fl3190 119 - issi,is31fl3191 120 - si-en,sn3190 121 - si-en,sn3191 122 then: 123 patternProperties: 124 "^led@[1-9]$": 125 properties: 126 reg: 127 maximum: 1 128 - if: 129 properties: 130 compatible: 131 contains: 132 enum: 133 - issi,is31fl3193 134 - si-en,sn3193 135 then: 136 patternProperties: 137 "^led@[1-9]$": 138 properties: 139 reg: 140 maximum: 3 141 - if: 142 properties: 143 compatible: 144 contains: 145 enum: 146 - issi,is31fl3196 147 - si-en,sn3196 148 then: 149 patternProperties: 150 "^led@[1-9]$": 151 properties: 152 reg: 153 maximum: 6 154 155required: 156 - compatible 157 - reg 158 - "#address-cells" 159 - "#size-cells" 160 161additionalProperties: false 162 163examples: 164 - | 165 #include <dt-bindings/gpio/gpio.h> 166 #include <dt-bindings/leds/common.h> 167 168 i2c0 { 169 #address-cells = <1>; 170 #size-cells = <0>; 171 172 led-controller@65 { 173 compatible = "issi,is31fl3196"; 174 reg = <0x65>; 175 #address-cells = <1>; 176 #size-cells = <0>; 177 178 shutdown-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; 179 180 led@1 { 181 reg = <1>; 182 label = "red:aux"; 183 led-max-microamp = <10000>; 184 }; 185 186 led@5 { 187 reg = <5>; 188 label = "green:power"; 189 linux,default-trigger = "default-on"; 190 }; 191 }; 192 }; 193... 194 195