Commit d1d511d5 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Sam Ravnborg

drm: tiny: st7735r: Add support for Okaya RH128128T

Add support for the Okaya RH128128T display to the st7735r driver on
DT-enabled systems.

The RH128128T is a 128x128 1.44" TFT display driven by a Sitronix
ST7715R TFT Controller/Driver.  The latter is very similar to the
ST7735R, and can be handled by the existing st7735r driver.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200115124548.3951-6-geert+renesas@glider.be
parent 98823f37
...@@ -85,14 +85,16 @@ config TINYDRM_ST7586 ...@@ -85,14 +85,16 @@ config TINYDRM_ST7586
If M is selected the module will be called st7586. If M is selected the module will be called st7586.
config TINYDRM_ST7735R config TINYDRM_ST7735R
tristate "DRM support for Sitronix ST7735R display panels" tristate "DRM support for Sitronix ST7715R/ST7735R display panels"
depends on DRM && SPI depends on DRM && SPI
select DRM_KMS_HELPER select DRM_KMS_HELPER
select DRM_KMS_CMA_HELPER select DRM_KMS_CMA_HELPER
select DRM_MIPI_DBI select DRM_MIPI_DBI
select BACKLIGHT_CLASS_DEVICE select BACKLIGHT_CLASS_DEVICE
help help
DRM driver Sitronix ST7735R with one of the following LCDs: DRM driver for Sitronix ST7715R/ST7735R with one of the following
* JD-T18003-T01 1.8" 128x160 TFT LCDs:
* Jianda JD-T18003-T01 1.8" 128x160 TFT
* Okaya RH128128T 1.44" 128x128 TFT
If M is selected the module will be called st7735r. If M is selected the module will be called st7735r.
// SPDX-License-Identifier: GPL-2.0+ // SPDX-License-Identifier: GPL-2.0+
/* /*
* DRM driver for Sitronix ST7735R panels * DRM driver for display panels connected to a Sitronix ST7715R or ST7735R
* display controller in SPI mode.
* *
* Copyright 2017 David Lechner <david@lechnology.com> * Copyright 2017 David Lechner <david@lechnology.com>
* Copyright (C) 2019 Glider bvba * Copyright (C) 2019 Glider bvba
...@@ -144,6 +145,11 @@ static const struct st7735r_cfg jd_t18003_t01_cfg = { ...@@ -144,6 +145,11 @@ static const struct st7735r_cfg jd_t18003_t01_cfg = {
.write_only = true, .write_only = true,
}; };
static const struct st7735r_cfg rh128128t_cfg = {
.mode = { DRM_SIMPLE_MODE(128, 128, 25, 26) },
.left_offset = 2,
.top_offset = 3,
.rgb = true,
}; };
DEFINE_DRM_GEM_CMA_FOPS(st7735r_fops); DEFINE_DRM_GEM_CMA_FOPS(st7735r_fops);
...@@ -163,6 +169,7 @@ static struct drm_driver st7735r_driver = { ...@@ -163,6 +169,7 @@ static struct drm_driver st7735r_driver = {
static const struct of_device_id st7735r_of_match[] = { static const struct of_device_id st7735r_of_match[] = {
{ .compatible = "jianda,jd-t18003-t01", .data = &jd_t18003_t01_cfg }, { .compatible = "jianda,jd-t18003-t01", .data = &jd_t18003_t01_cfg },
{ .compatible = "okaya,rh128128t", .data = &rh128128t_cfg },
{ }, { },
}; };
MODULE_DEVICE_TABLE(of, st7735r_of_match); MODULE_DEVICE_TABLE(of, st7735r_of_match);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment