From patchwork Tue Sep 29 03:15:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 255341 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19787C4727E for ; Tue, 29 Sep 2020 03:14:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C8655216C4 for ; Tue, 29 Sep 2020 03:14:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="tYivMjEz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727418AbgI2DOr (ORCPT ); Mon, 28 Sep 2020 23:14:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727416AbgI2DOq (ORCPT ); Mon, 28 Sep 2020 23:14:46 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54747C0613D4 for ; Mon, 28 Sep 2020 20:14:46 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id w16so3857957oia.2 for ; Mon, 28 Sep 2020 20:14:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Nh5o0Iu/sIZeZX/X4jVg+PbYLpIA5MkJTyhcsl8L8x0=; b=tYivMjEz8hGygZhhtfc92v4wXyoS8P1JXMKzYdamYaQviTmrt5YMUfTw7CWFm6NpQP gfRaXHdjk7i3nuIQAMyLSJGE3nT+WT5WmnT9OfZ5ksxQpuup5VUDGF9OPTXgKvRYP8LP d7bt5fwultsxxDsJC4EaJute/K+X/gxhM4LdSqqeH5mArwEg2pINbYyll9wHTtgh3N7X Ebsyfl4DGwMVI0UwNTs1O3QYApl5W+QL60l17mzAdF1/qrdoU8vzWfsJdl7j8oAaSad9 0QKj6BqkBS1ydgLCKPq2BAYSeh8xRyrNeF6yQopKwQVRh4L0Cy0cJ6NweDVRB4j/2dcK fG2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Nh5o0Iu/sIZeZX/X4jVg+PbYLpIA5MkJTyhcsl8L8x0=; b=jF8syW5MZ/cgc97vYrpBmBW0utxNWURnoQMd95Qr0ME9zC7Qlr23FVZNISRoBr4Kv7 N3ooiy0l43X2IGxVUTOPepSAXyve+tKDIrNOWYZbAuurQjOmfhrKejkMhx8cnBvyjpvC 8FMZBzBYVATFTtGZeBU+ZgXK5ZsC9BnQAN1z7LoJhHBvV2BFnHR2iz0RlsOHufTYSHYT D7m4dlYxSZZUkekVCAZsaukiGN0ftrcOyimhlq5skB9OO6K3uzXkpiWyU2JSxrP+D1mi pYcZMLwoHUTO7k+LlwzzoMWkwaSRvNu7zl3Koq/PHYrqAZ+YrKU6zpygvDnnCGf9sAEr oJbg== X-Gm-Message-State: AOAM533546XtjaVAcA6isdf9+LVO+m4CuWj8urWFwiIyUYRPNNmghp+7 WmehW4Ks5MByH2MPPOwPP3zVGQ== X-Google-Smtp-Source: ABdhPJzCaUUPPFvHGDDy9+Dw1EP6JS0uTQ3Q7Gvdopr3c2fhZ6dTgtIqKmX9/d5U6B0esvbKYT9cAQ== X-Received: by 2002:aca:f203:: with SMTP id q3mr1189882oih.148.1601349285686; Mon, 28 Sep 2020 20:14:45 -0700 (PDT) Received: from localhost.localdomain (99-135-181-32.lightspeed.austtx.sbcglobal.net. [99.135.181.32]) by smtp.gmail.com with ESMTPSA id 36sm729548otb.30.2020.09.28.20.14.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 20:14:45 -0700 (PDT) From: Bjorn Andersson To: Pavel Machek , Dan Murphy , Rob Herring , Andy Gross , Bjorn Andersson , Thierry Reding , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?b?w7ZuaWc=?= , Lee Jones , Martin Botka Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-pwm@vger.kernel.org Subject: [PATCH v4 1/4] dt-bindings: leds: Add Qualcomm Light Pulse Generator binding Date: Mon, 28 Sep 2020 20:15:41 -0700 Message-Id: <20200929031544.1000204-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929031544.1000204-1-bjorn.andersson@linaro.org> References: <20200929031544.1000204-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org 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 --- Changes since v3: - Rewritten as YAML - Adopt multicolor model .../bindings/leds/leds-qcom-lpg.yaml | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml new file mode 100644 index 000000000000..5c6e98fc3b9a --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml @@ -0,0 +1,170 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-qcom-lpg.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Light Pulse Generator + +maintainers: + - Bjorn Andersson + +description: > + 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. + +properties: + compatible: + enum: + - qcom,pm8916-pwm + - qcom,pm8941-lpg + - qcom,pm8994-lpg + - qcom,pmi8994-lpg + - qcom,pmi8998-lpg + + "#pwm-cells": + const: 2 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + "qcom,power-source": + $ref: /schemas/types.yaml#definitions/uint32 + description: > + power-source used to drive the output, as defined in the datasheet. + Should be specified if the TRILED block is present + enum: + - 0 + - 1 + - 3 + +patternProperties: + "^led@[0-9a-f]$": + type: object + $ref: common.yaml# + properties: + "qcom,dtest": + $ref: /schemas/types.yaml#definitions/uint32-array + description: > + 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 + minItems: 2 + maxItems: 2 + + required: + - reg + + "^multi-led$": + type: object + $ref: leds-class-multicolor.yaml# + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + "^led@[0-9a-f]$": + type: object + $ref: common.yaml# + + properties: + "qcom,dtest": + $ref: /schemas/types.yaml#definitions/uint32-array + description: > + 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 + minItems: 2 + maxItems: 2 + + required: + - reg + +required: + - compatible + +additionalProperties: false + +examples: + - | + #include + + lpg { + compatible = "qcom,pmi8994-lpg"; + + #address-cells = <1>; + #size-cells = <0>; + + qcom,power-source = <1>; + + led@1 { + reg = <1>; + label = "green:user1"; + }; + + led@2 { + reg = <2>; + label = "green:user0"; + default-state = "on"; + }; + + led@3 { + reg = <3>; + label = "green:user2"; + }; + + led@4 { + reg = <4>; + label = "green:user3"; + + qcom,dtest = <4 1>; + }; + }; + - | + #include + + lpg { + compatible = "qcom,pmi8994-lpg"; + + #address-cells = <1>; + #size-cells = <0>; + + qcom,power-source = <1>; + + multi-led { + color = ; + label = "rgb:notification"; + + #address-cells = <1>; + #size-cells = <0>; + + led@1 { + reg = <1>; + color = ; + }; + + led@2 { + reg = <2>; + color = ; + }; + + led@3 { + reg = <3>; + color = ; + }; + }; + }; + - | + lpg { + compatible = "qcom,pm8916-pwm"; + #pwm-cells = <2>; + }; +...