public inbox for linux-rockchip@lists.infradead.org
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@edgeble.ai>
To: Heiko Stuebner <heiko@sntech.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org
Cc: Jagan Teki <jagan@edgeble.ai>,
	dri-devel@lists.freedesktop.org, Sandy Huang <hjc@rock-chips.com>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Subject: [PATCH 08/14] drm/rockchip: dsi: Add rv1126 MIPI DSI support
Date: Mon, 31 Jul 2023 16:30:06 +0530	[thread overview]
Message-ID: <20230731110012.2913742-9-jagan@edgeble.ai> (raw)
In-Reply-To: <20230731110012.2913742-1-jagan@edgeble.ai>

RV1126 MIPI DSI supports V1.2 DPHY with 4 lanes and 1Gbps transfer
rate for lane.

Add support for it.

Signed-off-by: Jagan Teki <jagan@edgeble.ai>
---
Cc: dri-devel@lists.freedesktop.org
Cc: Sandy Huang <hjc@rock-chips.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>

 .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c   | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
index 0100162a73b2..8bafb2a2747f 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
@@ -198,6 +198,11 @@
 #define RK3568_DSI1_TURNDISABLE		BIT(2)
 #define RK3568_DSI1_FORCERXMODE		BIT(0)
 
+#define RV1126_GRF_DSIPHY_CON		0x10220
+#define RV1126_DSI_FORCETXSTOPMODE	(0xf << 4)
+#define RV1126_DSI_TURNDISABLE		BIT(2)
+#define RV1126_DSI_FORCERXMODE		BIT(0)
+
 #define HIWORD_UPDATE(val, mask)	(val | (mask) << 16)
 
 enum {
@@ -1651,6 +1656,18 @@ static const struct rockchip_dw_dsi_chip_data rk3568_chip_data[] = {
 	{ /* sentinel */ }
 };
 
+static const struct rockchip_dw_dsi_chip_data rv1126_chip_data[] = {
+	{
+		.reg = 0xffb30000,
+		.lanecfg1_grf_reg = RV1126_GRF_DSIPHY_CON,
+		.lanecfg1 = HIWORD_UPDATE(0, RV1126_DSI_TURNDISABLE |
+					     RV1126_DSI_FORCERXMODE |
+					     RV1126_DSI_FORCETXSTOPMODE),
+		.max_data_lanes = 4,
+	},
+	{ /* sentinel */ }
+};
+
 static const struct of_device_id dw_mipi_dsi_rockchip_dt_ids[] = {
 	{
 	 .compatible = "rockchip,px30-mipi-dsi",
@@ -1664,6 +1681,9 @@ static const struct of_device_id dw_mipi_dsi_rockchip_dt_ids[] = {
 	}, {
 	 .compatible = "rockchip,rk3568-mipi-dsi",
 	 .data = &rk3568_chip_data,
+	}, {
+	 .compatible = "rockchip,rv1126-mipi-dsi",
+	 .data = &rv1126_chip_data,
 	},
 	{ /* sentinel */ }
 };
-- 
2.25.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  parent reply	other threads:[~2023-07-31 11:01 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31 10:59 [PATCH 00/14] drm: rockchip: Add RV1126 Display (MIPI DSI) support Jagan Teki
2023-07-31 10:59 ` [PATCH 01/14] genpd: rockchip: Add PD_VO entry for rv1126 Jagan Teki
2023-07-31 20:48   ` Heiko Stübner
2023-08-12 12:57     ` Heiko Stübner
2023-08-14 11:45       ` Ulf Hansson
2023-07-31 11:00 ` [PATCH 02/14] clk: rockchip: rv1126: Add PD_VO clock tree Jagan Teki
2023-07-31 11:00 ` [PATCH 03/14] dt-bindings: phy: rockchip-inno-dsidphy: Document rv1126 Jagan Teki
2023-07-31 20:49   ` Heiko Stübner
2023-08-11 17:52   ` Rob Herring
2023-07-31 11:00 ` [PATCH 04/14] phy: rockchip: inno-dsidphy: Add rv1126 support Jagan Teki
2023-07-31 20:49   ` Heiko Stübner
2023-07-31 11:00 ` [PATCH 05/14] dt-bindings: display: rockchip-vop: Document rv1126 vop Jagan Teki
2023-08-01 21:07   ` Conor Dooley
2023-08-02 14:37     ` Jagan Teki
2023-08-02 15:12       ` Conor Dooley
2023-07-31 11:00 ` [PATCH 06/14] drm/rockchip: vop: Add rv1126 vop_lite support Jagan Teki
2023-07-31 11:00 ` [PATCH 07/14] dt-bindings: display: rockchip-dw-mipi-dsi: Document rv1126 DSI Jagan Teki
2023-08-01 21:05   ` Conor Dooley
2023-07-31 11:00 ` Jagan Teki [this message]
2023-07-31 11:00 ` [PATCH 09/14] ARM: dts: rockchip: rv1126: Add PD_VO entry Jagan Teki
2023-07-31 11:00 ` [PATCH 10/14] ARM: dts: rockchip: rv1126: Add VOP_LITE support Jagan Teki
2023-07-31 11:00 ` [PATCH 11/14] ARM: dts: rockchip: rv1126: Add MIPI DSI pipeline Jagan Teki
2023-07-31 11:00 ` [PATCH 12/14] ARM: dts: rockchip: rv1126: Add Edgeble Neu2 IO DSI overlay Jagan Teki
2023-07-31 11:00 ` [PATCH 13/14] ARM: dts: rockchip: Add Radxa Display 10HD overlay Jagan Teki
2023-07-31 11:00 ` [PATCH 14/14] ARM: dts: rockchip: Add Radxa Display 8HD overlay Jagan Teki
2023-08-10 21:08 ` (subset) [PATCH 00/14] drm: rockchip: Add RV1126 Display (MIPI DSI) support Heiko Stuebner
2023-08-10 21:28 ` Heiko Stuebner
2023-08-12 12:54 ` Heiko Stuebner
2023-08-12 13:00 ` Heiko Stuebner

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=20230731110012.2913742-9-jagan@edgeble.ai \
    --to=jagan@edgeble.ai \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.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