linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion
@ 2025-10-21  7:42 Heiko Stuebner
  2025-10-21  7:42 ` [PATCH v2 1/9] dt-bindings: display: rockchip: dw-hdmi: Add compatible for RK3368 HDMI Heiko Stuebner
                   ` (11 more replies)
  0 siblings, 12 replies; 21+ messages in thread
From: Heiko Stuebner @ 2025-10-21  7:42 UTC (permalink / raw)
  To: heiko
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	quentin.schulz, andy.yan, dri-devel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, cn.liweihao

This series adds the necessary bits for HDMI output on RK3368 and enables
this on RK3368-Lion. At the same time, use the recently added DSI support
to enable the generic Video-Demo-adapter as an overlay on Lion as well.


The reason I'm shaving this Yak is that the recently added DSI support
created DTC warnings about a single endpoint with an address.

So it was either removing the @0 from the endpoint, or adding a second
output option :-) .

changes in v2:
- pick up Conor's Ack for the compatible
- fix the spelling errors reported by Diederik

Heiko Stuebner (9):
  dt-bindings: display: rockchip: dw-hdmi: Add compatible for RK3368
    HDMI
  drm/rockchip: hdmi: add RK3368 controller variant
  soc: rockchip: grf: Add select correct PWM implementation on RK3368
  arm64: dts: rockchip: Add power-domain to RK3368 DSI controller
  arm64: dts: rockchip: Add power-domain to RK3368 VOP controller
  arm64: dts: rockchip: Use phandle for i2c_lvds_blc on rk3368-lion
    haikou
  arm64: dts: rockchip: Add HDMI node to RK3368
  arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou
  arm64: dts: rockchip: Add the Video-Demo overlay for Lion Haikou

 .../display/rockchip/rockchip,dw-hdmi.yaml    |   1 +
 arch/arm64/boot/dts/rockchip/Makefile         |   5 +
 .../rk3368-lion-haikou-video-demo.dtso        | 174 ++++++++++++++++++
 .../boot/dts/rockchip/rk3368-lion-haikou.dts  |  36 +++-
 arch/arm64/boot/dts/rockchip/rk3368.dtsi      |  45 +++++
 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c   |  16 ++
 drivers/soc/rockchip/grf.c                    |   1 +
 7 files changed, 268 insertions(+), 10 deletions(-)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso

-- 
2.47.2



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

* [PATCH v2 1/9] dt-bindings: display: rockchip: dw-hdmi: Add compatible for RK3368 HDMI
  2025-10-21  7:42 [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
@ 2025-10-21  7:42 ` Heiko Stuebner
  2025-10-21  7:42 ` [PATCH v2 2/9] drm/rockchip: hdmi: add RK3368 controller variant Heiko Stuebner
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Heiko Stuebner @ 2025-10-21  7:42 UTC (permalink / raw)
  To: heiko
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	quentin.schulz, andy.yan, dri-devel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, cn.liweihao, Heiko Stuebner,
	Conor Dooley

From: Heiko Stuebner <heiko.stuebner@cherry.de>

Define a new compatible for RK3368 HDMI.

The RK3368 HDMI also uses a PHY internal to the controller, so works
similar to other controllers, with the exception that the RK3368
only has one VOP, so there is no source selection needed.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
---
 .../devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml   | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
index 9d096856a79a..29716764413a 100644
--- a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
@@ -23,6 +23,7 @@ properties:
       - rockchip,rk3228-dw-hdmi
       - rockchip,rk3288-dw-hdmi
       - rockchip,rk3328-dw-hdmi
+      - rockchip,rk3368-dw-hdmi
       - rockchip,rk3399-dw-hdmi
       - rockchip,rk3568-dw-hdmi
 
-- 
2.47.2



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

* [PATCH v2 2/9] drm/rockchip: hdmi: add RK3368 controller variant
  2025-10-21  7:42 [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
  2025-10-21  7:42 ` [PATCH v2 1/9] dt-bindings: display: rockchip: dw-hdmi: Add compatible for RK3368 HDMI Heiko Stuebner
@ 2025-10-21  7:42 ` Heiko Stuebner
  2025-10-26  8:38   ` Andy Yan
  2025-10-21  7:42 ` [PATCH v2 3/9] soc: rockchip: grf: Add select correct PWM implementation on RK3368 Heiko Stuebner
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 21+ messages in thread
From: Heiko Stuebner @ 2025-10-21  7:42 UTC (permalink / raw)
  To: heiko
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	quentin.schulz, andy.yan, dri-devel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, cn.liweihao, Heiko Stuebner

From: Heiko Stuebner <heiko.stuebner@cherry.de>

The RK3368 has only one VOP, so there is no source selection happening
and the controller uses an internal PHY for the HDMI output.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
---
 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
index 7b613997bb50..95ff3fce97a3 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
@@ -467,6 +467,19 @@ static const struct dw_hdmi_plat_data rk3328_hdmi_drv_data = {
 	.use_drm_infoframe = true,
 };
 
+static struct rockchip_hdmi_chip_data rk3368_chip_data = {
+	.lcdsel_grf_reg = -1,
+};
+
+static const struct dw_hdmi_plat_data rk3368_hdmi_drv_data = {
+	.mode_valid = dw_hdmi_rockchip_mode_valid,
+	.mpll_cfg   = rockchip_mpll_cfg,
+	.cur_ctr    = rockchip_cur_ctr,
+	.phy_config = rockchip_phy_config,
+	.phy_data = &rk3368_chip_data,
+	.use_drm_infoframe = true,
+};
+
 static struct rockchip_hdmi_chip_data rk3399_chip_data = {
 	.lcdsel_grf_reg = RK3399_GRF_SOC_CON20,
 	.lcdsel_big = FIELD_PREP_WM16_CONST(RK3399_HDMI_LCDC_SEL, 0),
@@ -507,6 +520,9 @@ static const struct of_device_id dw_hdmi_rockchip_dt_ids[] = {
 	{ .compatible = "rockchip,rk3328-dw-hdmi",
 	  .data = &rk3328_hdmi_drv_data
 	},
+	{ .compatible = "rockchip,rk3368-dw-hdmi",
+	 .data = &rk3368_hdmi_drv_data
+	},
 	{ .compatible = "rockchip,rk3399-dw-hdmi",
 	  .data = &rk3399_hdmi_drv_data
 	},
-- 
2.47.2



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

* [PATCH v2 3/9] soc: rockchip: grf: Add select correct PWM implementation on RK3368
  2025-10-21  7:42 [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
  2025-10-21  7:42 ` [PATCH v2 1/9] dt-bindings: display: rockchip: dw-hdmi: Add compatible for RK3368 HDMI Heiko Stuebner
  2025-10-21  7:42 ` [PATCH v2 2/9] drm/rockchip: hdmi: add RK3368 controller variant Heiko Stuebner
@ 2025-10-21  7:42 ` Heiko Stuebner
  2025-10-21  7:42 ` [PATCH v2 4/9] arm64: dts: rockchip: Add power-domain to RK3368 DSI controller Heiko Stuebner
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Heiko Stuebner @ 2025-10-21  7:42 UTC (permalink / raw)
  To: heiko
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	quentin.schulz, andy.yan, dri-devel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, cn.liweihao, Heiko Stuebner

From: Heiko Stuebner <heiko.stuebner@cherry.de>

Similar to the RK3288, the RK3368 has two different implementations of
the PWM block inside the SoC - the newer ones that we have a driver for
and that is used on every SoC and a previous variant that was likely
left as a fallback if the new one creates problems.

The devicetree is already set up for the new variant, so make sure
we actually use it - similar to the RK3288.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
---
 drivers/soc/rockchip/grf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/rockchip/grf.c b/drivers/soc/rockchip/grf.c
index 344870da7675..963cdea01ce7 100644
--- a/drivers/soc/rockchip/grf.c
+++ b/drivers/soc/rockchip/grf.c
@@ -91,6 +91,7 @@ static const struct rockchip_grf_info rk3328_grf __initconst = {
 
 static const struct rockchip_grf_value rk3368_defaults[] __initconst = {
 	{ "jtag switching", RK3368_GRF_SOC_CON15, FIELD_PREP_WM16_CONST(BIT(13), 0) },
+	{ "pwm select", RK3368_GRF_SOC_CON15, FIELD_PREP_WM16_CONST(BIT(12), 1) },
 };
 
 static const struct rockchip_grf_info rk3368_grf __initconst = {
-- 
2.47.2



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

* [PATCH v2 4/9] arm64: dts: rockchip: Add power-domain to RK3368 DSI controller
  2025-10-21  7:42 [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
                   ` (2 preceding siblings ...)
  2025-10-21  7:42 ` [PATCH v2 3/9] soc: rockchip: grf: Add select correct PWM implementation on RK3368 Heiko Stuebner
@ 2025-10-21  7:42 ` Heiko Stuebner
  2025-12-01 15:23   ` Quentin Schulz
  2025-10-21  7:42 ` [PATCH v2 5/9] arm64: dts: rockchip: Add power-domain to RK3368 VOP controller Heiko Stuebner
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 21+ messages in thread
From: Heiko Stuebner @ 2025-10-21  7:42 UTC (permalink / raw)
  To: heiko
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	quentin.schulz, andy.yan, dri-devel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, cn.liweihao, Heiko Stuebner

From: Heiko Stuebner <heiko.stuebner@cherry.de>

The DSI controller is also part of the VIO power-domain and it
definitely needs to be on when accessing it to not cause SError
faults, so add the power-domains property to it.

Fixes: 5023d0cd6183 ("arm64: dts: rockchip: Add DSI for RK3368")
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
---
 arch/arm64/boot/dts/rockchip/rk3368.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3368.dtsi b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
index 8f0216203241..5b2cbb3003b6 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
@@ -896,6 +896,7 @@ mipi_dsi: dsi@ff960000 {
 		clock-names = "pclk";
 		phys = <&dphy>;
 		phy-names = "dphy";
+		power-domains = <&power RK3368_PD_VIO>;
 		resets = <&cru SRST_MIPIDSI0>;
 		reset-names = "apb";
 		rockchip,grf = <&grf>;
-- 
2.47.2



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

* [PATCH v2 5/9] arm64: dts: rockchip: Add power-domain to RK3368 VOP controller
  2025-10-21  7:42 [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
                   ` (3 preceding siblings ...)
  2025-10-21  7:42 ` [PATCH v2 4/9] arm64: dts: rockchip: Add power-domain to RK3368 DSI controller Heiko Stuebner
@ 2025-10-21  7:42 ` Heiko Stuebner
  2025-12-01 15:38   ` Quentin Schulz
  2025-10-21  7:42 ` [PATCH v2 6/9] arm64: dts: rockchip: Use phandle for i2c_lvds_blc on rk3368-lion haikou Heiko Stuebner
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 21+ messages in thread
From: Heiko Stuebner @ 2025-10-21  7:42 UTC (permalink / raw)
  To: heiko
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	quentin.schulz, andy.yan, dri-devel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, cn.liweihao, Heiko Stuebner

From: Heiko Stuebner <heiko.stuebner@cherry.de>

The VOP is also part of the VIO power-domain and it definitely needs to
be on when accessing it to not cause SError faults, so add the
power-domains property to it.

Fixes: ef06b5ddee1e ("arm64: dts: rockchip: Add display subsystem for RK3368")
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
---
 arch/arm64/boot/dts/rockchip/rk3368.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3368.dtsi b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
index 5b2cbb3003b6..ce4b112b082b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
@@ -862,6 +862,7 @@ vop: vop@ff930000 {
 		clocks = <&cru ACLK_VOP>, <&cru DCLK_VOP>, <&cru HCLK_VOP>;
 		clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
 		iommus = <&vop_mmu>;
+		power-domains = <&power RK3368_PD_VIO>;
 		resets = <&cru SRST_LCDC0_AXI>, <&cru SRST_LCDC0_AHB>, <&cru SRST_LCDC0_DCLK>;
 		reset-names = "axi", "ahb", "dclk";
 		status = "disabled";
-- 
2.47.2



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

* [PATCH v2 6/9] arm64: dts: rockchip: Use phandle for i2c_lvds_blc on rk3368-lion haikou
  2025-10-21  7:42 [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
                   ` (4 preceding siblings ...)
  2025-10-21  7:42 ` [PATCH v2 5/9] arm64: dts: rockchip: Add power-domain to RK3368 VOP controller Heiko Stuebner
@ 2025-10-21  7:42 ` Heiko Stuebner
  2025-12-01 15:41   ` Quentin Schulz
  2025-10-21  7:42 ` [PATCH v2 7/9] arm64: dts: rockchip: Add HDMI node to RK3368 Heiko Stuebner
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 21+ messages in thread
From: Heiko Stuebner @ 2025-10-21  7:42 UTC (permalink / raw)
  To: heiko
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	quentin.schulz, andy.yan, dri-devel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, cn.liweihao, Heiko Stuebner

From: Heiko Stuebner <heiko.stuebner@cherry.de>

i2c@0 on i2cmux2 does already have a phandle i2c_lvds_blc defined.

Use this one instead of replicating the hierarchy again, as this might
result in strange errors if the lion dtsi is changed at some point
in the future.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
---
 .../boot/dts/rockchip/rk3368-lion-haikou.dts   | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts b/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts
index ab70ee5f561a..abd1af97456a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts
@@ -18,16 +18,6 @@ chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
-	i2cmux2 {
-		i2c@0 {
-			eeprom: eeprom@50 {
-				compatible = "atmel,24c01";
-				pagesize = <8>;
-				reg = <0x50>;
-			};
-		};
-	};
-
 	leds {
 		pinctrl-0 = <&module_led_pins>, <&sd_card_led_pin>;
 
@@ -68,6 +58,14 @@ vcc5v0_otg: regulator-vcc5v0-otg {
 	};
 };
 
+&i2c_lvds_blc {
+	eeprom: eeprom@50 {
+		compatible = "atmel,24c01";
+		pagesize = <8>;
+		reg = <0x50>;
+	};
+};
+
 &sdmmc {
 	bus-width = <4>;
 	cap-mmc-highspeed;
-- 
2.47.2



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

* [PATCH v2 7/9] arm64: dts: rockchip: Add HDMI node to RK3368
  2025-10-21  7:42 [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
                   ` (5 preceding siblings ...)
  2025-10-21  7:42 ` [PATCH v2 6/9] arm64: dts: rockchip: Use phandle for i2c_lvds_blc on rk3368-lion haikou Heiko Stuebner
@ 2025-10-21  7:42 ` Heiko Stuebner
  2025-10-21  7:42 ` [PATCH v2 8/9] arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou Heiko Stuebner
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Heiko Stuebner @ 2025-10-21  7:42 UTC (permalink / raw)
  To: heiko
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	quentin.schulz, andy.yan, dri-devel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, cn.liweihao, Heiko Stuebner

From: Heiko Stuebner <heiko.stuebner@cherry.de>

Add the HDMI controller node to the main SoC devicetree and hook
it into the VOP.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
---
 arch/arm64/boot/dts/rockchip/rk3368.dtsi | 43 ++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3368.dtsi b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
index ce4b112b082b..892d35242259 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
@@ -875,6 +875,11 @@ vop_out_dsi: endpoint@0 {
 				reg = <0>;
 				remote-endpoint = <&dsi_in_vop>;
 			};
+
+			vop_out_hdmi: endpoint@1 {
+				reg = <1>;
+				remote-endpoint = <&hdmi_in_vop>;
+			};
 		};
 	};
 
@@ -933,6 +938,37 @@ dphy: phy@ff968000 {
 		status = "disabled";
 	};
 
+	hdmi: hdmi@ff980000 {
+		compatible = "rockchip,rk3368-dw-hdmi";
+		reg = <0x0 0xff980000 0x0 0x20000>;
+		interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>, <&cru SCLK_HDMI_CEC>;
+		clock-names = "iahb", "isfr", "cec";
+		pinctrl-names = "default";
+		pinctrl-0 = <&hdmi_i2c_xfer>;
+		power-domains = <&power RK3368_PD_VIO>;
+		reg-io-width = <4>;
+		rockchip,grf = <&grf>;
+		status = "disabled";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			hdmi_in: port@0 {
+				reg = <0>;
+
+				hdmi_in_vop: endpoint {
+					remote-endpoint = <&vop_out_hdmi>;
+				};
+			};
+
+			hdmi_out: port@1 {
+				reg = <1>;
+			};
+		};
+	};
+
 	hevc_mmu: iommu@ff9a0440 {
 		compatible = "rockchip,iommu";
 		reg = <0x0 0xff9a0440 0x0 0x40>,
@@ -1196,6 +1232,13 @@ rmii_pins: rmii-pins {
 			};
 		};
 
+		hdmi {
+			hdmi_i2c_xfer: hdmi-i2c-xfer {
+				rockchip,pins = <3 RK_PD2 1 &pcfg_pull_none>,
+						<3 RK_PD3 1 &pcfg_pull_none>;
+			};
+		};
+
 		i2c0 {
 			i2c0_xfer: i2c0-xfer {
 				rockchip,pins = <0 RK_PA6 1 &pcfg_pull_none>,
-- 
2.47.2



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

* [PATCH v2 8/9] arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou
  2025-10-21  7:42 [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
                   ` (6 preceding siblings ...)
  2025-10-21  7:42 ` [PATCH v2 7/9] arm64: dts: rockchip: Add HDMI node to RK3368 Heiko Stuebner
@ 2025-10-21  7:42 ` Heiko Stuebner
  2025-12-01 16:31   ` Quentin Schulz
  2025-12-02 10:41   ` Quentin Schulz
  2025-10-21  7:42 ` [PATCH v2 9/9] arm64: dts: rockchip: Add the Video-Demo overlay for Lion Haikou Heiko Stuebner
                   ` (3 subsequent siblings)
  11 siblings, 2 replies; 21+ messages in thread
From: Heiko Stuebner @ 2025-10-21  7:42 UTC (permalink / raw)
  To: heiko
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	quentin.schulz, andy.yan, dri-devel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, cn.liweihao, Heiko Stuebner

From: Heiko Stuebner <heiko.stuebner@cherry.de>

Enable the VOP and HDMI controller on the Lion-Haikou board.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
---
 .../boot/dts/rockchip/rk3368-lion-haikou.dts   | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts b/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts
index abd1af97456a..a8eb4e9c2778 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts
@@ -58,6 +58,16 @@ vcc5v0_otg: regulator-vcc5v0-otg {
 	};
 };
 
+&display_subsystem {
+	status = "okay";
+};
+
+&hdmi {
+	avdd-0v9-supply = <&vdd10_video>;
+	avdd-1v8-supply = <&vcc18_video>;
+	status = "okay";
+};
+
 &i2c_lvds_blc {
 	eeprom: eeprom@50 {
 		compatible = "atmel,24c01";
@@ -101,6 +111,14 @@ &uart1 {
 	status = "disabled";
 };
 
+&vop {
+	status = "okay";
+};
+
+&vop_mmu {
+	status = "okay";
+};
+
 &pinctrl {
 	pinctrl-names = "default";
 	pinctrl-0 = <&haikou_pin_hog>;
-- 
2.47.2



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

* [PATCH v2 9/9] arm64: dts: rockchip: Add the Video-Demo overlay for Lion Haikou
  2025-10-21  7:42 [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
                   ` (7 preceding siblings ...)
  2025-10-21  7:42 ` [PATCH v2 8/9] arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou Heiko Stuebner
@ 2025-10-21  7:42 ` Heiko Stuebner
  2025-12-02 13:37   ` Quentin Schulz
  2025-11-17 21:59 ` (subset) [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 21+ messages in thread
From: Heiko Stuebner @ 2025-10-21  7:42 UTC (permalink / raw)
  To: heiko
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	quentin.schulz, andy.yan, dri-devel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, cn.liweihao, Heiko Stuebner

From: Heiko Stuebner <heiko.stuebner@cherry.de>

The video-demo adapter also works on the Lion SoM when running
on a Haikou baseboard, so add an overlay for it.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
---
 arch/arm64/boot/dts/rockchip/Makefile         |   5 +
 .../rk3368-lion-haikou-video-demo.dtso        | 174 ++++++++++++++++++
 2 files changed, 179 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso

diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index ad684e3831bc..494fdd685a5c 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -42,6 +42,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-evb-act8846.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-geekbox.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-lba3368.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-lion-haikou.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-lion-haikou-video-demo.dtbo
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-orion-r68-meta.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-px5-evb.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-r88.dtb
@@ -231,6 +232,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += px30-ringneck-haikou-haikou-video-demo.dtb
 px30-ringneck-haikou-haikou-video-demo-dtbs := px30-ringneck-haikou.dtb \
 	px30-ringneck-haikou-video-demo.dtbo
 
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-lion-haikou-haikou-video-demo.dtb
+rk3368-lion-haikou-haikou-video-demo-dtbs := rk3368-lion-haikou.dtb \
+	rk3368-lion-haikou-video-demo.dtbo
+
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou-haikou-video-demo.dtb
 rk3399-puma-haikou-haikou-video-demo-dtbs := rk3399-puma-haikou.dtb \
 	rk3399-puma-haikou-video-demo.dtbo
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso b/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso
new file mode 100644
index 000000000000..e7767c008144
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso
@@ -0,0 +1,174 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2025 Cherry Embedded Solutions GmbH
+ *
+ * DEVKIT ADDON CAM-TS-A01
+ * https://embedded.cherry.de/product/development-kit/
+ *
+ * DT-overlay for the camera / DSI demo appliance for Haikou boards.
+ * In the flavour for use with a Puma system-on-module.
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/clock/rk3368-cru.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+
+&{/} {
+	backlight: backlight {
+		compatible = "pwm-backlight";
+		power-supply = <&dc_12v>;
+		pwms = <&pwm1 0 25000 0>;
+	};
+
+	cam_afvdd_2v8: regulator-cam-afvdd-2v8 {
+		compatible = "regulator-fixed";
+		gpio = <&pca9670 2 GPIO_ACTIVE_LOW>;
+		regulator-max-microvolt = <2800000>;
+		regulator-min-microvolt = <2800000>;
+		regulator-name = "cam-afvdd-2v8";
+		vin-supply = <&vcc2v8_video>;
+	};
+
+	cam_avdd_2v8: regulator-cam-avdd-2v8 {
+		compatible = "regulator-fixed";
+		gpio = <&pca9670 4 GPIO_ACTIVE_LOW>;
+		regulator-max-microvolt = <2800000>;
+		regulator-min-microvolt = <2800000>;
+		regulator-name = "cam-avdd-2v8";
+		vin-supply = <&vcc2v8_video>;
+	};
+
+	cam_dovdd_1v8: regulator-cam-dovdd-1v8 {
+		compatible = "regulator-fixed";
+		gpio = <&pca9670 3 GPIO_ACTIVE_LOW>;
+		regulator-max-microvolt = <1800000>;
+		regulator-min-microvolt = <1800000>;
+		regulator-name = "cam-dovdd-1v8";
+		vin-supply = <&vcc1v8_video>;
+	};
+
+	cam_dvdd_1v2: regulator-cam-dvdd-1v2 {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&pca9670 5 GPIO_ACTIVE_HIGH>;
+		regulator-max-microvolt = <1200000>;
+		regulator-min-microvolt = <1200000>;
+		regulator-name = "cam-dvdd-1v2";
+		vin-supply = <&vcc3v3_baseboard>;
+	};
+
+	vcc1v8_video: regulator-vcc1v8-video {
+		compatible = "regulator-fixed";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-max-microvolt = <1800000>;
+		regulator-min-microvolt = <1800000>;
+		regulator-name = "vcc1v8-video";
+		vin-supply = <&vcc3v3_baseboard>;
+	};
+
+	vcc2v8_video: regulator-vcc2v8-video {
+		compatible = "regulator-fixed";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-max-microvolt = <2800000>;
+		regulator-min-microvolt = <2800000>;
+		regulator-name = "vcc2v8-video";
+		vin-supply = <&vcc3v3_baseboard>;
+	};
+
+	video-adapter-leds {
+		compatible = "gpio-leds";
+
+		video-adapter-led {
+			color = <LED_COLOR_ID_BLUE>;
+			gpios = <&pca9670 7 GPIO_ACTIVE_HIGH>;
+			label = "video-adapter-led";
+			linux,default-trigger = "none";
+		};
+	};
+};
+
+&dphy {
+	status = "okay";
+};
+
+&i2c_gp2 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	/* OV5675, GT911, DW9714 are limited to 400KHz */
+	clock-frequency = <400000>;
+
+	touchscreen@14 {
+		compatible = "goodix,gt911";
+		reg = <0x14>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <RK_PB5 IRQ_TYPE_LEVEL_LOW>;
+		irq-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
+		pinctrl-0 = <&touch_int>;
+		pinctrl-names = "default";
+		reset-gpios = <&pca9670 1 GPIO_ACTIVE_HIGH>;
+		AVDD28-supply = <&vcc2v8_video>;
+		VDDIO-supply = <&vcc3v3_baseboard>;
+	};
+
+	pca9670: gpio@27 {
+		compatible = "nxp,pca9670";
+		reg = <0x27>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		pinctrl-0 = <&pca9670_resetn>;
+		pinctrl-names = "default";
+		reset-gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&mipi_dsi {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	panel@0 {
+		compatible = "leadtek,ltk050h3148w";
+		reg = <0>;
+		backlight = <&backlight>;
+		iovcc-supply = <&vcc1v8_video>;
+		reset-gpios = <&pca9670 0 GPIO_ACTIVE_LOW>;
+		vci-supply = <&vcc2v8_video>;
+
+		port {
+			mipi_in_panel: endpoint {
+				remote-endpoint = <&mipi_out_panel>;
+			};
+		};
+	};
+};
+
+&mipi_out {
+	mipi_out_panel: endpoint {
+		remote-endpoint = <&mipi_in_panel>;
+	};
+};
+
+&pinctrl {
+	pca9670 {
+		pca9670_resetn: pca9670-resetn {
+			rockchip,pins = <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	touch {
+		touch_int: touch-int {
+			rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+};
+
+&pwm1 {
+	status = "okay";
+};
\ No newline at end of file
-- 
2.47.2



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

* Re:[PATCH v2 2/9] drm/rockchip: hdmi: add RK3368 controller variant
  2025-10-21  7:42 ` [PATCH v2 2/9] drm/rockchip: hdmi: add RK3368 controller variant Heiko Stuebner
@ 2025-10-26  8:38   ` Andy Yan
  0 siblings, 0 replies; 21+ messages in thread
From: Andy Yan @ 2025-10-26  8:38 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	quentin.schulz, andy.yan, dri-devel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, cn.liweihao, Heiko Stuebner


Hello Heiko,

At 2025-10-21 15:42:47, "Heiko Stuebner" <heiko@sntech.de> wrote:
>From: Heiko Stuebner <heiko.stuebner@cherry.de>
>
>The RK3368 has only one VOP, so there is no source selection happening
>and the controller uses an internal PHY for the HDMI output.
>
>Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>

Reviewed-by: Andy Yan <andyshrk@163.com>

Thanks


>---
> drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
>diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
>index 7b613997bb50..95ff3fce97a3 100644
>--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
>+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
>@@ -467,6 +467,19 @@ static const struct dw_hdmi_plat_data rk3328_hdmi_drv_data = {
> 	.use_drm_infoframe = true,
> };
> 
>+static struct rockchip_hdmi_chip_data rk3368_chip_data = {
>+	.lcdsel_grf_reg = -1,
>+};
>+
>+static const struct dw_hdmi_plat_data rk3368_hdmi_drv_data = {
>+	.mode_valid = dw_hdmi_rockchip_mode_valid,
>+	.mpll_cfg   = rockchip_mpll_cfg,
>+	.cur_ctr    = rockchip_cur_ctr,
>+	.phy_config = rockchip_phy_config,
>+	.phy_data = &rk3368_chip_data,
>+	.use_drm_infoframe = true,
>+};
>+
> static struct rockchip_hdmi_chip_data rk3399_chip_data = {
> 	.lcdsel_grf_reg = RK3399_GRF_SOC_CON20,
> 	.lcdsel_big = FIELD_PREP_WM16_CONST(RK3399_HDMI_LCDC_SEL, 0),
>@@ -507,6 +520,9 @@ static const struct of_device_id dw_hdmi_rockchip_dt_ids[] = {
> 	{ .compatible = "rockchip,rk3328-dw-hdmi",
> 	  .data = &rk3328_hdmi_drv_data
> 	},
>+	{ .compatible = "rockchip,rk3368-dw-hdmi",
>+	 .data = &rk3368_hdmi_drv_data
>+	},
> 	{ .compatible = "rockchip,rk3399-dw-hdmi",
> 	  .data = &rk3399_hdmi_drv_data
> 	},
>-- 
>2.47.2

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

* Re: (subset) [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion
  2025-10-21  7:42 [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
                   ` (8 preceding siblings ...)
  2025-10-21  7:42 ` [PATCH v2 9/9] arm64: dts: rockchip: Add the Video-Demo overlay for Lion Haikou Heiko Stuebner
@ 2025-11-17 21:59 ` Heiko Stuebner
  2025-11-20 22:23 ` Heiko Stuebner
  2025-12-15 13:57 ` Heiko Stuebner
  11 siblings, 0 replies; 21+ messages in thread
From: Heiko Stuebner @ 2025-11-17 21:59 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	quentin.schulz, andy.yan, dri-devel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, cn.liweihao


On Tue, 21 Oct 2025 09:42:45 +0200, Heiko Stuebner wrote:
> This series adds the necessary bits for HDMI output on RK3368 and enables
> this on RK3368-Lion. At the same time, use the recently added DSI support
> to enable the generic Video-Demo-adapter as an overlay on Lion as well.
> 
> 
> The reason I'm shaving this Yak is that the recently added DSI support
> created DTC warnings about a single endpoint with an address.
> 
> [...]

Applied, thanks!

[3/9] soc: rockchip: grf: Add select correct PWM implementation on RK3368
      commit: 048213a38e7ac1591f725e370c152cc80dd84105

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>


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

* Re: (subset) [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion
  2025-10-21  7:42 [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
                   ` (9 preceding siblings ...)
  2025-11-17 21:59 ` (subset) [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
@ 2025-11-20 22:23 ` Heiko Stuebner
  2025-12-15 13:57 ` Heiko Stuebner
  11 siblings, 0 replies; 21+ messages in thread
From: Heiko Stuebner @ 2025-11-20 22:23 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	quentin.schulz, andy.yan, dri-devel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, cn.liweihao


On Tue, 21 Oct 2025 09:42:45 +0200, Heiko Stuebner wrote:
> This series adds the necessary bits for HDMI output on RK3368 and enables
> this on RK3368-Lion. At the same time, use the recently added DSI support
> to enable the generic Video-Demo-adapter as an overlay on Lion as well.
> 
> 
> The reason I'm shaving this Yak is that the recently added DSI support
> created DTC warnings about a single endpoint with an address.
> 
> [...]

Applied, thanks!

[4/9] arm64: dts: rockchip: Add power-domain to RK3368 DSI controller
      commit: 8319be65e860a2881e5213ed95e03992037bf5c1
[5/9] arm64: dts: rockchip: Add power-domain to RK3368 VOP controller
      commit: f54b09d46f72e4548e14476ba771231b0ec2b0af

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>


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

* Re: [PATCH v2 4/9] arm64: dts: rockchip: Add power-domain to RK3368 DSI controller
  2025-10-21  7:42 ` [PATCH v2 4/9] arm64: dts: rockchip: Add power-domain to RK3368 DSI controller Heiko Stuebner
@ 2025-12-01 15:23   ` Quentin Schulz
  0 siblings, 0 replies; 21+ messages in thread
From: Quentin Schulz @ 2025-12-01 15:23 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	andy.yan, dri-devel, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel, cn.liweihao, Heiko Stuebner

Hi Heiko,

On 10/21/25 9:42 AM, Heiko Stuebner wrote:
> From: Heiko Stuebner <heiko.stuebner@cherry.de>
> 
> The DSI controller is also part of the VIO power-domain and it
> definitely needs to be on when accessing it to not cause SError
> faults, so add the power-domains property to it.
> 
> Fixes: 5023d0cd6183 ("arm64: dts: rockchip: Add DSI for RK3368")
> Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
> ---
>   arch/arm64/boot/dts/rockchip/rk3368.dtsi | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3368.dtsi b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
> index 8f0216203241..5b2cbb3003b6 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3368.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
> @@ -896,6 +896,7 @@ mipi_dsi: dsi@ff960000 {
>   		clock-names = "pclk";
>   		phys = <&dphy>;
>   		phy-names = "dphy";
> +		power-domains = <&power RK3368_PD_VIO>;

Shouldn't we have the same for the PHY as well?

It's not entirely clear to me as pclk_dphytx0_phy seems to belong to 
PD_ALIVE according to page 62 of TRM v1.1, but Table 4-1 RK3368 Power 
Domain and Voltage Domain Summary doesn't seem to confirm that.

Cheers,
Quentin


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

* Re: [PATCH v2 5/9] arm64: dts: rockchip: Add power-domain to RK3368 VOP controller
  2025-10-21  7:42 ` [PATCH v2 5/9] arm64: dts: rockchip: Add power-domain to RK3368 VOP controller Heiko Stuebner
@ 2025-12-01 15:38   ` Quentin Schulz
  0 siblings, 0 replies; 21+ messages in thread
From: Quentin Schulz @ 2025-12-01 15:38 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	andy.yan, dri-devel, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel, cn.liweihao, Heiko Stuebner

Hi Heiko,

On 10/21/25 9:42 AM, Heiko Stuebner wrote:
> From: Heiko Stuebner <heiko.stuebner@cherry.de>
> 
> The VOP is also part of the VIO power-domain and it definitely needs to
> be on when accessing it to not cause SError faults, so add the
> power-domains property to it.
> 
> Fixes: ef06b5ddee1e ("arm64: dts: rockchip: Add display subsystem for RK3368")

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>

Thanks!
Quentin


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

* Re: [PATCH v2 6/9] arm64: dts: rockchip: Use phandle for i2c_lvds_blc on rk3368-lion haikou
  2025-10-21  7:42 ` [PATCH v2 6/9] arm64: dts: rockchip: Use phandle for i2c_lvds_blc on rk3368-lion haikou Heiko Stuebner
@ 2025-12-01 15:41   ` Quentin Schulz
  0 siblings, 0 replies; 21+ messages in thread
From: Quentin Schulz @ 2025-12-01 15:41 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	andy.yan, dri-devel, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel, cn.liweihao, Heiko Stuebner

Hi Heiko,

On 10/21/25 9:42 AM, Heiko Stuebner wrote:
> From: Heiko Stuebner <heiko.stuebner@cherry.de>
> 
> i2c@0 on i2cmux2 does already have a phandle i2c_lvds_blc defined.
> 
> Use this one instead of replicating the hierarchy again, as this might
> result in strange errors if the lion dtsi is changed at some point
> in the future.
> 

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>

Thanks!
Quentin


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

* Re: [PATCH v2 8/9] arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou
  2025-10-21  7:42 ` [PATCH v2 8/9] arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou Heiko Stuebner
@ 2025-12-01 16:31   ` Quentin Schulz
  2025-12-02 10:41   ` Quentin Schulz
  1 sibling, 0 replies; 21+ messages in thread
From: Quentin Schulz @ 2025-12-01 16:31 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	andy.yan, dri-devel, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel, cn.liweihao, Heiko Stuebner

Hi Heiko,

On 10/21/25 9:42 AM, Heiko Stuebner wrote:
> From: Heiko Stuebner <heiko.stuebner@cherry.de>
> 
> Enable the VOP and HDMI controller on the Lion-Haikou board.
> 
> Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
> ---
>   .../boot/dts/rockchip/rk3368-lion-haikou.dts   | 18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts b/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts
> index abd1af97456a..a8eb4e9c2778 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts
> @@ -58,6 +58,16 @@ vcc5v0_otg: regulator-vcc5v0-otg {
>   	};
>   };
>   
> +&display_subsystem {
> +	status = "okay";
> +};
> +
> +&hdmi {
> +	avdd-0v9-supply = <&vdd10_video>;
> +	avdd-1v8-supply = <&vcc18_video>;
> +	status = "okay";
> +};
> +
>   &i2c_lvds_blc {
>   	eeprom: eeprom@50 {
>   		compatible = "atmel,24c01";
> @@ -101,6 +111,14 @@ &uart1 {
>   	status = "disabled";
>   };
>   
> +&vop {
> +	status = "okay";
> +};
> +
> +&vop_mmu {
> +	status = "okay";
> +};
> +

This isn't alphabetically sorted (see &pinctrl right after) but I think 
it's rather pinctrl being in the wrong location than vop* as all the 
other nodes seem to be sorted properly, thus:

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>

Thanks!
Quentin


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

* Re: [PATCH v2 8/9] arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou
  2025-10-21  7:42 ` [PATCH v2 8/9] arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou Heiko Stuebner
  2025-12-01 16:31   ` Quentin Schulz
@ 2025-12-02 10:41   ` Quentin Schulz
  1 sibling, 0 replies; 21+ messages in thread
From: Quentin Schulz @ 2025-12-02 10:41 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	andy.yan, dri-devel, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel, cn.liweihao, Heiko Stuebner

Hi Heiko,

On 10/21/25 9:42 AM, Heiko Stuebner wrote:
> From: Heiko Stuebner <heiko.stuebner@cherry.de>
> 
> Enable the VOP and HDMI controller on the Lion-Haikou board.
> 
> Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
> ---
>   .../boot/dts/rockchip/rk3368-lion-haikou.dts   | 18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts b/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts
> index abd1af97456a..a8eb4e9c2778 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts
> @@ -58,6 +58,16 @@ vcc5v0_otg: regulator-vcc5v0-otg {
>   	};
>   };
>   
> +&display_subsystem {
> +	status = "okay";
> +};
> +
> +&hdmi {
> +	avdd-0v9-supply = <&vdd10_video>;
> +	avdd-1v8-supply = <&vcc18_video>;

After a long night of sleep, I believe this should be specified in 
rk3368-lion.dtsi SoM DTSI and not in rk3368-lion-haikou.dts as it's 
SoM-specific.

Cheers,
Quentin


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

* Re: [PATCH v2 9/9] arm64: dts: rockchip: Add the Video-Demo overlay for Lion Haikou
  2025-10-21  7:42 ` [PATCH v2 9/9] arm64: dts: rockchip: Add the Video-Demo overlay for Lion Haikou Heiko Stuebner
@ 2025-12-02 13:37   ` Quentin Schulz
  2025-12-03 10:36     ` Quentin Schulz
  0 siblings, 1 reply; 21+ messages in thread
From: Quentin Schulz @ 2025-12-02 13:37 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	andy.yan, dri-devel, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel, cn.liweihao, Heiko Stuebner

Hi Heiko,

On 10/21/25 9:42 AM, Heiko Stuebner wrote:
> From: Heiko Stuebner <heiko.stuebner@cherry.de>
> 
> The video-demo adapter also works on the Lion SoM when running
> on a Haikou baseboard, so add an overlay for it.
> 
> Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
> ---
>   arch/arm64/boot/dts/rockchip/Makefile         |   5 +
>   .../rk3368-lion-haikou-video-demo.dtso        | 174 ++++++++++++++++++
>   2 files changed, 179 insertions(+)
>   create mode 100644 arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso
> 
> diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
> index ad684e3831bc..494fdd685a5c 100644
> --- a/arch/arm64/boot/dts/rockchip/Makefile
> +++ b/arch/arm64/boot/dts/rockchip/Makefile
> @@ -42,6 +42,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-evb-act8846.dtb
>   dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-geekbox.dtb
>   dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-lba3368.dtb
>   dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-lion-haikou.dtb
> +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-lion-haikou-video-demo.dtbo
>   dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-orion-r68-meta.dtb
>   dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-px5-evb.dtb
>   dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-r88.dtb
> @@ -231,6 +232,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += px30-ringneck-haikou-haikou-video-demo.dtb
>   px30-ringneck-haikou-haikou-video-demo-dtbs := px30-ringneck-haikou.dtb \
>   	px30-ringneck-haikou-video-demo.dtbo
>   
> +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-lion-haikou-haikou-video-demo.dtb
> +rk3368-lion-haikou-haikou-video-demo-dtbs := rk3368-lion-haikou.dtb \
> +	rk3368-lion-haikou-video-demo.dtbo
> +
>   dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou-haikou-video-demo.dtb
>   rk3399-puma-haikou-haikou-video-demo-dtbs := rk3399-puma-haikou.dtb \
>   	rk3399-puma-haikou-video-demo.dtbo
> diff --git a/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso b/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso
> new file mode 100644
> index 000000000000..e7767c008144
> --- /dev/null
> +++ b/arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso
> @@ -0,0 +1,174 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (c) 2025 Cherry Embedded Solutions GmbH
> + *
> + * DEVKIT ADDON CAM-TS-A01
> + * https://embedded.cherry.de/product/development-kit/
> + *
> + * DT-overlay for the camera / DSI demo appliance for Haikou boards.
> + * In the flavour for use with a Puma system-on-module.

s/Puma/Lion/

> + */
> +
> +/dts-v1/;
> +/plugin/;
> +
> +#include <dt-bindings/clock/rk3368-cru.h>
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/leds/common.h>
> +#include <dt-bindings/pinctrl/rockchip.h>
> +
> +&{/} {
> +	backlight: backlight {
> +		compatible = "pwm-backlight";
> +		power-supply = <&dc_12v>;
> +		pwms = <&pwm1 0 25000 0>;
> +	};
> +
> +	cam_afvdd_2v8: regulator-cam-afvdd-2v8 {
> +		compatible = "regulator-fixed";
> +		gpio = <&pca9670 2 GPIO_ACTIVE_LOW>;
> +		regulator-max-microvolt = <2800000>;
> +		regulator-min-microvolt = <2800000>;
> +		regulator-name = "cam-afvdd-2v8";
> +		vin-supply = <&vcc2v8_video>;
> +	};
> +
> +	cam_avdd_2v8: regulator-cam-avdd-2v8 {
> +		compatible = "regulator-fixed";
> +		gpio = <&pca9670 4 GPIO_ACTIVE_LOW>;
> +		regulator-max-microvolt = <2800000>;
> +		regulator-min-microvolt = <2800000>;
> +		regulator-name = "cam-avdd-2v8";
> +		vin-supply = <&vcc2v8_video>;
> +	};
> +
> +	cam_dovdd_1v8: regulator-cam-dovdd-1v8 {
> +		compatible = "regulator-fixed";
> +		gpio = <&pca9670 3 GPIO_ACTIVE_LOW>;
> +		regulator-max-microvolt = <1800000>;
> +		regulator-min-microvolt = <1800000>;
> +		regulator-name = "cam-dovdd-1v8";
> +		vin-supply = <&vcc1v8_video>;
> +	};
> +
> +	cam_dvdd_1v2: regulator-cam-dvdd-1v2 {
> +		compatible = "regulator-fixed";
> +		enable-active-high;
> +		gpio = <&pca9670 5 GPIO_ACTIVE_HIGH>;
> +		regulator-max-microvolt = <1200000>;
> +		regulator-min-microvolt = <1200000>;
> +		regulator-name = "cam-dvdd-1v2";
> +		vin-supply = <&vcc3v3_baseboard>;
> +	};
> +
> +	vcc1v8_video: regulator-vcc1v8-video {
> +		compatible = "regulator-fixed";
> +		regulator-always-on;
> +		regulator-boot-on;
> +		regulator-max-microvolt = <1800000>;
> +		regulator-min-microvolt = <1800000>;
> +		regulator-name = "vcc1v8-video";
> +		vin-supply = <&vcc3v3_baseboard>;
> +	};
> +
> +	vcc2v8_video: regulator-vcc2v8-video {
> +		compatible = "regulator-fixed";
> +		regulator-always-on;
> +		regulator-boot-on;
> +		regulator-max-microvolt = <2800000>;
> +		regulator-min-microvolt = <2800000>;
> +		regulator-name = "vcc2v8-video";
> +		vin-supply = <&vcc3v3_baseboard>;
> +	};
> +
> +	video-adapter-leds {
> +		compatible = "gpio-leds";
> +
> +		video-adapter-led {
> +			color = <LED_COLOR_ID_BLUE>;
> +			gpios = <&pca9670 7 GPIO_ACTIVE_HIGH>;
> +			label = "video-adapter-led";
> +			linux,default-trigger = "none";
> +		};
> +	};
> +};
> +
> +&dphy {
> +	status = "okay";
> +};
> +
> +&i2c_gp2 {
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	/* OV5675, GT911, DW9714 are limited to 400KHz */
> +	clock-frequency = <400000>;
> +
> +	touchscreen@14 {
> +		compatible = "goodix,gt911";
> +		reg = <0x14>;
> +		interrupt-parent = <&gpio1>;
> +		interrupts = <RK_PB5 IRQ_TYPE_LEVEL_LOW>;
> +		irq-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
> +		pinctrl-0 = <&touch_int>;
> +		pinctrl-names = "default";
> +		reset-gpios = <&pca9670 1 GPIO_ACTIVE_HIGH>;
> +		AVDD28-supply = <&vcc2v8_video>;
> +		VDDIO-supply = <&vcc3v3_baseboard>;
> +	};
> +
> +	pca9670: gpio@27 {
> +		compatible = "nxp,pca9670";
> +		reg = <0x27>;
> +		gpio-controller;
> +		#gpio-cells = <2>;
> +		pinctrl-0 = <&pca9670_resetn>;
> +		pinctrl-names = "default";
> +		reset-gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>;
> +	};
> +};
> +
> +&mipi_dsi {
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	status = "okay";
> +
> +	panel@0 {
> +		compatible = "leadtek,ltk050h3148w";
> +		reg = <0>;
> +		backlight = <&backlight>;
> +		iovcc-supply = <&vcc1v8_video>;
> +		reset-gpios = <&pca9670 0 GPIO_ACTIVE_LOW>;
> +		vci-supply = <&vcc2v8_video>;
> +
> +		port {
> +			mipi_in_panel: endpoint {
> +				remote-endpoint = <&mipi_out_panel>;
> +			};
> +		};
> +	};
> +};
> +
> +&mipi_out {
> +	mipi_out_panel: endpoint {
> +		remote-endpoint = <&mipi_in_panel>;
> +	};
> +};
> +
> +&pinctrl {
> +	pca9670 {
> +		pca9670_resetn: pca9670-resetn {
> +			rockchip,pins = <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +	};
> +
> +	touch {
> +		touch_int: touch-int {
> +			rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +	};
> +};
> +
> +&pwm1 {
> +	status = "okay";
> +};

Both Puma and Ringneck enable the PWM controller in Haikou as it is 
exposed as BLT_CTRL signal on the MISC I/O pin header. The Qseven 
standard specifies this signal is only for PWM (either for a panel 
backlight or generic PWM), so I believe it's proper to enable it in the 
motherboard DTS to also align with the DTSO for the other modules.

I've tested the touchscreen, backlight and LED, they all work as expected.

I have not yet managed to make the DSI display work. It is detected but 
modetest test pattern doesn't show, only blank.

Since there's only one VOP, I'm also wondering if we need to disable 
HDMI here? Or is Linux capable of handling multiple connected displays 
but only use one? I've tried to make DSI work with the HDMI controller 
disabled, it didn't change anything.

Cheers,
Quentin


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

* Re: [PATCH v2 9/9] arm64: dts: rockchip: Add the Video-Demo overlay for Lion Haikou
  2025-12-02 13:37   ` Quentin Schulz
@ 2025-12-03 10:36     ` Quentin Schulz
  0 siblings, 0 replies; 21+ messages in thread
From: Quentin Schulz @ 2025-12-03 10:36 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	andy.yan, dri-devel, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel, cn.liweihao, Heiko Stuebner

Hi Heiko,

On 12/2/25 2:37 PM, Quentin Schulz wrote:
> Hi Heiko,
> 
> On 10/21/25 9:42 AM, Heiko Stuebner wrote:
>> From: Heiko Stuebner <heiko.stuebner@cherry.de>

[...]

> I have not yet managed to make the DSI display work. It is detected but 
> modetest test pattern doesn't show, only blank.
> 

Seems like it was a classical case of PEBKAC. Haven't figured out what I 
did wrong the whole of yesterday, but it works fine today.

> Since there's only one VOP, I'm also wondering if we need to disable 
> HDMI here? Or is Linux capable of handling multiple connected displays 
> but only use one? I've tried to make DSI work with the HDMI controller 
> disabled, it didn't change anything.
> 

I can display the modetest pattern on either DSI or HDMI, when HDMI is 
used to display the pattern, DSI is not showing anything (it shows the 
console by default for me).

So no need to disable HDMI in the overlay with the DSI display.

Tested-by: Quentin Schulz <quentin.schulz@cherry.de>

Thanks!
Quentin


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

* Re: (subset) [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion
  2025-10-21  7:42 [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
                   ` (10 preceding siblings ...)
  2025-11-20 22:23 ` Heiko Stuebner
@ 2025-12-15 13:57 ` Heiko Stuebner
  11 siblings, 0 replies; 21+ messages in thread
From: Heiko Stuebner @ 2025-12-15 13:57 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: maarten.lankhorst, mripard, tzimmermann, robh, krzk+dt, conor+dt,
	quentin.schulz, andy.yan, dri-devel, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel, cn.liweihao


On Tue, 21 Oct 2025 09:42:45 +0200, Heiko Stuebner wrote:
> This series adds the necessary bits for HDMI output on RK3368 and enables
> this on RK3368-Lion. At the same time, use the recently added DSI support
> to enable the generic Video-Demo-adapter as an overlay on Lion as well.
> 
> 
> The reason I'm shaving this Yak is that the recently added DSI support
> created DTC warnings about a single endpoint with an address.
> 
> [...]

Applied, thanks!

[1/9] dt-bindings: display: rockchip: dw-hdmi: Add compatible for RK3368 HDMI
      commit: 0edbd43e0c149152b917c0cde61e4bd34a5bd118
[2/9] drm/rockchip: hdmi: add RK3368 controller variant
      commit: e7a943f0824b584e42847ad9642d7fb751022cf6

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>


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

end of thread, other threads:[~2025-12-15 13:57 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-21  7:42 [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
2025-10-21  7:42 ` [PATCH v2 1/9] dt-bindings: display: rockchip: dw-hdmi: Add compatible for RK3368 HDMI Heiko Stuebner
2025-10-21  7:42 ` [PATCH v2 2/9] drm/rockchip: hdmi: add RK3368 controller variant Heiko Stuebner
2025-10-26  8:38   ` Andy Yan
2025-10-21  7:42 ` [PATCH v2 3/9] soc: rockchip: grf: Add select correct PWM implementation on RK3368 Heiko Stuebner
2025-10-21  7:42 ` [PATCH v2 4/9] arm64: dts: rockchip: Add power-domain to RK3368 DSI controller Heiko Stuebner
2025-12-01 15:23   ` Quentin Schulz
2025-10-21  7:42 ` [PATCH v2 5/9] arm64: dts: rockchip: Add power-domain to RK3368 VOP controller Heiko Stuebner
2025-12-01 15:38   ` Quentin Schulz
2025-10-21  7:42 ` [PATCH v2 6/9] arm64: dts: rockchip: Use phandle for i2c_lvds_blc on rk3368-lion haikou Heiko Stuebner
2025-12-01 15:41   ` Quentin Schulz
2025-10-21  7:42 ` [PATCH v2 7/9] arm64: dts: rockchip: Add HDMI node to RK3368 Heiko Stuebner
2025-10-21  7:42 ` [PATCH v2 8/9] arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou Heiko Stuebner
2025-12-01 16:31   ` Quentin Schulz
2025-12-02 10:41   ` Quentin Schulz
2025-10-21  7:42 ` [PATCH v2 9/9] arm64: dts: rockchip: Add the Video-Demo overlay for Lion Haikou Heiko Stuebner
2025-12-02 13:37   ` Quentin Schulz
2025-12-03 10:36     ` Quentin Schulz
2025-11-17 21:59 ` (subset) [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
2025-11-20 22:23 ` Heiko Stuebner
2025-12-15 13:57 ` Heiko Stuebner

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