From patchwork Fri Mar 7 09:18:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 14006028 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 27E62C19F32 for ; Fri, 7 Mar 2025 09:21:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Plham+sJxYGSJHFyYwhXDgycOevBPKE+N3A0QutP5jI=; b=GjjM3uiDw97t88 Y6FQUL9BtEhTD38OpQgZiZhMdNDRo2neS6a3tM1TVyrsy5n8XAoY6u9nOV37YQx0eLXl8kg1Ce6hR EKfm25G5ftM+wkt80c66ljyXF6+JcZYY8ItRTeAzxpYKParuWaPgj8tJqJXeUVctK6snjnFLFMOlP glbadB+zFQRNjomigteMfY0oAhJOt2o48j0vt8CcU8mw1bQaWJpW/QnShBa5jGDWVskmksxeR14tO AIhcNLaRQtjCPBgBOvI7UB8zQz3u6TknX6ESwy90PVLOX5OeCsZM34A3Ldli7ZzLUI4nJv7GPNs4a bRMetWiCrPIHLQ3OJpgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tqTtY-0000000DgqN-3g9C; Fri, 07 Mar 2025 09:21:28 +0000 Received: from sender4-pp-f112.zoho.com ([136.143.188.112]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tqTrt-0000000DgP4-2IbL for linux-rockchip@lists.infradead.org; Fri, 07 Mar 2025 09:19:46 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1741339171; cv=none; d=zohomail.com; s=zohoarc; b=iUW3/EWAQ74pV1vuawJREJ8QOpIrvnRIOsvVDcrnldvwdD4+UQM+dgJhNI631knUkJrE2pJiXcv8vboKlBKryjwsEtOELSfarhDJxv9wJ9POm7q82Ky6uGf6GIIVud2A64gV6pAFpkaXz9EnIG4PhMRWeQ6ku1jpY2O/95ub99I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741339171; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=jMsqnCZwk+9rRlGRVtpB7byehgQbLDfm0actQbMgEdc=; b=lWYby/8QddJpS0Z3HlsCDjhRBjtM52YXAzfUFWMnoifKvDiLQSQ2WPPiGAhHtVfJHaC9vbSrlKpB7HMxOA6l3I76o9J0YuJPGlXSmcBQzQMrC25V/Q+j4FON9JmXVTPmNmd89Mg/1TfTpEG6Tg3h+gow1zf/90WdkmzTt+o17BI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=dmitry.osipenko@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1741339171; s=zohomail; d=collabora.com; i=dmitry.osipenko@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=jMsqnCZwk+9rRlGRVtpB7byehgQbLDfm0actQbMgEdc=; b=TR34M9IEPY5YHVCfOwY5L9cDx1/YPEhWGI0PQyTgvHAzvwBBtqdFkGzS8e0i+jM5 Wqu4fsR7qrNeMFSZEmCS7wE52hD5vFYxPDvku8ciBV0OY+YAyL66ErtVRUcJoltAEKI WAQtimg9eygbVW4+CWumyhXdyrUO+UI9s7j5Ktnk= Received: by mx.zohomail.com with SMTPS id 1741339169951285.09211468103194; Fri, 7 Mar 2025 01:19:29 -0800 (PST) From: Dmitry Osipenko To: Shreeya Patel , Heiko Stuebner , Mauro Carvalho Chehab , Hans Verkuil , Rob Herring , Krzysztof Kozlowski , Conor Dooley , jose.abreu@synopsys.com, nelson.costa@synopsys.com, shawn.wen@rock-chips.com, nicolas.dufresne@collabora.com, Sebastian Reichel Cc: kernel@collabora.com, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Tim Surber Subject: [PATCH v15 1/2] arm64: dts: rockchip: Add device tree support for HDMI RX Controller Date: Fri, 7 Mar 2025 12:18:56 +0300 Message-ID: <20250307091857.646581-2-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250307091857.646581-1-dmitry.osipenko@collabora.com> References: <20250307091857.646581-1-dmitry.osipenko@collabora.com> MIME-Version: 1.0 X-ZohoMailClient: External X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250307_011945_645830_652303AD X-CRM114-Status: GOOD ( 11.01 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Shreeya Patel Add device tree support for Synopsys DesignWare HDMI RX Controller. Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Co-developed-by: Dingxian Wen Signed-off-by: Dingxian Wen Signed-off-by: Shreeya Patel Signed-off-by: Dmitry Osipenko --- .../arm64/boot/dts/rockchip/rk3588-extra.dtsi | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi index 4a950907ea6f..e18410c68530 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi @@ -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 = , + , + ; + 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>; From patchwork Fri Mar 7 09:18:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 14006029 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BBEFAC282D0 for ; Fri, 7 Mar 2025 09:21:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tuF1gqgzfuQaLjg6dNV7slWdUqXKb69/j0juXu3R/+o=; b=e8uaswvclLHB+M DwHf03y5J7GQwo8V0kz6V3GKlWzodELGp6G6RHfQn3FxpEOqMy0E+BQmgq+tOzrZxTZrTpxAlcckX ZbzH3HPuq19uDm7jfPxt6fdFAOFwFqz9Yl/f88YT+qEUCX1sC8TIzEdUYQ7y7PaX3+F5vSy0owBpW 3Pvda7EhjQM/xtVxO4353YgTu14AIlogQDX3bE16MYQJihww1tl2FJjNefhw51SEp+wdncynn85Dg gWkZ1PLYE+vmh8COjY1YLjwhT/ylGqMJbUwe9fJNiT5shUdA4Y4shQZyg/cDF4fiKBD6AurlEHTEr ZLoxr127QbaF8Dm3F6Uw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tqTtZ-0000000Dgqn-11gM; Fri, 07 Mar 2025 09:21:29 +0000 Received: from sender4-pp-f112.zoho.com ([136.143.188.112]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tqTrv-0000000DgPh-0794 for linux-rockchip@lists.infradead.org; Fri, 07 Mar 2025 09:19:48 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1741339175; cv=none; d=zohomail.com; s=zohoarc; b=kd2PxLRyDbHiEsHU4i2pu2uulTUubchrEKAJv9Ql/9HjC8TZCGciBkngP5jmdGoFYbJMICoQZiUA/9AEQ6F05UscKLmmgL1o1VRIMu5ywlmy+iR6PgMKDOP9NP8rPDZyY/0X4zqsKYk3ftZ52OztECzhSMFZ0yQSqDYXJzC32AA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741339175; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=/U61HHgit3TG325CG81jVLePHjTZCns1zkq/zcF+5IM=; b=AI3a4cWZ3/EmRVHMZ3Uy2KimoiGjkNC1Uu7Uc4n8VVjZvmUeWbCGKBa9xI1vNpt4a62weqzUnnhUP2heIxhSFcLo5I6dkpN/cK/ytUYOBevOeKrU8HRK7Kl8taehUFvTmZRzUA81XYci1MyVxG9GePOhcrRbGKSuhxgKwqEhBh8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=dmitry.osipenko@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1741339175; s=zohomail; d=collabora.com; i=dmitry.osipenko@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=/U61HHgit3TG325CG81jVLePHjTZCns1zkq/zcF+5IM=; b=KSpoOqsKWm0EIVaANKirRhaJc4PtPKZB5jRk87SkXHUoy109PI6NKWxNKlTiPbq0 cUHY5FLZSkHoVCImZvLQAExt4UcYwce4gVq92epySJGGuQGuCbQEjA9tHmMLjR7rvdJ egcyfmQxPFr4EgW3hi4tsElyn8TPkzc97iw7Nxi0= Received: by mx.zohomail.com with SMTPS id 1741339174644626.3807889582921; Fri, 7 Mar 2025 01:19:34 -0800 (PST) From: Dmitry Osipenko To: Shreeya Patel , Heiko Stuebner , Mauro Carvalho Chehab , Hans Verkuil , Rob Herring , Krzysztof Kozlowski , Conor Dooley , jose.abreu@synopsys.com, nelson.costa@synopsys.com, shawn.wen@rock-chips.com, nicolas.dufresne@collabora.com, Sebastian Reichel Cc: kernel@collabora.com, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Tim Surber Subject: [PATCH v15 2/2] arm64: dts: rockchip: Enable HDMI receiver on rock-5b Date: Fri, 7 Mar 2025 12:18:57 +0300 Message-ID: <20250307091857.646581-3-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250307091857.646581-1-dmitry.osipenko@collabora.com> References: <20250307091857.646581-1-dmitry.osipenko@collabora.com> MIME-Version: 1.0 X-ZohoMailClient: External X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250307_011947_127277_F238656F X-CRM114-Status: UNSURE ( 9.03 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Sebastian Reichel The Rock 5B has a Micro HDMI port, which can be used for receiving HDMI data. This enables support for it. Signed-off-by: Sebastian Reichel Signed-off-by: Shreeya Patel Signed-off-by: Dmitry Osipenko --- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts index d597112f1d5b..54a59a691538 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts @@ -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>;