[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250820163120.24997-1-jefflessard3@gmail.com>
Date: Wed, 20 Aug 2025 12:31:13 -0400
From: Jean-François Lessard <jefflessard3@...il.com>
To: Andy Shevchenko <andy@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
devicetree@...r.kernel.org,
linux-leds@...r.kernel.org,
linux-kernel@...r.kernel.org,
Andreas Färber <afaerber@...e.de>,
Boris Gjenero <boris.gjenero@...il.com>,
Christian Hewitt <christianshewitt@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Paolo Sabatino <paolo.sabatino@...il.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Subject: [PATCH v3 0/4] auxdisplay: Add TM16xx 7-segment LED matrix display controllers driver
This series adds mainline kernel support for TM16xx family LED matrix
controllers and compatible chips, widely used in auxiliary displays on TV boxes
and embedded devices.
Many consumer devices, particularly TV boxes, use auxiliary displays based on
TM16xx controllers to show status information such as time, network connectivity
and system state. Currently, there is no mainline kernel support for these
displays, forcing users to rely on out-of-tree drivers or userspace solutions
that access hardware interfaces directly.
This driver provides unified TM16xx support through the LED subsystem with both
I2C and SPI communication protocols. It integrates with the LED class
framework, enabling control via standard sysfs interfaces and LED triggers,
while supporting keypad input when hardware connections are available.
The driver supports multiple controller families from various vendors:
- Titan Micro Electronics: TM1618, TM1620, TM1628, TM1638, TM1650
- Fuda Hisi Microelectronics: FD620, FD628, FD650, FD655, FD6551
- i-Core Electronics: AiP650, AiP1618, AiP1628
- Princeton Technology: PT6964
- Winrise Technology: HBS658
Key features:
- 7-segment display support with flexible digit/segment mapping
- Individual LED icon control through LED class devices
- Optional keypad scanning with configurable key mapping
- Device tree configuration for board-specific wiring layouts
- LED trigger integration for automatic system event indication
- I2C and SPI protocol support depending on controller interface
Device tree bindings describe board-specific display wiring since controllers are
layout-agnostic. The bindings use separate 'digits' and 'leds' containers with
specific addressing schemes to accommodate the hardware's grid/segment matrix
organization.
Note: This driver is placed in drivers/auxdisplay rather than drivers/leds based
on previous maintainer guidance. LED maintainer Pavel Machek recommended
auxdisplay for TM1628-based display drivers:
https://lore.kernel.org/linux-devicetree/20200226130300.GB2800@duo.ucw.cz/
Tested on multiple ARM TV boxes (H96 Max, Magicsee N5, Tanix TX3 Mini,
Tanix TX6, X92, X96 Max) across different SoC platforms (Rockchip, Amlogic,
Allwinner) in both I2C and SPI configurations.
Dependencies:
- CONFIG_NEW_LEDS, CONFIG_LEDS_CLASS (required)
- CONFIG_INPUT, CONFIG_INPUT_MATRIXKMAP (for keypad support)
- CONFIG_I2C or CONFIG_SPI (depending on hardware interface)
Optional LED trigger modules for advanced functionality:
- CONFIG_LEDS_TRIGGER_TIMER for blinking elements.
- CONFIG_LEDS_TRIGGER_NETDEV for network activity indication.
- CONFIG_USB_LEDS_TRIGGER_USBPORT for USB activity indication.
User space utilities available at: https://github.com/jefflessard/tm16xx-display
v3:
- Update vendor prefixes with documented rationale, in a single patch,
per maintainer feedback
- Refine device tree bindings per maintainer feedback:
* Update compatible string ordering and fallback logic
* Improve YAML descriptions for clarity and maintain 80-column wrapping
* Replace digit-specific properties with clearer digits container node
* Add explicit constraints for reg and segments properties in container nodes
* Clarify addressing schemes for icons (2-cell) and digits (1-cell + mapping)
* Fix conditional SPI properties handling
* Document rationale for spi-3wire property (required for supported SPI chips)
* Expand DT examples to cover typical and transposed display layouts
- Code reformat from clang-format to kernel coding style per maintainer feedback
- Fix conditional CONFIG_I2C/CONFIG_SPI compilation issues per kernel test robot
- Add keypad scanning with configurable keymap (new feature)
- Add support for TM1638 controller extending hardware compatibility
- Add support for default and maximum brightness properties
- Fix multi-instance device handling and add optional label property
- Allocate DMA-safe SPI buffer for hardware compatibility
- Enhance error handling with comprehensive kernel-doc documentation
- Remove sysfs runtime reconfiguration, enforce device tree-only configuration
v2:
- Fix duplicate label in dt-bindings examples
- Rename device tree property prefixes to use titanmec vendor prefix
Jean-François Lessard (4):
dt-bindings: vendor-prefixes: Add fdhisi, titanmec, princeton,
winrise, wxicore
dt-bindings: auxdisplay: add Titan Micro Electronics TM16xx
auxdisplay: Add TM16xx 7-segment LED matrix display controllers driver
MAINTAINERS: Add entry for TM16xx driver
.../bindings/auxdisplay/titanmec,tm16xx.yaml | 471 +++++
.../devicetree/bindings/vendor-prefixes.yaml | 10 +
MAINTAINERS | 6 +
drivers/auxdisplay/Kconfig | 20 +
drivers/auxdisplay/Makefile | 1 +
drivers/auxdisplay/tm16xx.c | 1781 +++++++++++++++++
6 files changed, 2289 insertions(+)
create mode 100644 Documentation/devicetree/bindings/auxdisplay/titanmec,tm16xx.yaml
create mode 100644 drivers/auxdisplay/tm16xx.c
--
2.43.0
Powered by blists - more mailing lists