From patchwork Mon Apr 25 12:32:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Obbard X-Patchwork-Id: 12825710 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 C573AC433EF for ; Mon, 25 Apr 2022 12:33:14 +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=Jx4tIuju/8Rju1UHua5+KcY3nRRFFVMrSP7GzsA5Auk=; b=ucQwZY3r0VKtqd KhKUVPPOW1XDXtBY7hbPNzArAPkWgx4U2sgQcjqipjvsF8emPMOCOc+vEzSZmv7B3KY7VPb/uAtQn m9RNW6eBDvZNcVompzfNvc37W9Y1+A1HDmPExTbSBuM7wXM/d4Y9jUcifimu7j083MRWHowuPbZs6 ouT+pNQqApgowlNIxV4M+hmyPXx7T9M6OXRI1elqKIOqyuYg4WjWjL+HVfMTFQBiv+s2a7ORaOCSD fETT28TRZqpASwxo48V+ksizszv8Dadi7wj+BG1HHoQAgYyxqAw4m5bCCtEUIeQ9h2Mv4yZ96xsl3 sJr76R6/fJUXySvCTrrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nixtv-009VBK-Kc; Mon, 25 Apr 2022 12:33:11 +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 1nixtO-009Uyd-3C; Mon, 25 Apr 2022 12:32:39 +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 19F0C1F43534; Mon, 25 Apr 2022 13:32:32 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650889952; bh=6dPC6V3Efid0jyddZB9luhvds1hVGmHlsOLFj8lBtIY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hq9Ww1b9ymuOpIy6SMSdokQoqUUWPdVbTgXkuvcx+OjHvQUp3xWiI04H1bFlselRV zXLbCxo9S4vpiqN7dqxbrMDaBLC7Cyw3m0VV48e1NkyVG75LchfGRp9Hp0TzcOILlh STH5I9CWMCNFo0Xr5LFxqS6ztZx9L5R8QrYzGCIW6Nbj0lQa+aQ6FJPEzqainNm2O+ MVXCb7A4KFceoBG/aVh9S0S1t7XxqKN5kYdSWXpcfuD+7tIahf5tCH4DWDldnLJJVv nMqLobUK1G7ZpAhQ0y0PRxtKlUAsGGBzAmQwp+NKl07CZhLmvKfcUhb7ROcaOv3lIW nR1hLOK6pUKAg== 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 v2 1/3] media: dt-bindings: media: rockchip-vdec: Add RK3328 compatible Date: Mon, 25 Apr 2022 13:32:13 +0100 Message-Id: <20220425123215.1055251-2-chris.obbard@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220425123215.1055251-1-chris.obbard@collabora.com> References: <20220425123215.1055251-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_053238_302535_A108252D X-CRM114-Status: GOOD ( 10.54 ) 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. Signed-off-by: Christopher Obbard --- Documentation/devicetree/bindings/media/rockchip,vdec.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml index 089f11d21b25..ce06835e8d61 100644 --- a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml +++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml @@ -20,6 +20,9 @@ properties: - items: - const: rockchip,rk3228-vdec - const: rockchip,rk3399-vdec + - items: + - const: rockchip,rk3328-vdec + - const: rockchip,rk3399-vdec reg: maxItems: 1 From patchwork Mon Apr 25 12:32:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Obbard X-Patchwork-Id: 12825709 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 A26AFC433F5 for ; Mon, 25 Apr 2022 12:33:12 +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=JBTlXTWNWjXjAf VLCT/5kb+pFWNTUpcNcm3yJ5LUMRVxOZ+YUspHkfaRb8NOUg5uAh3zB8oSGrsaDh1VQhQ8WBinD4X Sd5T+o0xXhoedxl2YDHF7uK4CYhNC0EgY964PIjjOc05JHFWsUHbH+OBGT2L2iXwW5HE40B1qjuCG joDNms/O/aIiHW5IAdBESv/z8aysKc2OtGDVG1yQwFj+9L06MJwMG9+CFPI5kV5PTUGJxt30TFLrr jdiZHETU90C4Tn9wF1nn7Ydi3uMnhXKisSHL+4vq8P8BNkRwSff6JlpkTE66mJZwn1OEO1SGDMPv2 fPypv4xQRx1zm0XEWbHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nixts-009V9i-Sf; Mon, 25 Apr 2022 12:33:08 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nixtN-009Uye-DE; Mon, 25 Apr 2022 12:32:39 +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 4D3871F43548; Mon, 25 Apr 2022 13:32:32 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650889952; bh=ZflrCY90qDvsRTN/89T+MYpE5uYdGwBIfCIw17JRHS0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E/tPmOb+xaNf/oC8pddMWa4lFhJe+aS1VLPMk5ZO7j+apfoz6+NgkH7y2a6W4NDYa Ol+uWluOXKcp+62SFTw5H34uqUp7E93idAwM3/ySY/hvNjIEim3RuEN5u4Bgz4S7hZ FFe35LU6mUT+Y4N3D4sJ/3QwpPR71xwVzpyr/S0rG38xnbPo6YzxpNUbNTa2P+6920 Pt78Zbauoad9IkfcEGX+jMaFCWRlddvqxjzfalTVHhVcVBIsWaocbi/flqgV/THfmo HdhvaG1VCuVEhH5Yseq8mkqFK/kXizCuK47VzrbL0cCEbYxXSCoxuKcLvWA8Gkz81r OxZjmWQIhDdyA== 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 v2 2/3] arm64: dts: rockchip: Rename vdec_mmu node for RK3328 Date: Mon, 25 Apr 2022 13:32:14 +0100 Message-Id: <20220425123215.1055251-3-chris.obbard@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220425123215.1055251-1-chris.obbard@collabora.com> References: <20220425123215.1055251-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_053237_617759_F333CD00 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 12:32:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Obbard X-Patchwork-Id: 12825708 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 0CBB5C433F5 for ; Mon, 25 Apr 2022 12:33:01 +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=AkOBEcpdIlnVki nl8CCzyRk/l+69PDJJoehLQdEHZ/KfxcdAkyWykqXWluc+6Pc1pEDpbXNPH5XSq8i+dYAFkYoyjRl 3t6lpknU9aiKanIV3L0aMEichzrLvmMKIieiGe54Pg9z2lPdbEajOCoziKFA3dVg4LPrs12GjSGHV /BePGJy8VqLDzFRYj/9+AsE2iFKXj3cUSHGT1mFzMDAG7DkimYprAkBceF8Mtr+3ssr/ptfeYqb/O VoxWO/hpWxOb5ZKL6FNHBvZEerlS9jLpBL3KdssKsLQZgWeM/paS/arlR0afDgdrNtruBmSWxx9Rh 71DGUqNHp+jgHgEfcUtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nixtd-009V5P-Oc; Mon, 25 Apr 2022 12:32:58 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nixtN-009Uyf-DC; Mon, 25 Apr 2022 12:32:38 +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 96F101F43553; Mon, 25 Apr 2022 13:32:32 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650889952; bh=hSDAXRypJ/Z4HhJhylWfvqB1KkaymD9gTFsthsCapJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W9/PsLcXtG01Bhrekqx6eBoE2aNTbSa/do5zzv6WiKHJ23ya8u1xJ5tJSXLyeqWEX xlP9nxXmiaIHq2/y2zkVxl9d5AoR/6mC6r4AsKYZBUJBx2N8q16LnN0JWmu13vG24e JhJt0DtwSIlLSfW4H/ZY40fBUVDiwbS8c0ZAAS48OzVtA2b0YSvmdk97cCzChpratl aXkuV1eUWMb07D/h2MpF4XZnD50qezVCxEKxbtP8RmlWzEB26842lBoqiS2BVb1nnY byk/CyFPGLgU089nacef9TjA6oxF1fIoIS7l9E2IZnoHmOXWOsYhf33kuEJgU3Cb0V Pf0Y8rgeZ5iLQ== 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 v2 3/3] arm64: dts: rockchip: Add vdec support for RK3328 Date: Mon, 25 Apr 2022 13:32:15 +0100 Message-Id: <20220425123215.1055251-4-chris.obbard@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220425123215.1055251-1-chris.obbard@collabora.com> References: <20220425123215.1055251-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_053237_617157_E915F2C1 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 {