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: 1538969 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=U9qgvdrc; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HRq0k5P2sz9sS8 for ; Sun, 10 Oct 2021 15:37:42 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229697AbhJJEjh (ORCPT ); Sun, 10 Oct 2021 00:39:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230093AbhJJEjg (ORCPT ); Sun, 10 Oct 2021 00:39:36 -0400 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 335C6C061766 for ; Sat, 9 Oct 2021 21:37:38 -0700 (PDT) Received: by mail-oi1-x234.google.com with SMTP id y207so16396970oia.11 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=U6fIpq5HZn/v8V4RHHRT8n7ZGSOU5UEt490bdDb6qauV6HjFz4hVeXhkRzfyjPS31F 64B9tRhjrC5fDpW02U71CChGmuEENOkWfrhOmzrHINrfUnod78ZdwawJOfvuWulgC8Mw BMe1JVXfAzJWQuhTxRZJeCzv39g8k8KU+IrdmrySNygo+XA98+UayqG1fSz1H7e973ed MUNaLwC8SHBhPSLHMrIlnv7owXk7hAXP9DbvwPAevtKeMDsYjTSjBcBvqYJhqvdLkTzO N1ehXltMb8gZhcUQfpatZWWDiywdBfc+CMTaw/1ignHJwDHn5O/4eU8XPobD6fQuGceX mzPQ== X-Gm-Message-State: AOAM530da2kNrgD6F5K8XbB8Bt4LNrz7XEvx3kAIamd9YS7gh5HtGlmi xs32tz+g1OAuEnJgtUNwnns5Vw== 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_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: 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 Reviewed-by: Rob Herring 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 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>; + }; +...