Devicetree
 help / color / mirror / Atom feed
From: Amit Barzilai <amit.barzilai22@gmail.com>
To: Javier Martinez Canillas <javierm@redhat.com>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@intel.com>,
	Fabio Piparo <holofermes@gmail.com>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Amit Barzilai <amit.barzilai22@gmail.com>
Subject: [PATCH v4 0/6] drm/ssd130x: Add support for the Solomon SSD1351 OLED controller
Date: Tue, 18 Aug 2026 11:06:20 +0300	[thread overview]
Message-ID: <20260818080626.30430-1-amit.barzilai22@gmail.com> (raw)

This series adds support for the Solomon SSD1351, a 128x128 65k-color
RGB OLED controller, to the ssd130x DRM driver:

  - Patch 1 adds the device tree binding.

  - Patch 2 switches the SSD133X family from RGB332 to RGB565, bringing
    65k color to the SSD1331.

  - Patches 3 to 5 are preparatory cleanups requested on v3 [1]: constify
    the ssd130x_write_data() 'values' parameter, convert
    ssd130x_spi_id[] to C99 initializers, and reimplement
    ssd130x_write_cmd() as a variadic wrapper around
    ssd130x_write_cmds() so a single loop remains.

  - Patch 6 adds the SSD1351 as a new SSD135X_FAMILY. It gets its own
    primary plane update/disable, encoder enable and backlight
    callbacks; only the callbacks with no family-specific logic
    (ssd133x_primary_plane_atomic_check(), ssd133x_crtc_atomic_check()
    and ssd130x_encoder_atomic_disable()) are reused as is.

Testing:

  - Patches 1, 3, 4, 5 and 6 are tested on an SSD1351.
  - The SSD1331 RGB565 change (patch 2) was kindly tested by Javier on
    his SSD1331.

Based on drm-misc-next, as requested on v3, now that the ssd132x/ssd133x
column and row end address fixes have landed there.

Thanks to Javier, Andy, Krzysztof and Fabio for the reviews.

[1] v3 of this series:
    https://lore.kernel.org/dri-devel/20260704080925.75113-1-amit.barzilai22@gmail.com
[2] Command parameter path discussion:
    https://lore.kernel.org/dri-devel/20260811122603.30773-1-amit.barzilai22@gmail.com

---

Changes since v3:
- Rebase on drm-misc-next (per Javier). The v3 dependency on the
  ssd133x update_rect end-address fix is gone, it is upstream now.
- Split the ssd130x_write_data() constification into its own
  preparatory patch (per Javier), patch 3.
- Split the ssd130x_write_cmd()/ssd130x_write_cmds() unification into
  its own preparatory patch (per Javier), patch 5. It is a pure
  refactor: the bytes sent and the bus transactions used to send them
  are unchanged for every chip on both transports.
- New patch 4: convert ssd130x_spi_id[] to C99 initializers (per Andy).
- Patch 6: give the SSD135X family its own .atomic_update,
  .atomic_disable, encoder .atomic_enable and backlight callbacks
  instead of branching on the family inside the ssd133x ones, and drop
  the shared ssd133x_write_pixels() helper (per Javier).
- Patch 6: the SSD1351 command parameter path is now driven by a
  cmd_params_are_data flag in struct ssd130x_deviceinfo rather than a
  hardcoded family_id check (per Javier). It stays in ssd130x_write_cmds()
  instead of moving to ssd130x-spi.c as originally agreed; see [2] for
  the reasoning. In short, SSD13XX_COMMAND is the I2C control byte 0x80,
  whose Co=1 bit promises exactly one payload byte, so routing command
  buffers through regmap_raw_write() would have changed I2C command
  framing for every existing chip. Keeping the split in the core also
  avoids duplicating it in ssd130x-i2c.c if an I2C part ever needs it.
  Fabio reports the SSD1322 needs the same flag and plans to send
  SSD1322 support on top of this series.
- Patch 6: the SSD135X family now registers a backlight device like the
  other families, using ssd135x_set_contrast(). v3 skipped backlight
  registration for the family because SSD13XX_CONTRAST (0x81) does not
  exist on the SSD1351; the per-family backlight rework that landed
  upstream in the meantime made a per-family callback the natural fit.
  The SSD1351 takes all three color channels as parameters of a single
  command (0xc1), which ssd135x_set_contrast() handles.
- Patch 6: drop the post-reset delay comment in ssd130x_reset() (per
  Javier), it documented a mistake rather than the code.
- Collect Reviewed-by tags on patches 1, 2 and 3.

Amit Barzilai (6):
  dt-bindings: display: Add Solomon SSD1351 OLED controller
  drm/ssd130x: Change SSD133X color format to RGB565 from RGB332
  drm/ssd130x: Constify ssd130x_write_data() 'values' parameter
  drm/ssd130x: Replace positional ssd130x_spi_id[] initialization with
    C99
  drm/ssd130x: Implement ssd130x_write_cmd() on top of
    ssd130x_write_cmds()
  drm/ssd130x: Add SSD135X_FAMILY and SSD1351 support

 .../bindings/display/solomon,ssd1351.yaml     |  42 ++
 drivers/gpu/drm/solomon/ssd130x-spi.c         |  25 +-
 drivers/gpu/drm/solomon/ssd130x.c             | 414 +++++++++++++++---
 drivers/gpu/drm/solomon/ssd130x.h             |  10 +-
 4 files changed, 426 insertions(+), 65 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/solomon,ssd1351.yaml


base-commit: 09b47186a4164f3aaa3591313f80794443117342
-- 
2.55.0


             reply	other threads:[~2026-08-18  8:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18  8:06 Amit Barzilai [this message]
2026-08-18  8:06 ` [PATCH v4 1/6] dt-bindings: display: Add Solomon SSD1351 OLED controller Amit Barzilai
2026-08-18  8:06 ` [PATCH v4 2/6] drm/ssd130x: Change SSD133X color format to RGB565 from RGB332 Amit Barzilai
2026-08-18  8:18   ` sashiko-bot
2026-08-18  8:36   ` Andy Shevchenko
2026-08-18 18:58     ` Amit Barzilai
2026-08-18  8:06 ` [PATCH v4 3/6] drm/ssd130x: Constify ssd130x_write_data() 'values' parameter Amit Barzilai
2026-08-18  8:37   ` Andy Shevchenko
2026-08-18  8:06 ` [PATCH v4 4/6] drm/ssd130x: Replace positional ssd130x_spi_id[] initialization with C99 Amit Barzilai
2026-08-18  8:40   ` Andy Shevchenko
2026-08-18 19:25     ` Amit Barzilai
2026-08-20  9:06       ` Amit Barzilai
2026-08-18  8:06 ` [PATCH v4 5/6] drm/ssd130x: Implement ssd130x_write_cmd() on top of ssd130x_write_cmds() Amit Barzilai
2026-08-18  8:43   ` Andy Shevchenko
2026-08-18 19:34     ` Amit Barzilai
2026-08-18  8:06 ` [PATCH v4 6/6] drm/ssd130x: Add SSD135X_FAMILY and SSD1351 support Amit Barzilai
2026-08-18  8:24   ` sashiko-bot
2026-08-18  8:55   ` Andy Shevchenko
2026-08-18 20:13     ` Amit Barzilai

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=20260818080626.30430-1-amit.barzilai22@gmail.com \
    --to=amit.barzilai22@gmail.com \
    --cc=airlied@gmail.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=holofermes@gmail.com \
    --cc=javierm@redhat.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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