From patchwork Wed Feb 26 14:33:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Belin X-Patchwork-Id: 1245093 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=hegrlG36; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 48SJFc1K01z9sRl for ; Thu, 27 Feb 2020 01:33:40 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727715AbgBZOdj (ORCPT ); Wed, 26 Feb 2020 09:33:39 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:52700 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727627AbgBZOdi (ORCPT ); Wed, 26 Feb 2020 09:33:38 -0500 Received: by mail-wm1-f66.google.com with SMTP id p9so3320288wmc.2 for ; Wed, 26 Feb 2020 06:33:36 -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=E/6gF09OIYAAYDcV57fzVa8XqTwVQognyAPormZwLXA=; b=hegrlG36+pNJ7eQm7ecF25m/6jmdt9xJtyaZkyKYXTTcIhQSHUrlFOGC7QM1ZkSs1f z8Cii0H2nyG4YFC3gRgyZqEe2HVDgPGAMFF8Oi0EKGpftdOEUEHVDSusQ1+Mx4/446C1 mQ0rmvHluc25ztTOpLq60P35Fc/x7qwrIxndv01K9RtTNXPG2vhs8y90wuanfqXD2BkE fiDkHDNcWL2e7tHjtHwPqJaSfCIBOB5Ep+IcSpKSngLEO8P66LZOkF04iJq2Q7vPKClx /mIzKnEUHgviGqFsQYG6Imig61ZMZ8fejNc3vleGlSvmQUwt+gqVDwG0LoxZykRNAY0Q Oo1Q== 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=E/6gF09OIYAAYDcV57fzVa8XqTwVQognyAPormZwLXA=; b=gCveQiKrB2ew77Ysj4MGds6MvXfv2PVDqR/1LmgiQX0n5Bzbi2NktSwbiRGQ90JL8V WscTftoqhgyaDrK1O5eNsmCjmVa5bgks5RfpTUA+cA1emZHx0sqvh0Xes2Qwu6+7+as8 HgaeLrknk9Ok+OY9TiN9f/QIeP/9981TKIdi68BOymKsINPQYORQE3H6PHpJheiyAJ/c v6q1cs59GUk5lQf2ze4JXB82N4uCZWGP1W2h44CGqcC4r+aNEIwWnIRa7kpZoT4aYA1x MCaont2fvp49jf/QHmrgzPTwIWPcCU8snNaFfwxP8Hv5OhIkEjioWa6hnaPjKVPa1/i1 ov4g== X-Gm-Message-State: APjAAAXBhhkQLpJHzTjuSc4iKP/AigoS3d9JumIe3yY2+xZhTp2yplCt lItv4u5LCREIBm40MsebI7LEuA== X-Google-Smtp-Source: APXvYqwBKYor34z0MGWsBLW+ZiaHQNfsqktLq4aiSFvylON7V2FQMsPdkd+ygzITY5yRXB619OYQwQ== X-Received: by 2002:a7b:c7d2:: with SMTP id z18mr6015351wmk.160.1582727615570; Wed, 26 Feb 2020 06:33:35 -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.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Feb 2020 06:33:35 -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 1/3] dt-bindings: Document shiji vendor-prefix Date: Wed, 26 Feb 2020 15:33:10 +0100 Message-Id: <1582727592-4510-2-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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Shenzhen Shiji Lighting Co.,Ltd is a LED manufacturer. Signed-off-by: Nicolas Belin Acked-by: Rob Herring --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 9e67944bec9c..a463286c3960 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -863,6 +863,8 @@ patternProperties: description: SGX Sensortech "^sharp,.*": description: Sharp Corporation + "^shiji,.*": + description: Shenzhen Shiji Lighting Co.,Ltd "^shimafuji,.*": description: Shimafuji Electric, Inc. "^si-en,.*": From patchwork Wed Feb 26 14:33:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Belin X-Patchwork-Id: 1245095 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=CJlgzOGL; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 48SJFm2N3nz9sRN for ; Thu, 27 Feb 2020 01:33:48 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727740AbgBZOdk (ORCPT ); Wed, 26 Feb 2020 09:33:40 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:38762 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727069AbgBZOdj (ORCPT ); Wed, 26 Feb 2020 09:33:39 -0500 Received: by mail-wm1-f68.google.com with SMTP id a9so3358152wmj.3 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=b8/mneIrp+CQyFrNAaeixwDtSjQGOo3taFLuxonGcK9OI/mZjfHtv4N0V5jmdBmbaC Wvtt/DWNXqu4YyS7sWu3K5s80II0mlDeUHgBlvaceVEEdS5KnipdUscpkqHdHXrak/0j bwOAD1icgqy6kYk0SLbsZCXFXk9xSk9J1nZY4FQqMnIVBfx7OkHuGYX1lBLxx61r7dKC wGovTcZO3q8VzvjKmzxA4i3BZaS6KoIHtAPsVy/9puhLSOyN7ayEVcxFb9YtEAtudHP0 XHuDnn+S6CNV/KCUrVVLXWyyrcGJY6ljU39/oVQqQBuG2jn5IJgtGG1vhI26a2UE7JEr iXDw== X-Gm-Message-State: APjAAAX/D299Xh78sBUcULsXO5NwvHwiBYJ1VmHhOFkr5QZlu3qWhtyr IIrI2rfLTyJTIwJuT+NulUHd1Q== X-Google-Smtp-Source: APXvYqzZhzXkPXkp4kcfqNuTKsJrGYg75KuvuO5nb9ej/GtIo7tvL1eIrRG8KbF4CKK5or8tgGV4OQ== 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 = ; + }; + }; + }; + };