From patchwork Mon Oct 16 08:02:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 13422696 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 7C938CDB465 for ; Mon, 16 Oct 2023 08:02:54 +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: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:In-Reply-To:References: List-Owner; bh=6aEIWV4Ggr68y1TtgSmkdyMxrWF7NgaTT7HLCeVpbKk=; b=YTMr/7FpeNQuAD qyleiIZiMrfpbOQ/qsZmhmmiDCndGrQOs8OQ2sIWbceMfWJOdkbhYEhUNkDcSh5bcDrvAf3e9PC7b vvrRDGiBYnRWt+4VffUFjIN4jSkuuRZd4wZ46MNoArnmbsBEHc6iH0gV1AOux5Ov6c1/WtG/Z9BLd nZPiZ7KWIK+NxpVNYPjaDqDu8gTu5cwT9oFAuLd2myc3wHsWHkBfRvqjB/M4ErvHiJ5GQffF1oEmr qPpExuN1bZHMmCVyqhkVBVRT0p/yG135FYyXnzMPnM0/i9N4c9lyhn0QSLCpckBE3D6obRN/SFDlq XM3/x0YQLUM4dDQ+AIyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qsIYQ-008k0l-0V; Mon, 16 Oct 2023 08:02:22 +0000 Received: from mail-wm1-f54.google.com ([209.85.128.54]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qsIYN-008jyn-0G; Mon, 16 Oct 2023 08:02:20 +0000 Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-405524e6768so40304365e9.2; Mon, 16 Oct 2023 01:02:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697443336; x=1698048136; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7vxzdd7hvG1LZGKkqhTZumSilwKU2j2TuY6Cx8E9gJo=; b=t89OHHJSkR0TuKIr2FadJigJJOZAWCXeJY3ct2UKRwt7rLifCafIY45tlEVh+mjLz4 ntk3Sfl4XnqrAZgofbVs8YWBar8RKcE5Acpi+FXiuN2E62p8KUJRu8+mgE3s8Nq0/zt0 3ccjDzxUJGUPt6aqZNX6i/bnb4GTWpjnP3U8ld+Yj/zEdGExccnR6BgMU7HEuixadXCH pRUWXYjqmp9ppCypl+TYY9QfK6p/8wz0rkyXL6kyYMNhXLKFEE4qPt3KU/MINbfdvddH e6gssI0s7Vz9iI6g9Zmg2/I4kKiVOdqvGwXWjImn9IIuIp0SHgUT88roDU+WMCOQnMB1 niFA== X-Gm-Message-State: AOJu0Yz3Z0OgUmDucWjsSVqllGs/pHZV4t7BspDbjNrhTRY7Ctn8e6dQ DHL47EnRft5LvFlOuIG9G+s= X-Google-Smtp-Source: AGHT+IEnAQcfulAK8tSKm3mqtTHbvdCU+3ufmoudypoqa9HGPqbCXKZR1ZkkXFpExKpIiIPsRBFBng== X-Received: by 2002:a7b:c40a:0:b0:406:61c6:30b8 with SMTP id k10-20020a7bc40a000000b0040661c630b8mr28046368wmi.22.1697443335642; Mon, 16 Oct 2023 01:02:15 -0700 (PDT) Received: from cizrna.home (cst-prg-37-192.cust.vodafone.cz. [46.135.37.192]) by smtp.gmail.com with ESMTPSA id p22-20020a05600c419600b00407460234f9sm6395535wmh.21.2023.10.16.01.02.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 01:02:15 -0700 (PDT) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Cc: Da Xue , Tomeu Vizoso , Lucas Stach , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Ulf Hansson , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH 1/2] arm64: dts: VIM3: Set the rates of the clocks for the NPU Date: Mon, 16 Oct 2023 10:02:03 +0200 Message-ID: <20231016080205.41982-1-tomeu@tomeuvizoso.net> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231016_010219_121061_029A0F9D X-CRM114-Status: UNSURE ( 8.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Otherwise they are left at 24MHz and the NPU runs very slowly. Signed-off-by: Tomeu Vizoso Suggested-by: Lucas Stach --- arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi index ff68b911b729..9d5eab6595d0 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi @@ -2502,6 +2502,9 @@ npu: npu@ff100000 { clocks = <&clkc CLKID_NNA_CORE_CLK>, <&clkc CLKID_NNA_AXI_CLK>; clock-names = "core", "bus"; + assigned-clocks = <&clkc CLKID_NNA_CORE_CLK>, + <&clkc CLKID_NNA_AXI_CLK>; + assigned-clock-rates = <800000000>, <800000000>; resets = <&reset RESET_NNA>; status = "disabled"; }; From patchwork Mon Oct 16 08:02:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 13422697 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 3CA66CDB465 for ; Mon, 16 Oct 2023 08:02:59 +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=rCf+fjouyOV/bg1blX+3kJSAfzPG9nquSY58cP6VTlI=; b=4l+wYfz5Y7n4gU 7KJUsJD+Fl15sbtENv5RTA5DrwtC0H9jRohTWB8dWY2Owrb/qRd9pG2nDD8kV8IA0NHQdBl4Eg8hO 18W4WgM2uV1UBpWf34CGpmqs+UzG1FyggFaHxgeQMh5hT0h6+rc4//2AiQt59iWg/Fuj4d7rZJFTA NHLl2AxrrvQ+WkdYbCdfxzWP1cDhjD9RdZTWqrJKVtyb5qdAeFvjsuLZ2F0+x571QIGe4M4qI96l+ AU8JsEGzoFFT0e+QXFg45f3Cm+CuKX8CB/iV5OiXVetcza56gPhh0YGj33bYUizpunEiEMve4+3f2 wGOLz5Ctuok+s5IB2ksw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qsIYW-008k4e-0w; Mon, 16 Oct 2023 08:02:28 +0000 Received: from mail-lj1-f170.google.com ([209.85.208.170]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qsIYO-008jz8-0f; Mon, 16 Oct 2023 08:02:22 +0000 Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2c523ac38fbso7965621fa.0; Mon, 16 Oct 2023 01:02:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697443337; x=1698048137; 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=qtLS9Nj2nFZBWPhUvEtRP9PYRoru3Ywsw6HKjKsybKc=; b=SEAepDQXBp/dRqoocg13mjpC64jGAhHJNIvlFh2vpcrsVGV9qsxT8vboOhquDAuw4+ 9anPZHMkPfQ0x1fSFBoWJvHtCsYBiDv6dFsdUspHMBRYVbCO77KYezU+6NgrzjpDYTMk fHVy5PUHDPg6oT752PFtr75X5cgb3B3VcDmSll+OCFKdmapMgCTbY4sru4Wr3VljylHu XfFBX6Fm7hJ1hk0s8uBeQcWwFslknqs9kiO+ypcXdi5Hwv71am2yl6sDHvUrbQFEy6Ya oQDX7/4hHHPbNpeUUCYSCPHJqikBejBvzPNncPwdhAhm8G3TkRBrmbrgF3xFq55+kvga k4eg== X-Gm-Message-State: AOJu0YyTyS2laqMkHWvSmVpu7nQCGmbH3yJ7egZYF69pw9gsN9GvmKkV tV0V8IiEE0/T4QPVWBOTQgM= X-Google-Smtp-Source: AGHT+IEJgVTIkDdKS8wbwl9GR9zgveQ3KCzOuWUyYvLzmOvka53rPoTXp7pcFySPS7cbYgXGyHt08g== X-Received: by 2002:a05:6512:33d0:b0:507:a1df:1408 with SMTP id d16-20020a05651233d000b00507a1df1408mr4684169lfg.55.1697443337286; Mon, 16 Oct 2023 01:02:17 -0700 (PDT) Received: from cizrna.home (cst-prg-37-192.cust.vodafone.cz. [46.135.37.192]) by smtp.gmail.com with ESMTPSA id p22-20020a05600c419600b00407460234f9sm6395535wmh.21.2023.10.16.01.02.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 01:02:16 -0700 (PDT) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Cc: Da Xue , Tomeu Vizoso , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Ulf Hansson , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH 2/2] pmdomain: amlogic: Fix mask for the second NNA mem PD domain Date: Mon, 16 Oct 2023 10:02:04 +0200 Message-ID: <20231016080205.41982-2-tomeu@tomeuvizoso.net> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231016080205.41982-1-tomeu@tomeuvizoso.net> References: <20231016080205.41982-1-tomeu@tomeuvizoso.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231016_010220_243102_F0885B07 X-CRM114-Status: GOOD ( 11.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Without this change, the NPU hangs when the 8th NN core is used. It matches what the out-of-tree driver does. Signed-off-by: Tomeu Vizoso Acked-by: Neil Armstrong --- drivers/pmdomain/amlogic/meson-ee-pwrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pmdomain/amlogic/meson-ee-pwrc.c b/drivers/pmdomain/amlogic/meson-ee-pwrc.c index cfb796d40d9d..0dd71cd814c5 100644 --- a/drivers/pmdomain/amlogic/meson-ee-pwrc.c +++ b/drivers/pmdomain/amlogic/meson-ee-pwrc.c @@ -228,7 +228,7 @@ static struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_audio[] = { static struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_nna[] = { { G12A_HHI_NANOQ_MEM_PD_REG0, GENMASK(31, 0) }, - { G12A_HHI_NANOQ_MEM_PD_REG1, GENMASK(23, 0) }, + { G12A_HHI_NANOQ_MEM_PD_REG1, GENMASK(31, 0) }, }; #define VPU_PD(__name, __top_pd, __mem, __is_pwr_off, __resets, __clks) \