From patchwork Mon Apr 25 18:45:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Obbard X-Patchwork-Id: 12826062 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 C31C2C433EF for ; Mon, 25 Apr 2022 18:46:00 +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=0E2sUJpie0HZLjuakv9UGUA+f+FIYEe13AHQy7RFvF0=; b=Unu6pSNbc/ymiN jesOBtR9bf3Jfx//j98HK2tFfc9m66qwVZZt2N1xQ2pvIBwaU2CeFifEvixKapmUuC3aiZv/PpsTh QCwUTFek/EiOwdtFS6AUzHXpnETecCJS97/6LwYtTnVYKn7Q4Zv3QJQf9803J5UXjdYL5ZKdNpDVl KQx8udNMzPHnrOBL84mFXM/XO1aqJDNBtfnuf/XLJ8jIWKqYlsHBjiopfoacTo6KqtjUNk/seAC0i 3djmcLNgunIu4QM8iKmVQROECywTUsWLojMUhB5nHSfgaKJc3sN8MpW8OaabXC2w0q5G3059t3n/y 47R31452PDLwMQ2t+jEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nj3ie-00AvvS-K1; Mon, 25 Apr 2022 18:45:56 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nj3i7-00Avd5-5B; Mon, 25 Apr 2022 18:45:25 +0000 Received: from obbardc-laptop.home (unknown [IPv6:2a00:23c7:6883:e501:cf51:f3a2:10b5:accf]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: obbardc) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 94EF21F43001; Mon, 25 Apr 2022 19:45:18 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650912318; bh=eTCQfIcIP5R3rqMwABBjjXqfLJPdf96Z64Uo36McT3g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nzAEo4CyRwc5ubpWR2DEkfMRLzrnj2G+ZgXJE4kKIiTeW+iZtEBJP6rJy2E2ONYET g/xlzVBxm99NYRjWHtFzaB5U7susvC3oxlVAjmmq3Q6XB4D2YfRfjPrl2UkxMmK+Sx mjx93EZ5d5SFq8kY8f53RG0Zjxnygbrj0IhL9DFacFmMS9tNZ30Mw2ltz9o/RMO48N 4hQ8x00FWICkbi1VHyyfIx4znKrhaVKpQ4KDsWoJqpI8TWgpQKHjIkObUYnRCUcg3y xo6Rw9gqjIBudMrIYGhoEKvbXSe/nwRT5pe/l5Q2C6IdrFD6wgouZMfIa3Pk6+cKoS NyT0qMJalT+Gg== From: Christopher Obbard To: Ezequiel Garcia , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Johan Jonker , Elaine Zhang Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Christopher Obbard Subject: [PATCH v3 1/3] media: dt-bindings: media: rockchip-vdec: Add RK3328 compatible Date: Mon, 25 Apr 2022 19:45:08 +0100 Message-Id: <20220425184510.1138446-2-chris.obbard@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220425184510.1138446-1-chris.obbard@collabora.com> References: <20220425184510.1138446-1-chris.obbard@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220425_114523_439284_F037F729 X-CRM114-Status: GOOD ( 12.53 ) 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 Document the RK3328 compatible for rockchip-vdec. The driver shares the same base functionality as the RK3399 hardware so make sure that the RK3399 compatible is also included in the device tree. Signed-off-by: Christopher Obbard Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/media/rockchip,vdec.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml index 089f11d21b25..3bcfb8e12333 100644 --- a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml +++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml @@ -18,7 +18,9 @@ properties: oneOf: - const: rockchip,rk3399-vdec - items: - - const: rockchip,rk3228-vdec + - enum: + - rockchip,rk3228-vdec + - rockchip,rk3328-vdec - const: rockchip,rk3399-vdec reg: From patchwork Mon Apr 25 18:45:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Obbard X-Patchwork-Id: 12826060 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 31803C433FE for ; Mon, 25 Apr 2022 18:45:39 +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=/gSp9WnldpuH0Wn7ZiC4t77FOlInVMbT5Wu4p6J2QBQ=; b=2HnM2nELDMwHT/ R/D2chLMcE9kMZmxKsWEjKWSGbV4TeGrUqBOJajjDXlX3VM3ne/Sf+hW9iM33t30K/U9GA3mTzrCV ajI8O9yyWAsiTGaTfFSdJgzzCDSyNBSRjNgPyfE15K4Lr4MJp1EmP5Tr7jL7xgEBXfZdW79ZIdci1 xcCaRqn8xlmKtWBKJLP/2AC9Qn2rj5evASGnY0DdskgvJz4gV/QMmaXD1xuR7IW8b5+e2I+O6/t+V MTiofiZfdrWyUYK6npSsw+zM8WK1xThjon4x5f8gBoHeqNsgGPhdpqU5hjVmOtyMbIkD1V9ajO8t3 lRY3N0eoMF9ZHh0ej/Bg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nj3iJ-00AvjT-UU; Mon, 25 Apr 2022 18:45:35 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nj3i7-00AvdB-57; Mon, 25 Apr 2022 18:45:24 +0000 Received: from obbardc-laptop.home (unknown [IPv6:2a00:23c7:6883:e501:cf51:f3a2:10b5:accf]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: obbardc) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id C254B1F43008; Mon, 25 Apr 2022 19:45:18 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650912318; bh=ZflrCY90qDvsRTN/89T+MYpE5uYdGwBIfCIw17JRHS0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VNUGDF8zSp/x29xQ3kgPbHSYcmms/sNvtoaNvO+Zu9wh7RigElOutLh5cCi8QiVMp mEn9qYSyNPJ7HdVNsGrTrVZfgnXft1bsTmWtMxklAC4LilSUJ/gyAObAECxgfd5tbx y8Pa+FvtdQV6/BLqS76YkPS75gyYH5vg8ZLSRS9B5AxFCCJLJoRrCx5SoZLWwSv3cg of4k7AwoxhRB4RU1Sgd+uuuze2i2oEFSQV/PgNmxz7pIaLnnL4MyNcNu6EHA/13PJp iqTxAoXvh3j68xHOjpxivTSiXWMTXnBueB/cBLvszbYL/FtMapr3HYDIIZRJgYyjNS pzgbVK1EsuzQA== From: Christopher Obbard To: Ezequiel Garcia , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Johan Jonker , Elaine Zhang Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Christopher Obbard Subject: [PATCH v3 2/3] arm64: dts: rockchip: Rename vdec_mmu node for RK3328 Date: Mon, 25 Apr 2022 19:45:09 +0100 Message-Id: <20220425184510.1138446-3-chris.obbard@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220425184510.1138446-1-chris.obbard@collabora.com> References: <20220425184510.1138446-1-chris.obbard@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220425_114523_423590_E02DCD57 X-CRM114-Status: GOOD ( 13.90 ) 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 All other rockchip devices which have vdec nodes do not have an rk prefix. Remove the prefix from the (currently unused) rkvdec_mmu node for consistency with other devices. Signed-off-by: Christopher Obbard Reviewed-by: Ezequiel Garcia --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi index b822533dc7f1..f8ef149fedad 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi @@ -660,7 +660,7 @@ vpu_mmu: iommu@ff350800 { power-domains = <&power RK3328_PD_VPU>; }; - rkvdec_mmu: iommu@ff360480 { + vdec_mmu: iommu@ff360480 { compatible = "rockchip,iommu"; reg = <0x0 0xff360480 0x0 0x40>, <0x0 0xff3604c0 0x0 0x40>; interrupts = ; From patchwork Mon Apr 25 18:45:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Obbard X-Patchwork-Id: 12826061 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 64379C433F5 for ; Mon, 25 Apr 2022 18:45:39 +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=uzp5x6pHFTuymOe9UjhPVPGz5UJCPJ65J59iygSw3tw=; b=p0DImlsrNMmAp8 P7hOIvDNyiDpv3lEmwlK2bMy4DGp82SSf+UYuTAHpXf3XodBLRgPmUmZfGSRedo7iTp68OE11t+nY K+vVNhTaO5nIwfaYk3LDB5J09H7UJQ89WhbVWiKaNI/gtbBmne4q378xIOi8F8ibuPJWKQZQqBXfn 5qKppSa1fS6iTjOoh7dqijwBmliRl9Tr4eDlb6MIXJNoWJHl1OV3NIMi6vUBGacJQOZ9sPKJMwzVP HCuNrhtOUs3oGRJ7fWGJoxytkr/LKBpayQRK2o7Kyadqvff1yaa6+eIuhkSKF5qoIh0yUH/6/49XE F/ct4gE3DsoZ+oqpuKOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nj3iJ-00AvjF-7J; Mon, 25 Apr 2022 18:45:35 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nj3i7-00Avd8-53; Mon, 25 Apr 2022 18:45:24 +0000 Received: from obbardc-laptop.home (unknown [IPv6:2a00:23c7:6883:e501:cf51:f3a2:10b5:accf]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: obbardc) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 00DDA1F4300E; Mon, 25 Apr 2022 19:45:18 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650912319; bh=hSDAXRypJ/Z4HhJhylWfvqB1KkaymD9gTFsthsCapJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TsXfhHhpeDrZ+m1pUkaCZLU7zwah3JdG9lNHFDdSodF3B7ViBCy/UWy0ETU0Aa+XM 78dtZ+rkh+3x10Lw4UkXJ9ADAmw7YUqv/gDgpYiU9t68PesD2PL4GaljMjG81kG6x+ mQ+MIBYEF0CTTvQj/ULkOL/NzToEIJcU9wZYNL4BNqape+gPMTzljHijClLOpfbDBV IKJ2BsqK0xrwxU9pmY1/dLR+u/otjIXcFpZVwUu2WAkfIL1RYN82mfmrLnw6CnZBa7 SrxrcHdMLe9AFfuyRvVe73I3Mml2ek8Gw3vZQKvmz/Dg8CunrwjjSsYrKYRYhm/j6/ b8Od9akPbxCqQ== From: Christopher Obbard To: Ezequiel Garcia , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Johan Jonker , Elaine Zhang Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Christopher Obbard Subject: [PATCH v3 3/3] arm64: dts: rockchip: Add vdec support for RK3328 Date: Mon, 25 Apr 2022 19:45:10 +0100 Message-Id: <20220425184510.1138446-4-chris.obbard@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220425184510.1138446-1-chris.obbard@collabora.com> References: <20220425184510.1138446-1-chris.obbard@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220425_114523_370551_85F6014A X-CRM114-Status: GOOD ( 13.07 ) 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 The RK3328 has an vdec device with dedicated iommu. Describe the vdec device, the required power-domains and enable the iommu in the devicetree. Signed-off-by: Christopher Obbard --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi index f8ef149fedad..49ae15708a0b 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi @@ -306,6 +306,10 @@ power-domain@RK3328_PD_HEVC { }; power-domain@RK3328_PD_VIDEO { reg = ; + clocks = <&cru ACLK_RKVDEC>, + <&cru HCLK_RKVDEC>, + <&cru SCLK_VDEC_CABAC>, + <&cru SCLK_VDEC_CORE>; #power-domain-cells = <0>; }; power-domain@RK3328_PD_VPU { @@ -660,6 +664,20 @@ vpu_mmu: iommu@ff350800 { power-domains = <&power RK3328_PD_VPU>; }; + vdec: video-codec@ff360000 { + compatible = "rockchip,rk3328-vdec", "rockchip,rk3399-vdec"; + reg = <0x0 0xff360000 0x0 0x400>; + interrupts = ; + clocks = <&cru ACLK_RKVDEC>, <&cru HCLK_RKVDEC>, + <&cru SCLK_VDEC_CABAC>, <&cru SCLK_VDEC_CORE>; + clock-names = "axi", "ahb", "cabac", "core"; + assigned-clocks = <&cru ACLK_RKVDEC>, <&cru SCLK_VDEC_CABAC>, + <&cru SCLK_VDEC_CORE>; + assigned-clock-rates = <400000000>, <400000000>, <300000000>; + iommus = <&vdec_mmu>; + power-domains = <&power RK3328_PD_VIDEO>; + }; + vdec_mmu: iommu@ff360480 { compatible = "rockchip,iommu"; reg = <0x0 0xff360480 0x0 0x40>, <0x0 0xff3604c0 0x0 0x40>; @@ -667,7 +685,7 @@ vdec_mmu: iommu@ff360480 { clocks = <&cru ACLK_RKVDEC>, <&cru HCLK_RKVDEC>; clock-names = "aclk", "iface"; #iommu-cells = <0>; - status = "disabled"; + power-domains = <&power RK3328_PD_VIDEO>; }; vop: vop@ff370000 {