Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1769606pxy; Thu, 29 Apr 2021 14:16:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVipO0q/E2NkE0ae+3pTOL83c6P4nVTGJrDM5SX+G+mBeFr6XOr2ihhqJXc30vncLsbFvx X-Received: by 2002:a17:906:7842:: with SMTP id p2mr525994ejm.87.1619731000682; Thu, 29 Apr 2021 14:16:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619731000; cv=none; d=google.com; s=arc-20160816; b=LayCRSXXOcggWWZ8iwiWjGjPj7+PRx7WbusUCP6fFPTdrZtsN3eMRAhk06ACPVMSc9 1CI7qGZeG1SXA6RF54fsWq3lFc8bcx0aCn3c8xcaAKynC5voy4H/6gIW7B99E9BT3dGq bL3fCMrhDqJSznmbBLRejioojFR/eXklwa41uiosfLV37k2wkcxrkJQqPX/US8mTA3oQ hNwPy46EapE/AEya97KHh54mMU6KbCb++sDgnlhLfqZ4Pzf13IkMYDAgJOvfg9CMgDjA 1PeHlK/MzrGLS0m+5nG48vW5XV+hMTaWs+TCwC68/ba3A4Igsd9XcCOwfzArgApDN0Xs l2Fg== 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=Fe89kRGBfUr3nhPy9Di5M1WD0v7Pf3Rw9gqCGNTJqLs=; b=S0bnK3lTgNHZ+wUl5fZwHlEbHiU3JfU51ZGv7eWGYaYPAZm5SRallAo98FsAhDQkVA Sd7nTD+tNgRiukckwjI9dBQjn20MChZaEGvJw+GzaRpXo0MdtMVrvvyKicTCI6hGlgNx 82MlI43isi4sx4rCqqo2fPoVWA35/jtzl5xGoEY2NEwzI8vRf8SCFKLhwsJuflMogGh8 2N15fTkQkZHBKDiwWwLuHMCSyLDrAIAThuIzZ44JH8tYe52zZ2Jv8EfnRGQ9yuxMgvYB iSWQlbT3cKhV5ajaTuku8HRZEmNsGyRVPChI6jlfjN8YQkbi4gtQ9DbnYuUn/e81qW/C jJEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xl5WS50e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a27si1086978ejb.515.2021.04.29.14.16.16; Thu, 29 Apr 2021 14:16:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=Xl5WS50e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S237053AbhD2VQF (ORCPT + 99 others); Thu, 29 Apr 2021 17:16:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236900AbhD2VQD (ORCPT ); Thu, 29 Apr 2021 17:16:03 -0400 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FCE9C061349 for ; Thu, 29 Apr 2021 14:15:16 -0700 (PDT) Received: by mail-oi1-x231.google.com with SMTP id i81so67923912oif.6 for ; Thu, 29 Apr 2021 14:15:16 -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=Fe89kRGBfUr3nhPy9Di5M1WD0v7Pf3Rw9gqCGNTJqLs=; b=Xl5WS50eO7JhaA30CSUPZ/gtio09TI1cD0J1XdZrPp11SlXRNxkzGK3p7FAyBA6oKT r5eT9LyOZOKut5BvjAOP53cpdbe4sFrgJVMzdIu72op02LdjpNT0SH8XezzOO02+ErEL HNuLtbUmqgJN/l854LJ8zl6NtrqriPlA8Ito4sXl0hY9aSrNn6u0QYRhXMeKsLF2R6zH oeBo+aHunYuBTQoaf3OzrNpoLyVPXrRhxWXQV6Zs9ZODDvuGWJnU4Pax787VX1Xjyxk4 YBgCNVy4OVDi0XGYOisDB8xl5GX1m33E6HSaIm56OOKSPPVgcezQQ2FS78TshrOmY27y NqSg== 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=Fe89kRGBfUr3nhPy9Di5M1WD0v7Pf3Rw9gqCGNTJqLs=; b=mRyJrEl4raSj53F/nCL69yS4ZsUIIpqisNF+zrX/fPCv45U98L54ZvdMfvEOh9YFBZ N05Xpg4W4MPKsRJRTCDzJGi8uitDWbFlV2ZHf3fZfhrPPGNpGvmAwNgevVsju761LjAq 7QBgB4gpMVQoUxvVRJVaxul7Sk05SlWykXsC8frsTIJOg8dSql27rsnEm/OCnJzyaBcw vTr8Ul9i+5bpaSY2znZliTDXsGlh5ylONNmMYfVnO2XBlF41RNgNEc7tqirv1KzBTAHT XwFNnhlqCfRwuo8q6pFUfHqAFwgMg0yWqVPuCuvVAASGZavTSYvO51cA4A7TNND3xJqs +ZGA== X-Gm-Message-State: AOAM533sCVXAH2OPe4qwMP3dE7MUmlXVDALyovJdbP/2kGPs9oO+DYD/ NHrdkjydcyUUf4yN9qy48hCOAA== X-Received: by 2002:aca:c206:: with SMTP id s6mr1395445oif.177.1619730915354; Thu, 29 Apr 2021 14:15:15 -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 y67sm242707otb.1.2021.04.29.14.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 14:15:14 -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 v7 1/6] dt-bindings: leds: Add Qualcomm Light Pulse Generator binding Date: Thu, 29 Apr 2021 14:15:12 -0700 Message-Id: <20210429211517.312792-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210429211517.312792-1-bjorn.andersson@linaro.org> References: <20210429211517.312792-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- Changes since v6: - Backed qcom,dtest out of the child nodes again, as it's useful to be able to route pwm signals through dtest lines as well (and pwm channels aren't described as children). - Added pm8150[bl] compatibles - Dropped quotes around qcom,dtest - Fixed indentation errors in subnode definition .../bindings/leds/leds-qcom-lpg.yaml | 158 ++++++++++++++++++ 1 file changed, 158 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..2998598e8785 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml @@ -0,0 +1,158 @@ +# 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,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 + + qcom,dtest: + $ref: /schemas/types.yaml#/definitions/uint32-array + 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. + + 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 = ; + 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>; + }; +... -- 2.29.2