Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp458648lqp; Wed, 12 Jun 2024 06:55:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWMgJ25dWxutGFybdrr2jGSnOQM8RGY9Oddjatz5gk+ywA3HdEkxXY3M7NBmlkxYM30DchuV6MMCWH3DmJXoEvumILdeop6NixlVJS3gA== X-Google-Smtp-Source: AGHT+IHUo3n3QI1sIutkwjwCGIhqXgSUAita7hsZXuWy/8CNqn3oDhN+Fs2E6eFZRHFh5VNuZDO8 X-Received: by 2002:a17:902:db06:b0:1f7:1b08:dda9 with SMTP id d9443c01a7336-1f83b566293mr22079855ad.8.1718200517543; Wed, 12 Jun 2024 06:55:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718200517; cv=pass; d=google.com; s=arc-20160816; b=gK6XZY8D6ZuvWNFrkjMqDyULoxbIqKpvVKlh6X5Kig1UNjJFDPn75VmJfQXF9VXtP9 zMLLFkAez+4ogOzUvRvTQxPC6JRJHfBNBew43k91+FUlrUFwt/kus+XX5Y6dCVSaKPkO zVj0z20+PXJ3l8mONue6nd5XeGAljzZ75S+Yn803IeciLuM8HZpumdfCimB88i5BetTi ZZ5FuzTNVbgORPW0sVuP95DZY9DfnkhPLLdfXF9avLPIpzJgaH3cH7m6I9HKnAdxqDae xPhv1a7WYowvza2j6Dftk1lblv62gapGsfn3ELP8yfPY+KjrDZ3WtFNrFMrBXLmJSb42 pTxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from; bh=Vg0+/XjLA9DMNjh74DM615g/08bNgkZOcZb3JbFI57w=; fh=hOTFyxdx2tWzMvJkXLduFu7YIY38xqyQmp6iwlqMLfo=; b=pD466XHEFtKp9VtapJu0wOzXajBeWCUsKpAQfEl7B063unbdpSCJFpeBQYcf7rolrQ waGmrWTfiPiKYVPdL8yECKCpxGzac/UEUjriF8kOTpknAggV5isUEWI9uQtn6mkO4F7R XYoQhUpv5AZIS1rSYEGh0oJTdqVdXvAyarRhzjcPk2mV7NSePxk3cM5P2qKZPi613EU6 uUVH1OpjyuwpnB1Tbd+sEP+dkuo3/6bCC3npoMnAvjXuy9cQwAa9EUN8gWnhTCvW9UlG qw3KegiwFRLESOqgbiDP4nCRxPHIQG4iybw3SPaUn15XJVE+fcmefpL5mU8OgpZznnbO 85Og==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-211606-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211606-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f6ef8bcaafsi81408165ad.321.2024.06.12.06.55.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 06:55:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211606-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-211606-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211606-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 788A6287180 for ; Wed, 12 Jun 2024 13:54:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D40617F507; Wed, 12 Jun 2024 13:53:15 +0000 (UTC) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C1D417F37E; Wed, 12 Jun 2024 13:53:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718200394; cv=none; b=I1O8anYwrYNqR8/4slmdclvt9wy7vZuiupen4woT3zTvKUInmqjC8PgHwsO2jMRbh80R1MTHu24upCBBk6XL0Rkqn2r/qEzoW6AmtfyJS3RbqbQfsBmwb4PmLfFE5KpyZBGLy1KHEG0laBkBnMUGz8LiYkLhjJ3RqHe0023solA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718200394; c=relaxed/simple; bh=2ksgBeMoDxxU9lmoxZOewpWRGNambwfo3QRSZmh5AUI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LWg0doKb9gRCqBO/bE8zX6rS2kA8QNfCoGpHLfDHNXwhF+xrt3nuXJjGwPJNZhueCcNPbDdtigD/Wlf5h+uqWC6EzB8xsXOea61T5CUj00fnri63VzEbEJrdpa3nRQKUSqJbueq3BAZGObf+slDWR5fuuvzS5VyRxbx0ecebCmY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tomeuvizoso.net; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.167.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tomeuvizoso.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-52c94cf4c9bso2324513e87.2; Wed, 12 Jun 2024 06:53:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718200391; x=1718805191; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vg0+/XjLA9DMNjh74DM615g/08bNgkZOcZb3JbFI57w=; b=qJwp/p7jcBwylcBuzznqPcNm8E6y7DrYDQaLJ49IAZwaH/8Royuf5Vm53xnKHR3TQR 6mOjpVAf24WM9bN8CQ0FTBuZklppHfnFRnm39itBtlJTS56cn2LLQb5gYuSsB536uHWJ FlHGuYwfwtzUz/yGwMLbyhaRVznVzKochFCO83zW+rwl/eYXdutuniWN4yj8ZE2WhgPy Wl7y0tjYJotzQdMT60VhFlUfjf5JL7dzl2s2l6b+wwHWQ3hBeJU6O48rIAMsradRTdjI gjuwEzOIi0ZlBgwFn74NLz06po/kXauUWzArmKA6dvivlPuuwem2rBTiDhVltKIexwfu G/nw== X-Forwarded-Encrypted: i=1; AJvYcCV7euCR0kXwj4P1mnHl63rjv5OklMal5Ntx8G7mOsmZ3nOxd5NqKOasLu6RjYsDC5I+dRyNc6ct9IcnS7eQdZTBS56lFoVRyhqZETNpju2si2JjGkWcbRJoSwoS6noZIBHocmpYGhAWngYgcimPBQrIr6QTBCbIJdAbPop0uFESsCiK77BL X-Gm-Message-State: AOJu0YyFvg61kmgs67JjexWpkM30OnPsdHb+3GRz0XEdrzfWoQwT22Lw 0TDGI/fcFWanm2rx6easZfcABXSFToU0IsrzBh1rzwutaQjWuxV/ X-Received: by 2002:a05:6512:1391:b0:52c:82c7:bdff with SMTP id 2adb3069b0e04-52c9a3b963bmr1947827e87.13.1718200391086; Wed, 12 Jun 2024 06:53:11 -0700 (PDT) Received: from ramallet.home (cst-prg-45-36.cust.vodafone.cz. [46.135.45.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422871ec9e6sm28201695e9.38.2024.06.12.06.53.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 06:53:10 -0700 (PDT) From: Tomeu Vizoso Date: Wed, 12 Jun 2024 15:52:57 +0200 Subject: [PATCH 4/9] arm64: dts: rockchip: Add nodes for NPU and its MMU to rk3588s Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240612-6-10-rocket-v1-4-060e48eea250@tomeuvizoso.net> References: <20240612-6-10-rocket-v1-0-060e48eea250@tomeuvizoso.net> In-Reply-To: <20240612-6-10-rocket-v1-0-060e48eea250@tomeuvizoso.net> To: Joerg Roedel , Will Deacon , Robin Murphy , Heiko Stuebner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Oded Gabbay , Tomeu Vizoso , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Philipp Zabel , Sumit Semwal , =?utf-8?q?Christian_K=C3=B6nig?= Cc: iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, Tomeu Vizoso X-Mailer: b4 0.13.0 See Chapter 36 "RKNN" from the RK3588 TRM (Part 1). This is a derivative of NVIDIA's NVDLA, but with its own front-end processor. Mostly taken from downstream. Signed-off-by: Tomeu Vizoso --- arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi index 6ac5ac8b48ab..a5d53578c8f6 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi @@ -2665,6 +2665,59 @@ gpio4: gpio@fec50000 { #interrupt-cells = <2>; }; }; + + rknn: npu@fdab0000 { + compatible = "rockchip,rk3588-rknn", "rockchip,rknn"; + reg = <0x0 0xfdab0000 0x0 0x9000>, + <0x0 0xfdac0000 0x0 0x9000>, + <0x0 0xfdad0000 0x0 0x9000>; + interrupts = , + , + ; + interrupt-names = "npu0_irq", "npu1_irq", "npu2_irq"; + clocks = <&scmi_clk SCMI_CLK_NPU>, <&cru ACLK_NPU0>, + <&cru ACLK_NPU1>, <&cru ACLK_NPU2>, + <&cru HCLK_NPU0>, <&cru HCLK_NPU1>, + <&cru HCLK_NPU2>, <&cru PCLK_NPU_ROOT>; + clock-names = "clk_npu", + "aclk0", "aclk1", "aclk2", + "hclk0", "hclk1", "hclk2", + "pclk"; + assigned-clocks = <&scmi_clk SCMI_CLK_NPU>; + assigned-clock-rates = <200000000>; + resets = <&cru SRST_A_RKNN0>, <&cru SRST_A_RKNN1>, <&cru SRST_A_RKNN2>, + <&cru SRST_H_RKNN0>, <&cru SRST_H_RKNN1>, <&cru SRST_H_RKNN2>; + reset-names = "srst_a0", "srst_a1", "srst_a2", + "srst_h0", "srst_h1", "srst_h2"; + power-domains = <&power RK3588_PD_NPUTOP>, + <&power RK3588_PD_NPU1>, + <&power RK3588_PD_NPU2>; + power-domain-names = "npu0", "npu1", "npu2"; + iommus = <&rknn_mmu>; + status = "disabled"; + }; + + rknn_mmu: iommu@fdab9000 { + compatible = "rockchip,rk3588-iommu"; + reg = <0x0 0xfdab9000 0x0 0x100>, + <0x0 0xfdaba000 0x0 0x100>, + <0x0 0xfdaca000 0x0 0x100>, + <0x0 0xfdada000 0x0 0x100>; + interrupts = , + , + ; + interrupt-names = "npu0_mmu", "npu1_mmu", "npu2_mmu"; + clocks = <&cru ACLK_NPU0>, <&cru ACLK_NPU1>, <&cru ACLK_NPU2>, + <&cru HCLK_NPU0>, <&cru HCLK_NPU1>, <&cru HCLK_NPU2>; + clock-names = "aclk0", "aclk1", "aclk2", + "iface0", "iface1", "iface2"; + #iommu-cells = <0>; + power-domains = <&power RK3588_PD_NPUTOP>, + <&power RK3588_PD_NPU1>, + <&power RK3588_PD_NPU2>; + power-domain-names = "npu0", "npu1", "npu2"; + status = "disabled"; + }; }; #include "rk3588s-pinctrl.dtsi" -- 2.45.2