summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/solomon
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2022-04-07 01:29:56 +0800
committerJavier Martinez Canillas <javierm@redhat.com>2022-04-07 15:26:04 +0200
commit7cee157b4225089cb831f77515f9c4f4f7c24182 (patch)
tree754d754afd3e7feefae4a976ca92673ecf7d3c3d /drivers/gpu/drm/solomon
parentb0daaa5cfaa561477b8d3d10fb0697a2cce0c2ba (diff)
downloadlinux-7cee157b4225089cb831f77515f9c4f4f7c24182.tar.bz2
drm/ssd130x: Add support for SINO WEALTH SH1106
The SINO WEALTH SH1106 is an OLED display driver that is somewhat compatible with the SSD1306. It supports a slightly wider display, at 132 instead of 128 pixels. The basic commands are the same, but the SH1106 doesn't support the horizontal or vertical address modes. Add support for this display driver. The default values for some of the hardware settings are taken from the datasheet. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220406172956.3953-5-wens@kernel.org
Diffstat (limited to 'drivers/gpu/drm/solomon')
-rw-r--r--drivers/gpu/drm/solomon/Kconfig9
-rw-r--r--drivers/gpu/drm/solomon/ssd130x-i2c.c11
2 files changed, 16 insertions, 4 deletions
diff --git a/drivers/gpu/drm/solomon/Kconfig b/drivers/gpu/drm/solomon/Kconfig
index 6230369505c9..8c0a0c788385 100644
--- a/drivers/gpu/drm/solomon/Kconfig
+++ b/drivers/gpu/drm/solomon/Kconfig
@@ -5,9 +5,9 @@ config DRM_SSD130X
select DRM_GEM_SHMEM_HELPER
select DRM_KMS_HELPER
help
- DRM driver for the SSD1305, SSD1306, SSD1307 and SSD1309 Solomon
- OLED controllers. This is only for the core driver, a driver for
- the appropriate bus transport in your chip also must be selected.
+ DRM driver for the SSD130x Solomon and SINO WEALTH SH110x OLED
+ controllers. This is only for the core driver, a driver for the
+ appropriate bus transport in your chip also must be selected.
If M is selected the module will be called ssd130x.
@@ -16,6 +16,7 @@ config DRM_SSD130X_I2C
depends on DRM_SSD130X && I2C
select REGMAP_I2C
help
- Say Y here if the SSD130x OLED display is connected via I2C bus.
+ Say Y here if the SSD130x or SH110x OLED display is connected via
+ I2C bus.
If M is selected the module will be called ssd130x-i2c.
diff --git a/drivers/gpu/drm/solomon/ssd130x-i2c.c b/drivers/gpu/drm/solomon/ssd130x-i2c.c
index 3126aeda4ced..d099b241dd3f 100644
--- a/drivers/gpu/drm/solomon/ssd130x-i2c.c
+++ b/drivers/gpu/drm/solomon/ssd130x-i2c.c
@@ -53,6 +53,13 @@ static void ssd130x_i2c_shutdown(struct i2c_client *client)
ssd130x_shutdown(ssd130x);
}
+static struct ssd130x_deviceinfo ssd130x_sh1106_deviceinfo = {
+ .default_vcomh = 0x40,
+ .default_dclk_div = 1,
+ .default_dclk_frq = 5,
+ .page_mode_only = 1,
+};
+
static struct ssd130x_deviceinfo ssd130x_ssd1305_deviceinfo = {
.default_vcomh = 0x34,
.default_dclk_div = 1,
@@ -81,6 +88,10 @@ static struct ssd130x_deviceinfo ssd130x_ssd1309_deviceinfo = {
static const struct of_device_id ssd130x_of_match[] = {
{
+ .compatible = "sinowealth,sh1106-i2c",
+ .data = &ssd130x_sh1106_deviceinfo,
+ },
+ {
.compatible = "solomon,ssd1305fb-i2c",
.data = &ssd130x_ssd1305_deviceinfo,
},