From patchwork Wed Apr 27 22:44:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frattaroli X-Patchwork-Id: 12829579 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 CB432C433F5 for ; Wed, 27 Apr 2022 22:46:33 +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=BdaT41Ky0WyClwKJ5Xa85CaRCvvGw4e7sdzpgXTgd4w=; b=p3SxlOEGChtc4j 87pUEmQfCL1rBAFydERM3m/8rI8rUTwU0IroQv/LZ9oGwhti0gL5f+IYPZ5Ft/2xtI/4c8rYxewer c9YwPUJ3OKWDz2XawSKhs+Us3JdqFHEcPOekyEgaPImxHHMFOqvgs8uwH2+ud++LtTdAQfVufR7Fh 5X/dAYWcuJwtqkavgigO4RPGLYSvrAlkIeTTwEtaZ20PHrZw/F02+D8AeN78TEZQ9654xF+29bZUE ZqJXIy+2rlnx9BLbBrg2BNr57BX6HJTcblobltQHxBpsTdtQ0FwtgStfSi0C/2nosTCgGPjIYfLD+ wL53R4SlnuBVkWBh6RJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njqPb-003oS3-RU; Wed, 27 Apr 2022 22:45:31 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njqPY-003oQb-9W; Wed, 27 Apr 2022 22:45:29 +0000 Received: by mail-ej1-x636.google.com with SMTP id g6so6166679ejw.1; Wed, 27 Apr 2022 15:45:27 -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=pyZvRC+ImUtuat2otlAa+f33aNRxDWXd/DqxIdwCo1s=; b=QpNFUZCPgzvdxrGKeCw1W41OpBdSFRjJwTsfaMThDGiHLWIhgzSokitg8g8IM2htVc YsApSbH22jVkv+rHfesfbCLj9PDAcGtoWK2fekHjf6RK5ZPvcWpUFXB0LFrZJ2wM0fhN PKz1VqaEDxpHiP9mHlZ25CR2gR1AACS8PjNhMoyakaagTgVDCFrDvxfwgGWTTM1yEy9i noQFafrImDYAxOwP+jQkxagBInbL7K+ZBDmu5hWeoIwVyxFLXC+MkBcs/D9xffKHSVc7 SgazfLKyoewySjF/D6sXLEX+wL1ozb+foLEmuakwzMoVrW2SmzPYgFk3Vo8OWzjZSu6M 3w/A== 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=pyZvRC+ImUtuat2otlAa+f33aNRxDWXd/DqxIdwCo1s=; b=6hcvCeOSlgvxMjaDYWE3ymYxiR3VLXd4rMxJKqO1sJsUNJFnZjeZTgh4iiKxbQCeii kQDdk09lCL0etCc4skSV8NkNR/Kc5rMkYGuEu9Gz3XYPczFKgMCVsrS4WohbyKlKFORA VuAcZK6RWoy42VhSIUhvwcToG0QhHu1WTyzCVMI/NSWXpsSYjPWysBdhppeLf7uKb2P5 RmD0jf2hBs5y+4naiKX7sueBPvTQPibmUcI0RxHFRawPrfkFX+K5joiWmFjlcSkh5TNa 4TMDtvZ4KdpYnbfQSMaJy0wMW3oa05KAfNckp2MGQ0fDmruzPFwBs0LZSVt/NB8IYfIP PWaQ== X-Gm-Message-State: AOAM531BOHeCIoDX83E5tLY42peMkpcK1ujngw0ttF+bKR/bGY3nAvg0 nHwqNwre78ix92c+vFBrUl4= X-Google-Smtp-Source: ABdhPJxSIML5RaPid0dIjEvzf2jN0CDXNzAePhE3vd+DNERD2jnVTiDLJbNV7Y0XeAhPFY4oIwLgIg== X-Received: by 2002:a17:907:3ea1:b0:6f3:d6a0:e5be with SMTP id hs33-20020a1709073ea100b006f3d6a0e5bemr1607123ejc.522.1651099525898; Wed, 27 Apr 2022 15:45:25 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id t27-20020a1709063e5b00b006f3a94f5194sm3762594eji.77.2022.04.27.15.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 15:45:25 -0700 (PDT) From: Nicolas Frattaroli To: Ezequiel Garcia , Philipp Zabel , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner Cc: Nicolas Frattaroli , Ezequiel Garcia , 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/3] dt-bindings: media: rockchip-vpu: Add RK3568 JPEG compatible Date: Thu, 28 Apr 2022 00:44:36 +0200 Message-Id: <20220427224438.335327-2-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220427224438.335327-1-frattaroli.nicolas@gmail.com> References: <20220427224438.335327-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-20220427_154528_393607_2CA1FB28 X-CRM114-Status: GOOD ( 11.40 ) 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 VPU node solely dedicated to JPEG encoding. This patch adds a compatible for it, and also allows the bindings to only come with a vepu interrupt. Signed-off-by: Nicolas Frattaroli --- Documentation/devicetree/bindings/media/rockchip-vpu.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml index bacb60a34989..cd62b44c34c3 100644 --- a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml +++ b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml @@ -22,6 +22,7 @@ properties: - rockchip,rk3288-vpu - rockchip,rk3328-vpu - rockchip,rk3399-vpu + - rockchip,rk3568-jpeg-vepu - rockchip,px30-vpu - items: - const: rockchip,rk3188-vpu @@ -40,6 +41,7 @@ properties: interrupt-names: oneOf: - const: vdpu + - const: vepu - items: - const: vepu - const: vdpu From patchwork Wed Apr 27 22:44:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frattaroli X-Patchwork-Id: 12829580 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 2C4D1C433F5 for ; Wed, 27 Apr 2022 22:46:47 +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=s8gpqSwfTZqkGiURt4lzFd2UGCdxWODQRvH8AAT7hxA=; b=lg8/QJitgoe5U7 WemBQXzw5zVllVTM+hfYiSwik+7EfaD/Zj4s14A4RV9lTlofoumR8J0yG6FzFJw2Ay4e3w5l5v8hI ZH3by4eQPerqlci2A02Sr6jZyaqpMUGPVkKUG++RLXUEF7WFIvRcbzoxTid/GUuphwytK+zwCoK75 1QVVSUls2wpOV9v1bSXklHUlvAIbd7JUMnSsRfgN1DvKTQeHsD52NEy4BgyBUzzfl5VaCePw41EWE AfUtXWtEBzqHNoyVSZwblvPYANu3NFRXqY0V6PmndsuO/DQs++CsrNlftk76JG2MJPHZDdibGlnF5 ODT1xtd4XUCURu8BOdiQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njqPp-003oZJ-UE; Wed, 27 Apr 2022 22:45:46 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njqPk-003oWO-N0; Wed, 27 Apr 2022 22:45:42 +0000 Received: by mail-ej1-x630.google.com with SMTP id m20so6101407ejj.10; Wed, 27 Apr 2022 15:45:39 -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=SEsb2SgWolkRqj7dWyYbDSsU9Xv91zJdA8mUTyxyeSw=; b=aEKrgVIFzfcrqdNWBk+yt0k4UIxXu/l9JXBIdydEEKJhtT3JJ7J5Kbs/EkLl5I6c2i z3TR7WBb17BgE8T1h7HIn3HNNeCtacxjV9/5IKD3VyGbI/tkKQaIPmn9GhzppBAhsfet 7o66wMZYwFkZVzqYXbgJsD7W8h782CmMCvo7jWS/URIqUP6KRNzQu8WExNO6RPFZMHtS VXAgqEQWKOTSTtlDQty6qCyMROioe+pQPZHw/MRY+OE4lJnqFo5ZJQ8vRBarpf8LWhBM JWCxP8SzZfD9Q0TgzuuKLi7p8k1pNqdO8/q/06Q2viSsqHfZCL7M76tUEaPXjqBHo/Qv Op1Q== 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=SEsb2SgWolkRqj7dWyYbDSsU9Xv91zJdA8mUTyxyeSw=; b=dnqfrSnCTLNq6aptRrPRqBKPf6KlRF3bFGzRcRBRqz5P/qL9hkn+wIvleZx4Jemql5 ekJVukM2f3BX8L08so+RcK1lhQ3eU36JCTwuEVQtk6fXv0ZUseFNKkxNasO6EFxUAPOz SDk5/b03cYfR4G/A4j0D4pqqhIAUn2uuh2WAvXKi10M7ySgGXpJqgNHOJLUxgi+nwVQ6 TYzbYcwvbUIKaLl2WPadkJfLczAILx3LG40xGXYvV7tBBbTJwyfGOvp5U8VW5hZ/VGo+ 9tjPGtm8NUqfIiJIjvPaaM12fSR3+8HP9InaxKAzPsi10eH67+lQo21wN5LmAwYbI2NJ Rkbg== X-Gm-Message-State: AOAM5327ohitNUT8okNbZ+BS7c3qKGGNfPKUpjTQSmf5ufQxHyfwjAdU MsZwnp8eI/3eGuxrvnZ4C1g= X-Google-Smtp-Source: ABdhPJzTIKk2WZLdAghMr47bsyg/97696M6Bp2l3/n9Ropf3wqIzZufO2zQq2dPcsDeSYblym2EPPA== X-Received: by 2002:a17:907:98cf:b0:6f3:9901:bc0c with SMTP id kd15-20020a17090798cf00b006f39901bc0cmr15581065ejc.315.1651099538353; Wed, 27 Apr 2022 15:45:38 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id t27-20020a1709063e5b00b006f3a94f5194sm3762594eji.77.2022.04.27.15.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 15:45:37 -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 2/3] media: hantro: Add support for RK356x JPEG encoder Date: Thu, 28 Apr 2022 00:44:37 +0200 Message-Id: <20220427224438.335327-3-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220427224438.335327-1-frattaroli.nicolas@gmail.com> References: <20220427224438.335327-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-20220427_154540_790924_81E316C5 X-CRM114-Status: GOOD ( 15.80 ) 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 JPEG. This patch adds the necessary structs to the Hantro driver to allow it to function. 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 | 62 +++++++++++++++++++ 3 files changed, 64 insertions(+) diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c index dc768884cb79..3add9babd7bb 100644 --- a/drivers/staging/media/hantro/hantro_drv.c +++ b/drivers/staging/media/hantro/hantro_drv.c @@ -628,6 +628,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-jpeg-vepu", .data = &rk3568_jpeg_vepu_variant, }, #endif #ifdef CONFIG_VIDEO_HANTRO_IMX8M { .compatible = "nxp,imx8mm-vpu-g1", .data = &imx8mm_vpu_g1_variant, }, diff --git a/drivers/staging/media/hantro/hantro_hw.h b/drivers/staging/media/hantro/hantro_hw.h index ed018e293ba0..dd7f1edfacf2 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_jpeg_vepu_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 163cf92eafca..10d3ea92a954 100644 --- a/drivers/staging/media/hantro/rockchip_vpu_hw.c +++ b/drivers/staging/media/hantro/rockchip_vpu_hw.c @@ -204,6 +204,43 @@ static const struct hantro_fmt rk3399_vpu_dec_fmts[] = { }, }; +static const struct hantro_fmt rk3568_jpeg_vepu_enc_fmts[] = { + { + .fourcc = V4L2_PIX_FMT_YUV420M, + .codec_mode = HANTRO_MODE_NONE, + .enc_fmt = ROCKCHIP_VPU_ENC_FMT_YUV420P, + }, + { + .fourcc = V4L2_PIX_FMT_NV12M, + .codec_mode = HANTRO_MODE_NONE, + .enc_fmt = ROCKCHIP_VPU_ENC_FMT_YUV420SP, + }, + { + .fourcc = V4L2_PIX_FMT_YUYV, + .codec_mode = HANTRO_MODE_NONE, + .enc_fmt = ROCKCHIP_VPU_ENC_FMT_YUYV422, + }, + { + .fourcc = V4L2_PIX_FMT_UYVY, + .codec_mode = HANTRO_MODE_NONE, + .enc_fmt = ROCKCHIP_VPU_ENC_FMT_UYVY422, + }, + { + .fourcc = V4L2_PIX_FMT_JPEG, + .codec_mode = HANTRO_MODE_JPEG_ENC, + .max_depth = 2, + .header_size = JPEG_HEADER_SIZE, + .frmsize = { + .min_width = 96, + .max_width = 8192, + .step_width = MB_DIM, + .min_height = 32, + .max_height = 8192, + .step_height = MB_DIM, + }, + }, +}; + static irqreturn_t rockchip_vpu1_vepu_irq(int irq, void *dev_id) { struct hantro_dev *vpu = dev_id; @@ -417,6 +454,14 @@ static const struct hantro_codec_ops rk3399_vpu_codec_ops[] = { }, }; +static const struct hantro_codec_ops rk3568_jpeg_enc_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 +484,10 @@ static const struct hantro_irq rockchip_vpu2_irqs[] = { { "vdpu", rockchip_vpu2_vdpu_irq }, }; +static const struct hantro_irq rk3568_jpeg_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 +594,19 @@ const struct hantro_variant rk3399_vpu_variant = { .num_clocks = ARRAY_SIZE(rockchip_vpu_clk_names) }; +const struct hantro_variant rk3568_jpeg_vepu_variant = { + .enc_offset = 0x0, + .enc_fmts = rk3568_jpeg_vepu_enc_fmts, + .num_enc_fmts = ARRAY_SIZE(rk3568_jpeg_vepu_enc_fmts), + .codec = HANTRO_JPEG_ENCODER, + .codec_ops = rk3568_jpeg_enc_codec_ops, + .irqs = rk3568_jpeg_vepu_irqs, + .num_irqs = ARRAY_SIZE(rk3568_jpeg_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 px30_vpu_variant = { .enc_offset = 0x0, .enc_fmts = rockchip_vpu_enc_fmts, From patchwork Wed Apr 27 22:44:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frattaroli X-Patchwork-Id: 12829581 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 21865C433F5 for ; Wed, 27 Apr 2022 22:47:03 +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=m5nixAU66iCly5hIm4QWym3t5uTGTUPy1dvHLUxt6Rc=; b=mUDujds6JeApJ3 dxYj+YFhyq3SFZOPac69O7Cfzgsa5Axtcz4ih3YNYCGmmdl6z2vQuxCkRmMs4afHdvAm+LfpUD4zW DuvAVTo2Etgpgr4BXk1DNPwEApCBRL9aKO9BQA/FJx8ELEwkiE0hsqnu5k7dVpgPRKZbzWubAS1XW oKMOL0WrNJTIOtzKwODxT+wj6LB31sUqizQdhRuhVTDplIKxRw39qSwGtn6B+iao2yhsIBodtLncx vQKXhaTaAq25CNeYqAS9Ldja8UtwMXUAZGA6t4sAznA51ySuhAmGzQbD5MeroGh6WnXq71wJtVScr zFpeCyeaAOi1T1fx2r9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njqQ4-003ogq-JV; Wed, 27 Apr 2022 22:46:00 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njqPs-003oZt-9q; Wed, 27 Apr 2022 22:45:49 +0000 Received: by mail-ed1-x52f.google.com with SMTP id z99so3553491ede.5; Wed, 27 Apr 2022 15:45: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=okSCVW6L9a34IlYWN73Yo/cqzfL3+UCVtrLqSo2aTpU=; b=VyANRZ/fd8iCMPLNuxR0ZdOBJri3vl+dxRpNFPNquueLmI22pt9z1CufLP/RCkXqBU HE12KYCU7tCdTdS3MgP92myFap+2Qhpo2234wAoziCfC3S1iemkiDrGwqB5vRqWJaZfi k1sFXfrF4Iib9dchS73RcWhVzyzNKdhFlupxPTlrrJypPWNACuLGxEni82BSSwO7fdZC 0eJpCrVmILCL49swcmkPA0pbU7xhtF0uuPEldPw83lgfJ6mZD30u/FnzvBTwazqgsd++ H2RaOrmUgEDLgKLsRINUb/PL6So+DvxhcTLIZtn8A3VHJwwUNvs6jsVpWoxGVKA76j3C qxXQ== 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=okSCVW6L9a34IlYWN73Yo/cqzfL3+UCVtrLqSo2aTpU=; b=HNxMzNf1tr17Z3MVO0wltTYOjeJftVfiSp7tUlQoSoYf8cnDgs3VLrNaPftfA6Je1G j6fcZR7KL3L9h9RXmEB1JCSM1vWd86DsKczmISKKqFu3yVEmWDI6i2abE3yENdmTbdDr bfAhuSkLnVUJSOVF3bDIO1MZCJiq6fp1ruejVbSGCxXUP8QVf0eoNZC5JgSiD9NgqziO /IHd0kTw+t/PMJRKiutkaHdqHbpy9Q2GxzbojF3tn6WExQ1m8CIfmzTyINHLeRMPum0R 5EjOZb41+Kv3uX65lHvCMuUoysik+jDb7Mkmq5vewr57R/r/jFlsyg5K2TFIuAsEk3kE Z5kg== X-Gm-Message-State: AOAM531qxbbwNSwOuyG1sjuQMeAg/DhTs8oIolmUhNc8iaT8UxAKmWXC 5599Nt3UzrPCGEIDzeIHIJQ= X-Google-Smtp-Source: ABdhPJxuX/e930JKFnJ2zC30aKyv2otNuL/qGXSH74OgjR0UxhNtPyRDKxd10Peu7Gb553HbllMRbg== X-Received: by 2002:a05:6402:1e8d:b0:426:9:6ec with SMTP id f13-20020a0564021e8d00b00426000906ecmr9938522edf.55.1651099545994; Wed, 27 Apr 2022 15:45:45 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id t27-20020a1709063e5b00b006f3a94f5194sm3762594eji.77.2022.04.27.15.45.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 15:45:45 -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 3/3] arm64: dts: rockchip: Add JPEG encoder node to rk356x Date: Thu, 28 Apr 2022 00:44:38 +0200 Message-Id: <20220427224438.335327-4-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220427224438.335327-1-frattaroli.nicolas@gmail.com> References: <20220427224438.335327-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-20220427_154548_399123_44136F63 X-CRM114-Status: GOOD ( 12.57 ) 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 JPEG 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 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi index 7cdef800cb3c..276b76d5f3fb 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -508,6 +508,27 @@ gpu: gpu@fde60000 { status = "disabled"; }; + vepu_jpeg: video-codec@fdee0000 { + compatible = "rockchip,rk3568-jpeg-vepu"; + reg = <0x0 0xfdee0000 0x0 0x800>; + interrupts = ; + interrupt-names = "vepu"; + clocks = <&cru ACLK_JENC>, <&cru HCLK_JENC>; + clock-names = "aclk", "hclk"; + iommus = <&vepu_jpeg_mmu>; + power-domains = <&power RK3568_PD_RGA>; + }; + + vepu_jpeg_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>;