Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp650605imw; Mon, 4 Jul 2022 17:06:25 -0700 (PDT) X-Google-Smtp-Source: AGRyM1siKmBSPjovaarYQZ3K0FItBRpdlvdNNXMsryVoA+Qhroxr2n2PCfyTt+bErwShIruDCOQb X-Received: by 2002:a63:610a:0:b0:412:5621:e6e1 with SMTP id v10-20020a63610a000000b004125621e6e1mr4285165pgb.175.1656979585690; Mon, 04 Jul 2022 17:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656979585; cv=none; d=google.com; s=arc-20160816; b=Qm2QecOLxMQ4FbCyyC2NuHVMjdHJm+ku2oXhKCMB5eUluJ2PBAg37OzooVQooA+zz+ mFQF/+AOUet9WAvBQYC+ayMbFv12wJ62yvqMPFs47rg3iwW1HyL6xzJ/k8JXYrHMndG2 gOI2d6bk5sQ1mecetvHLF5Lk+f3zVs9n7DlnRU8HaRL4czmJfHI6WpM5W5R7tRAGwmux 8C508kk3J7HsWh18FLQBaLnieImoY5DgYk6mwSH9MQZFI8PyF/2LtbXXs/SAds44XL0E wVG6GZ3z+55HUuCtDQPIdO9lv4gqQkFh10tUGizY3W3GG9gYCwtqWt9vHJck1DJ5xYGK rrng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=WOm2iNxAu/hwm0CovHf8HCWZq0yoPLDwuf9JTWcFz2M=; b=n5K1hGiomH/kHGtqN6dcTlM0MLvqsmRxJMziK+3iNqvaMaqjohfjkTBqbA8eXxzuEY qWKbf/WIzNYyUqg6hYvwujKPn5f53Vumm5CdQ7w4/OOhHSwemAiOtHjBd5Zzv9tmD7cb vjXt+cWpJlgGCIoUaT7KQzefHhMO9Px5FQuJtXYb+36aVlzvYTiVTATnNEwH2s4VCoWj 8EhdXa/JXUmdAcOdPxaqhZh9+0amcWwYr7YM3R3u3D9Y/YTOuhF/YD5Pq4bkVe7Bxm5i pQISr3PkT99kCfexizV2KYH3zC4tpHq27wZ3PW9M1zI/zvwfhG7cK17J3xAO/YgJ8iTX Qclg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OZblpWXW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z184-20020a6333c1000000b00408b873b681si17031991pgz.743.2022.07.04.17.05.53; Mon, 04 Jul 2022 17:06:25 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OZblpWXW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231423AbiGEAFL (ORCPT + 99 others); Mon, 4 Jul 2022 20:05:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230240AbiGEAFI (ORCPT ); Mon, 4 Jul 2022 20:05:08 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42B8CB49D; Mon, 4 Jul 2022 17:05:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id ACD04B815D1; Tue, 5 Jul 2022 00:05:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 214DCC3411E; Tue, 5 Jul 2022 00:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656979504; bh=nUuGZzXB3lm/BS5eqFFgRGH6y+AP1FVcEon7bhUr3Hc=; h=From:To:Cc:Subject:Date:From; b=OZblpWXWvnI5Ww9hfS92j/UpBX/Fw5JzbrPCSOoZAy8MJpRUEd1Lt5gEjCySPThet 2IEk/qgtFzjdcSiryhx/dq4UVwkuEEpeEsbWioc2nOBjtMHVrQhhELWv02us5mcMdw npASJJ2lQQuf8NdaLQGrgzcCW2ULe/8u686ceSozS0iigxEIawtOg3f3Z85RVR22UX NWqosrr8x3xn6Y5k/KYSdNngODhozB7Qdfx13X5D6U+nSkxoybhQ/KLUxd2Oy9AMAb rz9Vwfha+1NCxJxsUChHftUcFQ3/Up7aMa/N7OwnS+U77IR2VdCs1BdP73yIZ2+wNj t5NzZ3aP7lL3Q== Received: by pali.im (Postfix) id 10D4079F; Tue, 5 Jul 2022 02:05:01 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Pavel Machek , Rob Herring , Krzysztof Kozlowski , =?UTF-8?q?Marek=20Beh=C3=BAn?= Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: leds: Add cznic,turris1x-leds.yaml binding Date: Tue, 5 Jul 2022 02:04:47 +0200 Message-Id: <20220705000448.14337-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Add device-tree bindings documentation for Turris 1.x RGB LEDs. Signed-off-by: Pali Rohár --- .../bindings/leds/cznic,turris1x-leds.yaml | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml diff --git a/Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml b/Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml new file mode 100644 index 000000000000..fd09613c8d2d --- /dev/null +++ b/Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml @@ -0,0 +1,116 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/cznic,turris1x-leds.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: CZ.NIC's Turris 1.x LEDs driver + +maintainers: + - Pali Rohár + +description: + This module adds support for the RGB LEDs found on the front panel of the + Turris 1.x routers. There are 8 RGB LEDs that are controlled by CZ.NIC CPLD + firmware running on Lattice FPGA. Firmware is open source and available at + https://gitlab.nic.cz/turris/hw/turris_cpld/-/blob/master/CZ_NIC_Router_CPLD.v + +properties: + compatible: + const: cznic,turris1x-leds + + reg: + maxItems: 2 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^multi-led@[0-7]$": + type: object + $ref: leds-class-multicolor.yaml# + + properties: + reg: + minimum: 0 + maximum: 7 + + required: + - reg + +additionalProperties: false + +examples: + - | + + #include + + cpld@3,0 { + #address-cells = <1>; + #size-cells = <1>; + + led-controller@13 { + compatible = "cznic,turris1x-leds"; + reg = <0x13 0x1d>; + #address-cells = <1>; + #size-cells = <0>; + + multi-led@0 { + reg = <0x0>; + color = ; + function = LED_FUNCTION_WAN; + }; + + multi-led@1 { + reg = <0x1>; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <5>; + }; + + multi-led@2 { + reg = <0x2>; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <4>; + }; + + multi-led@3 { + reg = <0x3>; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <3>; + }; + + multi-led@4 { + reg = <0x4>; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <2>; + }; + + multi-led@5 { + reg = <0x5>; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; + }; + + multi-led@6 { + reg = <0x6>; + color = ; + function = LED_FUNCTION_WLAN; + }; + + multi-led@7 { + reg = <0x7>; + color = ; + function = LED_FUNCTION_POWER; + }; + }; + }; + +... -- 2.20.1