From: Heiner Kallweit <hkallweit1@gmail.com>
To: "Mark Brown" <broonie@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski@canonical.com>,
"Andreas Färber" <afaerber@suse.de>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Neil Armstrong" <narmstrong@baylibre.com>,
"Kevin Hilman" <khilman@baylibre.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>
Cc: "linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"open list:ARM/Amlogic Meson..."
<linux-amlogic@lists.infradead.org>
Subject: [PATCH v2 3/6] dt-bindings: auxdisplay: Add Titan Micro Electronics TM1628
Date: Mon, 21 Feb 2022 21:23:18 +0100 [thread overview]
Message-ID: <39d61ddb-4b54-4a13-fbb2-c0f88d9bf017@gmail.com> (raw)
In-Reply-To: <1f39432b-84e2-e6dc-a6b8-c48ad5cf2210@gmail.com>
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 <afaerber@suse.de>.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
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 <afaerber@suse.de>
+ - Heiner Kallweit <hkallweit1@gmail.com>
+
+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 <dt-bindings/leds/common.h>
+
+ 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;
+ };
+ };
+ };
+...
--
2.35.1
next prev parent reply other threads:[~2022-02-21 20:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 20:19 [PATCH v2 0/6] auxdisplay: Add support for the Titanmec TM1628 7 segment display controller Heiner Kallweit
2022-02-21 20:20 ` [PATCH v2 1/6] spi: gpio: Implement LSB First bitbang support Heiner Kallweit
2022-02-21 20:21 ` [PATCH v2 2/6] dt-bindings: vendor-prefixes: Add Titan Micro Electronics Heiner Kallweit
2022-02-21 20:23 ` Heiner Kallweit [this message]
2022-02-22 14:22 ` [PATCH v2 3/6] dt-bindings: auxdisplay: Add Titan Micro Electronics TM1628 Rob Herring
2022-02-21 20:24 ` [PATCH v2 4/6] docs: ABI: document tm1628 attribute display-text Heiner Kallweit
2022-02-22 8:20 ` Geert Uytterhoeven
2022-02-21 20:25 ` [PATCH v2 5/6] auxdisplay: add support for Titanmec TM1628 7 segment display controller Heiner Kallweit
2022-02-22 8:19 ` Geert Uytterhoeven
2022-02-22 9:44 ` Heiner Kallweit
2022-02-22 12:16 ` Andreas Färber
2022-02-22 13:39 ` Heiner Kallweit
2022-02-21 20:26 ` [PATCH v2 6/6] arm64: dts: meson-gxl-s905w-tx3-mini: add support for the 7 segment display Heiner Kallweit
2022-02-21 22:10 ` [PATCH v2 0/6] auxdisplay: Add support for the Titanmec TM1628 7 segment display controller Miguel Ojeda
2022-02-21 22:57 ` Heiner Kallweit
2022-02-22 12:19 ` Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39d61ddb-4b54-4a13-fbb2-c0f88d9bf017@gmail.com \
--to=hkallweit1@gmail.com \
--cc=afaerber@suse.de \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=krzysztof.kozlowski@canonical.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=narmstrong@baylibre.com \
--cc=ojeda@kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).