From patchwork Sat Oct 17 05:20:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 317851 Delivered-To: patch@linaro.org Received: by 2002:a92:d603:0:0:0:0:0 with SMTP id w3csp2046045ilm; Fri, 16 Oct 2020 22:29:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAStyKvkg7SeZwfCfeCbclkRhBnD9lqlOIBOZEachbXAC4aLm0YJIiAWqylKeu4YRL4PgT X-Received: by 2002:a50:9548:: with SMTP id v8mr7644784eda.115.1602912596185; Fri, 16 Oct 2020 22:29:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602912596; cv=none; d=google.com; s=arc-20160816; b=phNLiXt/ixCiDryXs/hi8Mqs/kVnrPNxV6BqH1Kikh42T/q/Fx5N52omMxfR8Xq0LC 1Ka7NsE7KsuhVb6XZ9NmkKvp0KggvL/bvQsrIjOVLiae8ldJS6W+4w68pFojZmBNpBkD CJ9TabtTePeF02TeJR5KQVWsEHmz3d33Sc0pR4nFaz88/DcqGZCESiusuSwkRCSj69CH O8ai90w8j4NUuo1MRcF+0/PZhM4lThVZaEeK1EMuelaS18wo5xiPmt/hRuq1jOWbM0yk TSY+ZSn2Hh3WaHRJelqMTuNHtFX207SgVkobVJsIg08XGOdoEWLeRvhU0FVYDvtRZQPi Azaw== 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=tXeXPnv4CQs37BGu85cehveMD4OivOyMLXan2m+rAXSYMV7vM3gwweB8QFoKlbTvv3 nd9yf5pdXWSz96a7+WKOj1+ILKBSFGPw/gTGVo76ZwkgBzVoO+UUh2vWbbq2gS1C6I/P 7EUjR5+a16EBYW/652CqzDmowi7spO60yXspxa0sqlZs4bTJoRwnrwRJv7h99jZZK8DU gar5iCbE+5Kuirq35NFl3imUgJnJ5f3DYunqlz9d9SSEQpCifgvcxGHgkPO3eQpxBaqQ ZjwALVhWMlpJ3J/ao7BlLQIxhiCRyRfwOPiveFvjWLwOtBBNwZqpJkmQFDnbquhmZ8pm 0OSw== 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 devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 dc4si3176866ejb.526.2020.10.16.22.29.55; Fri, 16 Oct 2020 22:29:56 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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 devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S2411682AbgJQF3x (ORCPT + 6 others); Sat, 17 Oct 2020 01:29:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2411630AbgJQF3q (ORCPT ); Sat, 17 Oct 2020 01:29:46 -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 ADC1BC05BD3B for ; Fri, 16 Oct 2020 22:20:18 -0700 (PDT) Received: by mail-oo1-xc43.google.com with SMTP id f26so1149567oou.11 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=MthCSvlUNpPg0hOrRrIqUhm8l4QcUw+5t7PuQPYXldvXJ9nZG0V/UpPEMU33+So/UT I9AuqLEwWDJ2yiEo8pCRtfFjAC0DpvDa7fcYT/gmJqge8e/hsBkJ12rgU/S3DfaXKlVM 7Mzewhi+lNjVE54OzqxfBNImmTemPPabGdmX+Sj2iNTpwqtkAfUjQq7JiZq3SxL0IFvT SiDR1MHV6uyHshmqow4LksrxElA7W83E6DzinG8bnKZBXx6fxV9kx0Acm2PKDgdzsLPt O9Z+iEuZF2mVDnbW4Cw1eQS5/LH77FCK4/8dJCxl3e0E/bLSa5WM3uXeREgf8ou4n2Kh qmpg== X-Gm-Message-State: AOAM533jaAeOldWtyPXV648xZW7iFQsW+9kL+4wGQ7CqpZVKLNVQBFTo AWqXIkjeCk1HDs4sc0kOMEsaRUKUqL6RXQ== 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_Kleine-K?= =?utf-8?b?w7ZuaWc=?= , 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 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 --- 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 -- 2.28.0 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>; + }; +...