From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90A9CC433FE for ; Fri, 19 Nov 2021 05:42:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 56DCC611C0 for ; Fri, 19 Nov 2021 05:42:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 56DCC611C0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=dvqAdhdmAUMzEi07GNoA1QiesJxTiMZQKXGcuRjz8vE=; b=PR2KRAPuTZ4dB3 dL4SU4LvQjFreUzEBbmuugjAWJl5i+jO61TAGZ7X1gy23kuu82m/ja/38oBxrBYAnGHZZbphSPpob Anfj4W8KPvW7Zp8hLYAHuAq/6+v8zc0UzxbBHXqA4dq9aXN07jhflU9FuHugwXvXVKid1EJzU+ukt K/wFCK5luVrHNkne6YKf5uGOSi4JhaBG3H7kFBhS8nOxgoss6Acwv3a9NKay06LLYUlG+GAnJaIal IoIZGvyf5kOQU/ZL9YDEfciGS0YBUjX7XGxzi7ahna4xp+niB9S3VMdkoIDwFucDk+79Zfv2jxTB6 GCIv6Cf2DQe9zpqaCORg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnwdq-009UaI-IR; Fri, 19 Nov 2021 05:40:54 +0000 Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnwdm-009UYy-Ib for linux-arm-kernel@lists.infradead.org; Fri, 19 Nov 2021 05:40:52 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id AD3642B01147; Fri, 19 Nov 2021 00:40:46 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 19 Nov 2021 00:40:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=N5AF1nNgxB7c/q6LGCSBRDOkBc 8NQJ3dCBZhWBqbvS0=; b=NmNpXrOLq7O/aJcQ3Nc+InooBNqEQ461A3tHTBr8wo NlKWM7aCrVIkL/U/AHlwvSAIg7QaBWd7qQ1odqWbjjsIAjgOZESceVqP2gAq2bjP awo/vjfcii21hbLVMg1WEVuTvPm8lnk7gXgVs93dCLRWf7/ttNtxzpMTMElZtlzy Xrkkz7JoXb3POFJni51kVLu5Ze2lJwCHAMGrESZ5zdcTjfdGTC/9f8MDdc9ShIsM Oo+Fd5QKGMVyN7GZcVgNrWx8NnD5U0EhfY4n90Uv5Cjn/Et6s77UK1VlYDyUJ1J2 on5qHEER0ozPTogxXXvMrNRn77VrU7BtmHEVVrbvguWw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=N5AF1nNgxB7c/q6LG CSBRDOkBc8NQJ3dCBZhWBqbvS0=; b=b1a0w9H3xbO8z2ddTWS0f1oSfbEC7wEeo HhrzkRpfLnRxOZMg1ki8MC9v5/rTZkOUM9NtgEDhAs+BRd8E2kh2fWNb7g5xoUXS Ep3GEpRPdHDYgoHRn4si7fXRd2fop1BhLxUSQTsEooOucCl1wrM+Jdy5KIDPSXv0 IcufrZGfs+c0zKaw7Hp+iQAqMghb/KpyYINFY4CiQiDTEX4PSacBeQU7jY8MIJ4a Dw/jlRSPpv85yAsxmrioINMp13IMLGv1SmynHuwaKxS5nfXiIEbfX4AGjWiloM7W 7N6KNvnIwNrmKLw4KfYEJyafUP7al04sF1W4ma47ntjtvUJAtQrrA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrfeejgdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghlucfj ohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrfgrth htvghrnhepgefftddvvefgleejudevfefgfeffjefhtdduiedujeeuhedtleeggfejueff udeunecuffhomhgrihhnpeguvghvihgtvghtrhgvvgdrohhrghenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhhohhllhgr nhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 19 Nov 2021 00:40:45 -0500 (EST) From: Samuel Holland To: Pavel Machek , linux-leds@vger.kernel.org Cc: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Samuel Holland Subject: [PATCH v3 1/2] dt-bindings: leds: Add Allwinner R329/D1 LED controller Date: Thu, 18 Nov 2021 23:40:42 -0600 Message-Id: <20211119054044.16286-1-samuel@sholland.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211118_214050_660273_92773BC9 X-CRM114-Status: GOOD ( 14.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Allwinner R329 and D1 SoCs contain an LED controller designed to drive a series of RGB LED pixels. It supports PIO and DMA transfers, and has configurable timing and pixel format. Signed-off-by: Samuel Holland --- Changes in v3: - Removed quotes from enumeration values - Added vendor prefix to timing/format properties - Renamed "format" property to "pixel-format" for clarity - Dropped "vled-supply" as it is unrelated to the controller hardware Changes in v2: - Fixed typo leading to duplicate t1h-ns property - Removed "items" layer in definition of dmas/dma-names - Replaced uint32 type reference with maxItems in timing properties .../leds/allwinner,sun50i-r329-ledc.yaml | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/allwinner,sun50i-r329-ledc.yaml diff --git a/Documentation/devicetree/bindings/leds/allwinner,sun50i-r329-ledc.yaml b/Documentation/devicetree/bindings/leds/allwinner,sun50i-r329-ledc.yaml new file mode 100644 index 000000000000..f8ec5fc6e0ba --- /dev/null +++ b/Documentation/devicetree/bindings/leds/allwinner,sun50i-r329-ledc.yaml @@ -0,0 +1,137 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/allwinner,sun50i-r329-ledc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner R329 LED Controller Bindings + +maintainers: + - Samuel Holland + +description: + The LED controller found in Allwinner sunxi SoCs uses a one-wire serial + interface to drive up to 1024 RGB LEDs. + +properties: + compatible: + oneOf: + - const: allwinner,sun50i-r329-ledc + - items: + - enum: + - allwinner,sun20i-d1-ledc + - const: allwinner,sun50i-r329-ledc + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + clocks: + items: + - description: Bus clock + - description: Module clock + + clock-names: + items: + - const: bus + - const: mod + + resets: + maxItems: 1 + + dmas: + maxItems: 1 + description: TX DMA channel + + dma-names: + const: tx + + interrupts: + maxItems: 1 + + allwinner,pixel-format: + description: Pixel format (subpixel transmission order), default is "grb" + enum: + - bgr + - brg + - gbr + - grb + - rbg + - rgb + + allwinner,t0h-ns: + maxItems: 1 + description: Length of high pulse when transmitting a "0" bit + + allwinner,t0l-ns: + maxItems: 1 + description: Length of low pulse when transmitting a "0" bit + + allwinner,t1h-ns: + maxItems: 1 + description: Length of high pulse when transmitting a "1" bit + + allwinner,t1l-ns: + maxItems: 1 + description: Length of low pulse when transmitting a "1" bit + + allwinner,treset-ns: + maxItems: 1 + description: Minimum delay between transmission frames + +patternProperties: + "^multi-led@[0-9a-f]+$": + type: object + $ref: leds-class-multicolor.yaml# + properties: + reg: + minimum: 0 + maximum: 1023 + description: Index of the LED in the series (must be contiguous) + + required: + - reg + +required: + - compatible + - reg + - clocks + - clock-names + - resets + - dmas + - dma-names + - interrupts + +additionalProperties: false + +examples: + - | + #include + #include + + ledc: led-controller@2008000 { + compatible = "allwinner,sun20i-d1-ledc", + "allwinner,sun50i-r329-ledc"; + reg = <0x2008000 0x400>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&ccu 12>, <&ccu 34>; + clock-names = "bus", "mod"; + resets = <&ccu 12>; + dmas = <&dma 42>; + dma-names = "tx"; + interrupts = <36 IRQ_TYPE_LEVEL_HIGH>; + + multi-led@0 { + reg = <0x0>; + color = ; + function = LED_FUNCTION_INDICATOR; + }; + }; + +... -- 2.32.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel