Enable HDMI RX controller on RK3588
Subsystems (3)
v15 cover Enable HDMI RX controller on RK3588
Hi Heiko,
This patchset adds HDMIRX controller node to RK3588 DTSI and enables it on Rock 5b board.
Changelog:
v15: - Removed duplicated HDMIRX pinctrl definitions
- Removed default M1 HDMIRX pinctrl assignment from the DTSI as technically HDMIRX can use M0 depending on a board configuration.
- Changed ordering of the status DT property
v14: - Re-enabled LOAD_DEFAULT_EDID=y option in the defconfig and
added ack from Hans Verkuil fot that patch.
Sebastian Reichel (1):
arm64: dts: rockchip: Enable HDMI receiver on rock-5b
Shreeya Patel (1):
arm64: dts: rockchip: Add device tree support for HDMI RX Controller
.../arm64/boot/dts/rockchip/rk3588-extra.dtsi | 55 +++++++++++++++++++ .../boot/dts/rockchip/rk3588-rock-5b.dts | 17 ++++++ 2 files changed, 72 insertions(+)
Signature · 1 line
2.48.1
PATCH v15 1/2 arm64: dts: rockchip: Add device tree support for HDMI RX Controller
From: Shreeya Patel <[email protected]>
Add device tree support for Synopsys DesignWare HDMI RX Controller.
--- .../arm64/boot/dts/rockchip/rk3588-extra.dtsi | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+)
arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi +55 -0
@@ -7,6 +7,30 @@ #include "rk3588-extra-pinctrl.dtsi" / { + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + /* + * The 4k HDMI capture controller works only with 32bit + * phys addresses and doesn't support IOMMU. HDMI RX CMA + * must be reserved below 4GB. + * The size of 160MB was determined as follows: + * (3840 * 2160 pixels) * (4 bytes/pixel) * (2 frames/buffer) / 10^6 = 66MB + * To ensure sufficient support for practical use-cases, + * we doubled the 66MB value. + */ + hdmi_receiver_cma: hdmi-receiver-cma { + compatible = "shared-dma-pool"; + alloc-ranges = <0x0 0x0 0x0 0xffffffff>; + size = <0x0 (160 * 0x100000)>; /* 160MiB */ + alignment = <0x0 0x40000>; /* 64K */ + no-map; + status = "disabled"; + }; + }; + usb_host1_xhci: usb@fc400000 { compatible = "rockchip,rk3588-dwc3", "snps,dwc3"; reg = <0x0 0xfc400000 0x0 0x400000>;
@@ -135,6 +159,37 @@ i2s10_8ch: i2s@fde00000 { status = "disabled"; }; + hdmi_receiver: hdmi_receiver@fdee0000 { + compatible = "rockchip,rk3588-hdmirx-ctrler", "snps,dw-hdmi-rx"; + reg = <0x0 0xfdee0000 0x0 0x6000>; + power-domains = <&power RK3588_PD_VO1>; + rockchip,grf = <&sys_grf>; + rockchip,vo1-grf = <&vo1_grf>; + interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH 0>, + <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH 0>, + <GIC_SPI 179 IRQ_TYPE_LEVEL_HIGH 0>; + interrupt-names = "cec", "hdmi", "dma"; + clocks = <&cru ACLK_HDMIRX>, + <&cru CLK_HDMIRX_AUD>, + <&cru CLK_CR_PARA>, + <&cru PCLK_HDMIRX>, + <&cru CLK_HDMIRX_REF>, + <&cru PCLK_S_HDMIRX>, + <&cru HCLK_VO1>; + clock-names = "aclk", + "audio", + "cr_para", + "pclk", + "ref", + "hclk_s_hdmirx", + "hclk_vo1"; + resets = <&cru SRST_A_HDMIRX>, <&cru SRST_P_HDMIRX>, + <&cru SRST_HDMIRX_REF>, <&cru SRST_A_HDMIRX_BIU>; + reset-names = "axi", "apb", "ref", "biu"; + memory-region = <&hdmi_receiver_cma>; + status = "disabled"; + }; + pcie3x4: pcie@fe150000 { compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie"; #address-cells = <3>;
Signature · 1 line
2.48.1
PATCH v15 2/2 arm64: dts: rockchip: Enable HDMI receiver on rock-5b
In reply to Dmitry OsipenkoFrom: Sebastian Reichel <[email protected]>
The Rock 5B has a Micro HDMI port, which can be used for receiving HDMI data. This enables support for it.
--- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +17 -0
@@ -220,6 +220,17 @@ hdmi0_out_con: endpoint { }; }; +&hdmi_receiver_cma { + status = "okay"; +}; + +&hdmi_receiver { + hpd-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>; + pinctrl-0 = <&hdmim1_rx_cec &hdmim1_rx_hpdin &hdmim1_rx_scl &hdmim1_rx_sda &hdmirx_hpd>; + pinctrl-names = "default"; + status = "okay"; +}; + &hdptxphy_hdmi0 { status = "okay"; };
@@ -377,6 +388,12 @@ &pcie3x4 { }; &pinctrl { + hdmirx { + hdmirx_hpd: hdmirx-5v-detection { + rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + hym8563 { hym8563_int: hym8563-int { rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
Signature · 1 line
2.48.1
Quoted 8 lines · Dmitry Osipenko
This patchset adds HDMIRX controller node to RK3588 DTSI and enables it on Rock 5b board.
Changelog:
v15: - Removed duplicated HDMIRX pinctrl definitions
[...]
Applied, thanks!
[1/2] arm64: dts: rockchip: Add device tree support for HDMI RX Controller
commit: 0327238991ba2d1de25e1116b1c064f433e45b8d
[2/2] arm64: dts: rockchip: Enable HDMI receiver on rock-5b
commit: c62d8fdb27391ee72bfdf53328463813997844f1Best regards,
Signature · 1 line
Heiko Stuebner <[email protected]>