From patchwork Thu Dec 1 10:30:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 629985 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73CACC43217 for ; Thu, 1 Dec 2022 10:31:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230405AbiLAKbL (ORCPT ); Thu, 1 Dec 2022 05:31:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230375AbiLAKbC (ORCPT ); Thu, 1 Dec 2022 05:31:02 -0500 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92D0494559; Thu, 1 Dec 2022 02:31:01 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id bj12so3057725ejb.13; Thu, 01 Dec 2022 02:31:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=emFoOM20hOM5X61XhU2Zz+3u4EcYFFGnLjIcqz3xjIc=; b=NCXr1K4zFjuX/RVBxvc5oJIhyyXqDuAd5V0QzFdaC7DUehULpan+aXtsZJD6MrLX/P YJFEeIY+zE9kGCud/jm+qCBdQJqzThuBarI/SQ8Ol9c9Ua3w3PWX8tIUwjrarHPUUXyb duAMLX540wgF/gcxLN127MTtPnVJFk/5J/JR64frG2XZlluLFcKmxiKZslVRR4PC3Fq5 AlsgxObR6xxQTEi5dp+z5xXnvymKxzc6TYFIgWucGoOpCqosj9LlBqthGrR8/UXJCAzC WMLaCJQaHtFph/Jj+JNXlN/J6YVu+NDXZ4JEREyQ3NtBcMdmX4XfZUA3Y3s8n69MhKIE ixKQ== 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:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=emFoOM20hOM5X61XhU2Zz+3u4EcYFFGnLjIcqz3xjIc=; b=30jTBRbzhJxyLtuGuq5H9kmJkjJM7lQUPE1kI9YV6gU+R/ma+bp4JFfjgu83CnGNta qmrykoZDm8ZV0T28OmnhjrTz/Orq9mAxKcVknNeBQD8ud5rBP2K8gpKojgtmsDatLgJF CYby7W77csea5uJnODHcTvFVONmbLyVXF+8H/4vwyXzc7hE2X2d9KLnS/pZUHmyO7bW9 IitqmGN+HdWc/Wg1Pf1af6ZvonWr1O74LiG8J3FcBCP4Xjs9i4MGdt9QaOeZ9dSj0fXJ PJBYUcsrDaJSvh7j+DW3nBqrIrSHggKoPTolgeiv5KC6MyQ5iiScr6YXydOJHvARgvqx qNBA== X-Gm-Message-State: ANoB5pnGNGIyTaAAvMZdXmHuwXbHnP5WYMRZv5nVNssnfRH8ttZKYHDV oixIQB2vA3Lj0lgxbORfEFQ= X-Google-Smtp-Source: AA0mqf55rBfwItScperkgvv1mkaGNzu1S3hljfylapqfwpSxGknS33mAccSt+T18G0UKyR1cbafm6A== X-Received: by 2002:a17:906:eb04:b0:7ae:77ef:d048 with SMTP id mb4-20020a170906eb0400b007ae77efd048mr39734435ejb.740.1669890660080; Thu, 01 Dec 2022 02:31:00 -0800 (PST) Received: from cizrna.home (cst-prg-44-69.cust.vodafone.cz. [46.135.44.69]) by smtp.gmail.com with ESMTPSA id g1-20020a17090604c100b007c07b23a79bsm1592400eja.213.2022.12.01.02.30.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 02:30:59 -0800 (PST) Sender: Tomeu Vizoso From: Tomeu Vizoso Cc: italonicola@collabora.com, Tomeu Vizoso , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/Amlogic Meson SoC support), linux-amlogic@lists.infradead.org (open list:ARM/Amlogic Meson SoC support), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v5 4/7] arm64: dts: Add DT node for the VIPNano-QI on the A311D Date: Thu, 1 Dec 2022 11:30:20 +0100 Message-Id: <20221201103026.53234-5-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221201103026.53234-1-tomeu.vizoso@collabora.com> References: <20221201103026.53234-1-tomeu.vizoso@collabora.com> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This "NPU" is very similar to the Vivante GPUs and Etnaviv works well with it with just a few small changes. v2: Add reference to RESET_NNA (Neil) v3: Fix indentation (Neil) Signed-off-by: Tomeu Vizoso Reviewed-by: Neil Armstrong --- arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 11 +++++++++++ .../boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi index 45947c1031c4..61c8461df614 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi @@ -11,6 +11,7 @@ #include #include #include +#include / { interrupt-parent = <&gic>; @@ -2484,4 +2485,14 @@ xtal: xtal-clk { #clock-cells = <0>; }; + npu: npu@ff100000 { + compatible = "vivante,gc"; + reg = <0x0 0xff100000 0x0 0x20000>; + interrupts = <0 147 4>; + clocks = <&clkc CLKID_NNA_CORE_CLK>, + <&clkc CLKID_NNA_AXI_CLK>; + clock-names = "core", "bus"; + resets = <&reset RESET_NNA>; + power-domains = <&pwrc PWRC_G12A_NNA_ID>; + }; }; diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts index 124a80901084..73f3d87dcefd 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts @@ -15,6 +15,10 @@ / { compatible = "khadas,vim3", "amlogic,a311d", "amlogic,g12b"; }; +&npu { + status = "okay"; +}; + /* * The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential * lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between