From patchwork Wed Jul 5 23:13:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 700484 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 74EB5C001DF for ; Wed, 5 Jul 2023 23:13:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230383AbjGEXNp (ORCPT ); Wed, 5 Jul 2023 19:13:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230487AbjGEXNn (ORCPT ); Wed, 5 Jul 2023 19:13:43 -0400 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC1381BC5; Wed, 5 Jul 2023 16:13:39 -0700 (PDT) Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id C4BF7856C4; Thu, 6 Jul 2023 01:13:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1688598817; bh=LOHtMFS18+L5fALnNMFx2Si5gyvPq/4kU7bBxSwehQo=; h=From:To:Cc:Subject:Date:From; b=DIATDz/ywTd1JKLR0k5NJOlHkaGIN6vPhasl8XiFGvbX9aWsnOrcacQs2F4CzHPNV gwmXLyPn6sd7uRcAZhoqNQVp1KKgNs57Mpa0UIFVkGpvjBFYxh+rRJc7sXInkJGgas JZKnfkbaSDFG5XnfbzoSmm9+4HmpjxbL7nNVgkqTRaBoU/OSf+WAc3I4Hu/LHm+LW2 SYDTEnNcSAcZBemnpXPvTZ9Y4C43tYo6HXg77NStUcGHkhIlEnd1jkqMU6bRWOyFTN DwWBplKTlOUlaoVom5uEb/FNtutWycIhLWFO+/9JVfAQkBbFlMKPGj7idCydpLpchJ Osgr4YePES+xA== From: Marek Vasut To: linux-leds@vger.kernel.org Cc: Marek Vasut , Conor Dooley , Isai Gaspar , Krzysztof Kozlowski , Lee Jones , Pavel Machek , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH v3 1/2] dt-bindings: leds: pca995x: Add binding document for PCA995X chips Date: Thu, 6 Jul 2023 01:13:25 +0200 Message-Id: <20230705231326.232356-1-marex@denx.de> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The PCA995x chips are I2C controlled LED drivers. Each chip has up to 16 outputs, each one with an individual 8-bit resolution PWM for brightness control. Add binding document. Signed-off-by: Marek Vasut --- Cc: Conor Dooley Cc: Isai Gaspar Cc: Krzysztof Kozlowski Cc: Lee Jones Cc: Marek Vasut Cc: Pavel Machek Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: linux-leds@vger.kernel.org --- V2: Fix the led@[0-9]+ match V3: Unit addresses for leds@ are hex, add a-f into the glob --- .../devicetree/bindings/leds/nxp,pca995x.yaml | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/nxp,pca995x.yaml diff --git a/Documentation/devicetree/bindings/leds/nxp,pca995x.yaml b/Documentation/devicetree/bindings/leds/nxp,pca995x.yaml new file mode 100644 index 0000000000000..654915c1f687f --- /dev/null +++ b/Documentation/devicetree/bindings/leds/nxp,pca995x.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/nxp,pca995x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP PCA995x LED controllers + +maintainers: + - Isai Gaspar + - Marek Vasut + +description: + The NXP PCA9952/PCA9955B are programmable LED controllers connected via I2C + that can drive 16 separate lines. Each of them can be individually switched + on and off, and brightness can be controlled via individual PWM. + + Datasheets are available at + https://www.nxp.com/docs/en/data-sheet/PCA9952_PCA9955.pdf + https://www.nxp.com/docs/en/data-sheet/PCA9955B.pdf + +properties: + compatible: + enum: + - nxp,pca9952 + - nxp,pca9955b + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^led@[0-9a-f]+$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + + properties: + reg: + minimum: 0 + maximum: 15 + + required: + - reg + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@1 { + compatible = "nxp,pca9955b"; + reg = <0x01>; + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0x0>; + color = ; + function = LED_FUNCTION_POWER; + }; + + led@2 { + reg = <0x2>; + color = ; + function = LED_FUNCTION_STATUS; + }; + }; + }; + +...