Skip to content

drm/sitronix/st7920: Add support for the ST7920 controller

Iker Pedrosa dri-devel linux-devicetree lkml 7 versions – Applied

Status from this message: Pushed to drm-misc (drm-misc-next). Thanks!

Get series with b4
b4 am [email protected] change-id 20250806-st7920-e7aba32b3ab6

Versions newest first

  1. v7 Latest3 patches 1 replyApplied
  2. v63 patches 3 repliesSuperseded
  3. v53 patches 2 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v43 patches5 repliesSuperseded
v33 patches3 repliesSuperseded
v23 patches2 repliesSuperseded
v13 patches9 repliesSuperseded

Changes in v7 from the cover letter

- Fix Makefile typo and checkpatch --strict warnings.
- Update header paths and add missing includes.
- Remove unused DRIVER_DATE.
- Link to v6: https://lore.kernel.org/r/[email protected]

Patches in v7 Applied

#Subject and filesSizeRepliesApplied
1/3dt-bindings: display: sitronix,st7920: Add DT schemaDocumentation/devicetree/bindings/display/sitronix,st7920.yaml+58 -00 replies
2/3drm: Add driver for Sitronix ST7920 LCD displaysdrivers/gpu/drm/sitronix/Kconfig drivers/gpu/drm/sitronix/Makefile drivers/gpu/drm/sitronix/st7920.c+878 -00 replies
3/3MAINTAINERS: Add entry for Sitronix ST7920 driverMAINTAINERS+7 -00 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchKrzysztof KozlowskiThomas ZimmermannJavier Martinez Canillas
1/3R-b
2/3R-b R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v7 thread

Cover letter [PATCH v7 0/3] drm/sitronix/st7920: Add support for the ST7920 controller

This patch-series adds support for the Sitronix ST7920 controller, which is a monochrome dot-matrix graphical LCD controller that has SPI and parallel interfaces.

The st7920 driver only has support for SPI so displays using other transport protocols are currently not supported.

* Patch #1 adds the driver.
* Patch #2 adds the DT binding schema.
* Patch #3 adds the MAINTAINERS information.

---
Changes in v7:
- Fix Makefile typo and checkpatch --strict warnings.
- Update header paths and add missing includes.
- Remove unused DRIVER_DATE.
- Link to v6: https://lore.kernel.org/r/[email protected]

Changes in v6:
- Initialize spi7920_error structure.
- Call drm_dev_exit() when appropriate.
- Link to v5: https://lore.kernel.org/r/[email protected]

Changes in v5:
- Remove unused device variant structures and hard-code display resolution.
- Fix GPIO reset logic to correctly handle logical levels.
- Use kzalloc() instead of kmemdup() for atomic state duplication.
- Refactor atomic update to integrate cpu access with the damage loop.
- Rename macros to avoid the reserved DRM_ prefix.
- Use DRM logging helpers instead of generic device logging.
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- Added definitions for the VDD power supply and the XRESET GPIO line, which were identified as minimum requirements from the datasheet.
- The error handling strategy has been refactored to propagate an error-tracking struct from the caller.
- The atomic enable/disable logic has been correctly moved from drm_encoder_helper_funcs to drm_crtc_helper_funcs, as the functionality is bound to the CRTC.
- Added drm_dev_enter() and drm_dev_exit() calls to the atomic_enable and atomic_disable helpers to correctly manage the device's runtime power state.
- Renamed macro definitions to match the correct terminology.
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Reorganize the patch documenting compatible (DT bindings) before their use.
- Drop reduntant information from DT bindings.
- Use a goto label to ensure drm_dev_exit() is called in the error path of drm_gem_fb_begin_cpu_access().
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Refactor SPI communication:
* Internalize error handling and delays within the st7920_spi_write() helper.
* Split the main SPI write function into smaller, command-specific helpers for clarity.
- Improve DRM/KMS logic:
* Relocate CPU access calls (drm_gem_fb...) to the atomic_update hook.
* Use standard DRM helpers (drm_crtc_helper_mode_valid_fixed and drm_connector_helper_get_modes_fixed) for mode validation and creation.
- General code cleanup:
* Remove dead code related to ST7920_FAMILY.
* Replace WARN_ON() with drm_WARN_ON_ONCE().
* Ensure single variable assignments per line.
- Fix probe initialization order:
* Move spi_set_drvdata() and st7920_init() to occur before device registration.
- Devicetree:
* Update bindings to address feedback from review (e.g., reference common SPI properties).
- MAINTAINERS:
* Add a proper commit message to the patch.
- Link to v1: https://lore.kernel.org/r/[email protected]
---

---
Iker Pedrosa (3):
dt-bindings: display: sitronix,st7920: Add DT schema
drm: Add driver for Sitronix ST7920 LCD displays
MAINTAINERS: Add entry for Sitronix ST7920 driver

 .../bindings/display/sitronix,st7920.yaml          |  58 ++
 MAINTAINERS                                        |   7 +
 drivers/gpu/drm/sitronix/Kconfig                   |  10 +
 drivers/gpu/drm/sitronix/Makefile                  |   1 +
 drivers/gpu/drm/sitronix/st7920.c                  | 867 +++++++++++++++++++++
 5 files changed, 943 insertions(+)

---
base-commit: c571cb70e1ed43ee543c70151e61a001ab2eefa2
change-id: 20250806-st7920-e7aba32b3ab6

Best regards,

Signature · 1 line
Iker Pedrosa <[email protected]>