linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Heiner Kallweit" <hkallweit1@gmail.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@canonical.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"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: Tue, 19 Apr 2022 23:31:49 +0100	[thread overview]
Message-ID: <543820f8-5e93-eedb-e409-0cb13d092f07@arm.com> (raw)
In-Reply-To: <CAMuHMdV8iy4vMASuUgeQmjHdAMNzvCikwheyQO1-AQH0yYk0RQ@mail.gmail.com>

On 2022-03-21 08:12, Geert Uytterhoeven wrote:
> Hi Robin,
> 
> On Fri, Mar 18, 2022 at 9:50 PM Robin Murphy <robin.murphy@arm.com> 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>
> 
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml
> 
>>> +
>>> +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).
> 
> Sounds similar to HT16K33?

/me searches up a datasheet...

Keypad-wise, it appears so, however the display side of this 
1618/1628/1638 family is very much tuned for 7-segment displays rather 
than arbitrary dot-matrix ones.

I do recall when I was digging a few years ago, turning up an old Holtek 
VFD driver which looked suspiciously like it might be the origin of the 
particular 3-wire protocol and command set (including weird non-linear 
brightness scale) which all these LED driver clones seem to borrow from, 
but I can't now remember the part number :(

>> 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.
> 
> The problem with these devices is that there are thousands of different
> ways to wire them, and coming up with a generic wiring description in
> DT and writing code to handle that can be very hard.
> 
> For HT16K33 non-dot-matrix wirings, I just added extra compatible
> values matching the wiring of a few known devices[1].  That way the
> driver can handle them efficiently.
> It does have the disadvantage that adding support for new devices
> means introducing more compatible values, and adding more code.
> 
> Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml

I think the display side of Heiner's binding is fine for what these 
chips can do - I've finally had a bit more time to play with this 
series, and (with minor driver hacks) it works just fine to describe my 
TM1638 breakout board with an 8-digit display, where segments 8 and 9 of 
each grid are respectively a decimal point and a discrete indicator LED, 
managed as separate LED nodes.

However, I think you've indirectly addressed my outstanding concern 
there - I wasn't aware of the "linux,keymap" property, but since that 
brings its own implicit (row,column) addresses distinct from the DT 
address space, it looks like that might be sufficient as a neat standard 
way to extend this binding in future *without* any other changes.

Thanks,
Robin.

  reply	other threads:[~2022-04-19 22:32 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 [this message]
2022-03-21  8:34     ` Krzysztof Kozlowski
2022-03-23 20:33       ` Heiner Kallweit
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=543820f8-5e93-eedb-e409-0cb13d092f07@arm.com \
    --to=robin.murphy@arm.com \
    --cc=afaerber@suse.de \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=hkallweit1@gmail.com \
    --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).