From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D519C433FE for ; Sun, 10 Oct 2021 04:37:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B8EF61076 for ; Sun, 10 Oct 2021 04:37:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230124AbhJJEjg (ORCPT ); Sun, 10 Oct 2021 00:39:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbhJJEjf (ORCPT ); Sun, 10 Oct 2021 00:39:35 -0400 Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14388C061570 for ; Sat, 9 Oct 2021 21:37:38 -0700 (PDT) Received: by mail-oi1-x22b.google.com with SMTP id a3so19556099oid.6 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=P/B3PdQN/gjG9untIeY3mE3FNrvlugEo1JPDDQT2wnFAUAKkpPhTuub8C4NIz5ASVy qhd6ep+pecDIaHmmkO/aulmIS3jCI3KgFjYiJxlwLgyivBJprUm7b5QV1WXR2U6kc+ec PZkbS158LWIdi2GIb3Q3nfsA2gMfqrBGMfMzfTpBOW7aeXfQPIZ9v74VDVd3e1hHJFSh l3CkfiN8Q02oOGA8mhxlKBIEcpqoDAd1/BlepCivnrf985TBfL2xg1lqDas5mY7IkwiO B7SIQyVb0m+aMxz6mup0rVjWStwQumMBlFKjMwazopG/lQMfUn5s9Q50GSVO+WErbH68 5DBQ== X-Gm-Message-State: AOAM532Sj7naW1rcxBTD3o7HSYAPXNF10NzJ0Lzt3kxma7M/GOllHZxk WpwwseZyq4d8m+OJd2vA4NE+5A== X-Google-Smtp-Source: ABdhPJzip9nKq4R/a7WcDDunO7xjCpX1JoNYTsoeiVxo51L3J5P8tZ/YNHvrWwtYmDFQ1qFHenG4VA== 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-arm-msm@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