* [PATCH 1/9] dt-bindings: display: rockchip: dw-hdmi: Add compatible for RK3368 HDMI
2025-10-20 8:24 [PATCH 0/9] Gernal RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
@ 2025-10-20 8:25 ` Heiko Stuebner
2025-10-20 17:18 ` Conor Dooley
2025-10-20 8:25 ` [PATCH 2/9] drm/rockchip: hdmi: add RK3368 controller variant Heiko Stuebner
` (8 subsequent siblings)
9 siblings, 1 reply; 12+ messages in thread
From: Heiko Stuebner @ 2025-10-20 8:25 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>
Define a new compatible for RK3368 HDMI.
The RK3368 HDMI also uses a PHY internal in 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.
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] 12+ messages in thread* Re: [PATCH 1/9] dt-bindings: display: rockchip: dw-hdmi: Add compatible for RK3368 HDMI
2025-10-20 8:25 ` [PATCH 1/9] dt-bindings: display: rockchip: dw-hdmi: Add compatible for RK3368 HDMI Heiko Stuebner
@ 2025-10-20 17:18 ` Conor Dooley
0 siblings, 0 replies; 12+ messages in thread
From: Conor Dooley @ 2025-10-20 17:18 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
[-- Attachment #1: Type: text/plain, Size: 75 bytes --]
Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/9] drm/rockchip: hdmi: add RK3368 controller variant
2025-10-20 8:24 [PATCH 0/9] Gernal RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
2025-10-20 8:25 ` [PATCH 1/9] dt-bindings: display: rockchip: dw-hdmi: Add compatible for RK3368 HDMI Heiko Stuebner
@ 2025-10-20 8:25 ` Heiko Stuebner
2025-10-20 8:25 ` [PATCH 3/9] soc: rockchip: grf: Add select correct PWM implementation on RK3368 Heiko Stuebner
` (7 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Heiko Stuebner @ 2025-10-20 8:25 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] 12+ messages in thread* [PATCH 3/9] soc: rockchip: grf: Add select correct PWM implementation on RK3368
2025-10-20 8:24 [PATCH 0/9] Gernal RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
2025-10-20 8:25 ` [PATCH 1/9] dt-bindings: display: rockchip: dw-hdmi: Add compatible for RK3368 HDMI Heiko Stuebner
2025-10-20 8:25 ` [PATCH 2/9] drm/rockchip: hdmi: add RK3368 controller variant Heiko Stuebner
@ 2025-10-20 8:25 ` Heiko Stuebner
2025-10-20 8:25 ` [PATCH 4/9] arm64: dts: rockchip: Add power-domain to RK3368 DSI controller Heiko Stuebner
` (6 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Heiko Stuebner @ 2025-10-20 8:25 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 one 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 already is 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] 12+ messages in thread* [PATCH 4/9] arm64: dts: rockchip: Add power-domain to RK3368 DSI controller
2025-10-20 8:24 [PATCH 0/9] Gernal RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
` (2 preceding siblings ...)
2025-10-20 8:25 ` [PATCH 3/9] soc: rockchip: grf: Add select correct PWM implementation on RK3368 Heiko Stuebner
@ 2025-10-20 8:25 ` Heiko Stuebner
2025-10-20 8:25 ` [PATCH 5/9] arm64: dts: rockchip: Add power-domain to RK3368 VOP controller Heiko Stuebner
` (5 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Heiko Stuebner @ 2025-10-20 8:25 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
definitly needs to be on when accessing it to no cause SError
faults, so add the power-domain 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] 12+ messages in thread* [PATCH 5/9] arm64: dts: rockchip: Add power-domain to RK3368 VOP controller
2025-10-20 8:24 [PATCH 0/9] Gernal RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
` (3 preceding siblings ...)
2025-10-20 8:25 ` [PATCH 4/9] arm64: dts: rockchip: Add power-domain to RK3368 DSI controller Heiko Stuebner
@ 2025-10-20 8:25 ` Heiko Stuebner
2025-10-20 8:25 ` [PATCH 6/9] arm64: dts: rockchip: Use phandle for i2c_lvds_blc on rk3368-lion haikou Heiko Stuebner
` (4 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Heiko Stuebner @ 2025-10-20 8:25 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 definitly needs to
be on when accessing it to no cause SError faults, so add the
power-domain 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] 12+ messages in thread* [PATCH 6/9] arm64: dts: rockchip: Use phandle for i2c_lvds_blc on rk3368-lion haikou
2025-10-20 8:24 [PATCH 0/9] Gernal RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
` (4 preceding siblings ...)
2025-10-20 8:25 ` [PATCH 5/9] arm64: dts: rockchip: Add power-domain to RK3368 VOP controller Heiko Stuebner
@ 2025-10-20 8:25 ` Heiko Stuebner
2025-10-20 8:25 ` [PATCH 7/9] arm64: dts: rockchip: Add HDMI node to RK3368 Heiko Stuebner
` (3 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Heiko Stuebner @ 2025-10-20 8:25 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 hirarchy again, as this might
result in strange errors if the lion dtsi is change 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] 12+ messages in thread* [PATCH 7/9] arm64: dts: rockchip: Add HDMI node to RK3368
2025-10-20 8:24 [PATCH 0/9] Gernal RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
` (5 preceding siblings ...)
2025-10-20 8:25 ` [PATCH 6/9] arm64: dts: rockchip: Use phandle for i2c_lvds_blc on rk3368-lion haikou Heiko Stuebner
@ 2025-10-20 8:25 ` Heiko Stuebner
2025-10-20 8:25 ` [PATCH 8/9] arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou Heiko Stuebner
` (2 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Heiko Stuebner @ 2025-10-20 8:25 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] 12+ messages in thread* [PATCH 8/9] arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou
2025-10-20 8:24 [PATCH 0/9] Gernal RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
` (6 preceding siblings ...)
2025-10-20 8:25 ` [PATCH 7/9] arm64: dts: rockchip: Add HDMI node to RK3368 Heiko Stuebner
@ 2025-10-20 8:25 ` Heiko Stuebner
2025-10-20 8:25 ` [PATCH 9/9] arm64: dts: rockchip: Add the Video-Demo overlay for Lion Haikou Heiko Stuebner
2025-10-20 10:23 ` [PATCH 0/9] Gernal RK3368 HDMI support and 2 outputs for RK3368-Lion Diederik de Haas
9 siblings, 0 replies; 12+ messages in thread
From: Heiko Stuebner @ 2025-10-20 8:25 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] 12+ messages in thread* [PATCH 9/9] arm64: dts: rockchip: Add the Video-Demo overlay for Lion Haikou
2025-10-20 8:24 [PATCH 0/9] Gernal RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
` (7 preceding siblings ...)
2025-10-20 8:25 ` [PATCH 8/9] arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou Heiko Stuebner
@ 2025-10-20 8:25 ` Heiko Stuebner
2025-10-20 10:23 ` [PATCH 0/9] Gernal RK3368 HDMI support and 2 outputs for RK3368-Lion Diederik de Haas
9 siblings, 0 replies; 12+ messages in thread
From: Heiko Stuebner @ 2025-10-20 8:25 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] 12+ messages in thread* Re: [PATCH 0/9] Gernal RK3368 HDMI support and 2 outputs for RK3368-Lion
2025-10-20 8:24 [PATCH 0/9] Gernal RK3368 HDMI support and 2 outputs for RK3368-Lion Heiko Stuebner
` (8 preceding siblings ...)
2025-10-20 8:25 ` [PATCH 9/9] arm64: dts: rockchip: Add the Video-Demo overlay for Lion Haikou Heiko Stuebner
@ 2025-10-20 10:23 ` Diederik de Haas
9 siblings, 0 replies; 12+ messages in thread
From: Diederik de Haas @ 2025-10-20 10: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
Hi Heiko,
On Mon Oct 20, 2025 at 10:24 AM CEST, 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.
I noticed several 'spelling' issues in various patches, therefor
reporting it against the series:
- s/Gernal/General/ ? (series Subject)
- s/internal in the controller/internal to the controller/ (patch 1)
Incorrect/inconsistent casing (not sure about these though):
- s/phy/PHY/ (patch 2)
- s/soc/SoC/ (patch 3 + 7)
- s/hdmi/HDMI/ (patch 7)
- s/vop/VOP/ (patch 7)
- s/the newer one that/the newer ones that/ ? (correct if there is only
1 newer) (patch 3)
- s/devicetree already is set up/devicetree is already set up/ (patch 3)
- s/definitly/definitely/ (patch 4 + 5)
- s/to no cause/to not cause/ (patch 4 + 5)
- s/power-domain property/power-domains property/ (patch 4 + 5)
- s/hirarchy/hierarchy/ (patch 6)
- s/is change at/is changed at/ (patch 6)
Sorry ;-P
Diederik
>
> 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 :-) .
>
>
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread