]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
UBUNTU: SAUCE: (snapdragon) DT: leds: Add Qualcomm Light Pulse Generator binding
authorBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 24 Jan 2018 09:56:08 +0000 (11:56 +0200)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 4 Mar 2019 12:51:16 +0000 (06:51 -0600)
BugLink: http://bugs.launchpad.net/bugs/1763040
This adds the binding document describing the three hardware blocks
related to the Light Pulse Generator found in a wide range of Qualcomm
PMICs.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Ramon Fried <rfried@codeaurora.org>
(cherry picked from commit 780bb8370eb249be9a66084ea58482254e6a4c23
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Documentation/devicetree/bindings/leds/leds-qcom-lpg.txt [new file with mode: 0644]

diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.txt b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.txt
new file mode 100644 (file)
index 0000000..9cee6f9
--- /dev/null
@@ -0,0 +1,66 @@
+Binding for Qualcomm Light Pulse Generator
+
+The Qualcomm Light Pulse Generator consists of three different hardware blocks;
+a ramp generator with lookup table, the light pulse generator and a three
+channel current sink. These blocks are found in a wide range of Qualcomm PMICs.
+
+Required properties:
+- compatible: one of:
+             "qcom,pm8916-pwm",
+             "qcom,pm8941-lpg",
+             "qcom,pm8994-lpg",
+             "qcom,pmi8994-lpg",
+             "qcom,pmi8998-lpg",
+
+Optional properties:
+- qcom,power-source: power-source used to drive the output, as defined in the
+                    datasheet. Should be specified if the TRILED block is
+                    present
+- qcom,dtest: configures the output into an internal test line of the
+             pmic. Specified by a list of u32 pairs, one pair per channel,
+             where each pair denotes the test line to drive and the second
+             configures how the value should be outputed, as defined in the
+             datasheet
+- #pwm-cells: should be 2, see ../pwm/pwm.txt
+
+LED subnodes:
+A set of subnodes can be used to specify LEDs connected to the LPG. Channels
+not associated with a LED are available as pwm channels, see ../pwm/pwm.txt.
+
+Required properties:
+- led-sources: list of channels associated with this LED, starting at 1 for the
+              first LPG channel
+
+Optional properties:
+- label: see Documentation/devicetree/bindings/leds/common.txt
+- default-state: see Documentation/devicetree/bindings/leds/common.txt
+- linux,default-trigger: see Documentation/devicetree/bindings/leds/common.txt
+
+Example:
+The following example defines a RGB LED attached to the PM8941.
+
+&spmi_bus {
+       pm8941@1 {
+               lpg {
+                       compatible = "qcom,pm8941-lpg";
+                       qcom,power-source = <1>;
+
+                       rgb {
+                               led-sources = <7 6 5>;
+                       };
+               };
+       };
+};
+
+The following example defines the single PWM channel of the PM8916, which can
+be muxed by the MPP4 as a current sink.
+
+&spmi_bus {
+       pm8916@1 {
+               pm8916_pwm: pwm {
+                       compatible = "qcom,pm8916-pwm";
+
+                       #pwm-cells = <2>;
+               };
+       };
+};