From: Chen-Yu Tsai <wens@kernel.org>
To: Javier Martinez Canillas <javierm@redhat.com>,
Maxime Ripard <mripard@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Cc: Chen-Yu Tsai <wens@csie.org>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] drm: ssd130x: Add support for SINO WEALTH SH1106
Date: Thu, 31 Mar 2022 03:08:46 +0800 [thread overview]
Message-ID: <20220330190846.13997-5-wens@kernel.org> (raw)
In-Reply-To: <20220330190846.13997-1-wens@kernel.org>
From: Chen-Yu Tsai <wens@csie.org>
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>
---
drivers/gpu/drm/solomon/ssd130x-i2c.c | 11 +++++++++++
1 file changed, 11 insertions(+)
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,
@@ -80,6 +87,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,
--
2.34.1
next prev parent reply other threads:[~2022-03-30 19:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 19:08 [PATCH 0/4] drm: ssd130x: Add support for SINO WEALTH SH1106 Chen-Yu Tsai
2022-03-30 19:08 ` [PATCH 1/4] dt-bindings: vendor-prefixes: Add prefix for SINO WEALTH Eletronics Ltd Chen-Yu Tsai
2022-04-01 9:29 ` Javier Martinez Canillas
2022-04-01 13:43 ` Krzysztof Kozlowski
2022-03-30 19:08 ` [PATCH 2/4] dt-bindings: display: ssd1307fb: Add entry for SINO WEALTH SH1106 Chen-Yu Tsai
2022-04-01 9:32 ` Javier Martinez Canillas
2022-04-04 15:06 ` Chen-Yu Tsai
2022-04-04 15:48 ` Javier Martinez Canillas
2022-04-04 16:11 ` Chen-Yu Tsai
2022-04-04 16:58 ` Javier Martinez Canillas
2022-04-01 13:44 ` Krzysztof Kozlowski
2022-03-30 19:08 ` [PATCH 3/4] drm: ssd130x: Support page addressing mode Chen-Yu Tsai
2022-04-01 10:02 ` Javier Martinez Canillas
2022-03-30 19:08 ` Chen-Yu Tsai [this message]
2022-04-01 10:10 ` [PATCH 4/4] drm: ssd130x: Add support for SINO WEALTH SH1106 Javier Martinez Canillas
2022-04-04 16:35 ` Chen-Yu Tsai
2022-04-04 16:41 ` Javier Martinez Canillas
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=20220330190846.13997-5-wens@kernel.org \
--to=wens@kernel.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=robh+dt@kernel.org \
--cc=wens@csie.org \
/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;
as well as URLs for NNTP newsgroup(s).