From patchwork Thu Feb 24 20:03:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12759196 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 58240C433EF for ; Thu, 24 Feb 2022 20:12:52 +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=pmWpPnlHTkjQNm8WJDAy7E8InDGnq/Hyjt0HeuXiGqs=; b=tEaTP5vKsEttpQ MLq99fZMiLIRjcmzGzMfpBkUtdPwnbT7iqY6ZLuDIe6fUhz9MDU6Tld9E5o4jyrfzEIYQ969QQl8/ lgJBYviDuIblVsVJG2lscg6QyukH5boOQMUeNYxOXdkga3q9d7yXxmgzrMfWVqVmJJTz2vuWsk8gO s56hbSvt8uKRrvS5BDqdk7wgxAGepnkHmTgU0bI1KqVKYfw+QMgV+5bNFhHV8iYle7WkcMUbrEOPp MH/RTAqcsdJoHBRnCdMM1uIOUrrJ+oFwI3HbW5iVwpcAG1WBojYhxIBsX6vQzhVgp3JtEm2wiGFz3 /aG4IV3CTRv2Y8jpoC3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNKSc-002Hj6-Kk; Thu, 24 Feb 2022 20:11:34 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNKSZ-002HiF-4c; Thu, 24 Feb 2022 20:11:32 +0000 Received: by mail-ej1-x633.google.com with SMTP id gb39so6711750ejc.1; Thu, 24 Feb 2022 12:11:30 -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=LZieaA8IQfeUiT55cuSm8XlrpapnhQkbMv4PqrRswQs=; b=CaIYE4lGBxmhFUEqszNJ6ZfSr4qMhwZ2Ixf6B5itoz1D70RNdvcxI2uFwJmCMYV/1m tYs/RlOVekU9G4cjKo4Ywb0SXBGI9TOAX7q8kIyDnr190DbDGAS67pciIba+8udgjnv1 9r0fDMQhzZB/YbfDzdCHmYr53kSEDdmTRlvQW6VdNT2QDi29KpjgqKabEQSq5Twkx6Yh nZTb5HANbdVx929RxZE6+xekoynBmiTLUfHf7RsZ2s+K5AH1eDAwv0IpHwcqRcL68Qlq 2uJbk+4C3L0jDjIUG408NlBNM3qy30SuF91Jbhg44Joqs0yiEqnSy8MEkREidPUCNw8o kCQw== 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=LZieaA8IQfeUiT55cuSm8XlrpapnhQkbMv4PqrRswQs=; b=CdXuWJ3hWoH4yoo3bGPz3bR4DI5vRSsm8TgCQ8ekmKCaxnf0cjYY/qGwVGbTx8Dv64 ydLITiDnzevnO5XV9SedfMenErgj0Q7JAq0C30+iz2uof66mrvHBgbJzIDgNnfYKlz9n ABJQYfG+j2VYHnQFnFToHH59dodJmuG2n/Qt3/LNUuZwnXa79HJZ0KpsZMRzcGuLCXEo rhIpFeO+K5RLYcL/dzdqnx71VqhWuZCka5DKW8GASSC+pgiE014FrnAVaMOdVXPCEyTn 7t4q6ZZwEAprkQ3aWGy/jc+Ol79QEeU/eSNyfppwjtXQbupP70826knt1pHHT3rLf82f wNlw== X-Gm-Message-State: AOAM531Xp0vj4F4XAGqvGfUkAY9wdqA67awd/hYN36Mqw86TkTFfOE+O SyGM18SHrnF86PqLpLLqDTYeLXk6V/A= X-Google-Smtp-Source: ABdhPJx0xxe9oOyj3twkXv1sgWzq1cLG+e4+ameBc800P5R31eA18NyH+o7mjr87HALk7kQXpbMjnw== X-Received: by 2002:a17:906:6716:b0:6cc:7d95:90af with SMTP id a22-20020a170906671600b006cc7d9590afmr3546734ejp.442.1645733489127; Thu, 24 Feb 2022 12:11:29 -0800 (PST) Received: from ?IPV6:2003:ea:8f4d:2b00:70ad:e6bd:1cea:7edd? (p200300ea8f4d2b0070ade6bd1cea7edd.dip0.t-ipconnect.de. [2003:ea:8f4d:2b00:70ad:e6bd:1cea:7edd]) by smtp.googlemail.com with ESMTPSA id hz20-20020a1709072cf400b006d1b5df5c1fsm140379ejc.17.2022.02.24.12.11.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Feb 2022 12:11:28 -0800 (PST) Message-ID: Date: Thu, 24 Feb 2022 21:03:50 +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 v4 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: In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220224_121131_220928_19BF7752 X-CRM114-Status: GOOD ( 12.28 ) 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 Signed-off-by: Heiner Kallweit --- .../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; + }; + }; + }; +...