1a8e53db4SBjorn Andersson# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2a8e53db4SBjorn Andersson%YAML 1.2 3a8e53db4SBjorn Andersson--- 4a8e53db4SBjorn Andersson$id: http://devicetree.org/schemas/leds/leds-qcom-lpg.yaml# 5a8e53db4SBjorn Andersson$schema: http://devicetree.org/meta-schemas/core.yaml# 6a8e53db4SBjorn Andersson 7a8e53db4SBjorn Anderssontitle: Qualcomm Light Pulse Generator 8a8e53db4SBjorn Andersson 9a8e53db4SBjorn Anderssonmaintainers: 10a8e53db4SBjorn Andersson - Bjorn Andersson <bjorn.andersson@linaro.org> 11a8e53db4SBjorn Andersson 12a8e53db4SBjorn Anderssondescription: > 13a8e53db4SBjorn Andersson The Qualcomm Light Pulse Generator consists of three different hardware blocks; 14d7d0efafSAnjelique Melendez a ramp generator with lookup table (LUT), the light pulse generator and a three 15a8e53db4SBjorn Andersson channel current sink. These blocks are found in a wide range of Qualcomm PMICs. 16a8e53db4SBjorn Andersson 17a8e53db4SBjorn Anderssonproperties: 18a8e53db4SBjorn Andersson compatible: 1928598e21SNeil Armstrong oneOf: 2028598e21SNeil Armstrong - enum: 213ed4b599SMarijn Suijten - qcom,pm660l-lpg 22a8e53db4SBjorn Andersson - qcom,pm8150b-lpg 23a8e53db4SBjorn Andersson - qcom,pm8150l-lpg 24da19d10fSSatya Priya - qcom,pm8350c-pwm 25a8e53db4SBjorn Andersson - qcom,pm8916-pwm 26a8e53db4SBjorn Andersson - qcom,pm8941-lpg 27a8e53db4SBjorn Andersson - qcom,pm8994-lpg 28a8e53db4SBjorn Andersson - qcom,pmc8180c-lpg 298e25e2a0SLuca Weiss - qcom,pmi632-lpg 30*fc3b23faSGianluca Boiano - qcom,pmi8950-pwm 31a8e53db4SBjorn Andersson - qcom,pmi8994-lpg 32a8e53db4SBjorn Andersson - qcom,pmi8998-lpg 3303a85ab3SAnjelique Melendez - qcom,pmk8550-pwm 3428598e21SNeil Armstrong - items: 3528598e21SNeil Armstrong - enum: 36016cfc41SDanila Tikhonov - qcom,pm6150l-lpg 37016cfc41SDanila Tikhonov - const: qcom,pm8150l-lpg 38016cfc41SDanila Tikhonov - items: 39016cfc41SDanila Tikhonov - enum: 4028598e21SNeil Armstrong - qcom,pm8550-pwm 4128598e21SNeil Armstrong - const: qcom,pm8350c-pwm 42a8e53db4SBjorn Andersson 43a8e53db4SBjorn Andersson "#pwm-cells": 44a8e53db4SBjorn Andersson const: 2 45a8e53db4SBjorn Andersson 46a8e53db4SBjorn Andersson "#address-cells": 47a8e53db4SBjorn Andersson const: 1 48a8e53db4SBjorn Andersson 49a8e53db4SBjorn Andersson "#size-cells": 50a8e53db4SBjorn Andersson const: 0 51a8e53db4SBjorn Andersson 52a8e53db4SBjorn Andersson qcom,power-source: 53a8e53db4SBjorn Andersson $ref: /schemas/types.yaml#/definitions/uint32 54a8e53db4SBjorn Andersson description: 55a8e53db4SBjorn Andersson power-source used to drive the output, as defined in the datasheet. 56a8e53db4SBjorn Andersson Should be specified if the TRILED block is present 57a8e53db4SBjorn Andersson enum: [0, 1, 3] 58a8e53db4SBjorn Andersson 59a8e53db4SBjorn Andersson qcom,dtest: 60a8e53db4SBjorn Andersson $ref: /schemas/types.yaml#/definitions/uint32-matrix 61a8e53db4SBjorn Andersson description: > 62a8e53db4SBjorn Andersson A list of integer pairs, where each pair represent the dtest line the 63a8e53db4SBjorn Andersson particular channel should be connected to and the flags denoting how the 6447aab533SBjorn Helgaas value should be outputted, as defined in the datasheet. The number of 65a8e53db4SBjorn Andersson pairs should be the same as the number of channels. 66a8e53db4SBjorn Andersson items: 67a8e53db4SBjorn Andersson items: 68a8e53db4SBjorn Andersson - description: dtest line to attach 69a8e53db4SBjorn Andersson - description: flags for the attachment 70a8e53db4SBjorn Andersson 71d7d0efafSAnjelique Melendez nvmem: 72d7d0efafSAnjelique Melendez description: > 73d7d0efafSAnjelique Melendez This property is required for PMICs that supports PPG, which is when a 74d7d0efafSAnjelique Melendez PMIC stores LPG per-channel data and pattern LUT in SDAM modules instead 75d7d0efafSAnjelique Melendez of in a LUT peripheral. For PMICs, such as PM8350C, per-channel data 76d7d0efafSAnjelique Melendez and pattern LUT is separated into 2 SDAM modules. In that case, phandles 77d7d0efafSAnjelique Melendez to both SDAM modules need to be specified. 78d7d0efafSAnjelique Melendez minItems: 1 79d7d0efafSAnjelique Melendez maxItems: 2 80d7d0efafSAnjelique Melendez 81d7d0efafSAnjelique Melendez nvmem-names: 82d7d0efafSAnjelique Melendez minItems: 1 83d7d0efafSAnjelique Melendez items: 84d7d0efafSAnjelique Melendez - const: lpg_chan_sdam 85d7d0efafSAnjelique Melendez - const: lut_sdam 86d7d0efafSAnjelique Melendez 87d7d0efafSAnjelique Melendez qcom,pbs: 88d7d0efafSAnjelique Melendez $ref: /schemas/types.yaml#/definitions/phandle 89d7d0efafSAnjelique Melendez description: > 90d7d0efafSAnjelique Melendez Phandle of the Qualcomm Programmable Boot Sequencer node (PBS). 91d7d0efafSAnjelique Melendez PBS node is used to trigger LPG pattern sequences for PMICs that support 92d7d0efafSAnjelique Melendez single SDAM PPG. 93d7d0efafSAnjelique Melendez 94a8e53db4SBjorn Andersson multi-led: 95a8e53db4SBjorn Andersson type: object 96a8e53db4SBjorn Andersson $ref: leds-class-multicolor.yaml# 97de40c849SKrzysztof Kozlowski unevaluatedProperties: false 98de40c849SKrzysztof Kozlowski 99a8e53db4SBjorn Andersson properties: 100a8e53db4SBjorn Andersson "#address-cells": 101a8e53db4SBjorn Andersson const: 1 102a8e53db4SBjorn Andersson 103a8e53db4SBjorn Andersson "#size-cells": 104a8e53db4SBjorn Andersson const: 0 105a8e53db4SBjorn Andersson 106a8e53db4SBjorn Andersson patternProperties: 107a8e53db4SBjorn Andersson "^led@[0-9a-f]$": 108a8e53db4SBjorn Andersson type: object 109a8e53db4SBjorn Andersson $ref: common.yaml# 110fe469e83SKrzysztof Kozlowski unevaluatedProperties: false 111fe469e83SKrzysztof Kozlowski 112fe469e83SKrzysztof Kozlowski properties: 113fe469e83SKrzysztof Kozlowski reg: 114fe469e83SKrzysztof Kozlowski maxItems: 1 115fe469e83SKrzysztof Kozlowski 116fe469e83SKrzysztof Kozlowski required: 117fe469e83SKrzysztof Kozlowski - reg 118a8e53db4SBjorn Andersson 119a8e53db4SBjorn AnderssonpatternProperties: 120a8e53db4SBjorn Andersson "^led@[0-9a-f]$": 121a8e53db4SBjorn Andersson type: object 122a8e53db4SBjorn Andersson $ref: common.yaml# 123fe469e83SKrzysztof Kozlowski unevaluatedProperties: false 124a8e53db4SBjorn Andersson 125a8e53db4SBjorn Andersson properties: 126fe469e83SKrzysztof Kozlowski reg: 127fe469e83SKrzysztof Kozlowski maxItems: 1 128a8e53db4SBjorn Andersson 129a8e53db4SBjorn Andersson required: 130a8e53db4SBjorn Andersson - reg 131a8e53db4SBjorn Andersson 132a8e53db4SBjorn Anderssonrequired: 133a8e53db4SBjorn Andersson - compatible 134a8e53db4SBjorn Andersson 135a8e53db4SBjorn AnderssonadditionalProperties: false 136a8e53db4SBjorn Andersson 137d7d0efafSAnjelique MelendezallOf: 138d7d0efafSAnjelique Melendez - if: 139d7d0efafSAnjelique Melendez properties: 140d7d0efafSAnjelique Melendez compatible: 141d7d0efafSAnjelique Melendez contains: 1426c27bf4cSKrzysztof Kozlowski enum: 1436c27bf4cSKrzysztof Kozlowski - qcom,pm660l-lpg 1446c27bf4cSKrzysztof Kozlowski - qcom,pm8150b-lpg 1456c27bf4cSKrzysztof Kozlowski - qcom,pm8150l-lpg 1466c27bf4cSKrzysztof Kozlowski - qcom,pm8916-pwm 1476c27bf4cSKrzysztof Kozlowski - qcom,pm8941-lpg 1486c27bf4cSKrzysztof Kozlowski - qcom,pm8994-lpg 1496c27bf4cSKrzysztof Kozlowski - qcom,pmc8180c-lpg 150*fc3b23faSGianluca Boiano - qcom,pmi8950-pwm 1516c27bf4cSKrzysztof Kozlowski - qcom,pmi8994-lpg 1526c27bf4cSKrzysztof Kozlowski - qcom,pmi8998-lpg 1536c27bf4cSKrzysztof Kozlowski - qcom,pmk8550-pwm 1546c27bf4cSKrzysztof Kozlowski then: 1556c27bf4cSKrzysztof Kozlowski properties: 1566c27bf4cSKrzysztof Kozlowski nvmem: false 1576c27bf4cSKrzysztof Kozlowski nvmem-names: false 1586c27bf4cSKrzysztof Kozlowski 1596c27bf4cSKrzysztof Kozlowski - if: 1606c27bf4cSKrzysztof Kozlowski properties: 1616c27bf4cSKrzysztof Kozlowski compatible: 1626c27bf4cSKrzysztof Kozlowski contains: 163d7d0efafSAnjelique Melendez const: qcom,pmi632-lpg 164d7d0efafSAnjelique Melendez then: 165d7d0efafSAnjelique Melendez properties: 166d7d0efafSAnjelique Melendez nvmem: 167d7d0efafSAnjelique Melendez maxItems: 1 168d7d0efafSAnjelique Melendez nvmem-names: 169d7d0efafSAnjelique Melendez maxItems: 1 170615d49f5SKrzysztof Kozlowski 171d7d0efafSAnjelique Melendez - if: 172d7d0efafSAnjelique Melendez properties: 173d7d0efafSAnjelique Melendez compatible: 174d7d0efafSAnjelique Melendez contains: 175d7d0efafSAnjelique Melendez enum: 176d7d0efafSAnjelique Melendez - qcom,pm8350c-pwm 177d7d0efafSAnjelique Melendez then: 178d7d0efafSAnjelique Melendez properties: 179d7d0efafSAnjelique Melendez nvmem: 180d7d0efafSAnjelique Melendez minItems: 2 181d7d0efafSAnjelique Melendez nvmem-names: 182d7d0efafSAnjelique Melendez minItems: 2 183d7d0efafSAnjelique Melendez 184a8e53db4SBjorn Anderssonexamples: 185a8e53db4SBjorn Andersson - | 186a8e53db4SBjorn Andersson #include <dt-bindings/leds/common.h> 187a8e53db4SBjorn Andersson 188a8e53db4SBjorn Andersson led-controller { 189a8e53db4SBjorn Andersson compatible = "qcom,pmi8994-lpg"; 190a8e53db4SBjorn Andersson 191a8e53db4SBjorn Andersson #address-cells = <1>; 192a8e53db4SBjorn Andersson #size-cells = <0>; 193a8e53db4SBjorn Andersson 194a8e53db4SBjorn Andersson qcom,power-source = <1>; 195a8e53db4SBjorn Andersson 196a8e53db4SBjorn Andersson qcom,dtest = <0 0>, 197a8e53db4SBjorn Andersson <0 0>, 198a8e53db4SBjorn Andersson <0 0>, 199a8e53db4SBjorn Andersson <4 1>; 200a8e53db4SBjorn Andersson 201a8e53db4SBjorn Andersson led@1 { 202a8e53db4SBjorn Andersson reg = <1>; 203a8e53db4SBjorn Andersson color = <LED_COLOR_ID_GREEN>; 204a8e53db4SBjorn Andersson function = LED_FUNCTION_INDICATOR; 205a8e53db4SBjorn Andersson function-enumerator = <1>; 206a8e53db4SBjorn Andersson }; 207a8e53db4SBjorn Andersson 208a8e53db4SBjorn Andersson led@2 { 209a8e53db4SBjorn Andersson reg = <2>; 210a8e53db4SBjorn Andersson color = <LED_COLOR_ID_GREEN>; 211a8e53db4SBjorn Andersson function = LED_FUNCTION_INDICATOR; 212a8e53db4SBjorn Andersson function-enumerator = <0>; 213a8e53db4SBjorn Andersson default-state = "on"; 214a8e53db4SBjorn Andersson }; 215a8e53db4SBjorn Andersson 216a8e53db4SBjorn Andersson led@3 { 217a8e53db4SBjorn Andersson reg = <3>; 218a8e53db4SBjorn Andersson color = <LED_COLOR_ID_GREEN>; 219a8e53db4SBjorn Andersson function = LED_FUNCTION_INDICATOR; 220a8e53db4SBjorn Andersson function-enumerator = <2>; 221a8e53db4SBjorn Andersson }; 222a8e53db4SBjorn Andersson 223a8e53db4SBjorn Andersson led@4 { 224a8e53db4SBjorn Andersson reg = <4>; 225a8e53db4SBjorn Andersson color = <LED_COLOR_ID_GREEN>; 226a8e53db4SBjorn Andersson function = LED_FUNCTION_INDICATOR; 227a8e53db4SBjorn Andersson function-enumerator = <3>; 228a8e53db4SBjorn Andersson }; 229a8e53db4SBjorn Andersson }; 230a8e53db4SBjorn Andersson - | 231a8e53db4SBjorn Andersson #include <dt-bindings/leds/common.h> 232a8e53db4SBjorn Andersson 233a8e53db4SBjorn Andersson led-controller { 234a8e53db4SBjorn Andersson compatible = "qcom,pmi8994-lpg"; 235a8e53db4SBjorn Andersson 236a8e53db4SBjorn Andersson #address-cells = <1>; 237a8e53db4SBjorn Andersson #size-cells = <0>; 238a8e53db4SBjorn Andersson 239a8e53db4SBjorn Andersson qcom,power-source = <1>; 240a8e53db4SBjorn Andersson 241a8e53db4SBjorn Andersson multi-led { 242a8e53db4SBjorn Andersson color = <LED_COLOR_ID_RGB>; 243a8e53db4SBjorn Andersson function = LED_FUNCTION_STATUS; 244a8e53db4SBjorn Andersson 245a8e53db4SBjorn Andersson #address-cells = <1>; 246a8e53db4SBjorn Andersson #size-cells = <0>; 247a8e53db4SBjorn Andersson 248a8e53db4SBjorn Andersson led@1 { 249a8e53db4SBjorn Andersson reg = <1>; 250a8e53db4SBjorn Andersson color = <LED_COLOR_ID_RED>; 251a8e53db4SBjorn Andersson }; 252a8e53db4SBjorn Andersson 253a8e53db4SBjorn Andersson led@2 { 254a8e53db4SBjorn Andersson reg = <2>; 255a8e53db4SBjorn Andersson color = <LED_COLOR_ID_GREEN>; 256a8e53db4SBjorn Andersson }; 257a8e53db4SBjorn Andersson 258a8e53db4SBjorn Andersson led@3 { 259a8e53db4SBjorn Andersson reg = <3>; 260a8e53db4SBjorn Andersson color = <LED_COLOR_ID_BLUE>; 261a8e53db4SBjorn Andersson }; 262a8e53db4SBjorn Andersson }; 263a8e53db4SBjorn Andersson }; 264a8e53db4SBjorn Andersson - | 265a8e53db4SBjorn Andersson pwm-controller { 266a8e53db4SBjorn Andersson compatible = "qcom,pm8916-pwm"; 267a8e53db4SBjorn Andersson #pwm-cells = <2>; 268a8e53db4SBjorn Andersson }; 269d7d0efafSAnjelique Melendez - | 270d7d0efafSAnjelique Melendez #include <dt-bindings/leds/common.h> 271d7d0efafSAnjelique Melendez 272d7d0efafSAnjelique Melendez led-controller { 273d7d0efafSAnjelique Melendez compatible = "qcom,pmi632-lpg"; 274d7d0efafSAnjelique Melendez #address-cells = <1>; 275d7d0efafSAnjelique Melendez #size-cells = <0>; 276d7d0efafSAnjelique Melendez #pwm-cells = <2>; 277d7d0efafSAnjelique Melendez nvmem-names = "lpg_chan_sdam"; 278d7d0efafSAnjelique Melendez nvmem = <&pmi632_sdam_7>; 279d7d0efafSAnjelique Melendez qcom,pbs = <&pmi632_pbs_client3>; 280d7d0efafSAnjelique Melendez 281d7d0efafSAnjelique Melendez led@1 { 282d7d0efafSAnjelique Melendez reg = <1>; 283d7d0efafSAnjelique Melendez color = <LED_COLOR_ID_RED>; 284d7d0efafSAnjelique Melendez label = "red"; 285d7d0efafSAnjelique Melendez }; 286d7d0efafSAnjelique Melendez 287d7d0efafSAnjelique Melendez led@2 { 288d7d0efafSAnjelique Melendez reg = <2>; 289d7d0efafSAnjelique Melendez color = <LED_COLOR_ID_GREEN>; 290d7d0efafSAnjelique Melendez label = "green"; 291d7d0efafSAnjelique Melendez }; 292d7d0efafSAnjelique Melendez 293d7d0efafSAnjelique Melendez led@3 { 294d7d0efafSAnjelique Melendez reg = <3>; 295d7d0efafSAnjelique Melendez color = <LED_COLOR_ID_BLUE>; 296d7d0efafSAnjelique Melendez label = "blue"; 297d7d0efafSAnjelique Melendez }; 298d7d0efafSAnjelique Melendez }; 299