From patchwork Sun Oct 1 13:52:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Apitzsch?= X-Patchwork-Id: 147100 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp882439vqb; Sun, 1 Oct 2023 06:53:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHBUX3OpPxVgRDTa0nQJYkLgH3qLgH9FG1TD8EHuumgMLL7TgpL00ETnj+Aljxh3O2iSGEB X-Received: by 2002:a05:6830:111:b0:6bd:b0c9:a89 with SMTP id i17-20020a056830011100b006bdb0c90a89mr9386518otp.2.1696168400952; Sun, 01 Oct 2023 06:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696168400; cv=none; d=google.com; s=arc-20160816; b=0OOf246ie0U/hrHzU8HJJg0qo4FSW46rGsdS2ZklJz8PuICzL6l95WQO8wn5EjCBI3 yZVwoxKgcMmORELpawiSyjS7HdQd7gLhy302uJuTW1X9dXLAdiM7gsUcWAeuUIlrvbRR bwqGH1M5jJKL4aWjwmhECtBTGQHABnPqwN7zE3oaNdan9MTtrt6gbbYpnmdkziaYZd/U vZPxmu/9Ctw6q5fki8SsJoWB58EoeXE4C+Jd4lf50rdKRFQ/f2Be2ggjoH3dTTUhch5o utUfKEFRNMDQibM5is1bkmxzd8BxYJngau0oWfHrwD8g/SvCJ2bD5ACxC2cznWwdFRk6 dNGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=lOzG0TJfv3XU0IVuHBLylfBtu51zlxKmC7+DFxjCbwY=; fh=PrKrTEb/BXpu20x977EdrkTOIwBMhl/XYMN/8KXgZRc=; b=Hmq+e04LW/yKRU4ICcYsJa//Tv8G56m6HkyYcwd9ybQr0Qf3MsaomcGZ4H6a+IUxcV LptFv7Pz7mWBSd6O7M36BskcaREW+t7lUgWlFdonlWd4WYeCUfphE6BEQIYYC3hHuLfj SmK7wh8gw/JVrAQ1E/xeC0fRKLLvB6QNzmZNTo40MdilQJIEvKWQR1EONHnWRdzulA6s 3X+GoUYHcFj+6/FrBjbtNoRAz14nmUPj4tczB3vGvRcgR8OKmiq4vOlcqCt7aAmqF3LK Uwe/ila6RUwWKIr4eqrbtvs1FfMK0AiskRTKTlRlA9PPI6GZyAdMs0SzFBKc0slyNsH2 0mmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id k72-20020a636f4b000000b005831a5a3499si18041188pgc.306.2023.10.01.06.53.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 06:53:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 11DB98022B26; Sun, 1 Oct 2023 06:53:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235048AbjJANws (ORCPT + 18 others); Sun, 1 Oct 2023 09:52:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234379AbjJANws (ORCPT ); Sun, 1 Oct 2023 09:52:48 -0400 Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.18.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D71EF91; Sun, 1 Oct 2023 06:52:44 -0700 (PDT) Received: from [92.206.139.21] (helo=note-book.lan) by smtprelay05.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qmwsE-0004h3-1S; Sun, 01 Oct 2023 15:52:42 +0200 From: =?utf-8?q?Andr=C3=A9_Apitzsch?= Date: Sun, 01 Oct 2023 15:52:12 +0200 Subject: [PATCH v5 1/2] dt-bindings: leds: Add Kinetic KTD2026/2027 LED MIME-Version: 1.0 Message-Id: <20231001-ktd202x-v5-1-f544a1d0510d@apitzsch.eu> References: <20231001-ktd202x-v5-0-f544a1d0510d@apitzsch.eu> In-Reply-To: <20231001-ktd202x-v5-0-f544a1d0510d@apitzsch.eu> To: Pavel Machek , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , =?utf-8?q?Andr=C3=A9_Apitzsch?= , Krzysztof Kozlowski X-Mailer: b4 0.12.3 X-Df-Sender: YW5kcmVAYXBpdHpzY2guZXU= X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sun, 01 Oct 2023 06:53:17 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778561477242942059 X-GMAIL-MSGID: 1778561477242942059 Document Kinetic KTD2026/2027 LED driver devicetree bindings. Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Apitzsch --- .../devicetree/bindings/leds/kinetic,ktd202x.yaml | 171 +++++++++++++++++++++ 1 file changed, 171 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/kinetic,ktd202x.yaml b/Documentation/devicetree/bindings/leds/kinetic,ktd202x.yaml new file mode 100644 index 000000000000..832c030a5acf --- /dev/null +++ b/Documentation/devicetree/bindings/leds/kinetic,ktd202x.yaml @@ -0,0 +1,171 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/kinetic,ktd202x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Kinetic KTD2026/7 RGB/White LED Driver + +maintainers: + - André Apitzsch + +description: | + The KTD2026/7 is a RGB/White LED driver with I2C interface. + + The data sheet can be found at: + https://www.kinet-ic.com/uploads/KTD2026-7-04h.pdf + +properties: + compatible: + enum: + - kinetic,ktd2026 + - kinetic,ktd2027 + + reg: + maxItems: 1 + + vin-supply: + description: Regulator providing power to the "VIN" pin. + + vio-supply: + description: Regulator providing power for pull-up of the I/O lines. + Note that this regulator does not directly connect to KTD2026, but is + needed for the correct operation of the status ("ST") and I2C lines. + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + multi-led: + type: object + $ref: leds-class-multicolor.yaml# + unevaluatedProperties: false + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + patternProperties: + "^led@[0-3]$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + + properties: + reg: + description: Index of the LED. + minimum: 0 + maximum: 3 + + required: + - reg + - color + + required: + - "#address-cells" + - "#size-cells" + +patternProperties: + "^led@[0-3]$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + + properties: + reg: + description: Index of the LED. + minimum: 0 + maximum: 3 + + required: + - reg + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@30 { + compatible = "kinetic,ktd2026"; + reg = <0x30>; + #address-cells = <1>; + #size-cells = <0>; + + vin-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + + led@0 { + reg = <0>; + function = LED_FUNCTION_STATUS; + color = ; + }; + + led@1 { + reg = <1>; + function = LED_FUNCTION_STATUS; + color = ; + }; + + led@2 { + reg = <2>; + function = LED_FUNCTION_STATUS; + color = ; + }; + }; + }; + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@30 { + compatible = "kinetic,ktd2026"; + reg = <0x30>; + #address-cells = <1>; + #size-cells = <0>; + + vin-supply = <&pm8916_l17>; + vio-supply = <&pm8916_l6>; + + multi-led { + color = ; + function = LED_FUNCTION_STATUS; + + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + }; + + led@1 { + reg = <1>; + color = ; + }; + + led@2 { + reg = <2>; + color = ; + }; + }; + }; + };