Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1544377pxm; Thu, 3 Mar 2022 21:24:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJy0P4FKAdpsu0AThGDdbEyEzsgo4Pcxen/U8SkFnRztSW6wDsLt6oJGMsBo9b18TpaAb91N X-Received: by 2002:a05:6402:2549:b0:415:c31c:f9c2 with SMTP id l9-20020a056402254900b00415c31cf9c2mr10055134edb.335.1646371462639; Thu, 03 Mar 2022 21:24:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646371462; cv=none; d=google.com; s=arc-20160816; b=MnIRcLhFRCRmS2GJhu0f55WElGHOMAwXi6pMzUxJM9v3ZqpYQpjfh3o+l8x4oO29Ox ohoBpPqUHCTpm3zHKLUYm00/fLxxg/Q2oB5DAnSWeaAlgedgsh4qfIGZ5XvydudFOx+k nbaBQ1h46oZ4PTuexPxJk8DPM3fvhYzuipiS8oEQlmBYPEuKiuBgzkUwTZ1D4tKuvwI9 8LwulDBu073K7SJYQWsQA4HgLIkSUODROoO8+Xlm4+Ktdb22/oTSq5PoOMD1qw7Y20/X VzcqQvc7L0IAhoRrV5Sop73zt48IfwgSvFNQs+2mvdnF6BgqopecmXmmyKWJyA6XQf7Q IJmg== 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=TtDQVLQ7nb5Bmd2MMrd+NyabJBjG4ePHT9sF5OIJ/t8=; b=XASclzFi0GEv9f3Xd9PqxCb7GeSSsGK4zyHEav8fGjxrkhD0ci4hoKtkrkaByDeWR/ VGCfUmW9MXg1GWLIoiZYRmsqqW3Nz0IH0lcSWbaQETgekGW5gNDEg9fWim69HFPEfv3x nYfmtzaNJcM6OsRxGMZ2EkHhF0J9DJCiumcmSv/YcgVZt4tQjWyjrT/W5tXmZ+ENAV+J RgFuQG8dg+qmkS7J3cggbdFE5tVod1VbgFhGjaCss2shnVL7Y1k5e/poiirpqLfefV68 Z5XGjLPjgXqr6so+5sEJsQSe3Nzr7p+e1T+OOe6essMf1+X0UM+bE+akXCxW9zKfEUq6 zrsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qo/i5i2K"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ej13-20020a056402368d00b00412a2c4fffcsi2817248edb.157.2022.03.03.21.24.00; Thu, 03 Mar 2022 21:24:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qo/i5i2K"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236596AbiCCVmA (ORCPT + 99 others); Thu, 3 Mar 2022 16:42:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236593AbiCCVl7 (ORCPT ); Thu, 3 Mar 2022 16:41:59 -0500 Received: from mail-oo1-xc2a.google.com (mail-oo1-xc2a.google.com [IPv6:2607:f8b0:4864:20::c2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1532A1712B1 for ; Thu, 3 Mar 2022 13:41:12 -0800 (PST) Received: by mail-oo1-xc2a.google.com with SMTP id s203-20020a4a3bd4000000b003191c2dcbe8so7291819oos.9 for ; Thu, 03 Mar 2022 13:41:11 -0800 (PST) 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=TtDQVLQ7nb5Bmd2MMrd+NyabJBjG4ePHT9sF5OIJ/t8=; b=qo/i5i2K3xta5aEm817tE2oCay+rfJV+rjQTJyABc2sTIj69m4v7d3LLEVT5tj6/m5 DBqLOsFDX1c419do3v63Y5HHwNQc1gxK7UcozkG8PGGTnxSMpsCZTPdDdjyZVCk2f7gp +SBZGIj637ve1djD/F8APngCkWqb9MuPfqVPKiDdSBiFDitsmtpTdcZsi7624LWakVSD XRq7yz3S50mRk9LqZviPIMbHT+MnIINXIUm9kYr77pqQQ+LtkV48E3xZIN+CZvsfORkx /ChBniO1TEbNdqdhgBYgAma7N1F3fGaiK/Xcqk/ZbPHelEZSaoyB2TLGTB55qeAgX8uu 4hbA== 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=TtDQVLQ7nb5Bmd2MMrd+NyabJBjG4ePHT9sF5OIJ/t8=; b=cEB8be6hFO84n8Ak2V9LYc0zfFcQZUjxxPZGvNfNlKpLTjT7OcK8kvt0qITot27ZDS a0Xf/tj5Nxm9u0QWUh0yb1xNIfUK8Oq1lep3vSd1U9ujYrLAq/rY4xYpbYd5T+6l1cCa q2AnTYBFDfYnr06GxGHGko16MHcdpTYtWbEmZ+W5S52L/F9xbibZ34tkqp4//OwCJG2p qx2qckoWAEKgsoyr7L5kVzwH3TkwgaQd54FsJ2Y3kY7kDEd0tRH/iARai+pRG9JCqaES 6D32en/vx543cru5aBySjWC80R7dcMsk7olY25HEpet56U9CR5bNcbK40Xvee6eAq7gL w6YA== X-Gm-Message-State: AOAM531wgdjehXnwB/PcoWSB2nc7nh6va0pko95YAUmwv4U/XUTXNDfJ UzBVFTtzzCcjg5TR53kJSrMPGA== X-Received: by 2002:a4a:a801:0:b0:31d:3bf7:992b with SMTP id o1-20020a4aa801000000b0031d3bf7992bmr17098255oom.84.1646343670940; Thu, 03 Mar 2022 13:41:10 -0800 (PST) Received: from ripper.. ([2600:1700:a0:3dc8:205:1bff:fec0:b9b3]) by smtp.gmail.com with ESMTPSA id 42-20020a9d0d2d000000b005a3c7373d57sm1452955oti.52.2022.03.03.13.41.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 13:41:10 -0800 (PST) From: Bjorn Andersson To: Pavel Machek , Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Lee Jones Cc: Rob Herring , Jonathan Corbet , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-pwm@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stephen Boyd , Rob Herring Subject: [PATCH v14 1/2] dt-bindings: leds: Add Qualcomm Light Pulse Generator binding Date: Thu, 3 Mar 2022 13:42:59 -0800 Message-Id: <20220303214300.59468-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring --- Changes since v13: - None Changes since v12: - None .../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.33.1