General RK3368 HDMI support and 2 outputs for RK3368-Lion
Subsystems (5)
Heiko Stuebner
maintainerv2 cover General RK3368 HDMI support and 2 outputs for RK3368-Lion
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
Signature · 1 line
2.47.2
Heiko Stuebner
maintainerPATCH v2 1/9 dt-bindings: display: rockchip: dw-hdmi: Add compatible for RK3368 HDMI
From: Heiko Stuebner <[email protected]>
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.
--- .../devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml +1 -0
@@ -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
Signature · 1 line
2.47.2
Heiko Stuebner
maintainerPATCH v2 2/9 drm/rockchip: hdmi: add RK3368 controller variant
In reply to Heiko StuebnerFrom: Heiko Stuebner <[email protected]>
The RK3368 has only one VOP, so there is no source selection happening and the controller uses an internal PHY for the HDMI output.
--- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +16 -0
@@ -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 },
Signature · 1 line
2.47.2
Re:[PATCH v2 2/9] drm/rockchip: hdmi: add RK3368 controller variant
Hello Heiko,
Quoted 7 lines · Heiko Stuebner
From: Heiko Stuebner <[email protected]>
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 <[email protected]>
Quoted 40 lines
---
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c| 16 ++++++++++++++++1 file changed, 16 insertions(+)drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +16
-0@@ -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 },Signature · 1 line
2.47.2
Re:[PATCH v2 2/9] drm/rockchip: hdmi: add RK3368 controller variant
In reply to Heiko StuebnerHello Heiko,
Quoted 6 lines · Heiko Stuebner
From: Heiko Stuebner <[email protected]>
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 <[email protected]>
Thanks
Quoted 40 lines
---
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c| 16 ++++++++++++++++1 file changed, 16 insertions(+)drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +16
-0@@ -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 },Signature · 1 line
2.47.2
Heiko Stuebner
maintainerPATCH v2 3/9 soc: rockchip: grf: Add select correct PWM implementation on RK3368
In reply to Heiko StuebnerFrom: Heiko Stuebner <[email protected]>
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.
--- drivers/soc/rockchip/grf.c | 1 + 1 file changed, 1 insertion(+)
drivers/soc/rockchip/grf.c +1 -0
@@ -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 = {
Signature · 1 line
2.47.2
Heiko Stuebner
maintainerPATCH v2 4/9 arm64: dts: rockchip: Add power-domain to RK3368 DSI controller
In reply to Heiko StuebnerFrom: Heiko Stuebner <[email protected]>
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.
--- arch/arm64/boot/dts/rockchip/rk3368.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/rockchip/rk3368.dtsi +1 -0
@@ -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>;
Signature · 1 line
2.47.2
Re: [PATCH v2 4/9] arm64: dts: rockchip: Add power-domain to RK3368 DSI controller
Hi Heiko,
Quoted 17 lines · Heiko Stuebner
From: Heiko Stuebner <[email protected]>
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 <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3368.dtsi | 1 + 1 file changed, 1 insertion(+)arch/arm64/boot/dts/rockchip/rk3368.dtsi +0
-0
arch/arm64/boot/dts/rockchip/rk3368.dtsi mipi_dsi: dsi@ff960000 { · line 899
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3368.dtsi +1
-0@@ -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
Heiko Stuebner
maintainerPATCH v2 5/9 arm64: dts: rockchip: Add power-domain to RK3368 VOP controller
In reply to Heiko StuebnerFrom: Heiko Stuebner <[email protected]>
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.
--- arch/arm64/boot/dts/rockchip/rk3368.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/rockchip/rk3368.dtsi +1 -0
@@ -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";
Signature · 1 line
2.47.2
Re: [PATCH v2 5/9] arm64: dts: rockchip: Add power-domain to RK3368 VOP controller
Hi Heiko,
Quoted 7 lines · Heiko Stuebner
From: Heiko Stuebner <[email protected]>
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")
Thanks!
Quentin
Heiko Stuebner
maintainerPATCH v2 6/9 arm64: dts: rockchip: Use phandle for i2c_lvds_blc on rk3368-lion haikou
In reply to Heiko StuebnerFrom: Heiko Stuebner <[email protected]>
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.
--- .../boot/dts/rockchip/rk3368-lion-haikou.dts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts +8 -10
@@ -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;
Signature · 1 line
2.47.2
Re: [PATCH v2 6/9] arm64: dts: rockchip: Use phandle for i2c_lvds_blc on rk3368-lion haikou
Hi Heiko,
Quoted 8 lines · Heiko Stuebner
From: Heiko Stuebner <[email protected]>
i2c@0 on i2cmux2 does already have a phandle
i2c_lvds_blcdefined.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.
Thanks!
Quentin
Heiko Stuebner
maintainerPATCH v2 7/9 arm64: dts: rockchip: Add HDMI node to RK3368
In reply to Heiko StuebnerFrom: Heiko Stuebner <[email protected]>
Add the HDMI controller node to the main SoC devicetree and hook it into the VOP.
--- arch/arm64/boot/dts/rockchip/rk3368.dtsi | 43 ++++++++++++++++++++++++ 1 file changed, 43 insertions(+)
arch/arm64/boot/dts/rockchip/rk3368.dtsi +43 -0
@@ -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>,
Signature · 1 line
2.47.2
Heiko Stuebner
maintainerPATCH v2 8/9 arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou
In reply to Heiko StuebnerFrom: Heiko Stuebner <[email protected]>
Enable the VOP and HDMI controller on the Lion-Haikou board.
--- .../boot/dts/rockchip/rk3368-lion-haikou.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts +18 -0
@@ -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>;
Signature · 1 line
2.47.2
Re: [PATCH v2 8/9] arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou
Hi Heiko,
Quoted 32 lines · Heiko Stuebner
From: Heiko Stuebner <[email protected]>
Enable the VOP and HDMI controller on the Lion-Haikou board.
Signed-off-by Heiko Stuebner <[email protected]>--- .../boot/dts/rockchip/rk3368-lion-haikou.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts +10
-0@@ -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";
arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts &uart1 { · line 121
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts +8
-0}; +&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:
Thanks!
Quentin
Re: [PATCH v2 8/9] arm64: dts: rockchip: Enable HDMI output on RK3368-Lion-Haikou
In reply to Heiko StuebnerHi Heiko,
Quoted 14 lines · Heiko Stuebner
From: Heiko Stuebner <[email protected]>
Enable the VOP and HDMI controller on the Lion-Haikou board.
Signed-off-by Heiko Stuebner <[email protected]>--- .../boot/dts/rockchip/rk3368-lion-haikou.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts +0
-0
arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts vcc5v0_otg: regulator-vcc5v0-otg { · line 67
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3368-lion-haikou.dts +7
-0@@ -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
Heiko Stuebner
maintainerPATCH v2 9/9 arm64: dts: rockchip: Add the Video-Demo overlay for Lion Haikou
In reply to Heiko StuebnerFrom: Heiko Stuebner <[email protected]>
The video-demo adapter also works on the Lion SoM when running on a Haikou baseboard, so add an overlay for it.
--- 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
arch/arm64/boot/dts/rockchip/Makefile +5 -0
@@ -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
arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso new file +174 -0
175 lines not on this page · raw message
Signature · 1 line
2.47.2
Re: [PATCH v2 9/9] arm64: dts: rockchip: Add the Video-Demo overlay for Lion Haikou
Hi Heiko,
Quoted 41 lines · Heiko Stuebner
From: Heiko Stuebner <[email protected]>
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 <[email protected]>--- 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.dtsoarch/arm64/boot/dts/rockchip/Makefile +5
-0@@ -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.dtboarch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso new file +0
-0
arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso line 9
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso new file +9
-0@@ -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/
Quoted 155 lines
arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso new file +155
-0+ */ + +/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>; + }; + }; +
arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso line 174
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3368-lion-haikou-video-demo.dtso new file +10
-0+ 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
Quentin Schulz
Tested-byRe: [PATCH v2 9/9] arm64: dts: rockchip: Add the Video-Demo overlay for Lion Haikou
Hi Heiko,
Quoted 4 lines · Quentin Schulz
Hi Heiko,
Quoted 1 line · Heiko Stuebner
From: Heiko Stuebner <[email protected]>
[...]
Quoted 2 lines
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.
Quoted 2 lines
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.
Thanks!
Quentin
Re: (subset) [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion
In reply to Heiko StuebnerQuoted 9 lines · Heiko Stuebner
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,
Signature · 1 line
Heiko Stuebner <[email protected]>
Re: (subset) [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion
In reply to Heiko StuebnerQuoted 9 lines · Heiko Stuebner
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: f54b09d46f72e4548e14476ba771231b0ec2b0afBest regards,
Signature · 1 line
Heiko Stuebner <[email protected]>
Re: (subset) [PATCH v2 0/9] General RK3368 HDMI support and 2 outputs for RK3368-Lion
In reply to Heiko StuebnerQuoted 9 lines · Heiko Stuebner
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: e7a943f0824b584e42847ad9642d7fb751022cf6Best regards,
Signature · 1 line
Heiko Stuebner <[email protected]>