From patchwork Thu Jan 7 13:40:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 12004155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2E9FC433E0 for ; Thu, 7 Jan 2021 13:41:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5FA952312F for ; Thu, 7 Jan 2021 13:41:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5FA952312F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4EWEy8IqntyWYkt5jgkfLA8sMdwuBypyzvqco3XMLmc=; b=TLEgsQJnpfyJneQt/lKdwYc+A A941x6EWEkf2Z3hhMF6R7RQtHgQQDiLkmNTdLjjH0E0DJHTQycf7N76v+CDCHwDHScv3ujzDsTqxF I6t+dAdoy+d98NYeLPUNZSjQrMEw7S4HrbNgzv3uHsIja8vnwHap8qvvtML08aDa2vAoklY3KJDzT cM31yiqGbOmgPvxKlr0p5E1HQKBZR+Jh8nV1ZCouXINIE9jkAd7Qc/5Ycv/OFL6zleVOpwnFLyvnA VWRD7fmPy5yP69ZML9PahUP8G/7K9zjKiYkvY+ne8W7ln1r20dUqPX85UEv5ANp5864LnvT0nsklE P9sNA5GJA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxVXb-0003Qf-SX; Thu, 07 Jan 2021 13:41:27 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxVXS-0003N7-Hj; Thu, 07 Jan 2021 13:41:20 +0000 X-Originating-IP: 93.29.109.196 Received: from localhost.localdomain (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 54C7BC0011; Thu, 7 Jan 2021 13:41:15 +0000 (UTC) From: Paul Kocialkowski To: 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 Subject: [PATCH 1/5] dt-bindings: media: rockchip-rga: Add PX30 compatible Date: Thu, 7 Jan 2021 14:40:57 +0100 Message-Id: <20210107134101.195426-2-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210107134101.195426-1-paul.kocialkowski@bootlin.com> References: <20210107134101.195426-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_084118_723623_B0FC28C6 X-CRM114-Status: GOOD ( 11.82 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Greg Kroah-Hartman , Thomas Petazzoni , Rob Herring , Paul Kocialkowski , Jacob Chen , Philipp Zabel , Mauro Carvalho Chehab , Ezequiel Garcia Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Add a new compatible for the PX30 Rockchip SoC, which also features a RGA block. It is compatible with the RK3288 RGA block. Signed-off-by: Paul Kocialkowski --- Documentation/devicetree/bindings/media/rockchip-rga.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/media/rockchip-rga.yaml b/Documentation/devicetree/bindings/media/rockchip-rga.yaml index dd645ddccb07..4ffdb317b606 100644 --- a/Documentation/devicetree/bindings/media/rockchip-rga.yaml +++ b/Documentation/devicetree/bindings/media/rockchip-rga.yaml @@ -21,7 +21,9 @@ properties: - const: rockchip,rk3288-rga - const: rockchip,rk3399-rga - items: - - const: rockchip,rk3228-rga + - enum: + - rockchip,px30-rga + - rockchip,rk3228-rga - const: rockchip,rk3288-rga reg: From patchwork Thu Jan 7 13:40:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 12004157 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16EDDC433E6 for ; Thu, 7 Jan 2021 13:41:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C848C224BD for ; Thu, 7 Jan 2021 13:41:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C848C224BD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZxgeeoUBjpGxseoTzhZg1b5ZWT1UDJINJLiPMspkyw8=; b=Vexqhdu+PET7u8IJhnUw6BQ8y 00gJSJAc+Ue4xO1i4cpKLU0KV53cQ2tBw2mFubs95gPWp2zy4dYZJFgimrkICLN55hT84I9IhwYbT 2E4B/z311HB2UzhD94FTbEi9ene6QxfIw2NdksUF3BNgDrWMloOsl/cnSPviyjBex8FPi5Ll0CZSk 5+CSH4rBK9a6HuIuglZ+sWF9YC2ct36AgJymvCU4qfhy1wAQQPP1o5Xlri5bNYL2o7fEXXy0hjks6 gsL2y/DfgGs5Lx8K5kqdjS8SAuOOHt3lWILZU8k59VKEK6omw2ZbsoOCqWHA/MIlbKyoTeVxxTJ5B ondMJ9xyA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxVXb-0003QV-1g; Thu, 07 Jan 2021 13:41:27 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxVXS-0003N8-Jk; Thu, 07 Jan 2021 13:41:20 +0000 X-Originating-IP: 93.29.109.196 Received: from localhost.localdomain (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 7E292C0007; Thu, 7 Jan 2021 13:41:16 +0000 (UTC) From: Paul Kocialkowski To: 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 Subject: [PATCH 2/5] arm64: dts: rockchip: Add RGA support to the PX30 Date: Thu, 7 Jan 2021 14:40:58 +0100 Message-Id: <20210107134101.195426-3-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210107134101.195426-1-paul.kocialkowski@bootlin.com> References: <20210107134101.195426-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_084118_798373_33227531 X-CRM114-Status: GOOD ( 12.04 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Greg Kroah-Hartman , Thomas Petazzoni , Rob Herring , Paul Kocialkowski , Jacob Chen , Philipp Zabel , Mauro Carvalho Chehab , Ezequiel Garcia Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The PX30 features a RGA block: add the necessary node to support it. Signed-off-by: Paul Kocialkowski --- arch/arm64/boot/dts/rockchip/px30.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi index 2695ea8cda14..e056d1c32cc8 100644 --- a/arch/arm64/boot/dts/rockchip/px30.dtsi +++ b/arch/arm64/boot/dts/rockchip/px30.dtsi @@ -1106,6 +1106,17 @@ vopl_mmu: iommu@ff470f00 { status = "disabled"; }; + rga: rga@ff480000 { + compatible = "rockchip,px30-rga", "rockchip,rk3288-rga"; + reg = <0x0 0xff480000 0x0 0x10000>; + interrupts = ; + clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA_CORE>; + clock-names = "aclk", "hclk", "sclk"; + power-domains = <&power PX30_PD_VO>; + resets = <&cru SRST_RGA>, <&cru SRST_RGA_A>, <&cru SRST_RGA_H>; + reset-names = "core", "axi", "ahb"; + }; + qos_gmac: qos@ff518000 { compatible = "syscon"; reg = <0x0 0xff518000 0x0 0x20>; From patchwork Thu Jan 7 13:40:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 12004159 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E00B8C433E0 for ; Thu, 7 Jan 2021 13:41:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8C7A5224BD for ; Thu, 7 Jan 2021 13:41:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C7A5224BD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=misNJlQzKMYX+PPsVsWA54FCgR2HIUjSoo+O4gk/Hgo=; b=F1PxHXFOGcGqyGrLph/vo9lY2 Igc/IciNW1mhu5LgtRXc+HWEp7ZLTWcx0yAlWgDu76fCNor95V6itps2ly5Wos5/MH+ZktePZAHpD LHRhWc7Aas24x5uN6XzRo5ZeKW0pZmLPDFcqkNOHnAy+P7rZhiV8iIFYZc9fM9EptWCuEiA95G9Gu ilXWhhFwB8P8LqlYzUuO6pxPBmWhVcx4T5qjTzalrHJp4GwsWMg/ChlX+4CBcMnnt0O8WIugSJDEo kkzAntpjfmvtqREXAVJD6y4Yn7jLG5J2e1GLFyM3P2bmuMresd3MVTR1EMUivweLboQ/1807hFD/v UXf7Mm6eg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxVXk-0003Ss-Re; Thu, 07 Jan 2021 13:41:36 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxVXT-0003Nr-PZ; Thu, 07 Jan 2021 13:41:21 +0000 X-Originating-IP: 93.29.109.196 Received: from localhost.localdomain (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id AA1DCC0016; Thu, 7 Jan 2021 13:41:17 +0000 (UTC) From: Paul Kocialkowski To: 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 Subject: [PATCH 3/5] dt-bindings: media: rockchip-vpu: Add PX30 compatible Date: Thu, 7 Jan 2021 14:40:59 +0100 Message-Id: <20210107134101.195426-4-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210107134101.195426-1-paul.kocialkowski@bootlin.com> References: <20210107134101.195426-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_084119_961236_30154B51 X-CRM114-Status: GOOD ( 11.23 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Greg Kroah-Hartman , Thomas Petazzoni , Rob Herring , Paul Kocialkowski , Jacob Chen , Philipp Zabel , Mauro Carvalho Chehab , Ezequiel Garcia Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The Rockchip PX30 SoC has a Hantro VPU that features a decoder (VDPU2) and an encoder (VEPU2). It is similar to the RK3399's VPU but takes an extra clock (SCLK). Signed-off-by: Paul Kocialkowski --- .../bindings/media/rockchip-vpu.yaml | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml index c81dbc3e8960..c446b9ead21b 100644 --- a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml +++ b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml @@ -15,10 +15,13 @@ description: properties: compatible: - enum: - - rockchip,rk3288-vpu - - rockchip,rk3328-vpu - - rockchip,rk3399-vpu + oneOf: + - const: rockchip,rk3288-vpu + - const: rockchip,rk3328-vpu + - const: rockchip,rk3399-vpu + - items: + - const: rockchip,px30-vpu + - const: rockchip,rk3399-vpu reg: maxItems: 1 @@ -35,12 +38,18 @@ properties: - const: vdpu clocks: - maxItems: 2 + minItems: 2 + maxItems: 3 clock-names: - items: - - const: aclk - - const: hclk + oneOf: + - items: + - const: aclk + - const: hclk + - items: + - const: aclk + - const: hclk + - const: sclk power-domains: maxItems: 1 From patchwork Thu Jan 7 13:41:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 12004163 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53F7FC433E0 for ; Thu, 7 Jan 2021 13:41:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1DC2C224D3 for ; Thu, 7 Jan 2021 13:41:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DC2C224D3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5FCgFlv9/bjCyfdI2Z9XZYq3/IuMmR9pcDOKEt65X+w=; b=Xtm7jbGxADjhXWPeuUWn+EpF1 DVeBjCFwFxjN12cDLQZB8SCXx41ZXLDa1NzSZGdzN/ziWm+l9sRfpfrjUpM+y5q55cvqIFoTw/MuU ctN4GO9eO1zCDJyKQVkuM2xnyY6JfC4uGz/PszCR43QrjqM3ZIc8ZKq2U8l886AjuJecFO38UiQDF owtZRP+ZQErZq7hKKg6j33440IspjCEmUkeRgVsmrqh/7Y6+obHSVJINH0gMDg/+WoyGEYvB+zydJ QmrXrp/irL68ZUKmh9zJefNDEX52kZH9KIDbtAkr2ojBp468c2z+DbeL9nI94aqsW29uTnIBLhPQs Lrj4Iv+eg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxVXu-0003YH-IE; Thu, 07 Jan 2021 13:41:46 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxVXV-0003Oe-46; Thu, 07 Jan 2021 13:41:22 +0000 X-Originating-IP: 93.29.109.196 Received: from localhost.localdomain (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id E6717C0004; Thu, 7 Jan 2021 13:41:18 +0000 (UTC) From: Paul Kocialkowski To: 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 Subject: [PATCH 4/5] arm64: dts: rockchip: Add VPU support for the PX30 Date: Thu, 7 Jan 2021 14:41:00 +0100 Message-Id: <20210107134101.195426-5-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210107134101.195426-1-paul.kocialkowski@bootlin.com> References: <20210107134101.195426-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_084121_425051_A865212D X-CRM114-Status: GOOD ( 12.43 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Greg Kroah-Hartman , Thomas Petazzoni , Rob Herring , Paul Kocialkowski , Jacob Chen , Philipp Zabel , Mauro Carvalho Chehab , Ezequiel Garcia Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The PX30 has a VPU (both decoder and encoder) with a dedicated IOMMU. Describe these two entities in device-tree. Signed-off-by: Paul Kocialkowski --- arch/arm64/boot/dts/rockchip/px30.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi index e056d1c32cc8..4322302a2685 100644 --- a/arch/arm64/boot/dts/rockchip/px30.dtsi +++ b/arch/arm64/boot/dts/rockchip/px30.dtsi @@ -986,6 +986,29 @@ gpu: gpu@ff400000 { status = "disabled"; }; + vpu: video-codec@ff442000 { + compatible = "rockchip,px30-vpu", "rockchip,rk3399-vpu"; + reg = <0x0 0xff442000 0x0 0x800>; + interrupts = , + ; + interrupt-names = "vepu", "vdpu"; + clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>, <&cru SCLK_CORE_VPU>; + clock-names = "aclk", "hclk", "sclk"; + iommus = <&vpu_mmu>; + power-domains = <&power PX30_PD_VPU>; + }; + + vpu_mmu: iommu@ff442800 { + compatible = "rockchip,iommu"; + reg = <0x0 0xff442800 0x0 0x100>; + interrupts = ; + interrupt-names = "vpu_mmu"; + clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>; + clock-names = "aclk", "iface"; + #iommu-cells = <0>; + power-domains = <&power PX30_PD_VPU>; + }; + dsi: dsi@ff450000 { compatible = "rockchip,px30-mipi-dsi"; reg = <0x0 0xff450000 0x0 0x10000>; From patchwork Thu Jan 7 13:41:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 12004165 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9365EC433DB for ; Thu, 7 Jan 2021 13:41:53 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 53EBC22B45 for ; Thu, 7 Jan 2021 13:41:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53EBC22B45 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jD/YvMTSXK19pWz7X60sDXdjT9e6fQk8kRWhvbvfMe0=; b=PYShO9FErIKY147v1zUSESrYm 8hdSIG3yz8QNAn2zrG/vcn+gFVaajiTxksCSoOHgymITTy9/ImSM0KxLviG1RBSD48kpDCKrIpMqC LkyH1PFcOtYOqzV07p8j7+z2ChP2bHgtGz7rCJ2FmTb44SSKEbS02axcTYLfA4FMbZwi2JtUpZHd4 MPzxKkP7CSFb63GpcVB+zmC49CPWxAs33iSeJ3AlgirDiaybvESBiRhCur4kr6KcCzJ2C3fArI6tM BWUopIbUGRVXxQwLVV/V63jY4CEWrCXdQiWaBdj6lir2ovHHIKpIYjKqBHsbsGr3Ms0BIqiMVV/qw pPbitKd2A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxVXv-0003Z0-S7; Thu, 07 Jan 2021 13:41:47 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxVXW-0003P5-DP; Thu, 07 Jan 2021 13:41:23 +0000 X-Originating-IP: 93.29.109.196 Received: from localhost.localdomain (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 37DC0C0003; Thu, 7 Jan 2021 13:41:20 +0000 (UTC) From: Paul Kocialkowski To: 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 Subject: [PATCH 5/5] media: hantro: Add support for the Rockchip PX30 Date: Thu, 7 Jan 2021 14:41:01 +0100 Message-Id: <20210107134101.195426-6-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210107134101.195426-1-paul.kocialkowski@bootlin.com> References: <20210107134101.195426-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_084122_742682_733CBC64 X-CRM114-Status: GOOD ( 15.96 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Greg Kroah-Hartman , Thomas Petazzoni , Rob Herring , Paul Kocialkowski , Jacob Chen , Philipp Zabel , Mauro Carvalho Chehab , Ezequiel Garcia Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The PX30 SoC includes both the VDPU2 and VEPU2 blocks which are similar to the RK3399 (Hantro G1/H1 with shuffled registers). Besides taking an extra clock, it also shares an interrupt with the IOMMU so it's necessary to request the interrupt shared. Signed-off-by: Paul Kocialkowski --- drivers/staging/media/hantro/hantro_drv.c | 5 +++-- drivers/staging/media/hantro/hantro_hw.h | 1 + drivers/staging/media/hantro/rk3399_vpu_hw.c | 21 ++++++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c index e5f200e64993..076a7782b476 100644 --- a/drivers/staging/media/hantro/hantro_drv.c +++ b/drivers/staging/media/hantro/hantro_drv.c @@ -472,6 +472,7 @@ static const struct v4l2_file_operations hantro_fops = { static const struct of_device_id of_hantro_match[] = { #ifdef CONFIG_VIDEO_HANTRO_ROCKCHIP + { .compatible = "rockchip,px30-vpu", .data = &px30_vpu_variant, }, { .compatible = "rockchip,rk3399-vpu", .data = &rk3399_vpu_variant, }, { .compatible = "rockchip,rk3328-vpu", .data = &rk3328_vpu_variant, }, { .compatible = "rockchip,rk3288-vpu", .data = &rk3288_vpu_variant, }, @@ -796,8 +797,8 @@ static int hantro_probe(struct platform_device *pdev) return -ENXIO; ret = devm_request_irq(vpu->dev, irq, - vpu->variant->irqs[i].handler, 0, - dev_name(vpu->dev), vpu); + vpu->variant->irqs[i].handler, + IRQF_SHARED, dev_name(vpu->dev), vpu); if (ret) { dev_err(vpu->dev, "Could not request %s IRQ.\n", irq_name); diff --git a/drivers/staging/media/hantro/hantro_hw.h b/drivers/staging/media/hantro/hantro_hw.h index 34c9e4649a25..07f516fd7a2e 100644 --- a/drivers/staging/media/hantro/hantro_hw.h +++ b/drivers/staging/media/hantro/hantro_hw.h @@ -148,6 +148,7 @@ enum hantro_enc_fmt { RK3288_VPU_ENC_FMT_UYVY422 = 3, }; +extern const struct hantro_variant px30_vpu_variant; extern const struct hantro_variant rk3399_vpu_variant; extern const struct hantro_variant rk3328_vpu_variant; extern const struct hantro_variant rk3288_vpu_variant; diff --git a/drivers/staging/media/hantro/rk3399_vpu_hw.c b/drivers/staging/media/hantro/rk3399_vpu_hw.c index 7a7962cf771e..4112f98baa60 100644 --- a/drivers/staging/media/hantro/rk3399_vpu_hw.c +++ b/drivers/staging/media/hantro/rk3399_vpu_hw.c @@ -220,3 +220,24 @@ const struct hantro_variant rk3328_vpu_variant = { .clk_names = rk3399_clk_names, .num_clocks = ARRAY_SIZE(rk3399_clk_names), }; + +static const char * const px30_clk_names[] = { + "aclk", "hclk", "sclk" +}; + +const struct hantro_variant px30_vpu_variant = { + .enc_offset = 0x0, + .enc_fmts = rk3399_vpu_enc_fmts, + .num_enc_fmts = ARRAY_SIZE(rk3399_vpu_enc_fmts), + .dec_offset = 0x400, + .dec_fmts = rk3399_vpu_dec_fmts, + .num_dec_fmts = ARRAY_SIZE(rk3399_vpu_dec_fmts), + .codec = HANTRO_JPEG_ENCODER | HANTRO_MPEG2_DECODER | + HANTRO_VP8_DECODER, + .codec_ops = rk3399_vpu_codec_ops, + .irqs = rk3399_irqs, + .num_irqs = ARRAY_SIZE(rk3399_irqs), + .init = rk3399_vpu_hw_init, + .clk_names = px30_clk_names, + .num_clocks = ARRAY_SIZE(px30_clk_names) +};