Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1796852pxu; Sat, 17 Oct 2020 01:12:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwt/Aqexpkq+Esa8HpVPlQrnimEvmO5ICnJyayvqCe5KoPmti2v5p2bdi9uv808s+uEDlxm X-Received: by 2002:a50:d483:: with SMTP id s3mr8511234edi.173.1602922349026; Sat, 17 Oct 2020 01:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602922349; cv=none; d=google.com; s=arc-20160816; b=B856jP8Iz1m8VEgpfNnjIIk6hyDMoh6aJOpVgwhedFyeCX8taPZy+5QjxWjKN3oC4J UQv0Wqqi65hAp1hoPyMHaTopdpLavIPUQFr0qXhLKXqaX6O/y7QBa82WZA3xNtL1d7Pp rT21il5lMcMR8bUmmup9dA0QcwZQ5hgiytVuv2CIkmd4THj1GZRWaoJvdwTxRdzV0Q7+ XzhpHH/zKnhH0S19NmWOJ2liW5alKBpnW6raaaon67pLe+ZWgwaH3xWagibj7Q8We09r oBJFxH+fita79zh4eVG9O/tT0LOfEdDQIyj/w+vkjO//2mC/gZOVxQ86MFnezHHmPAE2 dffg== 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=9e/IBYO317qxh+k1PgUNvYuepVlTAW7gAlmjMH8Is2Y=; b=sOBG0SeBpLxQAtAWUSYfc+sze2PFpP/341lQ7POKRNHDEVAB1Szjqgu2OTiTkSxq5K KSst5HITdgnswIOPuxHcWzDIiM9eNK2HZyztON1R9G1j5/rTwjAVYbbnXl4zT9RvHYGK cAraTTVurVVL7PD0+tjNWRzP9D6FfwNmEJ54CXEHiUn/Y186dpXLmtgi71N/E+N5h43X fM5nNX9cB91HBj0E5upqLlwTHx7oQNmvNpwY8ZKyOjjW67col84V6XqbZ5c0a95oX8Mu 0oRDb+36NmYEUZfNcbaNDVdEXDPjPL5DQmTrcZitq4n6mOdH8Ayiu59fHeuebSRFFTsB nTGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bLxO1DyD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 b14si3247040edz.115.2020.10.17.01.12.03; Sat, 17 Oct 2020 01:12:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=bLxO1DyD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S2390465AbgJQFaK (ORCPT + 99 others); Sat, 17 Oct 2020 01:30:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2411642AbgJQF3o (ORCPT ); Sat, 17 Oct 2020 01:29:44 -0400 Received: from mail-oo1-xc43.google.com (mail-oo1-xc43.google.com [IPv6:2607:f8b0:4864:20::c43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A590CC05BD37 for ; Fri, 16 Oct 2020 22:20:18 -0700 (PDT) Received: by mail-oo1-xc43.google.com with SMTP id c10so1154974oon.6 for ; Fri, 16 Oct 2020 22:20:18 -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=9e/IBYO317qxh+k1PgUNvYuepVlTAW7gAlmjMH8Is2Y=; b=bLxO1DyD7WvKNbZ1qoNgdML8S06NyThXquGQr4XnUlUt9D4aVwZhUg0gExq4WLd4XB moDieBVHzm0EFujGt5u7mdbuXsOR4fm7sHvpnkiLPCWTIgY66YAincSyXbmuMcDGuqKi R6DHtHmCUuFVXmREnQqhl5wAsiiQLVFw+v7z/TfIqolMUQcFepstkBmPlZGHP4+exHvk pijkfCU+QyiOtC3wm0MA5tdZbusHUv2L7bFUufXqVnIfHd/96x2u7h0owK6oSnG7uQJP +C1pASGGslJtcalIIRC4vYTb67Os481jQ8802H+N6KqIz8EMTOEmNEaWrbYpfk/L/izs YkIQ== 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=9e/IBYO317qxh+k1PgUNvYuepVlTAW7gAlmjMH8Is2Y=; b=V96jDxm8qPrUYjTQ/FVcIBjRSIIiqznCVLL0LqbEA0t5gXquAcciTWtLRorWl9Fc3e 8GXoarCg6p6rR4sxHkUSgG85oz+bfyJ6JQkMdi1m5jBAPNAdUG0Y8CJC9wPFmJHu2fID t2zsW2rxlSXFYfnt9PI0i9AvpOp4TZYYYrn/lfBSO04WrqAD2G8brONcJKOM/8zzvZpS 2swo96D2qLXxrPPYvgoEgRatJS3esi8S9JT0LCp8jYDEeV8brSIC3RZtDYyLedUnJPqF cGDDdxddHPGClUJAD1SqAGRpAyriyFa4gTwv606fcQ8PzBxUJbqLeATQWGwztRpwhN+r EDlQ== X-Gm-Message-State: AOAM532KscNPoQsSWzgyVyQmIt1MX8+qaZsShEsar0zCC4LO0lW0JUsC vwV/jOyK7AjObONlJPi9YnIqzQ== X-Received: by 2002:a4a:9fd1:: with SMTP id b17mr5228553oom.86.1602912017986; Fri, 16 Oct 2020 22:20:17 -0700 (PDT) Received: from localhost.localdomain (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id f2sm1572769ots.64.2020.10.16.22.20.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 22:20:17 -0700 (PDT) From: Bjorn Andersson To: Pavel Machek , Dan Murphy , Rob Herring , Andy Gross , Bjorn Andersson , Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , 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 v5 1/4] dt-bindings: leds: Add Qualcomm Light Pulse Generator binding Date: Fri, 16 Oct 2020 22:20:54 -0700 Message-Id: <20201017052057.2698588-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201017052057.2698588-1-bjorn.andersson@linaro.org> References: <20201017052057.2698588-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 v4: - Dropped quotes around power-source - Moved "multi-led" to properties - Corrected tab-indented line in example .../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..5ccf0f3d8f1b --- /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 + + 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 + +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 + +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>; + }; +... -- 2.28.0