From patchwork Thu Apr 29 21:15:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 429269 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp1953275jao; Thu, 29 Apr 2021 14:15:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw95LIJMvKNlKO48xqmAqg3WRLMziEqxEmsERGu7nFVQJ6ZX6Trz+m4kEjT5jQShXGNrcea X-Received: by 2002:a17:90a:5d17:: with SMTP id s23mr1851991pji.44.1619730918674; Thu, 29 Apr 2021 14:15:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619730918; cv=none; d=google.com; s=arc-20160816; b=Ze78ZgkejsEYQv+A85LKcXUXBMYhbrMDtV+S/ffFtilvNqDfTyNz56g3LDTUP1RhEg /TcvcekwB3/5wZWSs6vGvw5XJGcp8ra68kb05urYmLu98RPK8Rlpgt1KOWuL7o1NIYJP moBzR0I2SJbG1aQhU+lY2jcmIMEVFLZSTSiU+Zkh+jKSXjZWg7zUXEmmlP8MRspMYw2D XBOeUPpfHYelQbmVP/kqamAiicyoKmVQ23T2rqF+5qGOAdHx/D9MumBu6qLzivkwlTYX MZ8bzP6JRFKjJBAuUvO+R2SqbN7culsq0SNlKVr5QpsnCIkizndtqFgnlWJQQDbNlNlw 49Ww== 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=h1ognJz8mgs1l7Ly+usr2LUzudyPoOoNinKq1e0qPVj/gnSTUKoF/csbbgSHTJDNop GXAyLTUlHC/fAL+OE/agMvr7V3eAbrzyEsSXlRErkTTtad9/UhuFDHrR43QW9IUwP0OO HYN7DBwqzBk3OQZwm4PE+H8nJgm2IzyS1IrETM8axdHQeFVldCtu8cBCrMUJZWjlIsCV zN8WzT9HvbO58ArpfOeYteBxR2NlZ5N3NAJ2gAASwWvB3hHcCURMfx0kUVuWWBQUntXk MWnlu1QhCVONzS5nA5XPwM1VZx3Y9cZcArzyRXE9O3DnDc4WKHO24lLs37VaFULf5W7X EcnA== 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-leds-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-leds-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 v11si5004185pfu.198.2021.04.29.14.15.18 for ; Thu, 29 Apr 2021 14:15:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-leds-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-leds-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-leds-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 S236983AbhD2VQE (ORCPT ); Thu, 29 Apr 2021 17:16:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236890AbhD2VQD (ORCPT ); Thu, 29 Apr 2021 17:16:03 -0400 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FAF5C061347 for ; Thu, 29 Apr 2021 14:15:15 -0700 (PDT) Received: by mail-oi1-x22d.google.com with SMTP id t24so10515475oic.10 for ; Thu, 29 Apr 2021 14:15:15 -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=YJ/rS71zKB1qrI4xcygK+XHhyiFJEPkk2VTOLge/bKMe5mhg1WlBXajDNwC4dELbCX deQDcjwGSmjC68q8ehH1XVHSw71oT2Cx9BTszfEZ7yE+3dsczLICxa8qe/hzYEl6HfYX AIHuif426fRIuTgzA4pFfrwXomL2Eraffq+syCZ9/l4t6VAxixvK4WVbzBrFsSI3jKZ9 EEUxj+n5jfv+VV2vNcZKt+JkGNbMmLPNL+T3TI5dfjEmN+jQOjKo2HkMYqZoo0zVa8vi xC7dK70unep/ZsW2Qt2LRpd1g2+4bSBphBG0zpZaiBy8AVxJ2W/oyl2MYFcizD/LES8Z fvmg== X-Gm-Message-State: AOAM533KtNHtoB2MLfV/SU4ru3qkD4QIRrHGiKC5Y0vz80kk3lVGh+d2 KaHIsFstVqny+wff7Xw14F4uIg== 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_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 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 Precedence: bulk List-ID: X-Mailing-List: linux-leds@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 -- 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..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>; + }; +...