From patchwork Fri Feb 25 21:13:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12760968 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 E84E7C433EF for ; Fri, 25 Feb 2022 21:24:09 +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:References:Cc:To:From: Subject: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=0rb78tYTWwLYWJveFje0Hv4B6hE8qU5CqT1SS8MBrvg=; b=L34M1T08WAHDmK J3tpeyMZHGGGmRAiKVyxOu9Zt2wtycGVmMVJaXUeMAuay/VGr0YJJuUN6XycHl8XKLPy4FvQLMXCy BFsFdDAfypx9/Pbc9VeGlbaa0sqkXByI3+bjX8WMJLhMv/tn6sjHp5cIZevAWrHSExOXy8Hr/X09y g7pWifKWX5WgTa5nFSdIWSpxnBRxVugLuy/Ap1aZCXlilCbmIluQzbJYm6XM6hLPy3vVkgev/t+X5 lYRO8BqXv5yYPFV3XmdPgBgsAHQ2a+uMtFsoUEKLqMqSWvSC48hiCAcwZkniDckwKrngRsi6Ej3zb nVus/yQsRpbpJEIRGdLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNi4J-0070Vl-Jx; Fri, 25 Feb 2022 21:24:03 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNi45-0070Qu-Lg; Fri, 25 Feb 2022 21:23:51 +0000 Received: by mail-ed1-x531.google.com with SMTP id h15so9139428edv.7; Fri, 25 Feb 2022 13:23:49 -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:subject:content-language :from:to:cc:references:in-reply-to:content-transfer-encoding; bh=QFvRzvIdRv3xplrJSGk7DMQfwafyCoO+jIxn5A7f+Mo=; b=geFvYOtYlAzZW5zPxS0omthKPQef/gERvsIFmb0VHNW6XMnc+Z5ob5eozbesva5yPr 72J4JMaInvqxY2jqPbpaI1UkEjzb4uzUPFcZXW48EeYT4cbfennd8+ZOH2vQF4LExoOo xt8I0sW+fKIPcboP/lp6KEpt5b8ve0SgyvFiel7TFGIRpGvz+lY7qejjkxbkDq7hkQcG CtOCaK2tSj4Qeg+kYGLwwMgfzrbNVPnX+UK4yVGcxhtPNHoOKuAl15GkXT04mzr2VAgl nBsMcjStzMttlCxfjct7DaL5VmhC+r7JnzZrLhHRxLZzOo8I2TyC3NsS0mSkEZ8rU8cb gEgA== 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:subject :content-language:from:to:cc:references:in-reply-to :content-transfer-encoding; bh=QFvRzvIdRv3xplrJSGk7DMQfwafyCoO+jIxn5A7f+Mo=; b=e9MxXl98LNUU0dwErtmFmbfS4EuKHtXkfHYU9CAcTaCC5uvkGwcdsVAfPef36DqErl sujE6uYtj4armBa/qlL5SWIsyyy/1DMaDVuzF8vP/0xF5VCjZJvNiJxPxR+2n/WrDvfV l76vAM/rBJV2BFOySLGwkyWg/DOv2nMdbVqeEwKIkHS3xzxO0MDWBgyKSyG24c2pS1Zq 8gY8DZLeMX3ZRxRAR9RE1KkNsf9vKd3ioITmIfUSmcWl10//gJ4Su9W504skXl+yJJxh RxQ/FL9GOe/8uooaVsCYywkkB1eZ+fiMrnnW93nKWcynDXSTXp8fulvwAqzzY3lAX/HM Nzcg== X-Gm-Message-State: AOAM532zF4xcoqugzs+7Puc6xmEPAuxY0zf0dHjvxhDZHZ71ocY+V8DV aihcl4mHBIcOiDJqQW4yAdM= X-Google-Smtp-Source: ABdhPJybxPWcIY7zb9JmvYjISMMVpmpNYRzrKQ7c/vcl+xvi88vo5XSX1q9NnfQSZTQIWu8iqUMpJA== X-Received: by 2002:a05:6402:6da:b0:3fd:cacb:f4b2 with SMTP id n26-20020a05640206da00b003fdcacbf4b2mr9055727edy.332.1645824228405; Fri, 25 Feb 2022 13:23:48 -0800 (PST) Received: from ?IPV6:2a01:c22:7326:e100:c9d3:3c62:2c99:d44b? (dynamic-2a01-0c22-7326-e100-c9d3-3c62-2c99-d44b.c22.pool.telefonica.de. [2a01:c22:7326:e100:c9d3:3c62:2c99:d44b]) by smtp.googlemail.com with ESMTPSA id c17-20020a05640227d100b00410ece2072dsm1999591ede.95.2022.02.25.13.23.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Feb 2022 13:23:47 -0800 (PST) Message-ID: <2671e6e3-8f18-8b70-244b-9e1415bfdf8f@gmail.com> Date: Fri, 25 Feb 2022 22:13:16 +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 Subject: [PATCH v5 2/6] dt-bindings: auxdisplay: Add Titan Micro Electronics TM1628 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: <90668779-b53d-b3e7-5327-af11ff4a1d18@gmail.com> In-Reply-To: <90668779-b53d-b3e7-5327-af11ff4a1d18@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220225_132349_749150_470CB1BA X-CRM114-Status: GOOD ( 12.49 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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 Signed-off-by: Heiner Kallweit Reviewed-by: Rob Herring --- v5: - add vendor prefix to driver-specific properties --- .../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 + + titanmec,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 + + titanmec,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>; + titanmec,grid = /bits/ 8 <4 3 2 1>; + titanmec,segment-mapping = /bits/ 8 <4 5 6 1 2 3 7>; + #address-cells = <2>; + #size-cells = <0>; + + alarm@5,4 { + reg = <5 4>; + function = LED_FUNCTION_ALARM; + }; + }; + }; +...