From: Heiner Kallweit <hkallweit1@gmail.com>
To: "Krzysztof Kozlowski" <krzk@kernel.org>,
"Robin Murphy" <robin.murphy@arm.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski@canonical.com>,
"Andreas Färber" <afaerber@suse.de>,
"Miguel Ojeda" <ojeda@kernel.org>
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>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Kevin Hilman <khilman@baylibre.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH v5 2/6] dt-bindings: auxdisplay: Add Titan Micro Electronics TM1628
Date: Wed, 23 Mar 2022 21:33:20 +0100 [thread overview]
Message-ID: <80937566-6455-b1bf-0a5d-a7b54dd3adc5@gmail.com> (raw)
In-Reply-To: <9e2fc38a-a51e-7635-970c-64948fc6eae4@kernel.org>
On 21.03.2022 09:34, Krzysztof Kozlowski wrote:
> On 18/03/2022 21:50, Robin Murphy wrote:
>> On 2022-02-25 21:13, Heiner Kallweit wrote:
>>> 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 <afaerber@suse.de>.
>>>
>>> Co-developed-by: Andreas Färber <afaerber@suse.de>
>>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>>> ---
>>> 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 <afaerber@suse.de>
>>> + - Heiner Kallweit <hkallweit1@gmail.com>
>>> +
>>> +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
>>
>> Would it be fair to say that "spi-lsb-first" and "spi-3wire" are also
>> required? The chips aren't configurable so won't exactly be usable any
>> other way. Furthermore I believe the transmission format actually works
>> out equivalent to SPI mode 3, so should warrant "spi-cpha" and
>> "spi-cpol" as well.
>>
>>> +
>>> +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
>>
>> I'm concerned that this leaves us no room to support the additional
>> keypad functionality in future. Having now double-checked a datasheet,
>> the inputs are also a two-dimensional mux (sharing the segment lines),
>> so the device effectively has two distinct but numerically-overlapping
>> child address spaces - one addressed by (grid,segment) and the other by
>> (segment,key).
>>
>> Rob, Krysztof, any thoughts on the best DT idiom to leave accommodation
>> for that? I'm thinking either require an intermediate node to contain
>> each notional address space, or perhaps add another leading address cell
>> to select between them? I don't believe any of these things have further
>> functionality beyond that.
>
> I think intermediate nodes - leds, keys - are more appropriate, because
> it is self-describing. Additional address space number would require
> decoding this "0" or "1" into LED/key. For complex devices - like PMICs
> with regulators, RTC and clocks - we already have such patterns.
>
Then it's just the question who can implement such an intermediate node
based on what has been done so far.
> Best regards,
> Best regards,
> Krzysztof
next prev parent reply other threads:[~2022-03-23 20:34 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-25 21:09 [PATCH v5 0/6] auxdisplay: Add support for the Titanmec TM1628 7 segment display controller Heiner Kallweit
2022-02-25 21:10 ` [PATCH v5 1/6] dt-bindings: vendor-prefixes: Add Titan Micro Electronics Heiner Kallweit
2022-02-25 21:13 ` [PATCH v5 2/6] dt-bindings: auxdisplay: Add Titan Micro Electronics TM1628 Heiner Kallweit
2022-03-04 23:07 ` Rob Herring
2022-03-18 20:50 ` Robin Murphy
2022-03-21 8:12 ` Geert Uytterhoeven
2022-04-19 22:31 ` Robin Murphy
2022-03-21 8:34 ` Krzysztof Kozlowski
2022-03-23 20:33 ` Heiner Kallweit [this message]
2022-03-30 5:54 ` Heiner Kallweit
2022-04-19 23:04 ` Robin Murphy
2022-04-20 16:27 ` Heiner Kallweit
2022-03-21 8:28 ` Krzysztof Kozlowski
2022-02-25 21:16 ` [PATCH v5 3/6] docs: ABI: document tm1628 attribute display_text Heiner Kallweit
2022-02-25 21:20 ` [PATCH v5 4/6] auxdisplay: add support for Titanmec TM1628 7 segment display controller Heiner Kallweit
2022-02-25 21:22 ` [PATCH v5 5/6] arm64: dts: meson-gxl-s905w-tx3-mini: add support for the 7 segment display Heiner Kallweit
2022-02-25 21:22 ` [PATCH v5 6/6] MAINTAINERS: Add entry for tm1628 auxdisplay driver Heiner Kallweit
2022-03-08 18:32 ` [PATCH v5 0/6] auxdisplay: Add support for the Titanmec TM1628 7 segment display controller Heiner Kallweit
2022-03-16 0:38 ` Robin Murphy
2022-03-16 21:19 ` Heiner Kallweit
2022-03-17 20:08 ` Robin Murphy
2022-03-17 21:49 ` Heiner Kallweit
2022-03-18 20:13 ` Robin Murphy
2022-04-23 20:57 ` Miguel Ojeda
2022-04-24 9:06 ` Heiner Kallweit
2022-05-12 12:46 ` Robin Murphy
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=80937566-6455-b1bf-0a5d-a7b54dd3adc5@gmail.com \
--to=hkallweit1@gmail.com \
--cc=afaerber@suse.de \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=krzk@kernel.org \
--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 \
--cc=robin.murphy@arm.com \
/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).