linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] rockchip-lvds for rk3568
@ 2022-09-23 16:01 Alibek Omarov
  2022-09-23 16:01 ` [RFC PATCH 1/3] drm/rockchip: lvds: add rk3568 support Alibek Omarov
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Alibek Omarov @ 2022-09-23 16:01 UTC (permalink / raw)
  To: linux-rockchip; +Cc: Alibek Omarov

This series adds support for the LVDS controller on the Rockchip RK3566 and
RK3568.

Tested on Autogramma Monitor RockChip, custom board based on Radxa Rock 3
Computing Module Plus.

Requires applied DSI DPHY patches by Chris Morgan, as LVDS controller
does share PHY controller with MIPI DSI.

Alibek Omarov (3):
  drm/rockchip: lvds: add rk3568 support
  arm64: dts: rockchip: rk356x: add LVDS bindings
  dt-bindings: display: rockchip-lvds: add compatible string for RK3568

 .../display/rockchip/rockchip-lvds.txt        |   1 +
 arch/arm64/boot/dts/rockchip/rk356x.dtsi      |  25 +++
 drivers/gpu/drm/rockchip/rockchip_lvds.c      | 144 +++++++++++++++++-
 drivers/gpu/drm/rockchip/rockchip_lvds.h      |  10 ++
 4 files changed, 173 insertions(+), 7 deletions(-)

-- 
2.25.1


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [RFC PATCH 1/3] drm/rockchip: lvds: add rk3568 support
  2022-09-23 16:01 [RFC PATCH 0/3] rockchip-lvds for rk3568 Alibek Omarov
@ 2022-09-23 16:01 ` Alibek Omarov
  2022-09-23 16:01 ` [RFC PATCH 2/3] arm64: dts: rockchip: rk356x: add LVDS bindings Alibek Omarov
  2022-09-23 16:01 ` [RFC PATCH 3/3] dt-bindings: display: rockchip-lvds: add compatible string for RK3568 Alibek Omarov
  2 siblings, 0 replies; 10+ messages in thread
From: Alibek Omarov @ 2022-09-23 16:01 UTC (permalink / raw)
  To: linux-rockchip; +Cc: Alibek Omarov

One of the ports of RK3568 can be configured as LVDS, re-using the DSI PHY

Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
---
 drivers/gpu/drm/rockchip/rockchip_lvds.c | 144 +++++++++++++++++++++--
 drivers/gpu/drm/rockchip/rockchip_lvds.h |  10 ++
 2 files changed, 147 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
index 5a284332ec49..5976067fb501 100644
--- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
+++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
@@ -429,6 +429,90 @@ static void px30_lvds_encoder_disable(struct drm_encoder *encoder)
 	drm_panel_unprepare(lvds->panel);
 }
 
+static int rk3568_lvds_poweron(struct rockchip_lvds *lvds)
+{
+	int ret;
+
+	ret = clk_enable(lvds->pclk);
+	if (ret < 0) {
+		DRM_DEV_ERROR(lvds->dev, "failed to enable lvds pclk %d\n", ret);
+		return ret;
+	}
+
+	ret = pm_runtime_get_sync(lvds->dev);
+	if (ret < 0) {
+		DRM_DEV_ERROR(lvds->dev, "failed to get pm runtime: %d\n", ret);
+		clk_disable(lvds->pclk);
+		return ret;
+	}
+
+	/* Enable LVDS mode */
+	return regmap_update_bits(lvds->grf, RK3568_GRF_VO_CON2,
+				  RK3568_LVDS0_MODE_EN(1),
+				  RK3568_LVDS0_MODE_EN(1));
+}
+
+static void rk3568_lvds_poweroff(struct rockchip_lvds *lvds)
+{
+	regmap_update_bits(lvds->grf, RK3568_GRF_VO_CON2,
+			   RK3568_LVDS0_MODE_EN(1) | RK3568_LVDS0_P2S_EN(1),
+			   RK3568_LVDS0_MODE_EN(0) | RK3568_LVDS0_P2S_EN(0));
+
+	pm_runtime_put(lvds->dev);
+	clk_disable(lvds->pclk);
+}
+
+static int rk3568_lvds_grf_config(struct drm_encoder *encoder,
+				struct drm_display_mode *mode)
+{
+	struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
+
+	if (lvds->output != DISPLAY_OUTPUT_LVDS) {
+		DRM_DEV_ERROR(lvds->dev, "Unsupported display output %d\n",
+			      lvds->output);
+		return -EINVAL;
+	}
+
+	/* Set format */
+	return regmap_update_bits(lvds->grf, RK3568_GRF_VO_CON0,
+				  RK3568_LVDS0_SELECT(3),
+				  RK3568_LVDS0_SELECT(lvds->format));
+}
+
+static void rk3568_lvds_encoder_enable(struct drm_encoder *encoder)
+{
+	struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
+	struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode;
+	int ret;
+
+	drm_panel_prepare(lvds->panel);
+
+	ret = rk3568_lvds_poweron(lvds);
+	if (ret) {
+		DRM_DEV_ERROR(lvds->dev, "failed to power on LVDS: %d\n", ret);
+		drm_panel_unprepare(lvds->panel);
+		return;
+	}
+
+	ret = rk3568_lvds_grf_config(encoder, mode);
+	if (ret) {
+		DRM_DEV_ERROR(lvds->dev, "failed to configure LVDS: %d\n", ret);
+		drm_panel_unprepare(lvds->panel);
+		return;
+	}
+
+	drm_panel_enable(lvds->panel);
+}
+
+static void rk3568_lvds_encoder_disable(struct drm_encoder *encoder)
+{
+	struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
+
+	drm_panel_disable(lvds->panel);
+	rk3568_lvds_poweroff(lvds);
+	drm_panel_unprepare(lvds->panel);
+}
+
 static const
 struct drm_encoder_helper_funcs rk3288_lvds_encoder_helper_funcs = {
 	.enable = rk3288_lvds_encoder_enable,
@@ -443,6 +527,13 @@ struct drm_encoder_helper_funcs px30_lvds_encoder_helper_funcs = {
 	.atomic_check = rockchip_lvds_encoder_atomic_check,
 };
 
+static const
+struct drm_encoder_helper_funcs rk3568_lvds_encoder_helper_funcs = {
+	.enable = rk3568_lvds_encoder_enable,
+	.disable = rk3568_lvds_encoder_disable,
+	.atomic_check = rockchip_lvds_encoder_atomic_check,
+};
+
 static int rk3288_lvds_probe(struct platform_device *pdev,
 			     struct rockchip_lvds *lvds)
 {
@@ -487,6 +578,26 @@ static int rk3288_lvds_probe(struct platform_device *pdev,
 	return 0;
 }
 
+static int rockchip_lvds_phy_probe(struct platform_device *pdev,
+				   struct rockchip_lvds *lvds)
+{
+	int ret;
+
+	lvds->dphy = devm_phy_get(&pdev->dev, "dphy");
+	if (IS_ERR(lvds->dphy))
+		return PTR_ERR(lvds->dphy);
+
+	ret = phy_init(lvds->dphy);
+	if (ret)
+		return ret;
+
+	ret = phy_set_mode(lvds->dphy, PHY_MODE_LVDS);
+	if (ret)
+		return ret;
+
+	return phy_power_on(lvds->dphy);
+}
+
 static int px30_lvds_probe(struct platform_device *pdev,
 			   struct rockchip_lvds *lvds)
 {
@@ -499,20 +610,28 @@ static int px30_lvds_probe(struct platform_device *pdev,
 	if (ret)
 		return ret;
 
-	/* PHY */
-	lvds->dphy = devm_phy_get(&pdev->dev, "dphy");
-	if (IS_ERR(lvds->dphy))
-		return PTR_ERR(lvds->dphy);
+	return rockchip_lvds_phy_probe(pdev, lvds);
+}
 
-	ret = phy_init(lvds->dphy);
+static int rk3568_lvds_probe(struct platform_device *pdev,
+			     struct rockchip_lvds *lvds)
+{
+	int ret;
+
+	ret = regmap_update_bits(lvds->grf, RK3568_GRF_VO_CON0,
+				  RK3568_LVDS0_MSBSEL(1),
+				  RK3568_LVDS0_MSBSEL(1));
 	if (ret)
 		return ret;
 
-	ret = phy_set_mode(lvds->dphy, PHY_MODE_LVDS);
+	ret = regmap_update_bits(lvds->grf, RK3568_GRF_VO_CON2,
+				 RK3568_LVDS0_P2S_EN(1),
+				 RK3568_LVDS0_P2S_EN(1));
+
 	if (ret)
 		return ret;
 
-	return phy_power_on(lvds->dphy);
+	return rockchip_lvds_phy_probe(pdev, lvds);
 }
 
 static const struct rockchip_lvds_soc_data rk3288_lvds_data = {
@@ -525,6 +644,11 @@ static const struct rockchip_lvds_soc_data px30_lvds_data = {
 	.helper_funcs = &px30_lvds_encoder_helper_funcs,
 };
 
+static const struct rockchip_lvds_soc_data rk3568_lvds_data = {
+	.probe = rk3568_lvds_probe,
+	.helper_funcs = &rk3568_lvds_encoder_helper_funcs,
+};
+
 static const struct of_device_id rockchip_lvds_dt_ids[] = {
 	{
 		.compatible = "rockchip,rk3288-lvds",
@@ -534,6 +658,10 @@ static const struct of_device_id rockchip_lvds_dt_ids[] = {
 		.compatible = "rockchip,px30-lvds",
 		.data = &px30_lvds_data
 	},
+	{
+		.compatible = "rockchip,rk3568-lvds",
+		.data = &rk3568_lvds_data
+	},
 	{}
 };
 MODULE_DEVICE_TABLE(of, rockchip_lvds_dt_ids);
@@ -608,6 +736,8 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master,
 	encoder = &lvds->encoder.encoder;
 	encoder->possible_crtcs = drm_of_find_possible_crtcs(drm_dev,
 							     dev->of_node);
+	rockchip_drm_encoder_set_crtc_endpoint_id(&lvds->encoder,
+						  dev->of_node, 0, 0);
 
 	ret = drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_LVDS);
 	if (ret < 0) {
diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.h b/drivers/gpu/drm/rockchip/rockchip_lvds.h
index 4ce967d23813..57decb33f779 100644
--- a/drivers/gpu/drm/rockchip/rockchip_lvds.h
+++ b/drivers/gpu/drm/rockchip/rockchip_lvds.h
@@ -120,4 +120,14 @@
 #define   PX30_LVDS_P2S_EN(val)			HIWORD_UPDATE(val,  6,  6)
 #define   PX30_LVDS_VOP_SEL(val)		HIWORD_UPDATE(val,  1,  1)
 
+#define RK3568_GRF_VO_CON0			0x0360
+#define   RK3568_LVDS0_SELECT(val)		HIWORD_UPDATE(val,  5,  4)
+#define   RK3568_LVDS0_MSBSEL(val)		HIWORD_UPDATE(val,  3,  3)
+
+#define RK3568_GRF_VO_CON2			0x0368
+#define   RK3568_LVDS0_DCLK_INV_SEL(val)	HIWORD_UPDATE(val,  9,  9)
+#define   RK3568_LVDS0_DCLK_DIV2_SEL(val)	HIWORD_UPDATE(val,  8,  8)
+#define   RK3568_LVDS0_MODE_EN(val)		HIWORD_UPDATE(val,  1,  1)
+#define   RK3568_LVDS0_P2S_EN(val)		HIWORD_UPDATE(val,  0,  0)
+
 #endif /* _ROCKCHIP_LVDS_ */
-- 
2.25.1


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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [RFC PATCH 2/3] arm64: dts: rockchip: rk356x: add LVDS bindings
  2022-09-23 16:01 [RFC PATCH 0/3] rockchip-lvds for rk3568 Alibek Omarov
  2022-09-23 16:01 ` [RFC PATCH 1/3] drm/rockchip: lvds: add rk3568 support Alibek Omarov
@ 2022-09-23 16:01 ` Alibek Omarov
  2022-11-16 13:19   ` Sverdlin, Alexander
  2023-01-31 13:33   ` Johan Jonker
  2022-09-23 16:01 ` [RFC PATCH 3/3] dt-bindings: display: rockchip-lvds: add compatible string for RK3568 Alibek Omarov
  2 siblings, 2 replies; 10+ messages in thread
From: Alibek Omarov @ 2022-09-23 16:01 UTC (permalink / raw)
  To: linux-rockchip; +Cc: Alibek Omarov

Exposes ports for VOP2 and for panel

Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
---
 arch/arm64/boot/dts/rockchip/rk356x.dtsi | 25 ++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
index 0473d7ee2668..fea3319a6a4e 100644
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
@@ -787,6 +787,31 @@ hdmi_out: port@1 {
 		};
 	};
 
+	lvds: lvds {
+		compatible = "rockchip,rk3568-lvds";
+		clocks = <&cru PCLK_DSITX_0>;
+		clock-names = "pclk_lvds";
+		phys = <&dsi_dphy0>;
+		phy-names = "dphy";
+		power-domains = <&power RK3568_PD_VO>;
+		rockchip,grf = <&grf>;
+		rockchip,output = "lvds";
+		status = "disabled";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			lvds_in: port@0 {
+				reg = <0>;
+			};
+
+			lvds_out: port@1 {
+				reg = <1>;
+			};
+		};
+	};
+
 	qos_gpu: qos@fe128000 {
 		compatible = "rockchip,rk3568-qos", "syscon";
 		reg = <0x0 0xfe128000 0x0 0x20>;
-- 
2.25.1


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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [RFC PATCH 3/3] dt-bindings: display: rockchip-lvds: add compatible string for RK3568
  2022-09-23 16:01 [RFC PATCH 0/3] rockchip-lvds for rk3568 Alibek Omarov
  2022-09-23 16:01 ` [RFC PATCH 1/3] drm/rockchip: lvds: add rk3568 support Alibek Omarov
  2022-09-23 16:01 ` [RFC PATCH 2/3] arm64: dts: rockchip: rk356x: add LVDS bindings Alibek Omarov
@ 2022-09-23 16:01 ` Alibek Omarov
  2 siblings, 0 replies; 10+ messages in thread
From: Alibek Omarov @ 2022-09-23 16:01 UTC (permalink / raw)
  To: linux-rockchip; +Cc: Alibek Omarov

RK3568 SoCs have a single LVDS output, that use PHY shared by two display
pipelines: LVDS and MIPI DSI.

Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
---
 .../devicetree/bindings/display/rockchip/rockchip-lvds.txt       | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip-lvds.txt b/Documentation/devicetree/bindings/display/rockchip/rockchip-lvds.txt
index aaf8c44cf90f..ec8a8d05368a 100644
--- a/Documentation/devicetree/bindings/display/rockchip/rockchip-lvds.txt
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip-lvds.txt
@@ -5,6 +5,7 @@ Required properties:
 - compatible: matching the soc type, one of
 	- "rockchip,rk3288-lvds";
 	- "rockchip,px30-lvds";
+	- "rockchip,rk3568-lvds";
 
 - reg: physical base address of the controller and length
 	of memory mapped region.
-- 
2.25.1


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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH 2/3] arm64: dts: rockchip: rk356x: add LVDS bindings
  2022-09-23 16:01 ` [RFC PATCH 2/3] arm64: dts: rockchip: rk356x: add LVDS bindings Alibek Omarov
@ 2022-11-16 13:19   ` Sverdlin, Alexander
  2022-11-16 15:09     ` Alibek Omarov
  2023-01-31 13:33   ` Johan Jonker
  1 sibling, 1 reply; 10+ messages in thread
From: Sverdlin, Alexander @ 2022-11-16 13:19 UTC (permalink / raw)
  To: a1ba.omarov, linux-rockchip

Hello Alibek!

On Fri, 2022-09-23 at 19:01 +0300, Alibek Omarov wrote:
> > Exposes ports for VOP2 and for panel
> > 
> > Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
> > ---
> >  arch/arm64/boot/dts/rockchip/rk356x.dtsi | 25 >
> > ++++++++++++++++++++++++
> >  1 file changed, 25 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi >
> > b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
> > index 0473d7ee2668..fea3319a6a4e 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
> > +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
> > @@ -787,6 +787,31 @@ hdmi_out: port@1 {
> >                 };
> >         };
> >  
> > +       lvds: lvds {
> > +               compatible = "rockchip,rk3568-lvds";
> > +               clocks = <&cru PCLK_DSITX_0>;
> > +               clock-names = "pclk_lvds";
> > +               phys = <&dsi_dphy0>;

If this patch depends of the 
https://lore.kernel.org/all/20220906174823.28561-6-macroalpha82@gmail.com/
patch, then should the phys reference "mipi_dphy0" node?

> > +               phy-names = "dphy";
> > +               power-domains = <&power RK3568_PD_VO>;
> > +               rockchip,grf = <&grf>;
> > +               rockchip,output = "lvds";
> > +               status = "disabled";
> > +
> > +               ports {
> > +                       #address-cells = <1>;
> > +                       #size-cells = <0>;
> > +
> > +                       lvds_in: port@0 {
> > +                               reg = <0>;
> > +                       };
> > +
> > +                       lvds_out: port@1 {
> > +                               reg = <1>;
> > +                       };
> > +               };
> > +       };
> > +
> >         qos_gpu: qos@fe128000 {
> >                 compatible = "rockchip,rk3568-qos", "syscon";
> >                 reg = <0x0 0xfe128000 0x0 0x20>;

-- 
Alexander Sverdlin
Siemens AG
www.siemens.com
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH 2/3] arm64: dts: rockchip: rk356x: add LVDS bindings
  2022-11-16 13:19   ` Sverdlin, Alexander
@ 2022-11-16 15:09     ` Alibek Omarov
  2022-11-18 18:06       ` Sverdlin, Alexander
  0 siblings, 1 reply; 10+ messages in thread
From: Alibek Omarov @ 2022-11-16 15:09 UTC (permalink / raw)
  To: Sverdlin, Alexander; +Cc: linux-rockchip

> patch, then should the phys reference "mipi_dphy0" node?

Looks like I just linked the old patch version instead of the one that
got merged.

https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/commit/arch/arm64/boot/dts/rockchip/rk356x.dtsi?h=for-next&id=e18d9b093006d8abd53e1ce13c0d5a8d0fcd5f64

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH 2/3] arm64: dts: rockchip: rk356x: add LVDS bindings
  2022-11-16 15:09     ` Alibek Omarov
@ 2022-11-18 18:06       ` Sverdlin, Alexander
  2022-11-18 18:52         ` Alibek Omarov
  0 siblings, 1 reply; 10+ messages in thread
From: Sverdlin, Alexander @ 2022-11-18 18:06 UTC (permalink / raw)
  To: a1ba.omarov; +Cc: linux-rockchip

Hi!

On Wed, 2022-11-16 at 18:09 +0300, Alibek Omarov wrote:
> > patch, then should the phys reference "mipi_dphy0" node?
> 
> Looks like I just linked the old patch version instead of the one
> that
> got merged.
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/commit/arch/arm64/boot/dts/rockchip/rk356x.dtsi?h=for-next&id=e18d9b093006d8abd53e1ce13c0d5a8d0fcd5f64

No, it's me totally missed v4 and the whole rockchip tree, sorry for
that!

You can add my
Tested-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>

Your patch works fine and shows some LVDS panel graphics on a custom
rk3566-based board, thank you!

-- 
Alexander Sverdlin
Siemens AG
www.siemens.com
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH 2/3] arm64: dts: rockchip: rk356x: add LVDS bindings
  2022-11-18 18:06       ` Sverdlin, Alexander
@ 2022-11-18 18:52         ` Alibek Omarov
  0 siblings, 0 replies; 10+ messages in thread
From: Alibek Omarov @ 2022-11-18 18:52 UTC (permalink / raw)
  To: Sverdlin, Alexander; +Cc: linux-rockchip

>Your patch works fine and shows some LVDS panel graphics on a custom
>rk3566-based board, thank you!

Awesome, thanks!

I didn't made any significant changes since that but I will probably
resend it when I will have free time.

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH 2/3] arm64: dts: rockchip: rk356x: add LVDS bindings
  2022-09-23 16:01 ` [RFC PATCH 2/3] arm64: dts: rockchip: rk356x: add LVDS bindings Alibek Omarov
  2022-11-16 13:19   ` Sverdlin, Alexander
@ 2023-01-31 13:33   ` Johan Jonker
  2023-01-31 18:21     ` Alibek Omarov
  1 sibling, 1 reply; 10+ messages in thread
From: Johan Jonker @ 2023-01-31 13:33 UTC (permalink / raw)
  To: Alibek Omarov, linux-rockchip



On 9/23/22 18:01, Alibek Omarov wrote:
> Exposes ports for VOP2 and for panel
> 
> Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
> ---
>  arch/arm64/boot/dts/rockchip/rk356x.dtsi | 25 ++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
> index 0473d7ee2668..fea3319a6a4e 100644
> --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
> @@ -787,6 +787,31 @@ hdmi_out: port@1 {
>  		};
>  	};
> 

 
> +	lvds: lvds {
> +		compatible = "rockchip,rk3568-lvds";

Hi Alibek,

1:
In the manufacturer tree they model this node in the grf node.
Any particular reason to do that different?

https://github.com/rockchip-linux/kernel/blob/develop-5.10/arch/arm64/boot/dts/rockchip/rk3568.dtsi#L734

In mainline PX30 already does the same.

2:
There's complete "Acked" serie to be merged by Heiko for a LVDS yaml binding.

[PATCH v6 01/17] dt-bindings: display: rockchip: convert rockchip-lvds.txt to YAML
https://lore.kernel.org/linux-rockchip/67771143-fd83-383d-41b2-68e8707134e8@gmail.com/

Maybe it's better to check this node in a automated way?

Johan


> +		clocks = <&cru PCLK_DSITX_0>;
> +		clock-names = "pclk_lvds";
> +		phys = <&dsi_dphy0>;
> +		phy-names = "dphy";
> +		power-domains = <&power RK3568_PD_VO>;
> +		rockchip,grf = <&grf>;
> +		rockchip,output = "lvds";
> +		status = "disabled";
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			lvds_in: port@0 {
> +				reg = <0>;
> +			};
> +
> +			lvds_out: port@1 {
> +				reg = <1>;
> +			};
> +		};
> +	};
> +
>  	qos_gpu: qos@fe128000 {
>  		compatible = "rockchip,rk3568-qos", "syscon";
>  		reg = <0x0 0xfe128000 0x0 0x20>;

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH 2/3] arm64: dts: rockchip: rk356x: add LVDS bindings
  2023-01-31 13:33   ` Johan Jonker
@ 2023-01-31 18:21     ` Alibek Omarov
  0 siblings, 0 replies; 10+ messages in thread
From: Alibek Omarov @ 2023-01-31 18:21 UTC (permalink / raw)
  To: Johan Jonker; +Cc: linux-rockchip

Hi Johan!

1. That's interesting, there is no particular reason for this. I can
move it since it makes more sense, as lvds driver only modifies the
grf.

2. I haven't noticed this patch. If it's merged to Heiko's branch, I
will rebase it on YAML then.

Sorry, I don't have that much free time to finish the v2 yet.
Hopefully will send an updated patchset next week or so.

Alibek.

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-01-31 18:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-23 16:01 [RFC PATCH 0/3] rockchip-lvds for rk3568 Alibek Omarov
2022-09-23 16:01 ` [RFC PATCH 1/3] drm/rockchip: lvds: add rk3568 support Alibek Omarov
2022-09-23 16:01 ` [RFC PATCH 2/3] arm64: dts: rockchip: rk356x: add LVDS bindings Alibek Omarov
2022-11-16 13:19   ` Sverdlin, Alexander
2022-11-16 15:09     ` Alibek Omarov
2022-11-18 18:06       ` Sverdlin, Alexander
2022-11-18 18:52         ` Alibek Omarov
2023-01-31 13:33   ` Johan Jonker
2023-01-31 18:21     ` Alibek Omarov
2022-09-23 16:01 ` [RFC PATCH 3/3] dt-bindings: display: rockchip-lvds: add compatible string for RK3568 Alibek Omarov

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).