From patchwork Wed Jun 23 03:50:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 465882 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp1352479jao; Tue, 22 Jun 2021 20:51:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVEQzoe3mKeZ20gB39YXMujO2oY5HZBT8vj42IG2yyDhZ4MZXZ1eSTXEsOJX4qKgBkM4mq X-Received: by 2002:a92:d484:: with SMTP id p4mr1309939ilg.139.1624420307867; Tue, 22 Jun 2021 20:51:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624420307; cv=none; d=google.com; s=arc-20160816; b=0tpCy86nPQ2j495SzHRGeeCNaxYFwI22lOONdJ9AXQ18FKT/jbpByNOiNpQsk0pAFo ocNQOgQgKr+AUcsChxJF7ueCenPymg1WJwfMhSFkuh8axCkm995BFVOrp9au3qAMxOwZ s8+oH2RG7/ZFMLtMhNQmBTATLs6Q0NfROLdpiCZZHflrBLQB8MgXWiywqEdUeHBOZdqa Hve3+rR7Bwc0LC7Xzv0t3pw0DLYJ2+ff8gvigt3P0IHHP1zvLWskXklVGB6OoO4O+FNU s6CbITK8tkvM9J5kYWlTQDMUB/usE1x28zfx7NEOEl6+fClADKBqNTsbC0c2swz7K9Xe 10BA== 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=DoiBj5BLfecwr4g0Pwg7h6z7bsywem+oXg3CJXF5nhU=; b=aih5ATt3WtCIR6UyGoBQT1QJITJ60TZFy0+1v9h2JYbPiGBeBhZicbTQ6ExuQuLV3K t88BP4tVByf9SYH+hMrOe6W4H55Ri9hrTG7YMmL32DRX/WOECD/lQlBqPnck0E/CNo8t +3W77UVY2mijpm09ChgsIAw1+6JHt49DTjfN6E9MAhYgfsjLgGRn6jIS52BBZ30uqunl Icqr8R47n26zEoP2cwk9x831ZHq2WUZG18miLeTA1R1iU8bgnmCL0ui32TCeAACVaEOM XrgdXEIOMRbSf+QHuyRZlfyUbS3wf5mclVxTBm1WBpKbMp+WMgzZEX5tv1cSTpkUqbvQ lSQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tUIMuIFC; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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 v22si3789748iob.51.2021.06.22.20.51.47; Tue, 22 Jun 2021 20:51:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-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=tUIMuIFC; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S229774AbhFWDyD (ORCPT + 17 others); Tue, 22 Jun 2021 23:54:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbhFWDyC (ORCPT ); Tue, 22 Jun 2021 23:54:02 -0400 Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3538BC061760 for ; Tue, 22 Jun 2021 20:51:46 -0700 (PDT) Received: by mail-ot1-x32b.google.com with SMTP id 6-20020a9d07860000b02903e83bf8f8fcso580279oto.12 for ; Tue, 22 Jun 2021 20:51:46 -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=DoiBj5BLfecwr4g0Pwg7h6z7bsywem+oXg3CJXF5nhU=; b=tUIMuIFCiV9gVf0yoXJoUl31hlsuLwoYj1vnTE97Ek1ls22yDASkuCTcd3ejZ19CJF kbwgjEGLSs29yWHy+BEjmI/qhnTgLEj1FC1mo6v4vfJtoLJdTYGePG806DBYXuMRQI/F 9E7WdNhdxSrVaYEuHJPaV1NFGL3cHb49BbynaDb4+fOxi73lJM7uwgjn4oNauUlGYs3F 6Vq1cmtH1HCDHKy9sY9xK5PbnJ3w2JWpyqdrmdBMlM6AudtTk7TwMknZ2wAx5ocYuF/p gQ1iV0KKBO2gc8broKEweO2Wn5p0zac1FNv/uQUDnB/mLItnyJqvJpyl87mGvOMzXTO9 FO+Q== 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=DoiBj5BLfecwr4g0Pwg7h6z7bsywem+oXg3CJXF5nhU=; b=fQtmYN+Hmjr4PRSNYCR5vwFgrgEht8oIO4VvBkfi2lpVepQF3xHTTMuD+aeQO1fgis j5V2PohwgO4GDkXtv9gHsZ/VANyokybYjXpS3SdmzIeuir4Ed5myMa8lCLGx6Rrmxel+ +Sla0X0cwfQNvqJkZySU1l+yr34o3Dl1G8Eopv3q3gjYxcllPr91Jvq/Ulh75xTFfcsU JgxAexPkc+YIMDrhJveXLCBSeQ5UH8t7R9tCyQsHM6ufcl/53bkz7nkO0+XmE8vbyGVW dZJRZ6NWrZ+B1DioRJATrzSFGz/3I8eSXrtRBU59MH7xX64cf4ahrb9P9tZ86wUdyDBx cnxQ== X-Gm-Message-State: AOAM5335iZLxdmxIpeoszINDds2QQzrhGSR62KokWBCKculAMdeY+Gbf aDoCXrMkXN1sneWv1zJpwJ485A== X-Received: by 2002:a05:6830:1208:: with SMTP id r8mr6048717otp.155.1624420305361; Tue, 22 Jun 2021 20:51:45 -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 v82sm4752509oia.27.2021.06.22.20.51.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Jun 2021 20:51:44 -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 v9 1/2] dt-bindings: leds: Add Qualcomm Light Pulse Generator binding Date: Tue, 22 Jun 2021 20:50:38 -0700 Message-Id: <20210623035039.772660-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 v8: - None 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 Reviewed-by: Rob Herring 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>; + }; +...