From patchwork Fri Apr 22 13:38:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Obbard X-Patchwork-Id: 12823447 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 EA863C433EF for ; Fri, 22 Apr 2022 13:39:11 +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=dOa+4x7Tm340DofN/DyFp1No4lX0VwspU6LpVOuwWho=; b=uUt9g7AUf6x8TY /5udO3AK5cqKkYTkutw/5XJAJvBM9tj73iGnWBdIYrHJT5D6Wwj/ticG9BC2e6+MqTMutWcSVMdfO L3EQkSaMv8X6Rti1LvaQ8DGAA3kgpQZWKLOvwpeEpYsYOd+RASYi1+P+vLEzFjCMFoaVao2dPbY17 6gX3EDcVor08DLHp7zGbxxS8uBAZbTQHW63EhI1FAiwU1b7W5QrPsaEnUqu8ZdtHAS5+GD08B2PTw KeS07y5JNW0ioPmD8rP8jNLEcoegNv69YivwCSGixIcqpAv3k/SmSKepO85TEfZGpdOb/Xo9Xvgz4 O2kB7tVzyQHqumGCKa3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhtV5-000d8H-6Y; Fri, 22 Apr 2022 13:39:07 +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 1nhtUU-000css-5B; Fri, 22 Apr 2022 13:38:32 +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 7D8641F468B7; Fri, 22 Apr 2022 14:38:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650634704; bh=9+2KVQa3DMg7UKEVPJhPFKwJCmwX4dRKAtLwy+ze6F8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XnKtwNf3WY0fiPd3LifbCPX1N0sVm2p03RmK4hbJ0a8U5dheIJJt5yvjfVUPi0kRX cRS3VBK5jOQZqc81e4NS+MzrNPCHq5awwoTDKxGAa1JJITeaw+5VoqtzdwFfVjhnPy 8muWxfnhx7hnVZxQg8o8KwJ2OsTqSm2J0lmpL4Ac8248prOxTYAPgkKDvWa6iUCa6V KAksFJ8Cbj5BfY1/CZOkgM0DyeFxfnyCA+V7eNRBFb8/yJ+uLZfW3tsIbMYIPcDP/W K8C7OXp09M721cKh61CBfO/OonxkcIz5B8cJMP8ASJ+JelxFA3TsPUVHEjxkfWK99B GQMoTAT+51nqQ== From: Christopher Obbard To: Ezequiel Garcia , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Johan Jonker , Alex Bee , 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 1/3] media: dt-bindings: media: rockchip-vdec: Add RK3328 compatible Date: Fri, 22 Apr 2022 14:38:01 +0100 Message-Id: <20220422133803.989256-2-chris.obbard@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220422133803.989256-1-chris.obbard@collabora.com> References: <20220422133803.989256-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-20220422_063830_360695_DC0989B9 X-CRM114-Status: GOOD ( 10.13 ) 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 Reviewed-by: Ezequiel Garcia Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/media/rockchip,vdec.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml index 089f11d21b25..23f9687d862c 100644 --- a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml +++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml @@ -19,6 +19,7 @@ properties: - const: rockchip,rk3399-vdec - items: - const: rockchip,rk3228-vdec + - const: rockchip,rk3328-vdec - const: rockchip,rk3399-vdec reg: From patchwork Fri Apr 22 13:38:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Obbard X-Patchwork-Id: 12823449 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 5B2A6C433EF for ; Fri, 22 Apr 2022 13:39:24 +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=orV/+FRfPWcTR665q7Wcd15jGJ3x/xbZDEn9+DhukJk=; b=Skusb64C3Q2liN 7rAw0v/J2TNLa0wL4HT/424OIluvkLzXIyJD30rPgMAGoGxHEr9m0abfV8JzNOJWxHqsEzTAxx7vQ SXPGuLZx0L0olhXVRGV5i5BdH+yucjQ+Bu8GIhzZiCDuFBLmoVrmYUSd64KWMYvwgSBA/72EwawEz apdnDzgbOJTobIIkK9BzN1kYzn8cSbwFZ62Q6bAhmYWVtm/kG3FV/lHFJMK+iCGA1CnoqmCnl6a88 irqGqrLm+nyO5RayblIXrdJCwLQoRwQfpjsO1EkiGkiY1nbWgj2X8Z7ZPRWczNgocYch1Yace+VeH bB8N/cJcV6AkRCrsJV0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhtVJ-000dHJ-Oq; Fri, 22 Apr 2022 13:39:21 +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 1nhtUU-000csx-5o; Fri, 22 Apr 2022 13:38:33 +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 BA8401F468B3; Fri, 22 Apr 2022 14:38:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650634705; bh=ksNotgvEvQzUrT0m8LzCraEdRg4X/Z2VoTeJH+OzRw4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=at69pO7OY8TutnNMW2RTCCNAY228SrD8Yfs7Ip+lZMSsOsauLe7Laq06l8lH9XgLH cHdqKPAeALmd23foj+rrQQD6E16r20RksQLaAekmZYn8OOSnd4nvKGe85gR+Ps2k1J +2WraCW4yUs91z9RLhnRrzDnpiFQTufrvm4HWVgyawZF31C95u3z4RAlRJ7v7GMp33 CLPtVM5lPNzCF9DGO63WDrc7yyJWcYUYIhipN5TJuV9sZJwwupn43tOuvYtw42obQk 8CMYrhBPOmq0d9UuSV91/2HojaQs0Vn3+PQGtbSPFIW8dHXUdcJE5tL9O+P9nA+Xu8 5OkykuMqIZx3A== From: Christopher Obbard To: Ezequiel Garcia , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Johan Jonker , Alex Bee , 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 2/3] arm64: dts: rockchip: Rename vdec_mmu node for RK3328 Date: Fri, 22 Apr 2022 14:38:02 +0100 Message-Id: <20220422133803.989256-3-chris.obbard@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220422133803.989256-1-chris.obbard@collabora.com> References: <20220422133803.989256-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-20220422_063830_405008_EBDBEE4A X-CRM114-Status: GOOD ( 14.30 ) 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 Fri Apr 22 13:38:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Obbard X-Patchwork-Id: 12823448 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 0E645C4332F for ; Fri, 22 Apr 2022 13:39: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=hRn6gpfaakiOcNoCwEVDJvrl0usNL12Z+jmd4Js/ckM=; b=PYbkKm3JGYEmFb ZYzDbwKghvaUHtk3qfuoqt/3GOkrQ1oMOdDRYuIM5u7lwQUgJvpnYUw+WO/4tfbBec389W4ExW7Y+ aVVEEE3boDv9k4fUfsL7F5Lrrz7yLsOyZDIKcpSMOY6GGJaWkRMHBdqpKeEDMNDjPX34aNmtPEKNa IZ2+UwfCMLa1g0BHfSlNpi4WWi0HFYtiKTy/aHbb+2XPj/d0he89ZD8HIYdnGOaEYCC/FGt+/WeUj uukYRphhOYWGrwYTPtA80IHYnN8/J8ZEwTY3FlWUi8VxX4jqpoWZdEavMsH91eo+ilRGphS9vjgsK 8fK3VU/icf/AYLy1fqYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhtV6-000d8e-6G; Fri, 22 Apr 2022 13:39:08 +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 1nhtUT-000ct0-R0; Fri, 22 Apr 2022 13:38:32 +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 9175D1F468BF; Fri, 22 Apr 2022 14:38:26 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1650634706; bh=F/N33suZ77vOK1o4zWmW6EAlNmYs0vZALu+fdpoKBn8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FYM0+91MXQGSStUj5wF0DajRh/uP2ylbKZaBRh53X1FEO4cKQ9mcQvaLHx/fIN6pn NBkADb9AqxcVCwKSsrQoiyEFXc1pCfvX/SLaAHkb4GLSxA5DZXk6f3UnOUM3npE+/+ yW9KVrSyKxP+gsBk8Nd/VFXCZtThlbZ+EXNXe3+7L4owQ9pKNqNC+HE1wtQcQMxDia i7ejhbKi9xOYxBNEJ/Dko/YDNZYr/SpVGN6w2uycwCmtyh/5g3bqu2Ogqz+6Dffhuh nZNmjpOpeCpNeziEEZV4Hz6WThFPA6W7NyB1oWAKfybMtzClPMRu+2OvGanaZHjE3i 7Nu5vpsyUORuA== From: Christopher Obbard To: Ezequiel Garcia , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Johan Jonker , Alex Bee , 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 3/3] arm64: dts: rockchip: Add vdec support for RK3328 Date: Fri, 22 Apr 2022 14:38:03 +0100 Message-Id: <20220422133803.989256-4-chris.obbard@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220422133803.989256-1-chris.obbard@collabora.com> References: <20220422133803.989256-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-20220422_063830_050753_7FF07C67 X-CRM114-Status: GOOD ( 13.28 ) 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 device and required power-domains in the devicetree. Signed-off-by: Christopher Obbard Reviewed-by: Ezequiel Garcia --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 25 +++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi index f8ef149fedad..390e1e4a8fc9 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,25 @@ 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>; + resets = <&cru SRST_VDEC_A>, <&cru SRST_VDEC_H>, + <&cru SRST_VDEC_CABAC>, <&cru SRST_VDEC_CORE>, + <&cru SRST_VDEC_NIU_A>, <&cru SRST_VDEC_NIU_H>; + reset-names = "video_a", "video_h", "video_cabac", "video_core", + "niu_a", "niu_h"; + 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 +690,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 {