From patchwork Sat May 14 13:36:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frattaroli X-Patchwork-Id: 12849788 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 93861C433EF for ; Sat, 14 May 2022 13:38:08 +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=F4vFLyVsZt6JVu0NWxhinC5A9dDyKz7Ss6wLmAOCN0Q=; b=j1iYPG0RuS2fOM 8JT15B0gTBPcNhGbTbPB9l86ymVUo33pvK2vqskaXd1DBLNrh4gc3fiPtiRRyY5zsA57ppvb1gQ+R k55J9xCz3rXEgmQBLN4trjX0H6GCigClpaq12a2+3gk0dmms+WnXjL8wJeMkY6TS9150Hf17J4iox OVS08Cc7nSN6nISt7LpcCr14OneIrAEZoOKGxLfLxCr169A0fpw/Ofn30y5RmfagUEDAHRLqZwlpf wIdblZWDoaCoU+2inXGEuqXhUhObwHYbPUit+TpiQiPr0zXUxQe/Zg1Nzz/PEKtlw8LitEB4j2go6 0yOiRW9ye2kBK2OvwFdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nprwy-001VIG-Rt; Sat, 14 May 2022 13:36:53 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nprwu-001VGI-IF; Sat, 14 May 2022 13:36:50 +0000 Received: by mail-ej1-x62b.google.com with SMTP id z2so20976931ejj.3; Sat, 14 May 2022 06:36:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7nM+O9rcnvWoPgEj551BXLaNSuGi3Sqb5ztVGD4qhv4=; b=masoxyItOVKrANFWKJdgypb3tEPp8p8acKsSxEyuYIDqy9bxP16M/Gzx+bBWBdLKXU OJ5LSRnTyx19ejGGLlLo3mot55qjl4/WU7mhVHx0YbeAVjRMg2Gj1nPAEvq/C9ohv5yF xleLGuQwdEwPrYAYsqv0YxR25XeMOpfVW0dWYB9GynEFVgglGSWORBlTwrHTtEyf7DoI PwFxB7/lnztlKc83IfrzPrixhoVEsgGe94MsAO7wItudyl1UCsAi7LraRjiL0B6VJCV+ sugN+zy+Y1J1TbE7j5tczgDa4T4L1JwlSzPMrCV2Fuzc2vFlKGb9ZxPH4gbN/0UA0JVg sKLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7nM+O9rcnvWoPgEj551BXLaNSuGi3Sqb5ztVGD4qhv4=; b=rcC0USo+H83GxSlCmLVUZ0stRgW45OvpCv53NgFN8wJX0T2Alr07GX32i19Qft/2Az H3NeG5+EG7uL5/E3zk6YZ6n+XoJiQeCBXTtkz3LWXeazbklp40vn0FQGDQLiz3xfv3+b fHrgJI1KvjEgxgUxvPGgY9lKZeEGEPETBiD7v75DGFs7n3xgvrI5guDco5wE73qOCuGv YBeRfYVULZPzTvyIO6DTIgBFXrUTgttqx7bUbHlYe0I/wgSbrn/GYYaI3eeOdotCH1lq jI3jVfOHwdqKExAG0mLU6JkE2oZRHw2i9+N4eJZWbqQXZnicdw0a9FbzalA85ITAkzfI UmOA== X-Gm-Message-State: AOAM532hX3HuhKAiVG5A1Z+8QEy7m/DWwacc+atbC614RPfIZpKtsCzw jhBFnJ6bDHDgNuAoI4w4LnI= X-Google-Smtp-Source: ABdhPJxgRlXeTS7HB6rRCXSHuxYkg45W2dCOnI6rKbQx0pIsQgZxuplwN6sk+hX6WRqruvKcw4xVqA== X-Received: by 2002:a17:906:4944:b0:6e8:a48d:804e with SMTP id f4-20020a170906494400b006e8a48d804emr8250192ejt.164.1652535406688; Sat, 14 May 2022 06:36:46 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id ci18-20020a170907267200b006f3ef214e49sm1736739ejc.175.2022.05.14.06.36.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 May 2022 06:36:46 -0700 (PDT) From: Nicolas Frattaroli To: Ezequiel Garcia , Philipp Zabel , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Nicolas Frattaroli 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 Subject: [PATCH v4 1/3] media: dt-binding: media: Add rockchip-vepu binding Date: Sat, 14 May 2022 15:36:02 +0200 Message-Id: <20220514133604.174905-2-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220514133604.174905-1-frattaroli.nicolas@gmail.com> References: <20220514133604.174905-1-frattaroli.nicolas@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220514_063648_646724_2F6FB306 X-CRM114-Status: GOOD ( 17.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The RK3568 and RK3566 have a Hantro VPU node solely dedicated to encoding. This patch adds a new binding to describe it, as it does not really fit the rockchip-vpu binding, since there is no decoder. Signed-off-by: Nicolas Frattaroli --- .../bindings/media/rockchip-vepu.yaml | 64 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 65 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rockchip-vepu.yaml diff --git a/Documentation/devicetree/bindings/media/rockchip-vepu.yaml b/Documentation/devicetree/bindings/media/rockchip-vepu.yaml new file mode 100644 index 000000000000..b7ba5bf3517a --- /dev/null +++ b/Documentation/devicetree/bindings/media/rockchip-vepu.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/media/rockchip-vepu.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Hantro G1 VPU encoders implemented on Rockchip SoCs + +maintainers: + - Nicolas Frattaroli + +description: + Hantro G1 video encode-only accelerators present on Rockchip SoCs. + +properties: + compatible: + enum: + - rockchip,rk3568-vepu + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 2 + + clock-names: + items: + - const: aclk + - const: hclk + + power-domains: + maxItems: 1 + + iommus: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + #include + #include + + vepu: video-codec@fdee0000 { + compatible = "rockchip,rk3568-vepu"; + reg = <0x0 0xfdee0000 0x0 0x800>; + interrupts = ; + clocks = <&cru ACLK_JENC>, <&cru HCLK_JENC>; + clock-names = "aclk", "hclk"; + iommus = <&vepu_mmu>; + power-domains = <&power RK3568_PD_RGA>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 9ce78f2275dc..f901a42e5d0f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8637,6 +8637,7 @@ L: linux-media@vger.kernel.org L: linux-rockchip@lists.infradead.org S: Maintained F: Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml +F: Documentation/devicetree/bindings/media/rockchip-vepu.yaml F: Documentation/devicetree/bindings/media/rockchip-vpu.yaml F: drivers/staging/media/hantro/ From patchwork Sat May 14 13:36:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frattaroli X-Patchwork-Id: 12849789 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 7193AC433EF for ; Sat, 14 May 2022 13:38:10 +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=14xoz3hhYNqvXqk1z6vLE4ot78TfSnUkQihmwmmv7Tw=; b=S6/rt27Bjw3HFh XtY6s0AHU6fDNk071qnC2FjL8+iUvMMy/nK4t0ZotlDZvEswf4ZPo7zhfVXeKEWKBmGgvRtXQSV9I R4mviQ8dcSflu1mt529zeVlFKwYtJfuoL7QBTp0NRMm+V5GlLsfT95Fjv+mhzKQqWXg/Q0l6ns/HV rZQX1WKTYrz0IH11z9K7X1C7iByhiQgiV76KH5VDhK0cghd6Tau8vCUv8bDopxQzOwUtj79HlKXCH CFvB68rIKXbSUsCaw3MvfFigFn6kk3vB5XjdYr642lhzNObGXPC+Hzl8J14UB+QkQcvle3Re68JF9 5VKBoP0AO7fUo6MXfAKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nprx9-001VNk-Br; Sat, 14 May 2022 13:37:03 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nprx2-001VJc-FZ; Sat, 14 May 2022 13:36:58 +0000 Received: by mail-ed1-x52e.google.com with SMTP id z19so13007305edx.9; Sat, 14 May 2022 06:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fWumciIhP+oFBoIFbUXRMlzycA/gM0riZhiqo5gNScU=; b=V3ukrmo1UeLvhuLRQplrZ9DIj98TdIzk1/sq4otyZfc0INqVtkaSqdln+UYidsqJyy dPCMjq1+6XjKslck4xtsaIs2N2W2nnx/hXs/z0YGTPmPiNkB3lz9D+q0vlWSWxNU8LRL MHxVzkMIc00XFQm78Z97YHgA2c5EVUFWvLRgB9p4oMR+YJ4fb9tZRde7SSsjlb26li2g 7w9UO67aufDizFWDU6WZjdvybkhtpTYDx6w+cWVPcY3zKfOaHU4eEBLWwJBenhvFu7C9 kCIgc4Hl5dbQasSFP9GABY8O5sroUn1bdXtjAuNdupA0w3GUm8w9HLOoOBVKp25uEvy1 3epQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fWumciIhP+oFBoIFbUXRMlzycA/gM0riZhiqo5gNScU=; b=2DDekELzpGc0pejB1ZofB379cWkcdT4aJwjj3uBxtGksJTn/IV7+Xkq6t1JxFswNjI D6o2HGoYuxEaTOaI88PkvO8yjUKj/QCgG9oV705xqKsRMhf6eDdja+rwC0ltCCeSsbty 2VaOACEfbYglXpLGWF6f8298ZO2ZrioFBlPSfii3mjgE1iXePk5HvHfIyb3zQKz05sSD syGEkrLN87cW9SEbUnM3i5DtdGGwCMCQ/6ddOOBJVLHZTNW5ksmm0jtvjNzORxpQ0QVV meCbFBnwYooBaGY8IEPdsIZapS62rOO8j2oguR53qmSXf+G3OE/SOr5ZkaD4z1WrmOjH WSGw== X-Gm-Message-State: AOAM532oh0DBVq5LDpgqCX0nr/rabnxIN87Am5lZ3wICJ0Tkkq80oqCO 6zrmYoRdG3xm/VoaAVFM+V8= X-Google-Smtp-Source: ABdhPJyD0WYz9/D9X12wXHaejif0/1Ip2LueFcJDATsZp1cXy8onWFmfrxR+gjZLn4/sKxCh+pc4Zw== X-Received: by 2002:a05:6402:3214:b0:428:9d92:e5c5 with SMTP id g20-20020a056402321400b004289d92e5c5mr3819742eda.108.1652535414308; Sat, 14 May 2022 06:36:54 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id ci18-20020a170907267200b006f3ef214e49sm1736739ejc.175.2022.05.14.06.36.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 May 2022 06:36:53 -0700 (PDT) From: Nicolas Frattaroli To: Ezequiel Garcia , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Heiko Stuebner Cc: Nicolas Frattaroli , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 2/3] media: hantro: Add support for RK356x encoder Date: Sat, 14 May 2022 15:36:03 +0200 Message-Id: <20220514133604.174905-3-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220514133604.174905-1-frattaroli.nicolas@gmail.com> References: <20220514133604.174905-1-frattaroli.nicolas@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220514_063656_575482_91901D26 X-CRM114-Status: GOOD ( 15.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The RK3566 and RK3568 SoCs come with a small Hantro instance which is solely dedicated to encoding. This patch adds the necessary structs to the Hantro driver to allow the JPEG encoder of it to function. Through some sleuthing through the vendor's MPP source code and after closer inspection of the TRM, it was determined that the hardware likely supports VP8 and H.264 as well. Tested with the following GStreamer command: gst-launch-1.0 videotestsrc ! v4l2jpegenc ! matroskamux ! \ filesink location=foo.mkv Signed-off-by: Nicolas Frattaroli --- drivers/staging/media/hantro/hantro_drv.c | 1 + drivers/staging/media/hantro/hantro_hw.h | 1 + .../staging/media/hantro/rockchip_vpu_hw.c | 25 +++++++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c index ac232b5f7825..1112e8d0c821 100644 --- a/drivers/staging/media/hantro/hantro_drv.c +++ b/drivers/staging/media/hantro/hantro_drv.c @@ -638,6 +638,7 @@ static const struct of_device_id of_hantro_match[] = { { .compatible = "rockchip,rk3288-vpu", .data = &rk3288_vpu_variant, }, { .compatible = "rockchip,rk3328-vpu", .data = &rk3328_vpu_variant, }, { .compatible = "rockchip,rk3399-vpu", .data = &rk3399_vpu_variant, }, + { .compatible = "rockchip,rk3568-vepu", .data = &rk3568_vepu_variant, }, { .compatible = "rockchip,rk3568-vpu", .data = &rk3568_vpu_variant, }, #endif #ifdef CONFIG_VIDEO_HANTRO_IMX8M diff --git a/drivers/staging/media/hantro/hantro_hw.h b/drivers/staging/media/hantro/hantro_hw.h index c5dc77125fb7..38988be04d39 100644 --- a/drivers/staging/media/hantro/hantro_hw.h +++ b/drivers/staging/media/hantro/hantro_hw.h @@ -300,6 +300,7 @@ extern const struct hantro_variant rk3066_vpu_variant; extern const struct hantro_variant rk3288_vpu_variant; extern const struct hantro_variant rk3328_vpu_variant; extern const struct hantro_variant rk3399_vpu_variant; +extern const struct hantro_variant rk3568_vepu_variant; extern const struct hantro_variant rk3568_vpu_variant; extern const struct hantro_variant sama5d4_vdec_variant; extern const struct hantro_variant sunxi_vpu_variant; diff --git a/drivers/staging/media/hantro/rockchip_vpu_hw.c b/drivers/staging/media/hantro/rockchip_vpu_hw.c index fc96501f3bc8..b39813d53e57 100644 --- a/drivers/staging/media/hantro/rockchip_vpu_hw.c +++ b/drivers/staging/media/hantro/rockchip_vpu_hw.c @@ -417,6 +417,14 @@ static const struct hantro_codec_ops rk3399_vpu_codec_ops[] = { }, }; +static const struct hantro_codec_ops rk3568_vepu_codec_ops[] = { + [HANTRO_MODE_JPEG_ENC] = { + .run = rockchip_vpu2_jpeg_enc_run, + .reset = rockchip_vpu2_enc_reset, + .done = rockchip_vpu2_jpeg_enc_done, + }, +}; + /* * VPU variant. */ @@ -439,6 +447,10 @@ static const struct hantro_irq rockchip_vpu2_irqs[] = { { "vdpu", rockchip_vpu2_vdpu_irq }, }; +static const struct hantro_irq rk3568_vepu_irqs[] = { + { "vepu", rockchip_vpu2_vepu_irq }, +}; + static const char * const rk3066_vpu_clk_names[] = { "aclk_vdpu", "hclk_vdpu", "aclk_vepu", "hclk_vepu" @@ -545,6 +557,19 @@ const struct hantro_variant rk3399_vpu_variant = { .num_clocks = ARRAY_SIZE(rockchip_vpu_clk_names) }; +const struct hantro_variant rk3568_vepu_variant = { + .enc_offset = 0x0, + .enc_fmts = rockchip_vpu_enc_fmts, + .num_enc_fmts = ARRAY_SIZE(rockchip_vpu_enc_fmts), + .codec = HANTRO_JPEG_ENCODER, + .codec_ops = rk3568_vepu_codec_ops, + .irqs = rk3568_vepu_irqs, + .num_irqs = ARRAY_SIZE(rk3568_vepu_irqs), + .init = rockchip_vpu_hw_init, + .clk_names = rockchip_vpu_clk_names, + .num_clocks = ARRAY_SIZE(rockchip_vpu_clk_names) +}; + const struct hantro_variant rk3568_vpu_variant = { .dec_offset = 0x400, .dec_fmts = rk3399_vpu_dec_fmts, From patchwork Sat May 14 13:36:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frattaroli X-Patchwork-Id: 12849790 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 17AE6C433F5 for ; Sat, 14 May 2022 13:38:18 +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=sNfszvhMNfotEeR0NDOVEzAPsAon5i9BUfvT81YRCMY=; b=yjRLNgmk2PmhcP DcdtV6yVnIwPWa6LiwZjk2+L6OaU8vhDxOLWvcf0MaA29cg91Ow2TSptxQQHOpcLfQ9fVG0cnHY3E c3bJBDmVxkM/qE8+bDAPtGW04AOAAM8GmFXC7GEgZXUAVUAFh2Qda95nK/wetEOuwdbiIcFBQLkZy ebABD1GT/J5UD8AOAYf1m7wT9OTaRHEb8Xnfo6LxVJ4WGIhFVtnTRveqdON6S5QaK0OE/k++1cUsG EDz0hg8RZAWGh3kkYHERavemfsYiOrOf1zSMgBt6zeinvKCFdxVn+VBWF1SLV0fpp2AbkjC1Po8Zm SM3ViOvsv1JKTEDAzbIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nprxL-001VTt-8i; Sat, 14 May 2022 13:37:15 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nprxA-001VNX-4m; Sat, 14 May 2022 13:37:05 +0000 Received: by mail-ed1-x52a.google.com with SMTP id k27so13025689edk.4; Sat, 14 May 2022 06:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=toXlyjRqxPOMu7FU0IW8LcSR73wz0FAFwkKHEk9OfQg=; b=mF0fvJmaxcPEJXwm3QYVF49GBdsbPWOj4de02PwDIcByndRXk4h4m06jv73pa0pSme 2N2z/KsA3+HjyKj/TcHeWYFR54jRG+Hi7JuCuU5QLpIZlXTFIMttfIl9PQ9uZUhKYmaV tVIA5a3GN0/FUA1Vj+m+mcARIuiNLdN+633pa1cT7gXQ+XYCnGwbVy1IB5yO7eaC3cvI 8pn4LKgtnupFAwjzNlYsh2u9B9A4rcjy8FuDyhfE7YjGW7xxhv0eBGyNx/oa7ACQ+HBE yDB3dTIOmazon6wB7+se0uhHtLlSzBumYL8BMnYndo89GFwO/jsmGx+Jq/Wh8fOTIpAc gdVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=toXlyjRqxPOMu7FU0IW8LcSR73wz0FAFwkKHEk9OfQg=; b=LPYVN3U2+I5JmjQRXxMSO44Yj0BJB8p8YwZIWI1HSdOTBZBq/64lTVQ1KVZU1Z+cvu dpF925k4ZhN3jJm8an01vJL81mOEypmhrZ+uHHLCkQxiFwmWehgRlRsZMQEV5Y2uYogM P8bDRe4Y8YQn+MJKC5BJZSVcWXvxCBRISIrEl3TyLez3UFAwx1h81B/pkVoMzgP3Yqna KQQFs/dz5Twn63kxJsQg8QGef/1IcT7lVVM+nGx42OoWwg2hVOTB4NH9J3p7DZtROad3 3Stj/iUg6IK4S2ugvVDdcykNJtf0U7gSG6afrVe06EN81bHqWFQNxvYHhaYfgHQ2JNej LAtw== X-Gm-Message-State: AOAM531STE1YfTj7BkmFS3WFv//ELgBPArrwOPJBxoPqgWzaEyFrIkr+ KLQBwz/qUoA3Y+9FJV44FHg= X-Google-Smtp-Source: ABdhPJwWj2/+V8JJuLG/en/GhFUmBSvLuOfOdP0FDOK6FKh3Z6r87dGQpB9uw240uYeEwToco2nhzA== X-Received: by 2002:a50:fe1a:0:b0:425:e276:5adf with SMTP id f26-20020a50fe1a000000b00425e2765adfmr3840879edt.284.1652535422140; Sat, 14 May 2022 06:37:02 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id ci18-20020a170907267200b006f3ef214e49sm1736739ejc.175.2022.05.14.06.37.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 May 2022 06:37:01 -0700 (PDT) From: Nicolas Frattaroli To: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner Cc: Nicolas Frattaroli , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 3/3] arm64: dts: rockchip: Add Hantro encoder node to rk356x Date: Sat, 14 May 2022 15:36:04 +0200 Message-Id: <20220514133604.174905-4-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220514133604.174905-1-frattaroli.nicolas@gmail.com> References: <20220514133604.174905-1-frattaroli.nicolas@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220514_063704_215077_2CA4F054 X-CRM114-Status: GOOD ( 12.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The RK3566 and RK3568 come with a dedicated Hantro instance solely for encoding. This patch adds a node for this to the device tree, along with a node for its MMU. Signed-off-by: Nicolas Frattaroli --- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi index 1042e68602de..9b4bed7a8a44 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -569,6 +569,26 @@ gpu: gpu@fde60000 { status = "disabled"; }; + vepu: video-codec@fdee0000 { + compatible = "rockchip,rk3568-vepu"; + reg = <0x0 0xfdee0000 0x0 0x800>; + interrupts = ; + clocks = <&cru ACLK_JENC>, <&cru HCLK_JENC>; + clock-names = "aclk", "hclk"; + iommus = <&vepu_mmu>; + power-domains = <&power RK3568_PD_RGA>; + }; + + vepu_mmu: iommu@fdee0800 { + compatible = "rockchip,rk3568-iommu"; + reg = <0x0 0xfdee0800 0x0 0x40>; + interrupts = ; + clocks = <&cru ACLK_JENC>, <&cru HCLK_JENC>; + clock-names = "aclk", "iface"; + power-domains = <&power RK3568_PD_RGA>; + #iommu-cells = <0>; + }; + sdmmc2: mmc@fe000000 { compatible = "rockchip,rk3568-dw-mshc", "rockchip,rk3288-dw-mshc"; reg = <0x0 0xfe000000 0x0 0x4000>;