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: 20246 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2603112wru; Tue, 15 Nov 2022 01:10:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf495vj7l9Sak9Didbw0M8RbWM3Txd+3yKt6TeJQuqGRwfvw08etiwolXLlFiACr9QHfOs7i X-Received: by 2002:a17:906:7a11:b0:7ad:84c7:502d with SMTP id d17-20020a1709067a1100b007ad84c7502dmr12731855ejo.177.1668503438322; Tue, 15 Nov 2022 01:10:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668503438; cv=none; d=google.com; s=arc-20160816; b=yIc2dKW0UGoaCEBwkaGFjbg60FJKHbtSP2I9JHljHciie54WgvRX6LHJNUWMEa7jQc t0rkmQIrJm3zhs6SxetJTyp2xe0EidZEBT7g1rhXrGYtd04wkGEQ8wHmwphksw/EsyMu UJdzI2bgvu01jAjxZVj2deiMEMS8yIv4mBDz/AaRZfwbB4wIMYeJ46qsaS5Tb5Ijvsdq rNJO/S3ZFmCfQhV4tonIn+7Buzn32yzWkfhNvkNHtmkO9A5BXkNm/y2owJ3M3gHWVR1s ygezxcs+pXMM+xpRYzGdalNMu4YsunQp4eT6XuJ7BYrboRUDgrcBWlSDtRIvqjxhPjoI 0rEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CTYdVIALUl9YpoP++eVlpJmeUKMRDCw8t5UXvIltjl4=; b=Bvuqg71Cg3XX+yD2Cs830W4rQsQPqEHHuv6h0MCgLR1KTYpcyMz74UNhyY9+XCDwh+ L6pqINL5xqFNry0Tf86Vg35mAPTJ4KFMsEOSTJGXTzo/ch2RkCfo6Q/WEpT3pyqzu8JF S0YCLYQeJHbYOzXPeP3phhHgnnU85WgKWIaNWYH4hhFXyItffqrsZktI5FzYoKUStR/o naswzsKgND1WjOedv7wqKhcLsilktKrOtYpggf4BvV8oT9q1rFIrlxPTHrqXJxMyM74m wYXToquL3opzYLumsA/3An2PkzWjSi2yWo0DJzEUGJ5r5OBkna+KuG6idJ1rES0HuvnD EdIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Zemr7C/G"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d12-20020a056402078c00b00461a7bb34c2si9994000edy.473.2022.11.15.01.10.14; Tue, 15 Nov 2022 01:10:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Zemr7C/G"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237662AbiKOJHT (ORCPT + 99 others); Tue, 15 Nov 2022 04:07:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237735AbiKOJHN (ORCPT ); Tue, 15 Nov 2022 04:07:13 -0500 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47BA421824 for ; Tue, 15 Nov 2022 01:07:12 -0800 (PST) Received: by mail-pf1-x42b.google.com with SMTP id v28so13535382pfi.12 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=K/3oqwKHYqWiAipWhtaPOz5bRgLOl/4XJ618zIHat3FvT2tzSwxladmuqB+t6VVoNT K42illnoVWqRVd5FCmxvR8n93dID3J6IDR4B+hNFYdSDnvY+XfjsNGmbL7DmUOxGMa3i YHiPftGR5hEqdk7ZDGpYOnWXukmKb8ipdaDn+gniFAGva7b/kwbMosjOV0N4VyPSzZJ1 gfpB7RyIuChADT/pFDjFj5lhQ+YGhwExsipOp5rifhTIpyEznO2P2MzCP4n05AiTg1mt +ZkiXt2RhEA5jr6A81llpB95oc3J2nItozzWPahb3LGMja2/mwsGGOxvBzb29hSzP9K2 B+bQ== X-Gm-Message-State: ANoB5pnpv1/b8zhzqPxWaXy/EgcADFlJ2xMhPImQqPBbw6K0hSfrodtb ZcZbYW+ShDynxsMTcCXwy2V5OA== 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=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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749552661059763112?= X-GMAIL-MSGID: =?utf-8?q?1749552661059763112?= 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: 20247 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2603330wru; Tue, 15 Nov 2022 01:11:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf6kqGBGc0mzS6kfZSJ1qO94btnTCKWcPljz1aVVV7asRs0qk6NipxWBIrAGkiPaFKpWui43 X-Received: by 2002:a50:fc8e:0:b0:461:bcf0:86dc with SMTP id f14-20020a50fc8e000000b00461bcf086dcmr14751984edq.368.1668503469096; Tue, 15 Nov 2022 01:11:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668503469; cv=none; d=google.com; s=arc-20160816; b=GAVR8KeUrIJjBjGMyjr42tkwPdwuX1Y1hfcIec657KbOg7w7RZAYbk+/ymQJM6QeQt fZHA5rZ4GN3JvrNCVl/JRt42xqdcxFnDMixKQU6Y6EaJ90vBRfxf+wxCt0LGkd0/5Rdz HdMXdRDO1PiBK+cUJM4jhUySDHUGKyJkq134bIntfzn4q/Drcc6mSjt7+BR1HryLCWBr rudzp0Dt85caT215pdxNyKO+Oxx1G/4ujN+/AS95V9HbjZVoCWWPPjUD88vfpncfzMaV SoNzpSryhSXWMnz+7ktdTytHNNF9OmuzNHglagp6LCwnaXMtt6FvHKLsTWNuFzZbOGlY RKKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=R5ZFQEoKVRbIfSfItdmWycqTzq7emVGHn7tQvs1HyFc=; b=bb9/ksLQ77fr4QBcv0YvDwnUBN7SGeterS/izB8nHR2k2q8rJY01fB6bjXoEUuTcZB sBCFUG7CM6snOcTCStNO9SrKwo4KSKr62MARQCmso23UOEKkJJZbCR+f8vmCSMFtzVSv hM32wHXvv46gAXL0tXc/dnBSuCHtJoJVCktK1jCIDAeONZgAcS6LuxEiTeozPIe7Jx6N bsKMso2aGq4W8t3gPxBsTZV524A2pJySfDVX+AybGdoMA0DBRjZaBLVixa+ay50RT9RI Z7YMApFjn+rqtOXRNr8SkHPl8mCQy2gBx9ScfLPobVj+hAlRjNLBZF4zOKyxvbzqbmWS jBeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kaTCXy9N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz17-20020a1709077d9100b0078d8bd255d4si11940860ejc.949.2022.11.15.01.10.44; Tue, 15 Nov 2022 01:11:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kaTCXy9N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237809AbiKOJH0 (ORCPT + 99 others); Tue, 15 Nov 2022 04:07:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237821AbiKOJHQ (ORCPT ); Tue, 15 Nov 2022 04:07:16 -0500 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6B8A220D2 for ; Tue, 15 Nov 2022 01:07:14 -0800 (PST) Received: by mail-pj1-x1034.google.com with SMTP id b11so12773593pjp.2 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=rdGFroUrYkBy1nozDBZ2oLvjjbrODYYxJIYg2NtXDsM3rCzi7alOPgojZFPnZK4tUQ IIqTIxGjwxjJw3JNpOLObLwLaEgRPcxvZ0ktExp6ZgkHOauwmnhLn5iQDRknee0+Iaxy HtxK79CyKWvd49wEpu0cLM9wJaLZB8HyQYFdSCJGi1vIKusSIwNgINXlI4reUmPt8ctl WhUwQgrJuxbrFXVDVmQeJZ0O/dAuhZ52Hb62thvXnaaehvgqGHrnSHaop6zE8FF2ijm5 HHoAe6joE/8bSqqtrRiEZMhJAnyLEdmGpnyGyGZT+Zn/WcOqRzPjFnPhU8RzleF1ILzP xA9Q== X-Gm-Message-State: ANoB5pkle+ESvvM4VCt2w54eOtkpx2Niwjm3TTN3PJvHMk+9MmP/9LeT z/8Q3tX8T2n5kbaRC2gNgNjgZw== 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749552693706144975?= X-GMAIL-MSGID: =?utf-8?q?1749552693706144975?= 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 {