From patchwork Sun May 8 20:25:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frattaroli X-Patchwork-Id: 12842771 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 003A8C433EF for ; Sun, 8 May 2022 20:26: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=xsLhbsZbEOfRDTUgbBE/4xrHFTPs5WwQWqkY3YwOD7Y=; b=Zz/TSeMrECzKms EQMn2yzSJ73RVkqAWuRyr2Uosu4ndvfwM2YtdG2SBf9+RMxglSD/bcBzqK1UxmWu3F1q1Z4B+zMGH zzSvcwhHpY5alA79voy7A7iABQv1zdUAmRl5D9etwMMhzKDyD7INWhv4zSsB1C4tMpwggXM01K7ub UG7cAgdDKmH+HJbnjqRplKvab/JYAhxQw97NS2Cwmo5DpgXFGsrUwvu0CXph5K+z4rku7BhpMBO/Z IRLpTHRRXA8Nosc4C6hmNS8uTajL0bGBp65MbgKX9zFpMprQiKcSd7/jTm00WaGXqGZAECFN5yWeH ExPAJKyXbyXZxGrAP2NQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nnnTf-00BKjC-GY; Sun, 08 May 2022 20:26:03 +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 1nnnTc-00BKgr-LJ; Sun, 08 May 2022 20:26:01 +0000 Received: by mail-ej1-x62b.google.com with SMTP id i27so23259638ejd.9; Sun, 08 May 2022 13:25:59 -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=dls9wx30M8vanff1di+e0hUY3FreOPnMS2PbTpSJF+Y=; b=AWKEbn5j6vYe+ERbURHm63ghUCUdskHzA+tWJ0P90OrMViEG0+GSPC5/0yAA+U90e0 IA3vGWZ4gmIMJh+N9eJTwjKp3J94S1uj9gkWx+A4xn5oNGaAYPVSKE0Q5BnWHXnAjPZy we24gpVfD76gjJk3P0COoalrDYmq+2EARzu/lf8AJ+sK4WdHMjC/GyiUJ3sZxL5PxzUn KdoOkB67trCPsGwxVhMjFFTLSW1pR9UVeoOoj8QiELM99mNkbKWVLsOddRFkqp+hA1S/ OUtaj3c1eqbdFRtD2accDjdX10hbUuTPOC9oqHV64TigwmQqqUJ2uzyIbRd1+PsbMADm gyTw== 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=dls9wx30M8vanff1di+e0hUY3FreOPnMS2PbTpSJF+Y=; b=im4RCDKmiYBI30kWEzQvbNsUD5Nbiapu9ikWWt054q5EKpjM6vz4OkOk9TAgPMj00L KC8XgTN3oGFn/+5DgSVvOCzxfW7Y4e9Vi2TwY0Eq1foHy1GQeOelclyrFYZrzTWfEjfo 8wuyW6lKrKfv70hx04VQAWFAYM66S+cLX3PEuczIO0UvXAtsAFUBGBHptFchNRJC6N13 3LZnS/Gq1zrM/zjDNnuLt5MiMAECToD8hNjI5aQut+C0NbERaPaTV90rjUa+49AkBrGv 9U/QeLjPwRT5z6YVouDbhvvR3WkcsSefLuM+pQBxWjakUm8YxkTUB/7SoczXCKP7vxWb SsGw== X-Gm-Message-State: AOAM532ko5NoKncrmFQAaKWMoNnxwZy12Ln9lOVMdijQXsjOGh7UQ+K5 Rba58SoUYl9U3g1MVxh1wQg= X-Google-Smtp-Source: ABdhPJyVbXNW970OhlMSwPXQgso3Y3BHest5yP+ACGD+ENnnXybEOjqBzDgDbBpJiJGGZXLvHpyrsQ== X-Received: by 2002:a17:906:c10d:b0:6f4:a770:846e with SMTP id do13-20020a170906c10d00b006f4a770846emr12135921ejc.497.1652041558580; Sun, 08 May 2022 13:25:58 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id eo10-20020a1709069b0a00b006f3ef214e1esm4341459ejc.132.2022.05.08.13.25.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 13:25:58 -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 v2 1/3] dt-bindings: media: rockchip-vpu: Add RK3568 VEPU compatible Date: Sun, 8 May 2022 22:25:42 +0200 Message-Id: <20220508202544.501981-2-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220508202544.501981-1-frattaroli.nicolas@gmail.com> References: <20220508202544.501981-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-20220508_132600_735645_8321FAE6 X-CRM114-Status: GOOD ( 11.49 ) 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 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 --- 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..4045f107ca4e 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 @@ -40,6 +41,7 @@ properties: interrupt-names: oneOf: - const: vdpu + - const: vepu - items: - const: vepu - const: vdpu From patchwork Sun May 8 20:25:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frattaroli X-Patchwork-Id: 12842782 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 3BF23C433F5 for ; Sun, 8 May 2022 20:26:25 +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=IY5vzffbq3q5/HD9xwjT7R6WplEHwiCP/AvYNms7PQw=; b=3if87ZPII0RiOc +ID1wJMDpc3DSYbDSuHphiygeM+TKSLvTTNrYmSqQqB7500lhlpKOwb3kuQJeU4HiSirenHZoVg2l GDsUWo61SsrMqthxMkA638wk/4yS/b5IpWPX2j9m6j3Kx7wsaC6TkQAbHWtJ2GOsBnTRlODjh73L2 TI35CibcXhGEwx4ZboFR0f9AvfT1/Tjq5OS3OpD7ShcNLtIwDBxZtPJPOldOU9m+zJ9E+bqa1ZcjA 0xOwbtAHHAT+/F82uXmRhNsgYVahqzt4rWEuTqB1XfbqvMS6HQfC07ua7Emgc/SypUYZkYw97iy1g BILozO64ZpeZz5IcCd4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nnnTp-00BKpo-Se; Sun, 08 May 2022 20:26:13 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nnnTi-00BKjk-5a; Sun, 08 May 2022 20:26:07 +0000 Received: by mail-ej1-x62d.google.com with SMTP id kq17so23302838ejb.4; Sun, 08 May 2022 13:26:05 -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=p/y8kwDEE09pYlbLH2XHpoLmNt2slQabq1pX4LdThWs=; b=hqFpDUGBEQhnZoUyBAcPrbduVWYy9dYRR/YdtNDlpJs5Jat9FGkikcr3MXBH0vHRdl kven41XIGh+k7EnNM6yx9qPzoHcLUA8RxttHaqPIfHk18+anqdcYuQcEHvVYPSN7mFb7 hkqNldEjKn8vvUa6Jn+QhnnvH7K4Ii/gXqEpeDsUgO/4EsFJcoB5W8mWgNXPdOgb6483 UgJ0rKNMqa2t6LdGg2dHQZRx5T1h+P78KwDTAnGLihixIPLxAkW4gpntRN/RnCY3mqC7 z8Xk/pcGxIo8KNImR9ZMB5N3hU6NoighFVIW5CpD3TTd+CpVU0S9TLZagIWg+coMLQzp 9/yw== 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=p/y8kwDEE09pYlbLH2XHpoLmNt2slQabq1pX4LdThWs=; b=XH/a78WFd0ir7I/pK1qIvFPeZtLakkoBtODseS0lWl8tAe7Drac700nE7MqNh4265k Z7Hlni4WZG0xnZ1JLstuUBXfD37N4NXkZL1jBxhtf01g5UGiAa2FVOALL5Dmp+9Kq+9t NkMKdC4TTMtm9lzZDnI7JR3WHbzHaoKsYVxq3BXl+MAFxDm26g4apz++2ig8jgs86tP7 Iw2HCvuwWg4VHJfIh27wcd8IKIEovusSMdNWNM83+yti2wrLUlDg/BN/QqDUhe4vNxEP 1Iy335GRKPX7YZ3bY0XcdjjjI1S33AeSCcPKi6780yhQF4CTK2xEfhgQwOlaDS5gEqVT x+Fg== X-Gm-Message-State: AOAM532grX/onXnh7SQREiflzjAzRb9ZDhKXD85DKZeiCItHxQBfOl4X Y2pwWGqF2XIYsaWJWRmDfRY= X-Google-Smtp-Source: ABdhPJydrEwCCJRojJ77JBqDKeWn/RhmqedOu899Ka9w0LMyDl2haPSySeYYzb1AEfNu4Jb/9LBG9A== X-Received: by 2002:a17:906:c284:b0:6f4:dcc3:7939 with SMTP id r4-20020a170906c28400b006f4dcc37939mr11576981ejz.444.1652041564100; Sun, 08 May 2022 13:26:04 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id eo10-20020a1709069b0a00b006f3ef214e1esm4341459ejc.132.2022.05.08.13.26.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 13:26:03 -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 v2 2/3] media: hantro: Add support for RK356x encoder Date: Sun, 8 May 2022 22:25:43 +0200 Message-Id: <20220508202544.501981-3-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220508202544.501981-1-frattaroli.nicolas@gmail.com> References: <20220508202544.501981-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-20220508_132606_234555_98E4ADA0 X-CRM114-Status: GOOD ( 16.17 ) 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 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 Sun May 8 20:25:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frattaroli X-Patchwork-Id: 12842783 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 AF37CC433EF for ; Sun, 8 May 2022 20:26:45 +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=1YDJjBF5mjnoDrj/5W6J3ZWfDuzhMobw4PCadP9TAbQ=; b=25+rkZlmSkboG2 exal3LcsAQC9iTP+FcNdEl5VHtlURtdGqIXXRcdpMsdXszpKL1BzvYzSujX+SYOLbzwNnK+8ICFrD QATUUHlKilazrdGt93ybkKVyZA1PCFMIqk2EM0EU3LYK0Hs09mX3IiT5MAQlJFDDnkY8jaYCs7yoR mpw9utqAgBwqHrg8k3U/cCGv7nqE3BmUTLxFIxTVkkNGv/qZXxFleAyQWkE+iMdIDQIByFohrXgb0 Edz95hc+FmE7mI8x8QSjhBZ3wzLl2QWHu9e4Ke59PQUUy7nZOWcAUzX0txqsBTFx/jU9zP2Cvl5Sc RS6yspgzefOExn8fCXrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nnnUB-00BL45-Q0; Sun, 08 May 2022 20:26:35 +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 1nnnTl-00BKnR-R6; Sun, 08 May 2022 20:26:11 +0000 Received: by mail-ej1-x636.google.com with SMTP id g6so23310777ejw.1; Sun, 08 May 2022 13:26:09 -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=TSUnltcnxB8eV4VrYsSiSm4/tOdwwwPKXlxEHNw+w2o=; b=m6VYQkJuWb7ICTN5thHvelfUzu9+ccnwndD9rTLRax278oSgt0bZQQb3VO0i+pCd3R uyOfkYApc5ZyOq5ueuTmDhqqH96VUf5xTDLapsjMf12sfp9WTvWtEnzC4cT5D0JW5ZJQ /0EmuXTZKBJQbNTIRRRTvSTM7Eq7FxDH0D/OOuzKBcHxBXWTWXtcGtULPAfOWKlOe+z+ RU8A6g3K9GmrQo0LpsoQB6sHkFy0I9Jua3CBOKyw+KafJqUq09d9WqrNaRmGIAXSsVUJ D62qTk05ZDKloElvhBM5AXuywrW417DI2+oRq7rI0yhMvomyxud5UcLivza634eBNsqg Xt1g== 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=TSUnltcnxB8eV4VrYsSiSm4/tOdwwwPKXlxEHNw+w2o=; b=nTYN4JG3r+wcv/7hq0xXhHqvEyFwhFn0zZskzZ4bm7Ba1iCDMPjnrszTBL6E+D0H0q r7bkboj9j+FlnR2PaU8SdkmO2mM3yJC09gk+5mI3xVq+XV1AYZ9W1k2qGXBNATMLhGBM trumiTrNqj+/tdpadktJP5Mj16wBkOAYcCL9Nt6wKJkc2NZVQdGoENDMdAXpyV4R/a02 77zQ9GmNtBZQi+oO06wpOoDqiW/ZQuneyBRYMXO+iFHIJH/U23Z3xinMRYBghrycYXS1 Zs1EEr40OVd5JwCk/e0dg2Y5NXuXuVPsJDjaKKZgi2k6D77HMjhC/dxoCBn7wVYS6eru vhJQ== X-Gm-Message-State: AOAM531CrsWHkaClO3gYYsQCjWmoYGjrQcBN3mWfSOJzn4dmT4y8wbjf Z41P2EQNVEpc60zTB2RGcvU2sU+eDYYVJQ== X-Google-Smtp-Source: ABdhPJzdMN/f7ZWaohfNeUNNXrNq/2c59BKKXWhM2P/3Puseb7ir8GLeyLApz66URMK4byTWlj4rxw== X-Received: by 2002:a17:906:6a14:b0:6f4:78b8:39e7 with SMTP id qw20-20020a1709066a1400b006f478b839e7mr11662003ejc.309.1652041568682; Sun, 08 May 2022 13:26:08 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id eo10-20020a1709069b0a00b006f3ef214e1esm4341459ejc.132.2022.05.08.13.26.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 13:26:08 -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 v2 3/3] arm64: dts: rockchip: Add Hantro encoder node to rk356x Date: Sun, 8 May 2022 22:25:44 +0200 Message-Id: <20220508202544.501981-4-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220508202544.501981-1-frattaroli.nicolas@gmail.com> References: <20220508202544.501981-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-20220508_132609_922954_13EBE6D7 X-CRM114-Status: GOOD ( 12.62 ) 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 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>;