From patchwork Mon Feb 21 20:23:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12754114 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 029EBC433F5 for ; Mon, 21 Feb 2022 20:28:43 +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=qLJz+cK996fBQnrnZilnPlrB1kTZQtpj8oHCfwT5qkg=; b=XqTryX9hSqVaZI 8gF2Q5Zd0vnFT3dfka0vRVNQYNv7vwISslyod9h9cKncjtVo5Utlxv+yR/OGD38HgMWIJO+66ubG0 40No7p0WHWUx+pQNk8zbyUTpF9q2vZQnOv0Ri9IiEFtrjF0c4lEUSlJuhFMG8tRjJ4QgyT4YBARo4 jtysEGBTW2MqIPSM8RB6WSGz8+rv9k2XwYzDah90aBTQ78Hikt/J4Jm2tNdS78UukZFTlo6osehz0 5vxx/keUFde5o/xIMgXbn7toQ/tiwxVOlAyKq997/JmUYURyoev5/VwKXbafMM5tIx+n4VNhSuaIC h48pZuS5spBskGD1Z7iA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMFHH-007BBi-Ro; Mon, 21 Feb 2022 20:27:24 +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 1nMFGp-007B2l-Ds; Mon, 21 Feb 2022 20:26:57 +0000 Received: by mail-ed1-x531.google.com with SMTP id u18so31757264edt.6; Mon, 21 Feb 2022 12:26:55 -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=dd134NjBkl8fhO5WBxxq3dG4rqJRhX37CWmAE2Aj2VI=; b=WXhkfQHfRShc/s+qx4BbtexHkKdRaIoWOy/LMlFZ42d8AksTRQ17IKdh+0pvehhVlY 6MjmHpx0Z8Z8OBfHTF+TZ9MsoYsc6al6WUxse2drDxzKgXLtT64O2NWuA4nBlHXB3VWq PJJsxBQZLrzZg+wQ3gaQ9Csd/Z9OBS+hEsaEUTU82vuRcguAdNBEOZrUxy0JNL71H0iH OrKE6yHXGN9CpHkNtjQdpNdPruSrNeJOq/0pZ9tmB+KIFVr2tpy648wW3xIJOcQLkPoD JjZFClQ32xFW7MWj6oQJvI//ly9H/IEdsKTXhOc5oPAAcNfOJy+WS0fJyT2KEbkR21/i iyWg== 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=dd134NjBkl8fhO5WBxxq3dG4rqJRhX37CWmAE2Aj2VI=; b=wJLEJpVQmChvDcVUMfCR0Kbmeu9MxCiVgVitPisPClhGwMuytseaymPQzfrUDyVDoA A78MDQgmFepfPuRmGaIs9pRuyH7rXIuWOO7eHs/zcoUJT7DwY47WpjMQH/62VNj/QtWg PISv/bpqtMym9qa6MrqRnUh0iLEGtJrRCmH5MixelBYlVjDEoVUfC50axUu5DFIgnFaS UIoUJ3t/97EPNePVlLKC8fIDmZzwJit2RrSAX8AWSbuDWM/t8YHHUdp24Af9YS5snvrR EuGjbJ4PlO4l/cuJDS+JueFAq6kZwn0K5WYVHQVhKLESPBdafH58u30NfxeW5AeTVX2e 8VVw== X-Gm-Message-State: AOAM532GMPO7ZOqmTVdfWy0lYpeCOZMuW1MnbtR3vCLdS5s6IeaVlO7x U4sMClY78JOKDuqTnkIhcvM= X-Google-Smtp-Source: ABdhPJzaqueRJw3KgqhuWsxjs3QEClMbOXRm7JpJl1xJ3fl/7oVyk2YsuGp5uqbgdO+DWhTs9d6gEA== X-Received: by 2002:aa7:c612:0:b0:40f:2a41:bddb with SMTP id h18-20020aa7c612000000b0040f2a41bddbmr23081017edq.291.1645475214128; Mon, 21 Feb 2022 12:26:54 -0800 (PST) Received: from ?IPV6:2003:ea:8f4d:2b00:b141:a0d:4aad:2a06? (p200300ea8f4d2b00b1410a0d4aad2a06.dip0.t-ipconnect.de. [2003:ea:8f4d:2b00:b141:a0d:4aad:2a06]) by smtp.googlemail.com with ESMTPSA id v1sm5565278ejk.11.2022.02.21.12.26.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Feb 2022 12:26:53 -0800 (PST) Message-ID: <39d61ddb-4b54-4a13-fbb2-c0f88d9bf017@gmail.com> Date: Mon, 21 Feb 2022 21:23:18 +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 v2 3/6] dt-bindings: auxdisplay: Add Titan Micro Electronics TM1628 Content-Language: en-US From: Heiner Kallweit To: Mark Brown , Rob Herring , Krzysztof Kozlowski , =?utf-8?q?Andreas_?= =?utf-8?q?F=C3=A4rber?= , Geert Uytterhoeven , Miguel Ojeda , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: "linux-spi@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "open list:ARM/Amlogic Meson..." References: <1f39432b-84e2-e6dc-a6b8-c48ad5cf2210@gmail.com> In-Reply-To: <1f39432b-84e2-e6dc-a6b8-c48ad5cf2210@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220221_122655_491537_688AE761 X-CRM114-Status: GOOD ( 12.67 ) 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 RFC work from Andreas Färber . Signed-off-by: Andreas Färber Signed-off-by: Heiner Kallweit --- v2: - (re-)add Andreas' SoB - fix YAML errors reported by Rob --- .../bindings/auxdisplay/titanmec,tm1628.yaml | 88 +++++++++++++++++++ 1 file changed, 88 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..da7cc16e7 --- /dev/null +++ b/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml @@ -0,0 +1,88 @@ +# 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 + +properties: + compatible: + enum: + - 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 + description: | + Properties for a single LED. + + properties: + reg: + description: | + 1-based grid number, followed by 1-based segment bit number. + maxItems: 1 + + required: + - reg + +additionalProperties: 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; + }; + }; + }; +...