Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp309564pxb; Sat, 9 Oct 2021 21:39:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEMOZO8FsBbxHGou0lq6Tw4YiE+8UOf9Zj/j9zZES3nAqDQmet2/OA37AFN1gyo3ckNxY9 X-Received: by 2002:a62:3383:0:b0:438:4b0d:e50e with SMTP id z125-20020a623383000000b004384b0de50emr18753214pfz.9.1633840775494; Sat, 09 Oct 2021 21:39:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633840775; cv=none; d=google.com; s=arc-20160816; b=Bx1q90DTMZh4O8yCsbDn2zq1vVFA9xGZTtzh7BP25UFxZrD7W7HrYtycIZh3HxXFF3 m7j4ddj0nyYV3mNEPe28vSlYf+bWpAHRLrnT50K0tlv83Mdga5FnXXlDGOIxKhyPdIFd SJYoHMsZZWNasvXmIwbnn1uUmuuJFa39aXEnXKO4562NPRKmJt23wC5sJ+jh9zfX3DEW tXMZ6eLVdkDltg5/poHI+Ty+3g2ip95Saaqas5V7M+TwPZUrOCMsTBP3sz7S3RDBac6Y C2QnBYUvGJ6HGC4V8WJ9oqo/aUXP8GvO242+avgjwdcfBs4wslyk4ViR17FUIz//1F1Q hRuA== 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=ClvAmfgBzfFl0bxL/PGGCR9bfJyCmZjkyGuG7gtkBPCQuTk9PnQJ/2lFjnCDktC0/1 zR7D8Y3sO22Yi3fhjFUFDFY/fd/XdyLbrc0FSQC17YnSs7neJtPf1WJyxQs9kHBPJ/CZ 3CFq6vfQk0mJbHPQHYE9Yyenye1FoCBuN0wZJj9XqkK3SZttb6Lq6ekNzkqrk3pn/jtc a4VSzvabTPNgE9XVSAuFMMAJD8C1AVq7zeQ1jkUy2dD8/LBQX6+0+0fA9PCUEdwEYF5i wgPzv1qO+Sc0C4kILDKQ8u/wfk7FMHhVk0LbCv5De0BYGdYmvtInVi+kNCD6mhmAzNsR 3LvQ== 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-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 e189si5610708pgc.412.2021.10.09.21.39.23; Sat, 09 Oct 2021 21:39:35 -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=U9qgvdrc; 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 S230271AbhJJEji (ORCPT + 99 others); Sun, 10 Oct 2021 00:39:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbhJJEjf (ORCPT ); Sun, 10 Oct 2021 00:39:35 -0400 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BDCAC061765 for ; Sat, 9 Oct 2021 21:37:38 -0700 (PDT) Received: by mail-oi1-x22d.google.com with SMTP id u69so7121147oie.3 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=NOoMp/MizyP5Qgl6hMp6y2SzG6MJLUD9m+aPOVnaREfKaC3zqHPy1pPk2gBy6ThwV1 xXM4Gy9zELHSu/ufxD/nHskbDgKnzz7ZRn0/7cOMOHs0JpqJx38GGOb2NTKTAEoogxL9 IIF9dkdoMUcecxl+cBBfNAU0UwB4kTzCQuDVuq16VPFXbyIgDHdlylYgwUjGUj99kGYP hKDuQ8vZ+8HSYWma7NZirDAKishdixhocs0YGERoLtun8FpxCvau7CfS8WSepKrHDtpk pLD4Tn5n666i9zU17ghfTg2FjHYUWsA3c+okjC/uEjl/2ry1ln4yyiZYS3/7Tb0aN8i6 ZVdA== X-Gm-Message-State: AOAM530eQ6ptM+Omoahlq9s/V6mm6ch1z+9PqODYRjXlyyppQDljxpEc K78YZEkR9JSvTxrWli8ll2LcfQ== 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=20Kleine-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 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 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 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>; + }; +... -- 2.29.2