From: Samuel Holland <samuel@sholland.org>
To: Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Maxime Ripard <mripard@kernel.org>
Cc: Samuel Holland <samuel@sholland.org>,
Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev
Subject: [PATCH 08/10] drm/sun4i: Add support for D1 TCON TOP
Date: Sun, 10 Apr 2022 23:34:20 -0500 [thread overview]
Message-ID: <20220411043423.37333-9-samuel@sholland.org> (raw)
In-Reply-To: <20220411043423.37333-1-samuel@sholland.org>
D1 has a TCON TOP with TCON TV0 and DSI, but no TCON TV1. This puts the
DSI clock name at index 1 in clock-output-names. Support this by only
incrementing the index for clocks that are actually supported.
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
drivers/gpu/drm/sun4i/sun8i_tcon_top.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
index 1b9b8b48f4a7..da97682b6835 100644
--- a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
+++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
@@ -189,22 +189,23 @@ static int sun8i_tcon_top_bind(struct device *dev, struct device *master,
* if TVE is active on each TCON TV. If it is, mux should be switched
* to TVE clock parent.
*/
+ i = 0;
clk_data->hws[CLK_TCON_TOP_TV0] =
sun8i_tcon_top_register_gate(dev, "tcon-tv0", regs,
&tcon_top->reg_lock,
- TCON_TOP_TCON_TV0_GATE, 0);
+ TCON_TOP_TCON_TV0_GATE, i++);
if (quirks->has_tcon_tv1)
clk_data->hws[CLK_TCON_TOP_TV1] =
sun8i_tcon_top_register_gate(dev, "tcon-tv1", regs,
&tcon_top->reg_lock,
- TCON_TOP_TCON_TV1_GATE, 1);
+ TCON_TOP_TCON_TV1_GATE, i++);
if (quirks->has_dsi)
clk_data->hws[CLK_TCON_TOP_DSI] =
sun8i_tcon_top_register_gate(dev, "dsi", regs,
&tcon_top->reg_lock,
- TCON_TOP_TCON_DSI_GATE, 2);
+ TCON_TOP_TCON_DSI_GATE, i++);
for (i = 0; i < CLK_NUM; i++)
if (IS_ERR(clk_data->hws[i])) {
@@ -272,6 +273,10 @@ static const struct sun8i_tcon_top_quirks sun8i_r40_tcon_top_quirks = {
.has_dsi = true,
};
+static const struct sun8i_tcon_top_quirks sun20i_d1_tcon_top_quirks = {
+ .has_dsi = true,
+};
+
static const struct sun8i_tcon_top_quirks sun50i_h6_tcon_top_quirks = {
/* Nothing special */
};
@@ -282,6 +287,10 @@ const struct of_device_id sun8i_tcon_top_of_table[] = {
.compatible = "allwinner,sun8i-r40-tcon-top",
.data = &sun8i_r40_tcon_top_quirks
},
+ {
+ .compatible = "allwinner,sun20i-d1-tcon-top",
+ .data = &sun20i_d1_tcon_top_quirks
+ },
{
.compatible = "allwinner,sun50i-h6-tcon-top",
.data = &sun50i_h6_tcon_top_quirks
--
2.35.1
next prev parent reply other threads:[~2022-04-11 4:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 4:34 [PATCH 00/10] drm/sun4i: Allwinner D1 Display Engine 2.0 Support Samuel Holland
2022-04-11 4:34 ` [PATCH 01/10] dt-bindings: display: Separate clock item lists by compatible Samuel Holland
2022-04-11 6:37 ` Krzysztof Kozlowski
2022-04-11 4:34 ` [PATCH 02/10] dt-bindings: display: Add D1 display engine compatibles Samuel Holland
2022-04-11 6:38 ` Krzysztof Kozlowski
2022-04-11 4:34 ` [PATCH 03/10] drm/sun4i: Remove obsolete references to PHYS_OFFSET Samuel Holland
2022-04-11 15:37 ` Jernej Škrabec
2022-04-12 2:56 ` Samuel Holland
2022-04-11 4:34 ` [PATCH 04/10] drm/sun4i: Allow building the driver on RISC-V Samuel Holland
2022-04-11 15:38 ` Jernej Škrabec
2022-04-11 21:15 ` kernel test robot
2022-04-12 10:00 ` kernel test robot
2022-04-11 4:34 ` [PATCH 05/10] drm/sun4i: csc: Add support for the new MMIO layout Samuel Holland
2022-04-11 15:40 ` Jernej Škrabec
2022-04-11 4:34 ` [PATCH 06/10] drm/sun4i: Allow VI layers to be primary planes Samuel Holland
2022-04-11 15:48 ` Jernej Škrabec
2022-04-11 4:34 ` [PATCH 07/10] drm/sun4i: Add support for D1 mixers Samuel Holland
2022-04-11 15:51 ` Jernej Škrabec
2022-04-11 4:34 ` Samuel Holland [this message]
2022-04-11 4:34 ` [PATCH 09/10] drm/sun4i: Add support for D1 TCONs Samuel Holland
2022-04-11 4:34 ` [PATCH 10/10] drm/sun4i: Add compatible for D1 display engine Samuel Holland
2022-04-11 15:54 ` Jernej Škrabec
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=20220411043423.37333-9-samuel@sholland.org \
--to=samuel@sholland.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--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).