From patchwork Mon Oct 2 16:48:27 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: 147425 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1621449vqb; Mon, 2 Oct 2023 11:44:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHhmphcrg1zf+/QzOewRFE5k7jCLnMIKw5sr8e9dMD9A9nTSbwILXhseP1zthHeUGSfgeoC X-Received: by 2002:a05:6a20:2d09:b0:163:a8c9:76c4 with SMTP id g9-20020a056a202d0900b00163a8c976c4mr7943240pzl.4.1696272259551; Mon, 02 Oct 2023 11:44:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696272259; cv=none; d=google.com; s=arc-20160816; b=g4bSqRS+miBfavmLe9Df1lQKiWjlpu/9h9Brv6Fd1RU7Mr7NjOfNQ0xgF8uvFZ0g81 nB4NgxAE9/N2qXBTpxzAdiOj1rGnuoaRaKB6ka//zysgUhqldTmlgYXd1nmqcVMEf3pS blNiDPvOc7CXHkRLwmq2NiYKTKIPT74EYpj2rOQf1o1CLh0P7XGRO7sjovka306CRZJ1 b4+o06J1RwF6cCNw0v5LmnOA+0DxxKb5BAXQpQPwOYWBMkkro0KL5i6Mnw26EnIRE228 j0l+iuiFlFv+qDNL3+4tywpJS6BylJuzx9huag3C9GEJyvJjXCuPQovB2cei20EPkgBP I9wQ== 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=H5vFtbmA00KNEL11b5e2x7foKviTthnHjCQg1u1gfmM=; b=zcvtEs8FlPIA2q+mBPFNLgZ/XQuhyorA4xJz+fU4bU87SCO6aZwgHU2KCK4w/dhnGh 5xpZrsg3dMYfxVKYjhWM4Da+5YDW8QMUNbh6D/EEWVfBmrWBZJqwSKLv68G85TJ3Qk3i h8Axr6bBaC+3LxRhEbw6BvdCkUJJeZFsOf9Gw3kNU/EPfUWfUHH4jQv3Q/HB5BXp+gYI PQ2971O86aL44StCxfZW6ygw6MtqL9hNVHM4cYbAEyqRhGPjzhLInkggd6r8xEh+36G9 X5gOC+98ntrsLFrkirdUYOokhVIscsjRQRO/VP3W3Urju0b6l6LtXaZFbkgwUBDfZVvt yJJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id ck3-20020a056a00328300b0068fc9c6eafdsi21324159pfb.137.2023.10.02.11.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 11:44:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 450008043D7A; Mon, 2 Oct 2023 09:49:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238480AbjJBQtq (ORCPT + 18 others); Mon, 2 Oct 2023 12:49:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238344AbjJBQtm (ORCPT ); Mon, 2 Oct 2023 12:49:42 -0400 Received: from smtprelay07.ispgateway.de (smtprelay07.ispgateway.de [134.119.228.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09849A7; Mon, 2 Oct 2023 09:49:39 -0700 (PDT) Received: from [92.206.139.21] (helo=note-book.lan) by smtprelay07.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qnM6x-0005X7-H8; Mon, 02 Oct 2023 18:49:35 +0200 From: =?utf-8?q?Andr=C3=A9_Apitzsch?= Date: Mon, 02 Oct 2023 18:48:27 +0200 Subject: [PATCH v6 1/2] dt-bindings: leds: Add Kinetic KTD2026/2027 LED MIME-Version: 1.0 Message-Id: <20231002-ktd202x-v6-1-26be8eefeb88@apitzsch.eu> References: <20231002-ktd202x-v6-0-26be8eefeb88@apitzsch.eu> In-Reply-To: <20231002-ktd202x-v6-0-26be8eefeb88@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?= , Christophe JAILLET , =?utf-8?q?Andr=C3=A9_Ap?= =?utf-8?q?itzsch?= , Krzysztof Kozlowski X-Mailer: b4 0.12.3 X-Df-Sender: YW5kcmVAYXBpdHpzY2guZXU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (howler.vger.email [0.0.0.0]); Mon, 02 Oct 2023 09:49:51 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778670380672751846 X-GMAIL-MSGID: 1778670380672751846 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 = ; + }; + }; + }; + };