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: 313700 Delivered-To: patch@linaro.org Received: by 2002:a92:5ad1:0:0:0:0:0 with SMTP id b78csp3800504ilg; Mon, 28 Sep 2020 20:14:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyIq3QkRZQe3bAJqeQ2bURAZTHS7ec1LFk4ptMzjmA6Jl+lwV5u7dXm2kZJoUlcHagdDYp X-Received: by 2002:a17:906:a2d9:: with SMTP id by25mr1839830ejb.326.1601349288257; Mon, 28 Sep 2020 20:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601349288; cv=none; d=google.com; s=arc-20160816; b=bs+k5SsMfRLrZBjmkCBZo/GXnm9haYxinTOPelbcA83o9xoqZdHzRuWgMHOyZyTFEX kSMrOfgHczmg5xqeBo8WpjWRC/fHqvfAHaa733L3BQddNs16gO6eFVRXnU7WbtSU+w4Q YQ93r3hxWq4di1MyhQ5PrsrsLWoiqzblHZMqGkq761MsD5+6yKYaJ7KswBuX7Nw7iyZS HF0kciVqwbNx3VVVZMHGkOGHoqCSGJgwW4BvlPvRcRzYEQz0x84TaSAQExonDua4gMbd Bbd6zUzmRFwTz5snO1Lx8/VJf7EQgsCzdNkH70w1UaV1eS9gOnhvQFf5C98pP7pUM4Fu Hyiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Nh5o0Iu/sIZeZX/X4jVg+PbYLpIA5MkJTyhcsl8L8x0=; b=cPnFWXLjohBzc14egezv24Su4P/ZE9A/KXZk58VtSAHn7NyI4CKKdu9bQEQvFTfqrw NAZKhk4WmtpYyGY4ddHR5qeq/FvJ43tQIrqevxslNkWiUW13MCMLzq8hUJXCjc9fqzUp jGn5D84snhQvaHwXUpi+qRSxCqbWomHpZiqFjoCyXM5yb1R8AVRDiyZT54UhWHv24bd3 7qmQh+81hFxX4oGcGsRRdrKEzGWCbSVY3CvSOcFJoquJoirXQHuQqUviKQoWx8JJCAHS tzdZvUhbEwKStW1KKA5GIHQhsn2fVUmRyc/Y4d9UBYZWYNg1Shuz3yviCqn/x5+9TmQc hkHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tYivMjEz; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h10si1949101eje.414.2020.09.28.20.14.48; Mon, 28 Sep 2020 20:14:48 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tYivMjEz; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727420AbgI2DOq (ORCPT + 6 others); Mon, 28 Sep 2020 23:14:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727417AbgI2DOq (ORCPT ); Mon, 28 Sep 2020 23:14:46 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65001C0613D6 for ; Mon, 28 Sep 2020 20:14:46 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id 185so3828663oie.11 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=VMDuSNLpfopFSexyqHhWNnvf43xcbjuxLXqD/4A8LUtHd3HO+7l1cC/jNTtKtk79W0 DQlkDJTsIcCJd//FPm5QOw4g+e9a8cvXGzbK1PjvXEe15BwsVzszSSzA7B1rjT3MWpm6 PF+nSAhT69fpa/Ttnx1/wIdvGXu4uU4ELLxZ4ayLoC+N8+iQ47PjR+0ZkEeuokUlUH4V gF/EC0/zaFzoyH0s7MclRvBG5V2OBgv8on/nKtQLS6lixVt9FifM5KcoDe11e4kVuq8J TbN8gBPbn2uG6u0QHJruY8Hib8nfxhR1uMQSVFTStxz8PAnyVmzR4e/eNWZD9rW/+7f4 JGMA== X-Gm-Message-State: AOAM531OG3n1rO+/jZ6DGJpz14AU0CynNvslG0H0GYSXRBa3eCAkstsj Fh3ekP9BK2tZbsL4bjpal1HBFg== 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: devicetree@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 -- 2.28.0 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>; + }; +...