From patchwork Wed May 11 15:53:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frattaroli X-Patchwork-Id: 12846400 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 0A9FAC433F5 for ; Wed, 11 May 2022 15:54:43 +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=vl5CEyh372MKR1MXOdgQOFQGXMQ1xaJ2drgX/iUSiFU=; b=I6BpVyD/bwRh3V r/LZLxuiI6jFqmOPUJ5r2uYueficpb9Rh71+HRyf5JiB3ed6+I9koQlopSsHcL79iWrLmXbazNF1b HcpgEeGkccAeFVk45rQLzf/gb7cgDv7m53UaDxl65qvYjgo3+JejSxkk0bUDBITECInFl0Y4mlNru QP2fAj4ffcALmF+EA5LUqH9N0M0qR6LkYHp79HyExheuoau8HBA6eojZr5+Ypmh5OIQGhR1Ucn4/g gACeHfJqEONc3h0dqbJpV99qyHzN+aGdBnvbKnBwrKBtB0p2IQbnmZ2eVX6GwSxMWhTkghCniafO6 Nw4Ywec8FU4bl9yN0C1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nooem-007ehf-8j; Wed, 11 May 2022 15:53:44 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nooec-007ed6-J0; Wed, 11 May 2022 15:53:35 +0000 Received: by mail-ej1-x62f.google.com with SMTP id n10so4951450ejk.5; Wed, 11 May 2022 08:53:34 -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=yjOB8oqEwj9sflBfsTrbSM5ZU+W2PCPtGpyHnXQbiBE=; b=DEe5lwmx+2gl2/ljAQlEQrJ1PN8mf3JLE2GLEOI8Pc10Qd60sdbvlnNgdIjftPFcXU DjMiBmrvgwzcqgEkOqHilryRors0zI0ldL3Yrz9TqPC/H0ia7astUlcXSIkhwqLsOKX8 ydamXn4CY3Wq5lQyHaXMsRP/r+dRITClHBqwhXbAPBuz5M0m4JEs3VQq+KS0cr/in9Z5 yrwtOrC8B5SzGtAcs75Ng6wkqTfkEqnOQRrlrgqKbX/IR2ngEwu30fa+NPrd2iowUIoA PwMFHrGVXoaQMgmu3pxfqseLOSfk1dX9ay2Gfm8VKHB8Rfhf41cAX2yYbe9EgU7EB4tq BwYg== 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=yjOB8oqEwj9sflBfsTrbSM5ZU+W2PCPtGpyHnXQbiBE=; b=qfCsykYmGI+XTubmDc6Qhf+aie5JKW4H3Px1wIDTNFn2MPyrBE2YWWw63IXQ1/ZA85 Plu4ureYn0s3hGkeI7ODRY7qRzQ4wK9xcd3J8/YopXLZesKpcH48famqRFccFN+eWpnL HmC4RFtR+yq3piBnWqSrrm8Ov1ohl3yZtSRAYgLbeg5WyEtbwgv6VkrqTNvLVMlqKwbV BJMC8RJOLLc451hDpTS7mrh+4cXsxhzX2Ccq8qpXT6QhFDy8ItHpagrmyfIHBgGbr1QU l1MSzZ/UgyxlGMA6Apu3DuRj0JyPDc+vau9irwvGiK23rhkF/MI0jk1hutZwJkjomrq0 d+Eg== X-Gm-Message-State: AOAM53274/FAMTK7AKWKQLTsoqqr0C32nBNj4GygEBmTkMJh9JUp+c9Z QCBIUoTEY3g76xulz0JMq/M= X-Google-Smtp-Source: ABdhPJyWSUkwh8FQB0XXOTQIraeUsjzWhAMctVfXQSgsFRY6m2slte57mkSqtEgbc+2cMTXMJL4F1A== X-Received: by 2002:a17:907:1623:b0:6f6:e9ce:9926 with SMTP id hb35-20020a170907162300b006f6e9ce9926mr21965119ejc.360.1652284413040; Wed, 11 May 2022 08:53:33 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id fb21-20020a1709073a1500b006f3ef214e1fsm1072458ejc.133.2022.05.11.08.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 08:53:32 -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 v3 1/3] dt-bindings: media: rockchip-vpu: Add RK3568 VEPU compatible Date: Wed, 11 May 2022 17:53:06 +0200 Message-Id: <20220511155309.2637-2-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220511155309.2637-1-frattaroli.nicolas@gmail.com> References: <20220511155309.2637-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-20220511_085334_666858_E6CF611A 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 RK3568 and RK3566 have a Hantro VPU node solely dedicated to 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 --- .../devicetree/bindings/media/rockchip-vpu.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml index bacb60a34989..965ca80b5cea 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-vepu - rockchip,px30-vpu - items: - const: rockchip,rk3188-vpu @@ -39,7 +40,9 @@ properties: interrupt-names: oneOf: - - const: vdpu + - enum: + - vdpu + - vepu - items: - const: vepu - const: vdpu @@ -76,6 +79,18 @@ required: additionalProperties: false +allOf: + # compatibles that end in -vepu should only have the vepu interrupt + - if: + properties: + compatible: + contains: + pattern: "^[a-zA-Z0-9\\-,_.]+\\-vepu$" + then: + properties: + interrupt-names: + const: vepu + examples: - | #include From patchwork Wed May 11 15:53:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frattaroli X-Patchwork-Id: 12846403 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 E099CC433F5 for ; Wed, 11 May 2022 15:55:48 +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=/NS8DlvRhrYTqYr+xcpBagd08Okq80pJW9mIJbE99tA=; b=t6Cm8ipzjPEO2f 1ttvL+f6QRnNPkfPs3Vs1x3x9U8H5LoQsEEeKe/cMVcxZ4N4BUfoM0jlBqikzLgfAdog0NdOUXD5y Ua2bjA2RzgBh+qQPhLHlO5iyBoX9l2LuGntBUVpM0irz3t2/AWdpkp4SNS75P/PrN69qjr5KYzuUo 8FPdDSZhBW8kzNq1QtZ6PRxqnJy0KLeguKei6wncbpZX3nuRVUsO9Ecs+2JGis4tUmnli2uLRySJ3 lCWXx7qPf9sSaW+bkBQ4SJzZYRc6aYhz9Ip99ryQjSA8pV04RFdHJlxmfba/QhbMFebGTR4hZ72Tk /7xXg8knNmEOq10jF93A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1noofA-007eso-Rk; Wed, 11 May 2022 15:54:08 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nooey-007elq-40; Wed, 11 May 2022 15:54:00 +0000 Received: by mail-ej1-x629.google.com with SMTP id i19so4900598eja.11; Wed, 11 May 2022 08:53: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=dUweJsekqn20RiGCHeTdxpbDFbYhVgStBTWjqPTC0OA=; b=cyTtogAdcREKIftueghnF0sDVo//N1OZwgehStWkfnvKyI8bEyee2moKrfR+WWVvMI lv9zRWQUappmQK2ic6Eir90cj93KO5VDwRvEzBtFDBbcjgbHEh/PHlM78eDcL+7JrQ9X qGw4O3RS8gLpgcqGv7JkWeaKkl4JWCyO9ddzvZjUUR4aPyZ6sgwc25U2WodEJu6cZoI0 SenLc7N90eX0AuY3idnywtZwF8PwlSIhSPOq7rlKzj1GIvA8h5eRoaubsbWWmQCG4vLP fLz2phzw3vaR5jCz2x9zy4r4PLUA5Br3sjHeXzkxnZl9up7OCowgLhCw44QsX8qokhnX QQ5g== 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=dUweJsekqn20RiGCHeTdxpbDFbYhVgStBTWjqPTC0OA=; b=hPKhJM1k7q/gmuO1aGjT2x490EjyZpnZQI0gnCkddng6iy3+7blV2dhbnoYsm2FPX1 LG6P0pwM84QGWpGJSOKqGQ51lJ09aDlIJU8zC1p3Her/6MWtTU8bVNjyuf1fl4CrAvs1 8at6dOnWyKyNjNg7I1sGImD4V4701lBf4A2a8qmS63lbP1xtsugftT5x1jPPuHUAOd3G Ha2R9qVtFNp968mTwbZLomIDrdiJz+n3RELGfbr/3gCM4gLbzt848mbAS6vfPtqyDLxp n+KnoI3k0fJaWwFF/Ri9o/6nq+jLoTw2oux3A12Hyr3w0zIL/04Y8OO9kG4wv83SZSL1 g88w== X-Gm-Message-State: AOAM532snpoy7ovgW47VCVpR5GfRtOergWoutFdbJ/OLveRtV9VjVzvj UfS5utOCdZXxZfVzx89UCTk= X-Google-Smtp-Source: ABdhPJx56wlYGNygo2oYyc1gSjL/5348c7Sgrxk0TlJvf62vEm+dYrg4aJ1wLPgNm73KSMvWOPdJFQ== X-Received: by 2002:a17:906:b74b:b0:6f4:cd08:6fec with SMTP id fx11-20020a170906b74b00b006f4cd086fecmr27063368ejb.155.1652284419934; Wed, 11 May 2022 08:53:39 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id fb21-20020a1709073a1500b006f3ef214e1fsm1072458ejc.133.2022.05.11.08.53.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 08:53:36 -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 v3 2/3] media: hantro: Add support for RK356x encoder Date: Wed, 11 May 2022 17:53:07 +0200 Message-Id: <20220511155309.2637-3-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220511155309.2637-1-frattaroli.nicolas@gmail.com> References: <20220511155309.2637-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-20220511_085356_233811_DB6DC9A2 X-CRM114-Status: GOOD ( 16.29 ) 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 dc768884cb79..0b38b41136e2 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-vepu", .data = &rk3568_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..b312da654d38 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 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..a97a4ea8ede4 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_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 +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_jpeg_enc_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 px30_vpu_variant = { .enc_offset = 0x0, .enc_fmts = rockchip_vpu_enc_fmts, From patchwork Wed May 11 15:53:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frattaroli X-Patchwork-Id: 12846402 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 55ADEC433F5 for ; Wed, 11 May 2022 15:55: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=cAc3AVwq0ywlI4tOeRW/klpyA2SSElCl5Txd402/ULc=; b=JmI8YcaYlLiBHj UpNtJXFXuYPQj6Nfc2KMqvnvYd+mFMFrweGxWo8jLyCdgDTCMaUFj/BBuCL1KVe7BCWGuCl/mkDC8 pw+T4Ec+75FJkbU5d7rLHQMADq3WKvbC1GsTkENDrdJeufBmrBXyXEKwh3pug/xtiBBORpDGBwiY/ Mj6+17w2Bg2LmrpvwcROrJ+IEdQRGJ7MxjQbSaR8+J/sWnKUqCgsJUZgRhLila4FcksMT5lh0OJj0 ZbswXmoa0I1xNUJv53ULdwupGicRbSEtwwryPkpee7Y/pSgAAunjzGWAhJjzz0XiSr7NP1kUQtQUh P0VKmhB79s5sAQ2wHbgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nooex-007elw-RK; Wed, 11 May 2022 15:53:55 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nooev-007ejy-AQ; Wed, 11 May 2022 15:53:54 +0000 Received: by mail-ej1-x62a.google.com with SMTP id l18so4935509ejc.7; Wed, 11 May 2022 08:53:52 -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=3fg5Nzjhs3fr5rSwk6Iz/2XPkRGYgF2tY/d4ceMcAoM=; b=YcB+oMZTgmuRzalJJyIxDg7S8mCjfLNaBcjTjI6H/O/9pBVI5JZAcGOM4KgIdk/psE 29sA0AHei/DQ7FaqWxRmy18uOoSk4AAqHkcWqr1+NWKejifLM7u7Sa9LyoLudIvPzJrv o4EVHDilSgpS1K7VMpEMdc43NqMGWwY949pvQOgmDCJdymeVAot+bs2YsVMBOG58H6vY H9NrLiLDwQmmi3TbZhTk/BMhEg0ubePrb2+U6O025RuUXpdXOuwSqmZUiQ3We2RNXPnj 9yslpZQ+sYoP6AdE26hlXlCG28K2+Praw+OpWVUnMs5S+EZDhFX9F1rMZLhau+CoSsbQ NPUw== 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=3fg5Nzjhs3fr5rSwk6Iz/2XPkRGYgF2tY/d4ceMcAoM=; b=lOwQYZ+j4xmU94nj+nXjWBu9ugOa7o/JuFfjaHLWuBz0/n4FtSmPdZqDCh1TgxyNzk qgCDA4+SUBvq7EztmAxX57SDdLCk5U2DbJnu9830Mr/lv08khCUBLdS+kCNwsZuAzQhO d1A3UjAaf7lgSEbO6QRJFoucIUMXGHXTSdWxOxQD/7NkvvJVLrR8MqqM4gQhxbLB5tNr qu/sscSEwkkX2JQ5ViJA+3HUj3VH470VBZQ+iXDo1rOEl6LWY3nRfIfBTNvHJYfYONRS 6HO/u0Y0qoGIT3z/dyOsmkPES18cq0slIBzcW0npy9Ffm3KMI01Zae5uZKMWrtm9+yNn k75g== X-Gm-Message-State: AOAM533D5mJpb34Le8kK4g6MYYdYvM2Svs8hjGU7s/hlWSPQEFudeaT8 pO59fFx1JgK2iqW3fCmn2Mfz2MzkFcut2A== X-Google-Smtp-Source: ABdhPJybtTb4hy/yCAfASXiU8rK4aH8rB3XXtZigSeku4xIBcXrFT2uAPQURviyW/zkQezUOEjlnCQ== X-Received: by 2002:a17:906:e9b:b0:6f3:cfcc:922e with SMTP id p27-20020a1709060e9b00b006f3cfcc922emr24996863ejf.346.1652284431371; Wed, 11 May 2022 08:53:51 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id fb21-20020a1709073a1500b006f3ef214e1fsm1072458ejc.133.2022.05.11.08.53.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 08:53:50 -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 v3 3/3] arm64: dts: rockchip: Add Hantro encoder node to rk356x Date: Wed, 11 May 2022 17:53:08 +0200 Message-Id: <20220511155309.2637-4-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220511155309.2637-1-frattaroli.nicolas@gmail.com> References: <20220511155309.2637-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-20220511_085353_400090_8AE0A601 X-CRM114-Status: GOOD ( 12.72 ) 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 | 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..2e3c9e1887e3 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: video-codec@fdee0000 { + compatible = "rockchip,rk3568-vepu"; + reg = <0x0 0xfdee0000 0x0 0x800>; + interrupts = ; + interrupt-names = "vepu"; + 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>;