All of lore.kernel.org
 help / color / mirror / Atom feed
From: WeiHao Li <cn.liweihao@gmail.com>
To: heiko@sntech.de, robh@kernel.org
Cc: hjc@rock-chips.com, andy.yan@rock-chips.com, krzk+dt@kernel.org,
	conor+dt@kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org, WeiHao Li <cn.liweihao@gmail.com>
Subject: [PATCH v2 1/8] drm/rockchip: dsi: Add support for RK3368
Date: Fri,  5 Sep 2025 10:56:25 +0800	[thread overview]
Message-ID: <20250905025632.222422-2-cn.liweihao@gmail.com> (raw)
In-Reply-To: <20250905025632.222422-1-cn.liweihao@gmail.com>

RK3368 has DesignWare MIPI DSI controller and an external inno D-PHY.

Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
---
 .../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 5523911b9..de8405ee8 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
@@ -163,6 +163,11 @@
 #define RK3288_DSI0_LCDC_SEL		BIT(6)
 #define RK3288_DSI1_LCDC_SEL		BIT(9)
 
+#define RK3368_GRF_SOC_CON7		0x41c
+#define RK3368_DSI_FORCETXSTOPMODE	(0xf << 7)
+#define RK3368_DSI_FORCERXMODE		BIT(6)
+#define RK3368_DSI_TURNDISABLE		BIT(5)
+
 #define RK3399_GRF_SOC_CON20		0x6250
 #define RK3399_DSI0_LCDC_SEL		BIT(0)
 #define RK3399_DSI1_LCDC_SEL		BIT(4)
@@ -1528,6 +1533,18 @@ static const struct rockchip_dw_dsi_chip_data rk3288_chip_data[] = {
 	{ /* sentinel */ }
 };
 
+static const struct rockchip_dw_dsi_chip_data rk3368_chip_data[] = {
+	{
+		.reg = 0xff960000,
+		.lanecfg1_grf_reg = RK3368_GRF_SOC_CON7,
+		.lanecfg1 = FIELD_PREP_WM16_CONST((RK3368_DSI_TURNDISABLE |
+						RK3368_DSI_FORCETXSTOPMODE |
+						RK3368_DSI_FORCERXMODE), 0),
+		.max_data_lanes = 4,
+	},
+	{ /* sentinel */ }
+};
+
 static int rk3399_dphy_tx1rx1_init(struct phy *phy)
 {
 	struct dw_mipi_dsi_rockchip *dsi = phy_get_drvdata(phy);
@@ -1687,6 +1704,9 @@ static const struct of_device_id dw_mipi_dsi_rockchip_dt_ids[] = {
 	}, {
 	 .compatible = "rockchip,rk3288-mipi-dsi",
 	 .data = &rk3288_chip_data,
+	}, {
+	 .compatible = "rockchip,rk3368-mipi-dsi",
+	 .data = &rk3368_chip_data,
 	}, {
 	 .compatible = "rockchip,rk3399-mipi-dsi",
 	 .data = &rk3399_chip_data,
-- 
2.39.5



WARNING: multiple messages have this Message-ID (diff)
From: WeiHao Li <cn.liweihao@gmail.com>
To: heiko@sntech.de, robh@kernel.org
Cc: hjc@rock-chips.com, andy.yan@rock-chips.com, krzk+dt@kernel.org,
	conor+dt@kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org, WeiHao Li <cn.liweihao@gmail.com>
Subject: [PATCH v2 1/8] drm/rockchip: dsi: Add support for RK3368
Date: Fri,  5 Sep 2025 10:56:25 +0800	[thread overview]
Message-ID: <20250905025632.222422-2-cn.liweihao@gmail.com> (raw)
In-Reply-To: <20250905025632.222422-1-cn.liweihao@gmail.com>

RK3368 has DesignWare MIPI DSI controller and an external inno D-PHY.

Signed-off-by: WeiHao Li <cn.liweihao@gmail.com>
---
 .../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 5523911b9..de8405ee8 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
@@ -163,6 +163,11 @@
 #define RK3288_DSI0_LCDC_SEL		BIT(6)
 #define RK3288_DSI1_LCDC_SEL		BIT(9)
 
+#define RK3368_GRF_SOC_CON7		0x41c
+#define RK3368_DSI_FORCETXSTOPMODE	(0xf << 7)
+#define RK3368_DSI_FORCERXMODE		BIT(6)
+#define RK3368_DSI_TURNDISABLE		BIT(5)
+
 #define RK3399_GRF_SOC_CON20		0x6250
 #define RK3399_DSI0_LCDC_SEL		BIT(0)
 #define RK3399_DSI1_LCDC_SEL		BIT(4)
@@ -1528,6 +1533,18 @@ static const struct rockchip_dw_dsi_chip_data rk3288_chip_data[] = {
 	{ /* sentinel */ }
 };
 
+static const struct rockchip_dw_dsi_chip_data rk3368_chip_data[] = {
+	{
+		.reg = 0xff960000,
+		.lanecfg1_grf_reg = RK3368_GRF_SOC_CON7,
+		.lanecfg1 = FIELD_PREP_WM16_CONST((RK3368_DSI_TURNDISABLE |
+						RK3368_DSI_FORCETXSTOPMODE |
+						RK3368_DSI_FORCERXMODE), 0),
+		.max_data_lanes = 4,
+	},
+	{ /* sentinel */ }
+};
+
 static int rk3399_dphy_tx1rx1_init(struct phy *phy)
 {
 	struct dw_mipi_dsi_rockchip *dsi = phy_get_drvdata(phy);
@@ -1687,6 +1704,9 @@ static const struct of_device_id dw_mipi_dsi_rockchip_dt_ids[] = {
 	}, {
 	 .compatible = "rockchip,rk3288-mipi-dsi",
 	 .data = &rk3288_chip_data,
+	}, {
+	 .compatible = "rockchip,rk3368-mipi-dsi",
+	 .data = &rk3368_chip_data,
 	}, {
 	 .compatible = "rockchip,rk3399-mipi-dsi",
 	 .data = &rk3399_chip_data,
-- 
2.39.5


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

  reply	other threads:[~2025-09-05  3:02 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05  2:56 [PATCH v2 0/8] drm/rockchip: Add MIPI DSI support for RK3368 WeiHao Li
2025-09-05  2:56 ` WeiHao Li
2025-09-05  2:56 ` WeiHao Li [this message]
2025-09-05  2:56   ` [PATCH v2 1/8] drm/rockchip: dsi: Add " WeiHao Li
2025-09-05  2:56 ` [PATCH v2 2/8] drm/rockchip: vop: add lut_size for RK3368 vop_data WeiHao Li
2025-09-05  2:56   ` WeiHao Li
2025-09-05  2:56 ` [PATCH v2 3/8] dt-bindings: clock: rk3368: Add SCLK_MIPIDSI_24M WeiHao Li
2025-09-05  2:56   ` WeiHao Li
2025-09-05  5:52   ` Heiko Stübner
2025-09-05  5:52     ` Heiko Stübner
2025-09-05 12:26     ` 李维豪
2025-09-05 12:26       ` 李维豪
2025-09-05  2:56 ` [PATCH v2 4/8] clk: rockchip: use clock ids for SCLK_MIPIDSI_24M on rk3368 WeiHao Li
2025-09-05  2:56   ` WeiHao Li
2025-09-05  2:56 ` [PATCH v2 5/8] arm64: dts: rockchip: Add display subsystem for RK3368 WeiHao Li
2025-09-05  2:56   ` WeiHao Li
2025-09-05  2:56 ` [PATCH v2 6/8] arm64: dts: rockchip: Add D-PHY " WeiHao Li
2025-09-05  2:56   ` WeiHao Li
2025-09-05  2:56 ` [PATCH v2 7/8] arm64: dts: rockchip: Add DSI " WeiHao Li
2025-09-05  2:56   ` WeiHao Li
2025-09-05  2:56 ` [PATCH v2 8/8] dt-bindings: display: rockchip,dw-mipi-dsi: Document RK3368 DSI WeiHao Li
2025-09-05  2:56   ` WeiHao Li
2025-09-05 20:45   ` Rob Herring (Arm)
2025-09-05 20:45     ` Rob Herring (Arm)
2025-10-14 12:23 ` (subset) [PATCH v2 0/8] drm/rockchip: Add MIPI DSI support for RK3368 Heiko Stuebner
2025-10-14 12:23   ` Heiko Stuebner
2025-10-14 18:06 ` Heiko Stuebner
2025-10-14 18:06   ` 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=20250905025632.222422-2-cn.liweihao@gmail.com \
    --to=cn.liweihao@gmail.com \
    --cc=andy.yan@rock-chips.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.