Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4990087ybv; Wed, 26 Feb 2020 06:34:02 -0800 (PST) X-Google-Smtp-Source: APXvYqz8/SEUJ9KB21UvKGAXLM34fADdCXRng9fUt7MyfPJjaVL2zIuc6LLJci8+F6RRfUTBXFyo X-Received: by 2002:a9d:2028:: with SMTP id n37mr3491572ota.127.1582727642198; Wed, 26 Feb 2020 06:34:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582727642; cv=none; d=google.com; s=arc-20160816; b=FAXXwtJmKqjrv5OiW06yn+BFDBKLtx4K3f8z0EIm5nMvswdfd62uE5GThvBmaq10tG rbJMXBDJEZcmNRIqQq7WqTdEXYJOp33L/Ck3REiOma+L410IcLbFTA0QHdt9FBVkQnFf DmEzhljsl5JeD+ReXZKeHt+DnrbtFWf3lwkdYa3gwdHJcjuvKcY+FBjBIGlI5QsAjS+/ Zya8ZnSnGbAN0dPHjp4PCmKoB5b0If7gQDFSgxfioahN9izYCftfiTLI5RpOh76VhPiS szBM2bwnNcfuTJEOzJ+6JCp74uGij3wx3oS8MSupS3hRJXk6bWtvh9FhZnaaLDzyCp1I WLRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=Y4urQS/1di8YmhdYz7EDXbcoOguLI1Co0XJrTjZXktY=; b=Of0CVVpj9nWyBca3hGfXF4JQFMnHEP/ANEFUUeG69lW95XuS6tSl5GQ8RUkz1xuNmB Y5GnojnFLLiYJtRS4FrRYCvon+rxf4aTpcq4y8Uqiq1Lw3sMnyCq82XownqZQ3Lmwrjx A/Fww2wzLfzPLFQ15rCRD0QrxMMgQAEAwj6lLM00uvp7KhlfCGefYkV9FegbyMKrANn8 bgC/ceLSJWrBnezFugNQWhjaQWoDd1aAn9KOfiJhtR6/vfYx2XoC7mVhCkCiL55B1z8C hxZgFPdqwES1j6GnwQWc9Kb1mBXw5JLrUCZoBqnkqW2Xgwley/R3kofmgUbFPKUw/zfQ S4Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=CJlgzOGL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z21si1411935oti.199.2020.02.26.06.33.49; Wed, 26 Feb 2020 06:34:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=CJlgzOGL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727745AbgBZOdl (ORCPT + 99 others); Wed, 26 Feb 2020 09:33:41 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:37771 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727426AbgBZOdj (ORCPT ); Wed, 26 Feb 2020 09:33:39 -0500 Received: by mail-wm1-f65.google.com with SMTP id a141so2572682wme.2 for ; Wed, 26 Feb 2020 06:33:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Y4urQS/1di8YmhdYz7EDXbcoOguLI1Co0XJrTjZXktY=; b=CJlgzOGLmX7eVpdAJh7haQvpLpyvdibkSRs5pb/rbeu2iGcr72Qv/yi+2ZglMHwn1Z iZbnUUHf6aSBAQgSMODO9BOL/I8/RqAO0G/lROpCr572B3kWc7T3RFlWCkKaOB1INTLx 2ICl/7P1d0XrgGpgNzto5LMEWk8oqSzal+7bg5xQc/g/9U6qHguu6ohVoi0+bDWGFv3O SowwHKpyj1Zb5SXNF8ypvpd7EDL/JwGky9u+V3SU3+SvbPVVDAML8uMfHL8UflZoUMhf JbgM5/O2ZZR6P2yWn7I1hNNelv9QC+ynXj08W+t+TZCBH0N6DtWVLI6kbcQeV9ANMFc9 yo8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Y4urQS/1di8YmhdYz7EDXbcoOguLI1Co0XJrTjZXktY=; b=rl2Xiga45cofjMg2RTyBjG1JfZsF2igX6lqERACoptu6Slge2sFAAgEKL991Ct6VTb m4MDXTw7X3JgThNHtis7cmDQedQZ8M+BAbcNElzvbAW6rehIAa9vzRA77FT6XgpxB5c0 Ey3aH3iPxpMIwP9yEGjqLBLxXGxRvrFuNMHop/ZBhGWdxorNIUmwwCQEp+0ncZGMwbjc 0qZlpcSYraZ2s97afDtMqZdYgmkLeoXl0nKPvfgslHkW5mTKjd21CLqaL43afQ65Q13E n4em16Zr8ClceFgjai+4Nbz57MpTpEjPK7f+cBIuy2VaCnsLbYbOFXlWD3I1Nt6WbMYl GR7Q== X-Gm-Message-State: APjAAAVz1wmqsvLX6wbwEBNHStrBngl0jKn2Wb1R0l0LR2LBViWeKbui pricpJRIOssXuKkMUg94boU1U3mUQW0= X-Received: by 2002:a05:600c:217:: with SMTP id 23mr5868713wmi.124.1582727616685; Wed, 26 Feb 2020 06:33:36 -0800 (PST) Received: from nbelin-ThinkPad-T470p.baylibre.local (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id h10sm3204198wml.18.2020.02.26.06.33.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Feb 2020 06:33:36 -0800 (PST) From: Nicolas Belin To: linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, jacek.anaszewski@gmail.com, pavel@ucw.cz, dmurphy@ti.com, devicetree@vger.kernel.org Cc: baylibre-upstreaming@groups.io, Nicolas Belin Subject: [PATCH RFC v2 2/3] dt-bindings: leds: Shiji Lighting APA102C LED driver Date: Wed, 26 Feb 2020 15:33:11 +0100 Message-Id: <1582727592-4510-3-git-send-email-nbelin@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1582727592-4510-1-git-send-email-nbelin@baylibre.com> References: <1582727592-4510-1-git-send-email-nbelin@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Document Shiji Lighting APA102C LED driver device tree bindings. Signed-off-by: Nicolas Belin --- .../devicetree/bindings/leds/leds-apa102c.yaml | 154 +++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-apa102c.yaml diff --git a/Documentation/devicetree/bindings/leds/leds-apa102c.yaml b/Documentation/devicetree/bindings/leds/leds-apa102c.yaml new file mode 100644 index 000000000000..90c827ab5a5a --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-apa102c.yaml @@ -0,0 +1,154 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-apa102c.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: LED driver for Shiji Lighting - APA102C + +maintainers: + - Nicolas Belin + +description: + Each RGB LED is represented as a multi-led sub-node of the leds-apa102c + device. Each LED + is a three color rgb LED with 32 levels brightness adjustment that can be + cascaded so that multiple LEDs can be set with a single command. + +properties: + compatible: + const: shiji,apa102c + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 1000000 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^multi-led@[0-9]+$": + type: object + description: | + Properties for an array of connected LEDs. + + properties: + reg: + description: | + This property corresponds to the led index. It has to be between 0 + and the number of managed leds minus 1 + maxItems: 1 + + label: + description: | + This property corresponds to the name of the led. If not set, + the led index will be used to create the led name instead + maxItems: 1 + + color: + const: 8 + + linux,default-trigger: true + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + patternProperties: + "^led@[0-9]+$": + type: object + description: | + Properties for the LED color components. + + properties: + reg: + maxItems: 1 + + color: + oneOf: + - enum: [ 1, 2, 3 ] + + required: + - reg + - color + + required: + - reg + - color + - '#address-cells' + - '#size-cells' + +required: + - compatible + - reg + - spi-max-frequency + - '#address-cells' + - '#size-cells' + +examples: + - | + + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + led-controller@0 { + compatible = "shiji,apa102c"; + reg = <0>; + spi-max-frequency = <1000000>; + #address-cells = <1>; + #size-cells = <0>; + multi-led@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + color = ; + label = "rgb_led1"; + + led@0 { + reg = <0>; + color = ; + }; + + led@1 { + reg = <1>; + color = ; + }; + + led@2 { + reg = <2>; + color = ; + }; + }; + multi-led@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + color = ; + label = "rgb_led2"; + + led@3 { + reg = <3>; + color = ; + }; + + led@4 { + reg = <4>; + color = ; + }; + + led@5 { + reg = <5>; + color = ; + }; + }; + }; + }; -- 2.7.4