From patchwork Tue Nov 15 09:06:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 87368 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1ourua-00D0Yh-38; Tue, 15 Nov 2022 09:07:20 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237828AbiKOJHR (ORCPT + 1 other); Tue, 15 Nov 2022 04:07:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237662AbiKOJHN (ORCPT ); Tue, 15 Nov 2022 04:07:13 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4015018393 for ; Tue, 15 Nov 2022 01:07:12 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id y13so13553555pfp.7 for ; Tue, 15 Nov 2022 01:07:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CTYdVIALUl9YpoP++eVlpJmeUKMRDCw8t5UXvIltjl4=; b=Zemr7C/GHx/NegieoNzHXBrXKSnkhmJEj85qj90eZoGg1EssVm3kU0vKtctNXmWkqB mKEQVjkdNTTJM+g/b6pIhoDQq1xy9HwDrzjGkKR8QLfNY3c1Q+ZYt48oYdQcclJKy3Wq uNE9mfi6sI10qu+bdYAZvbKKgMnOH8GL1duU8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CTYdVIALUl9YpoP++eVlpJmeUKMRDCw8t5UXvIltjl4=; b=q3OA1T3r5s4K+ErDZQEfSTY6y3LlHR3pgLMfb+tKZUJMAcojMh3uZerrr84BGReya4 CM1Q1x4B+bLSJxJYm7qMP0k6ZiqLwftHggnRYnggx5z2nQCmrKQ4gTYDe0Y/N6THiAsG zKl8OCcol2fRHut0k4q902/hWO5kE4kopSF/1v3Jnuhq7Ptu7zQW29c6Wt9wpX8Qi9hy 0zjEepDhebKoCYxEzDkTvA+1Sm3HRdpyuvRMeJwrafYuamGJjVPeNjbeq5g8ZhRiK/GG rTTUOJw8vyhJlD2kTk0gf92kDduIMjEzJNzQlGF9DM3FWnWxFDtD4wGN9Ry8rgEmqV37 MI3A== X-Gm-Message-State: ANoB5plq3zbC60hTS5ATCceR6kB+bGobPp+AkjTD5t9V0YsUN4RWjFC2 eHp0XUOFzeGwMtP+8j5wtociUQ== X-Google-Smtp-Source: AA0mqf4maw/zOnFAm6mK7X2FkowQqKj5X0F+diwR9KPfh1t3egiDv/bNjxyvC1awklk5juosr0kv7g== X-Received: by 2002:a62:648a:0:b0:561:ada0:69d7 with SMTP id y132-20020a62648a000000b00561ada069d7mr17616150pfb.9.1668503231802; Tue, 15 Nov 2022 01:07:11 -0800 (PST) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:4d49:6d15:b250:5977]) by smtp.gmail.com with ESMTPSA id q16-20020a17090311d000b00182a9c27acfsm3378830plh.227.2022.11.15.01.07.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 01:07:11 -0800 (PST) From: Chen-Yu Tsai To: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Jernej Skrabec , Samuel Holland , Hans Verkuil Cc: Chen-Yu Tsai , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] media: dt-bindings: allwinner: h6-vpu-g2: Add IOMMU reference property Date: Tue, 15 Nov 2022 17:06:43 +0800 Message-Id: <20221115090644.3602573-2-wenst@chromium.org> X-Mailer: git-send-email 2.38.1.493.g58b659f92b-goog In-Reply-To: <20221115090644.3602573-1-wenst@chromium.org> References: <20221115090644.3602573-1-wenst@chromium.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.5 (--) X-LSpam-Report: No, score=-2.5 required=5.0 tests=BAYES_00=-1.9,DKIMWL_WL_HIGH=0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no The Hantro G2 video decoder block sits behind an IOMMU. The device tree binding needs a property to reference it. Without a reference for the implementation to properly configure the IOMMU, it will fault and cause the video decoder to fail. Add an "iommus" property for referring to the IOMMU port. The master ID in the example is taken from the IOMMU fault error message on Linux, and the number seems to match the order in the user manual's IOMMU diagram. Fixes: fd6be12716c4 ("media: dt-bindings: allwinner: document H6 Hantro G2 binding") Signed-off-by: Chen-Yu Tsai Acked-by: Krzysztof Kozlowski Acked-by: Jernej Skrabec --- .../bindings/media/allwinner,sun50i-h6-vpu-g2.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/media/allwinner,sun50i-h6-vpu-g2.yaml b/Documentation/devicetree/bindings/media/allwinner,sun50i-h6-vpu-g2.yaml index 24d7bf21499e..9d44236f2deb 100644 --- a/Documentation/devicetree/bindings/media/allwinner,sun50i-h6-vpu-g2.yaml +++ b/Documentation/devicetree/bindings/media/allwinner,sun50i-h6-vpu-g2.yaml @@ -36,6 +36,9 @@ properties: resets: maxItems: 1 + iommus: + maxItems: 1 + required: - compatible - reg @@ -43,6 +46,7 @@ required: - clocks - clock-names - resets + - iommus additionalProperties: false @@ -59,6 +63,7 @@ examples: clocks = <&ccu CLK_BUS_VP9>, <&ccu CLK_VP9>; clock-names = "bus", "mod"; resets = <&ccu RST_BUS_VP9>; + iommus = <&iommu 5>; }; ... From patchwork Tue Nov 15 09:06:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 87369 Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1ourui-00D0ZI-20; Tue, 15 Nov 2022 09:07:28 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237557AbiKOJHY (ORCPT + 1 other); Tue, 15 Nov 2022 04:07:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237809AbiKOJHP (ORCPT ); Tue, 15 Nov 2022 04:07:15 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A229D21E3F for ; Tue, 15 Nov 2022 01:07:14 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id k5so12747915pjo.5 for ; Tue, 15 Nov 2022 01:07:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=R5ZFQEoKVRbIfSfItdmWycqTzq7emVGHn7tQvs1HyFc=; b=kaTCXy9NTn9ky20nP7T+gz/kzP4EXtscARvVKey6KLpM1X5mvpxHLvxGZRgm3HiGKy Ku4VVEhfcdvwqWQRZkpEaw87Z5WtiIBKtibuSyCqkLo4tHTDDSwVORjGzVXHUW3mfet4 AFamSQ83xPANX9ssr7d+CfeU6vpusLtDTxABE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R5ZFQEoKVRbIfSfItdmWycqTzq7emVGHn7tQvs1HyFc=; b=P62LRIInzqERpDsl4KiVrBJI60/mtB2qQjT44Dc63JEICrIXB4kA1Aq/cSkoJt5AAK y5xxPuaag8kiKhb0DmAdDCGjUxqGYHKnK8YQaCtL3C3TfZPsfVvyQGSf3gzoTZl5nzt0 sPRL+W/iSTxeo6II/vjRg8Nh1Sf1MYaJf5yWkdA9Zwtukzl6Bk18Kx9VHoWgHbUoH5a5 YhBa2Cr/r+hcoahLGgu7ETIOSIP1pQN8PQ5eVjG6+kUsovPK8zmU8nY6fkLQQf8l+IVn v2gccMUVBeKRsJnIqnW6cHmYZEZRyVAGW/KQV7yfrMhZk4k+tCl4rGuiqDiq6FpOq/+6 EtNw== X-Gm-Message-State: ANoB5pnwYxk7YhdgPNBcU9aoHnhF08j00KEMdVOtBaiQ/RWEEzN86gIR CWnrAVr0o2p7axIW4PWWaTCUOw== X-Google-Smtp-Source: AA0mqf6xPgmp/9dWQoBk4GaDGwS6v+A/TwdAX5vB3zmEdHUZjJxWqfB0WDZ/WyQ5o/+ZIS9vw8C7cQ== X-Received: by 2002:a17:903:28d:b0:186:9cce:c59 with SMTP id j13-20020a170903028d00b001869cce0c59mr3133032plr.120.1668503234175; Tue, 15 Nov 2022 01:07:14 -0800 (PST) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:4d49:6d15:b250:5977]) by smtp.gmail.com with ESMTPSA id q16-20020a17090311d000b00182a9c27acfsm3378830plh.227.2022.11.15.01.07.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 01:07:13 -0800 (PST) From: Chen-Yu Tsai To: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Jernej Skrabec , Samuel Holland , Hans Verkuil Cc: Chen-Yu Tsai , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] arm64: dts: allwinner: h6: Add IOMMU reference to Hantro G2 Date: Tue, 15 Nov 2022 17:06:44 +0800 Message-Id: <20221115090644.3602573-3-wenst@chromium.org> X-Mailer: git-send-email 2.38.1.493.g58b659f92b-goog In-Reply-To: <20221115090644.3602573-1-wenst@chromium.org> References: <20221115090644.3602573-1-wenst@chromium.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.5 (--) X-LSpam-Report: No, score=-2.5 required=5.0 tests=BAYES_00=-1.9,DKIMWL_WL_HIGH=0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no The Hantro G2 video decoder block sits behind the IOMMU. Without a reference for the system to properly configure the IOMMU, it will fault and cause the video decoder to fail. Add a proper reference to the IOMMU port. The master ID is taken from the IOMMU fault error message on Linux, and the number seems to match the order in the user manual's IOMMU diagram. Fixes: 0baddea60e8d ("arm64: dts: allwinner: h6: Add Hantro G2 node") Signed-off-by: Chen-Yu Tsai Acked-by: Jernej Skrabec --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 53f6660656ac..ca1d287a0a01 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -161,6 +161,7 @@ video-codec-g2@1c00000 { clocks = <&ccu CLK_BUS_VP9>, <&ccu CLK_VP9>; clock-names = "bus", "mod"; resets = <&ccu RST_BUS_VP9>; + iommus = <&iommu 5>; }; video-codec@1c0e000 {