From patchwork Tue Jun 22 05:01: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: 465153 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp308782jao; Mon, 21 Jun 2021 22:02:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1rWgsb/Tgz3aYkKdTKge+g58L84TfqE6BkEOZ88RVcHHBj8wzFsWNBTU4gsHMowlrSfIt X-Received: by 2002:aa7:dd43:: with SMTP id o3mr2368482edw.302.1624338147636; Mon, 21 Jun 2021 22:02:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624338147; cv=none; d=google.com; s=arc-20160816; b=cItssVfJ/5JufdKMLukS/H2ZSqt6+t2SUmNbSHeV1IyyU3pEZUViMIuAQvNMZ4045U SAt8zznNELBoFxV06i/S85PPEpraroLiu0S94EburF4w1VEauJhau4U1ej5Amy3z+DII 8hCEBS5YVwFLJ4KZXMW9BmaJxNjoCfTEPoi2yb34rBT1aucvzpsdzg2r++Ks4Bsy2/e/ 0ptbscG+Bb4TlZNmi/dKR5qsVdQdX43l4sYM8KSwzatl5pOmziAu0qBzAnmbG8Kwda5R 66lg4lMH5sYw557VZiTvr5W1wJOGwyHdyQQIrcolbk9tDc4HCDOOZEjLUk78sA+hPS9f Ohyg== 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=2VziDaVw7AQP16cHBrR18mCTRK6FsXt1uYtJ2gwusbU=; b=sqDwWOuMYyhuDcLizljCnRf4AA5DrlUU6hHOJIc/RWIP4XBfkZTMZrQDAHRQYDzHXq OfckoFlBDTbqKyZ+qjh4XcVB3Oqle0CgUNzYhogXfxjFZkSMEhLPlsY4nekwZYzK9yCR W0ORWyq1CErLchqRZRp3MEzdtQ6BGJz534/rsWJ4tF3cGNlvkqPBdl1c7BNogtcpGBgS DaVHnH8/lVcONOIFefflypmCOEvF7Lr+55Nmfo1x3n04xNmDb6TZnJfxt30vVM7Dn2yZ llslejlrc7DjzDGlI501UxviToK/yjpS73SNk4jO+E5oo5cPso7jkzKiLwmJHoIG3gju 7f5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pPGuVJF7; 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 7si12911484ejh.116.2021.06.21.22.02.27; Mon, 21 Jun 2021 22:02:27 -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=pPGuVJF7; 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 S229854AbhFVFEe (ORCPT + 7 others); Tue, 22 Jun 2021 01:04:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229612AbhFVFEe (ORCPT ); Tue, 22 Jun 2021 01:04:34 -0400 Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 546AFC061574 for ; Mon, 21 Jun 2021 22:02:18 -0700 (PDT) Received: by mail-oi1-x236.google.com with SMTP id m137so22473437oig.6 for ; Mon, 21 Jun 2021 22:02: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:mime-version :content-transfer-encoding; bh=2VziDaVw7AQP16cHBrR18mCTRK6FsXt1uYtJ2gwusbU=; b=pPGuVJF76xVB2bzNF7+KpG9ySpQ63uqucA2lIyaIxOejbovl2hflHS5j6x2m+1wks3 xsKrSo/G/P+967X1zeBjzyYxSgFvywqj2H6T0xmFxOoO0gMYi3YLpWAK+inV8On9kHce G55hlDLU9DK/joos5kXBICqjTCKFBpWNrhPHxjWyW4VAXeRbZQKLg3BwUr5yj8joDdw1 Vz4CV9BZOW6IreB8f+TGRPz+36Y2MYMbFFtTPlubiysqlbXl7EXkKYwATrx0zJBH4bJh XaN0slhvVz7t9f69vAEpxJZM2Rt7LT0dhSuKOajLW0JX+isc9wR+tbdi256Iu/b6c04q oyrQ== 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:mime-version :content-transfer-encoding; bh=2VziDaVw7AQP16cHBrR18mCTRK6FsXt1uYtJ2gwusbU=; b=pYhZcQl8TwVCBd/Hr/je/VL/EfUq8UX//9w64s5Df67VeN2gxLCgzw3nCEfdgK1gVp gFW96g7mylAitsjUmHmwUjBE5Gb/gM1+Li6pQHZ0OJ7f+zB0YKpOOmuKZ5Et38DiAPgb m5a4QCnNQE1AQANcqbIyNAc6K3Z41oOs/BKxR+htBa693NBU3FXrcTGaxSojaZo5hvC2 uf/IfZfo8JVYdV7Cjr1Pwit0Ne+De7eRaBHsq6/GOpiGvHWtDmtykMXW2YWZFmeGSe3l LPq7ctOZ/BtS4ieDtw6tCtnI2GCQlB/deRVP04iT5GAGdAhFUvdAsv9q4XZi+IxxhyFv +IRw== X-Gm-Message-State: AOAM531jKxhcrdfHYzfu9YbceCb6/bKZxhdQsT3AdndIde0Dk1Vp+OIX zymDWM1J17Y/btOM6DpiGSQbSw== X-Received: by 2002:aca:5a04:: with SMTP id o4mr1710761oib.33.1624338137650; Mon, 21 Jun 2021 22:02: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 r1sm4467744oth.19.2021.06.21.22.02.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 22:02:17 -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 v8 1/2] dt-bindings: leds: Add Qualcomm Light Pulse Generator binding Date: Mon, 21 Jun 2021 22:01:11 -0700 Message-Id: <20210622050113.231902-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 --- Changes since v7: - Added qcom,pmc8180c-lpg - Defined constraints for qcom,power-source - Changes qcom,dtest to matrix and added constraints - Changed example from LED_COLOR_ID_MULTI to LED_COLOR_ID_RGB .../bindings/leds/leds-qcom-lpg.yaml | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml -- 2.29.2 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..10aee61a7ffc --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml @@ -0,0 +1,164 @@ +# 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 + + "^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 + + lpg { + 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>; + 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"; + }; + }; + - | + #include + + lpg { + 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 = ; + }; + }; + }; + - | + lpg { + compatible = "qcom,pm8916-pwm"; + #pwm-cells = <2>; + }; +...