From patchwork Wed Feb 23 17:59:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12757270 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BADF3C433F5 for ; Wed, 23 Feb 2022 18:04:19 +0000 (UTC) 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:In-Reply-To:Subject:References:Cc:To: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fR+89v7KH1vzoS4lvF+Ltv+Xg7zv7nf+YHZW/a1r95k=; b=KElOz1hFzpiJyH QE/tfLScst8U1Kb8hgqCR1K2S5DR/XpT5uDYuFtFLe+7b2vSUuMwucN7ulOhKX2jwcOaEANptOMs+ aYoWKXLD8OriUfVRMQLpuCLo635C0ceXuQAkCJ92tj7ipd6GxuORwypRxY+uIkzwIPnmGKJng+ROZ RATlCgNp4dnEfTwh3MlpOSHY9uLw8hXePNTJanv0+KIyBvHSZyPoJyZ/SOMk5/yEn2LhhnkPero0k qXaW1ltny+2DQDC7+63r8yo3xUx308hhwVVxWCreO79CWCmusL55CJFRHE0UH4/LILWQBzBb4NjHg n8z65jydvuzt1Iq6Uv4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMvyM-00Fdd5-BM; Wed, 23 Feb 2022 18:02:42 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMvyH-00Fdb8-KS; Wed, 23 Feb 2022 18:02:39 +0000 Received: by mail-ed1-x529.google.com with SMTP id i11so43766943eda.9; Wed, 23 Feb 2022 10:02:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:content-language:from:to:cc :references:subject:in-reply-to:content-transfer-encoding; bh=hoJN2xiYRR/AiZH+KyClQAfus1beCOFyquBC28PraRo=; b=BK5rJXWHEtAUExxO90vanXAuMqoIbonOIR0Fe500A/Wi0GoWYYxgDa3IWghcxGlaCA lEgtpUVFe1Rh9cz0ZD1iV9nCsIgHde2IGE5bixRcP61Y89haI6IOO8DkycQarHveeWH6 zoO3+sC4X9et6j+eOY6kKCYiBEGFm0fuIxTDXhvXgphq60t6uYdTp9AhwZJhx3h0xLan Wo5KUbwhFKOaofDSP+O2GHPq/mxIhr6jVquB19CMuwkjV3N2/K1EMR0rmFcywDHZzfQo 7keaLYTqABYT6W83aGQtWFaZtw6g1U7sbT5Iovo/atgRM+3Ui/f7wq36fXhOVfNrQHV9 hYUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:from:to:cc:references:subject:in-reply-to :content-transfer-encoding; bh=hoJN2xiYRR/AiZH+KyClQAfus1beCOFyquBC28PraRo=; b=rjrG/Te4c/5NV/2UJS0NqkCgdsQIjpp8Re/CaTIVNNRijPxkQO5l5aZvmFoKtxf+nm 1WVoOraL4OVh/0Dc11HEUNkV7xK6dZl4UsEhFzg0s4B/I3QMGBUCjPSnu0gZDgyn5+bh 03n1fQ1yaqimubW+4X+6jwLcMc892en22158J9kq47hUsZuxeoRVWxqxclfFYVuHNO/E 1eiFDqeIToTBnxQiSGKd4HuS7Y1rFXexfUjQPTZu3a79XxPZt7eL71ZXndFKllPIV0Q4 3e8bwoiT5QLjAexXENK0i6alhb0PB0g5uAhu0Xm6W7CaxQUFYHi5rWQZvsvkkB8FpgMK WhNQ== X-Gm-Message-State: AOAM53054irVJtGT4hvk8S5U8hMp1uastRF/LX0hzCR6c++TaUm3arWw g1YQgQwIIwX5q8eo3QIikUs= X-Google-Smtp-Source: ABdhPJycAljqrBPqD8wJMoiV0mKJVPvgLcNKwwPiK/7ua7Ct9CK5DDDW+9+DjFMwrvIt2BR8BIn/XQ== X-Received: by 2002:a05:6402:849:b0:412:8cf5:73db with SMTP id b9-20020a056402084900b004128cf573dbmr581155edz.237.1645639355841; Wed, 23 Feb 2022 10:02:35 -0800 (PST) Received: from ?IPV6:2003:ea:8f4d:2b00:d12c:c0a:f603:b44d? (p200300ea8f4d2b00d12c0c0af603b44d.dip0.t-ipconnect.de. [2003:ea:8f4d:2b00:d12c:c0a:f603:b44d]) by smtp.googlemail.com with ESMTPSA id k9sm138295eje.202.2022.02.23.10.02.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Feb 2022 10:02:35 -0800 (PST) Message-ID: <2b7f0011-8872-70fa-b9b7-50b7817e7084@gmail.com> Date: Wed, 23 Feb 2022 18:59:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Content-Language: en-US From: Heiner Kallweit To: Rob Herring , Krzysztof Kozlowski , =?utf-8?q?Andreas_?= =?utf-8?q?F=C3=A4rber?= , Miguel Ojeda Cc: "linux-spi@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "open list:ARM/Amlogic Meson..." , Jerome Brunet , Martin Blumenstingl , Kevin Hilman , Neil Armstrong , Geert Uytterhoeven References: <4eb7b036-a9b9-3bd2-4e84-f56ba4b1a740@gmail.com> Subject: [PATCH v3 2/5] dt-bindings: auxdisplay: Add Titan Micro Electronics TM1628 In-Reply-To: <4eb7b036-a9b9-3bd2-4e84-f56ba4b1a740@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220223_100237_706598_4DB28922 X-CRM114-Status: GOOD ( 12.62 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a YAML schema binding for TM1628 auxdisplay (7/11-segment LED) controller. This patch is partially based on previous work from Andreas Färber . Co-Developed-by: Andreas Färber Signed-off-by: Andreas Färber Co-Developed-by: Heiner Kallweit Signed-off-by: Heiner Kallweit --- v3: - fix remaining YAML issues - use Co-Developed-by --- .../bindings/auxdisplay/titanmec,tm1628.yaml | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml diff --git a/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml b/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml new file mode 100644 index 000000000..2a1ef692c --- /dev/null +++ b/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml @@ -0,0 +1,92 @@ +# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/auxdisplay/titanmec,tm1628.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Titan Micro Electronics TM1628 LED controller + +maintainers: + - Andreas Färber + - Heiner Kallweit + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + const: titanmec,tm1628 + + reg: + maxItems: 1 + + grid: + description: + Mapping of display digit position to grid number. + This implicitly defines the display size. + $ref: /schemas/types.yaml#/definitions/uint8-array + minItems: 1 + maxItems: 7 + + segment-mapping: + description: + Mapping of 7 segment display segments A-G to bit numbers 1-12. + $ref: /schemas/types.yaml#/definitions/uint8-array + minItems: 7 + maxItems: 7 + + "#address-cells": + const: 2 + + "#size-cells": + const: 0 + +required: + - compatible + - reg + +patternProperties: + "^.*@[1-7],([1-9]|1[0-6])$": + type: object + $ref: /schemas/leds/common.yaml# + unevaluatedProperties: false + description: | + Properties for a single LED. + + properties: + reg: + description: | + 1-based grid number, followed by 1-based segment bit number. + maxItems: 1 + + required: + - reg + +unevaluatedProperties: false + +examples: + - | + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@0 { + compatible = "titanmec,tm1628"; + reg = <0>; + spi-3-wire; + spi-lsb-first; + spi-max-frequency = <500000>; + grid = /bits/ 8 <4 3 2 1>; + segment-mapping = /bits/ 8 <4 5 6 1 2 3 7>; + #address-cells = <2>; + #size-cells = <0>; + + alarmn@5,4 { + reg = <5 4>; + function = LED_FUNCTION_ALARM; + }; + }; + }; +...