Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp360946rdb; Sat, 2 Sep 2023 12:16:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHiOcnnmGJxatRgjYE4Bk0Jp3O7zYscWrwk2bXkbkpFlOcS1dxwe2D+YDaazPIbr6PmY1E8 X-Received: by 2002:a17:902:ea10:b0:1be:f2a1:22e1 with SMTP id s16-20020a170902ea1000b001bef2a122e1mr6827227plg.53.1693682194505; Sat, 02 Sep 2023 12:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693682194; cv=none; d=google.com; s=arc-20160816; b=EzzvG548cKFSSJRkloiW9c77XDQ8TFBZFpn+w/2pjvfEt1IvC0oksD1djUXktjlP46 B0UCiSfU4QjbyaS98SWmf0KUgovs6cz2HJVHMuWazde5sJMS/Msi2kRaYrvABaLhkWMw A+eI7+R0OVkbgwAuioDd1zX+fKSCwFvFJglGhlorv+NhhLYuEjdFVNgwqM/rvcdd3Dg0 BGKeOFFsFc4KXvAnEcGDrXAKuTZ9q8nhJDfWGpO1Rq5jRgN8r+uGyXz2vxCbSwXycmw8 9UdlpkL/lhRV8VtlSlFOTcKzT1RXu0F9AG1y0dO0V5yqKxJxxDz23yPKaSnDgS6iNdW1 uwUA== 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=3PjbU7eCRAYODn/AcFrRC5AfOm9ENlsmPA/4PQyWEO0=; fh=ftAcFsKr4gHHl+Dt0aXZcsklHq8PzBqz9mnQ4uPWF5o=; b=GfRtZWn4GP890lG8Z6k9WB+YDV4etWYJeyAL8UfM8FR985q9Gw2UtFmtaW64avZwTm lmFB1+oFiCWzA/fdjVZw5DkkzQP7xcgsKn1zdYyYzvFiRjuy7R17kHJXfNVvEaQhMKSW S6C2VupTZXjDd4vuc2ezXr2V4Cw5UhcppfdNSrlcg+gTOgtW1bDqdDfYLMmrnM+cgycW NyBw6bR8cSVvxYP979YEH101pKXqmVsLs8X0XAtsj7ZlW06n4eYk7UBK3XnLGFDi5yIy p2H4xQvwLCps71BnjVTB6GDxOFbagXh1Mx0jBv+HOrQWWbPQD6RQi1xXFhubikFjTE51 xYDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h15-20020a170902f54f00b001b9d335175asi5132618plf.292.2023.09.02.12.16.21; Sat, 02 Sep 2023 12:16:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229695AbjIAVqR (ORCPT + 99 others); Fri, 1 Sep 2023 17:46:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350809AbjIAVmu (ORCPT ); Fri, 1 Sep 2023 17:42:50 -0400 Received: from smtprelay07.ispgateway.de (smtprelay07.ispgateway.de [134.119.228.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34EB81BEF for ; Fri, 1 Sep 2023 14:20:30 -0700 (PDT) Received: from [77.64.243.219] (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 1qcBZ5-0004Wd-Rl; Fri, 01 Sep 2023 23:20:27 +0200 From: =?utf-8?q?Andr=C3=A9_Apitzsch?= Date: Fri, 01 Sep 2023 23:19:58 +0200 Subject: [PATCH v2 1/2] dt-bindings: leds: Add Kinetic KTD2026/2027 LED MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230901-ktd202x-v2-1-3cb8b0ca02ed@apitzsch.eu> References: <20230901-ktd202x-v2-0-3cb8b0ca02ed@apitzsch.eu> In-Reply-To: <20230901-ktd202x-v2-0-3cb8b0ca02ed@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?Andr=C3=A9_Apitzsch?= X-Mailer: b4 0.12.3 X-Df-Sender: YW5kcmVAYXBpdHpzY2guZXU= X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS autolearn=no 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 Document Kinetic KTD2026/2027 LED driver devicetree bindings. 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 = ; + }; + }; + }; + }; -- 2.42.0