From patchwork Sat Aug 26 08:38:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13366551 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 B64BDC83F01 for ; Sat, 26 Aug 2023 08:39:01 +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=C9Cubhysdc6izHVZMk8lE3okuftrz1fujqxnMI89Im4=; b=yYmtTRsbewp3BD wZfR4HQspreV5SWRlwwBovlCUn7C3K0A8yLicShYVuzH0ZgOm5StgDZbAPuXJ1aFUar0K3PidrqsF tcBVYSLmCt3tlHXBW9BkvJxZG1j2/hFfZ7XFcJp0YWIXmhm2d4eSJfIOc4XWRfmkrixMbZnSQXkSR 0Z+qdik+r6lHpWyPQ+R/ubPGgnz/h8GnJbzPHcxUSporySgLvkcpABEK7e/0BAEL+NNgldI3SAc8+ lG8eRfLZfS49EnoFh171Cngl2Iw10ngdCChWitDs1H/6Qwc32qen60cCzdhGUZzW8RpWq8nj8z8IT SnZzY+trydps2osH7Zmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qZoon-006ats-2M; Sat, 26 Aug 2023 08:38:53 +0000 Received: from mail-dm6nam10olkn20811.outbound.protection.outlook.com ([2a01:111:f400:7e88::811] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qZook-006atK-15; Sat, 26 Aug 2023 08:38:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GC2heLubiGjSifoV0Y/m59HKV1Lbg1yDvZrsiXw+wVTYoQilm3bix8USy5u8bZuMJP4Ncv5um3yz4hcwHe/yZQSG9LNcjzw7HtfkO67OcSHl31iVYA9NsCk87mwHYfqHZca+b8pPv46cJDpC8X/jfnwZtIceTBavOMjBtPWvPf7QXSIgtM8T65CFyJDbJchunL7CdCiGGlsuP3Kjz9kmrKm7bzbaDDQcs+Klxkf+wxnKGKiUJTKcc9Bz+XdXkdUunvHRKpcZQ6dy6hXKeSnBiu5039PTHWgarP4ALW9mNgUBVuvK6v9l3OCX9y4kF0KwqwQ5hTEEWAmsRARyVf858Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oD7D4hOXe241VESq6IMYP/Kc3DL5yh0Yrek02YvU57I=; b=UfAE12YUDsb+87EweA9FZSEF+HhtYa8YBYsORqsfWcagmunBbKtHYxQWHFBMk3Bp42AT+B1xWdLg8w/4P2dugzmhwUvai/kdkyUEQgQp2eMnT1fM3lh0MSK3upMldNe0Fd3K+9dCYbqbSV0LU/euYTf1pPzbvxSLuWqKfvUnur/t0WgW0AeO9bNs7msiH2628T0TNGFgIJ1oA30TXwfBoIkCBvLYzNvzYQRGDR6KAnpKu7OtJ9vlHSYgBBCIMkY3R1EuR2a5yNnkx+dHIx6+99ejN88ys9mh0fo2H9PUgGFcY4bXAa0zlRn0kgR33L+37NRLpAwWkTyHoBKGj1YOyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oD7D4hOXe241VESq6IMYP/Kc3DL5yh0Yrek02YvU57I=; b=CCvz1UPdBx3MmcxDeaTziYuq2cR1scPkfgNY13jEsga93+KbpLqrX7s0ab9zkoRDHpRUQs/63sp/UITlvdeVFSF3Ns51WElw/NphWgx+ubHTumx5+dfjNavfwmNxAnqz7wx8vVuUU6p1ZDlJeGIxfxde/H1F72qruufMhAZEauyRA7FblXOD+uKVMyqfbK6VHrEQcywpy9FEnMCASRqdU4kYbsgQK8RChFDG4fIwWsic7lwJ/xw85Q/2Vu87AjcHmnOsC6g+B14boQB5cWrQ7ySzNin2TWBvuiv8vgOTxyKJiwbfz3G4jDthIYkjzDcP7B/rQZSrFXnQe8PT/kBdLg== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by CY5PR20MB4844.namprd20.prod.outlook.com (2603:10b6:930:23::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.29; Sat, 26 Aug 2023 08:38:41 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::cbad:4566:1f3e:4e1f]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::cbad:4566:1f3e:4e1f%4]) with mapi id 15.20.6699.034; Sat, 26 Aug 2023 08:38:41 +0000 From: Inochi Amaoto To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Inochi Amaoto , Heiko Stuebner , Wei Fu , Guo Ren , devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] riscv: dts: allwinner: d1: Add PMU event node Date: Sat, 26 Aug 2023 16:38:53 +0800 Message-ID: X-Mailer: git-send-email 2.41.0 X-TMN: [MHffcNEFutK/NKvS6NUMhf2bYQ9cSLCmNEjCx7FQJQ0=] X-ClientProxiedBy: SI1PR02CA0047.apcprd02.prod.outlook.com (2603:1096:4:1f5::15) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20230826083853.136087-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|CY5PR20MB4844:EE_ X-MS-Office365-Filtering-Correlation-Id: ee2e1c8b-3c11-4967-3563-08dba60fd966 X-MS-Exchange-SLBlob-MailProps: fNPDeqDZc0IqNcQZ0cWXe5cnwXgLTXMXawnC9DpyrkulOlbW3559MAetkeiX/vvx7VMtdZtUmk81ECGuSBmKlY8ahOtwfP8DAoMYBPQ1Mx0vXK5/7HgqPAUbe2PyppQNJRVXwWjuQ2jWJqZ6d3SjgAQRL5VYO7lsAKfGKAoIRoQD7topwgtbO+3OG2dyk6w4nbCw3cLLakhJWS3/Xkovj0FdwdOnR2iAiHKJYk8inM3JeYc1c2M5DsccQcFdiYvNWM8Q6ilLWLke2X3ZnYrWRxnq7qsE6j3iAN/dlPF1T9qQFfiiqhbMZ2f+/K/mquZfsjnnitZD07GzJlhv0BpeekGxRN4pdSSq2wJGs8vCtiVvAXJxtSFA34TTbO13nNjaaFS7tL5efMPcUcMR/l1FKbP/MVFTy+dunz7D6AHcnQbb8JMWIvmXPUymd2khKmVv+xKLljZ5HBKY5WXzLemixxq6A+E5/eoXo8cdjt8ECiIkCeUZtlQteKc6vU7+rbe3Nr9iZsNzPq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sdCjW/sKdW0Wt+pbAHAdRcLtEtD+wLOc3s+Bs6ONMjEsPKG6pyoIIS9bQ4ijGXNTQmiUHYWXN/nGJ2WhqkUOkzqnRXGlQ1KjBfvoAyGY= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee2e1c8b-3c11-4967-3563-08dba60fd966 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2023 08:38:41.6134 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR20MB4844 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230826_013850_404073_3251550D X-CRM114-Status: UNSURE ( 7.75 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org D1 has several pmu events supported by opensbi. These events can be used by perf for profiling. Signed-off-by: Inochi Amaoto --- arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi b/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi index 8275630af977..d9031ccdec89 100644 --- a/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi +++ b/arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi @@ -72,5 +72,45 @@ plic: interrupt-controller@10000000 { #address-cells = <0>; #interrupt-cells = <2>; }; + + pmu { + compatible = "riscv,pmu"; + riscv,event-to-mhpmcounters = + <0x00003 0x00003 0x00000008>, + <0x00004 0x00004 0x00000010>, + <0x00005 0x00005 0x00000200>, + <0x00006 0x00006 0x00000100>, + <0x10000 0x10000 0x00004000>, + <0x10001 0x10001 0x00008000>, + <0x10002 0x10002 0x00010000>, + <0x10003 0x10003 0x00020000>, + <0x10019 0x10019 0x00000040>, + <0x10021 0x10021 0x00000020>; + riscv,event-to-mhpmevent = + <0x00003 0x00000000 0x00000001>, + <0x00004 0x00000000 0x00000002>, + <0x00005 0x00000000 0x00000007>, + <0x00006 0x00000000 0x00000006>, + <0x0000a 0x00000000 0x0000000b>, + <0x10000 0x00000000 0x0000000c>, + <0x10001 0x00000000 0x0000000d>, + <0x10002 0x00000000 0x0000000e>, + <0x10003 0x00000000 0x0000000f>, + <0x10019 0x00000000 0x00000004>, + <0x10021 0x00000000 0x00000003>; + riscv,raw-event-to-mhpmcounters = + <0x00000000 0x00000001 0xffffffff 0xffffffff 0x00000008>, + <0x00000000 0x00000002 0xffffffff 0xffffffff 0x00000010>, + <0x00000000 0x00000003 0xffffffff 0xffffffff 0x00000020>, + <0x00000000 0x00000004 0xffffffff 0xffffffff 0x00000040>, + <0x00000000 0x00000005 0xffffffff 0xffffffff 0x00000080>, + <0x00000000 0x00000006 0xffffffff 0xffffffff 0x00000100>, + <0x00000000 0x00000007 0xffffffff 0xffffffff 0x00000200>, + <0x00000000 0x0000000b 0xffffffff 0xffffffff 0x00002000>, + <0x00000000 0x0000000c 0xffffffff 0xffffffff 0x00004000>, + <0x00000000 0x0000000d 0xffffffff 0xffffffff 0x00008000>, + <0x00000000 0x0000000e 0xffffffff 0xffffffff 0x00010000>, + <0x00000000 0x0000000f 0xffffffff 0xffffffff 0x00020000>; + }; }; };