From patchwork Sun Oct 10 04:39:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 515591 Delivered-To: patch@linaro.org Received: by 2002:ac0:b5cc:0:0:0:0:0 with SMTP id x12csp3392670ime; Sat, 9 Oct 2021 21:37:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx04Nm+1z+iyrCEMMwTFZxa/tml1NJ+ZJvCUL0OyAvgYoPcoaOxMeWtvN3Ip8UhhHCIM6JB X-Received: by 2002:a17:906:d92e:: with SMTP id rn14mr15827734ejb.526.1633840661207; Sat, 09 Oct 2021 21:37:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633840661; cv=none; d=google.com; s=arc-20160816; b=xjlW46/5x/Nn8INq4IJ80d8pYoSFwaBds1wg7zvwmHs1PwjI7jBe4Dua3uVHdcfrxZ 4P8/tMNqVJKelrS5LvHXx2VCAa2bJ8rvJzRCPeRhmJ69aVcplRKf/3skA4NyQJCkKro8 VQ+VSCNSYoRmL3F+pT8HOkLQa4srwYrvbdmNlUcW7jeA6+rGSq7BlsgpepMyQHUgHPj+ CeARQvo2nhWIuOHPFCckFgm+R/cdd+/UB+2GOdd2NXJfiDnLzqdZR7va3mN8qKUM4hya qt7tP3138X1FAfj3h3FUMEBFeSt6nsRpk+EFGYLHALtneZD9DJP25rU/Cey+klrd5mTF g74w== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=LND76CQ9d5nw6mEeTiH1H1kGnaK21DZuSx57AAvuFmo=; b=teIl4rpn6fW/vZNwpeqrCgUq26Et4l2YtSA0Gbg8Drjs/dgeUDH7tvejZP7as1bL0m WoYiAvR50yzxPW7cJL0d4EWFMz3UppyWoWbrLQ5BaBwQuJUJoq4np2nFmdu4Q8MK9xdQ GP38abdMIwnlNKoH+gAzJVnW3n2txT3Hms+USrV+AbhxLDewWPC0V4V7rFlOFXhL1PzW QO6N+Ea+rC84WcrLe6/Ir9dqneW2h4p7wdkG6AQqgvCaLrhe8/aLXfH1tSQbgrCwmrGW L0uMsD9YJkbqJVTZvWvDJusIXO8AhC1fQZVCyMCLe0FYjvtUToG6blHT5RjPTayDohn3 dBbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U9qgvdrc; spf=pass (google.com: domain of linux-leds-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-leds-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 p12si5479858edh.110.2021.10.09.21.37.41 for ; Sat, 09 Oct 2021 21:37:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-leds-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=U9qgvdrc; spf=pass (google.com: domain of linux-leds-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-leds-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 S230186AbhJJEjg (ORCPT ); Sun, 10 Oct 2021 00:39:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbhJJEjf (ORCPT ); Sun, 10 Oct 2021 00:39:35 -0400 Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26E43C061764 for ; Sat, 9 Oct 2021 21:37:38 -0700 (PDT) Received: by mail-oi1-x230.google.com with SMTP id n63so19521675oif.7 for ; Sat, 09 Oct 2021 21:37:38 -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:mime-version :content-transfer-encoding; bh=LND76CQ9d5nw6mEeTiH1H1kGnaK21DZuSx57AAvuFmo=; b=U9qgvdrcWvJCuxBEb3LCtSFlTqLZTCVK662QSjs/0Ug4sEjKZ7LIpcqyw14X9vsvtp YoOrQW57gy0t6cvV3qf5S+9JCEs/hITTSVCQudWuswb7Kldt1wXxf/r6XYb6exi1sZpt WY1yK8d3UtYPjehrNxzi60za6+wo8HkEi0swlqgdKk0r1h/cwyulBMd+6og21p3VCtLB +37Z/IHDJbUlTFjLtzMtVbAnqV4CNBAmVaFuACI1yS/yPDvVx0mmSWhBm/vPaVwVHq0t A1BjzrFX3VZTedktp9WeEjdv68aslH49xFFT70OFc6vgd4tA4njgja/2Hiw95VbN4KzQ TDqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LND76CQ9d5nw6mEeTiH1H1kGnaK21DZuSx57AAvuFmo=; b=Ii/S7bUCpyo/tKIxOJYxLGKVZ6NenraFqsby5lU83tdF4MwjHIDIeHX5oB4i+g18fc o7E2Y/JGusyLrnk1M3wpHrcs1CSpXHOdLIG0Ljnkhutr8QoFsD4/XPgfSgCO0TTlRZDl XBbSNnRTTbKPxsRERA3zasBjyIzkn0THoyQdiWDCaPIw4xWTLeKDH0PhhDnoKNmXGkw3 a6sDBN550ZB3WBPF493+7PrByisXxHLpkIXd2dC4LeIqFejswgvDo/ho7qZwTxcCNLkr YDTBpFKJx6DAzU+iCGk4dNCo6I7vyY1CDVbBG3f5wx1dzxSbF8XG+bn0AUaALCzxSSrJ eHVw== X-Gm-Message-State: AOAM531P98rXiVN5wKsai0CQdbMg0W+hCS7nk0cfRgnNfOaLrXMvKcd2 eSC0fkVKo94EhBQYmLhxaVFU5g== X-Received: by 2002:aca:3556:: with SMTP id c83mr17828600oia.95.1633840657276; Sat, 09 Oct 2021 21:37:37 -0700 (PDT) Received: from localhost.localdomain ([2600:1700:a0:3dc8:205:1bff:fec0:b9b3]) by smtp.gmail.com with ESMTPSA id p14sm811685oov.0.2021.10.09.21.37.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Oct 2021 21:37:36 -0700 (PDT) From: Bjorn Andersson To: Pavel Machek , Rob Herring , Andy Gross , Bjorn Andersson , Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Lee Jones 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, Marijn Suijten , Yassine Oudjana , Luca Weiss , Subbaraman Narayanamurthy Subject: [PATCH v10 1/2] dt-bindings: leds: Add Qualcomm Light Pulse Generator binding Date: Sat, 9 Oct 2021 21:39:11 -0700 Message-Id: <20211010043912.136640-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.29.2 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 Reviewed-by: Stephen Boyd --- Changes since v9: - "led" child of "multi-led" now needed a patternProperties - use generic "led-controller" and "pwm-controller" in example .../bindings/leds/leds-qcom-lpg.yaml | 173 ++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml -- 2.29.2 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..336bd8e10efd --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml @@ -0,0 +1,173 @@ +# 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,pm8150b-lpg + - qcom,pm8150l-lpg + - qcom,pm8916-pwm + - qcom,pm8941-lpg + - qcom,pm8994-lpg + - qcom,pmc8180c-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] + + qcom,dtest: + $ref: /schemas/types.yaml#/definitions/uint32-matrix + description: > + A list of integer pairs, where each pair represent the dtest line the + particular channel should be connected to and the flags denoting how the + value should be outputed, as defined in the datasheet. The number of + pairs should be the same as the number of channels. + items: + items: + - description: dtest line to attach + - description: flags for the attachment + + multi-led: + type: object + $ref: leds-class-multicolor.yaml# + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + patternProperties: + "^led@[0-9a-f]$": + type: object + $ref: common.yaml# + +patternProperties: + "^led@[0-9a-f]$": + type: object + $ref: common.yaml# + + properties: + reg: true + + required: + - reg + +required: + - compatible + +additionalProperties: false + +examples: + - | + #include + + led-controller { + compatible = "qcom,pmi8994-lpg"; + + #address-cells = <1>; + #size-cells = <0>; + + qcom,power-source = <1>; + + qcom,dtest = <0 0>, + <0 0>, + <0 0>, + <4 1>; + + led@1 { + reg = <1>; + color = ; + function = LED_FUNCTION_INDICATOR; + function-enumerator = <1>; + }; + + led@2 { + reg = <2>; + color = ; + function = LED_FUNCTION_INDICATOR; + function-enumerator = <0>; + default-state = "on"; + }; + + led@3 { + reg = <3>; + color = ; + function = LED_FUNCTION_INDICATOR; + function-enumerator = <2>; + }; + + led@4 { + reg = <4>; + color = ; + function = LED_FUNCTION_INDICATOR; + function-enumerator = <3>; + }; + }; + - | + #include + + led-controller { + compatible = "qcom,pmi8994-lpg"; + + #address-cells = <1>; + #size-cells = <0>; + + qcom,power-source = <1>; + + multi-led { + color = ; + function = LED_FUNCTION_STATUS; + + #address-cells = <1>; + #size-cells = <0>; + + led@1 { + reg = <1>; + color = ; + }; + + led@2 { + reg = <2>; + color = ; + }; + + led@3 { + reg = <3>; + color = ; + }; + }; + }; + - | + pwm-controller { + compatible = "qcom,pm8916-pwm"; + #pwm-cells = <2>; + }; +...