From patchwork Mon May 23 08:49:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Jacques Hiblot X-Patchwork-Id: 575651 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58385C433F5 for ; Mon, 23 May 2022 08:58:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232209AbiEWI6b (ORCPT ); Mon, 23 May 2022 04:58:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232273AbiEWI6a (ORCPT ); Mon, 23 May 2022 04:58:30 -0400 X-Greylist: delayed 497 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 23 May 2022 01:58:27 PDT Received: from smtpout1.mo528.mail-out.ovh.net (smtpout1.mo528.mail-out.ovh.net [46.105.34.251]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0C073EAB5; Mon, 23 May 2022 01:58:27 -0700 (PDT) Received: from pro2.mail.ovh.net (unknown [10.109.143.120]) by mo528.mail-out.ovh.net (Postfix) with ESMTPS id 8F21E10347F4B; Mon, 23 May 2022 10:50:08 +0200 (CEST) Received: from localhost.localdomain (88.161.25.233) by DAG1EX2.emp2.local (172.16.2.2) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.9; Mon, 23 May 2022 10:50:08 +0200 From: Jean-Jacques Hiblot To: Pavel Machek , Rob Herring , Krzysztof Kozlowski , Jean-Jacques Hiblot CC: , , Subject: [PATCH 1/3] dt-bindings: leds: Add bindings for the TLC5925 controller Date: Mon, 23 May 2022 10:49:55 +0200 Message-ID: <20220523084958.2723943-2-jjhiblot@traphandler.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220523084958.2723943-1-jjhiblot@traphandler.com> References: <20220523084958.2723943-1-jjhiblot@traphandler.com> MIME-Version: 1.0 X-Originating-IP: [88.161.25.233] X-ClientProxiedBy: DAG8EX2.emp2.local (172.16.2.82) To DAG1EX2.emp2.local (172.16.2.2) X-Ovh-Tracer-Id: 5386305156936645083 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrjedtgddutdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgtghisehtkeertdertddtnecuhfhrohhmpeflvggrnhdqlfgrtghquhgvshcujfhisghlohhtuceojhhjhhhisghlohhtsehtrhgrphhhrghnughlvghrrdgtohhmqeenucggtffrrghtthgvrhhnpedttdffveeljeetleeijefhffevtdffleejheejiefgjeeludefvdevjedutdejhfenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgnecukfhppedtrddtrddtrddtpdekkedrudeiuddrvdehrddvfeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopehprhhovddrmhgrihhlrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehjjhhhihgslhhothesthhrrghphhgrnhgulhgvrhdrtghomhdpnhgspghrtghpthhtohepuddprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Add bindings documentation for the TLC5925 LED controller. Signed-off-by: Jean-Jacques Hiblot --- devicetree@vger.kernel.org .../bindings/leds/leds-tlc5925.yaml | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-tlc5925.yaml diff --git a/Documentation/devicetree/bindings/leds/leds-tlc5925.yaml b/Documentation/devicetree/bindings/leds/leds-tlc5925.yaml new file mode 100644 index 000000000000..156db599d5a1 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-tlc5925.yaml @@ -0,0 +1,100 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-tlc5925.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: LEDs connected to TI TLC5925 controller + +maintainers: + - Jean-Jacques Hiblot + +description: | + The TLC5925 is a low-power 16-channel constant-current LED sink driver. + It is controlled through a SPI interface. + It is built around a shift register and latches which convert serial + input data into a parallel output. Several TLC5925 can be chained to + control more than 16 LEDs with a single chip-select. + The brightness level cannot be controlled, each LED is either on or off. + + Each LED is represented as a sub-node of the ti,tlc5925 device. + +properties: + compatible: + const: ti,tlc5925 + + shift_register_length: + maxItems: 1 + description: | + The length of the shift register. If several TLC5925 are chained, + shift_register_length should be set to 16 times the number of TLC5925. + The value must be a multiple of 8. + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + output-enable-b-gpios: + description: | + GPIO pins to enable/disable the parallel output. They describe the GPIOs + connected to the OE/ pin of the TLC5925s. + +patternProperties: + "@[a-f0-9]+$": + type: object + + $ref: common.yaml# + + properties: + reg: + items: + description: | + LED pin number (must be lower than shift_register_length). + The furthest LED down the chain has the pin number 0. + + required: + - reg + +required: + - reg + - "#address-cells" + - "#size-cells" + - shift_register_length + +examples: + - | + &spi0 { + leds@2 { + compatible = "ti,tlc5925"; + reg = <0x02>; + spi-max-frequency = <30000000>; + shift_register_length = <32>; + output-enable-b-gpios = <&gpio0b 9 GPIO_ACTIVE_HIGH>, <&gpio0b 7 GPIO_ACTIVE_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + + led-satus@0 { + reg = <0>; + function = LED_FUNCTION_STATUS; + color = ; + }; + + led-satus@4 { + reg = <4>; + function = LED_FUNCTION_STATUS; + color = ; + }; + + led-alive@24 { + reg = <24>; + label = "green:alive" + }; + + led-panic@31 { + reg = <31>; + label = "red:panic" + }; + }; + };