From patchwork Mon May 15 15:01:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 682128 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 01930C77B7D for ; Mon, 15 May 2023 15:03:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229590AbjEOPDJ (ORCPT ); Mon, 15 May 2023 11:03:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242005AbjEOPCr (ORCPT ); Mon, 15 May 2023 11:02:47 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2046.outbound.protection.outlook.com [40.107.6.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F18B12701; Mon, 15 May 2023 08:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dma6LYDVHYGJ2OPpk+vQ8kr+BH83axBXUhJtScDFgnZf3zzgmIslYDYO3jZPG8jxFU+8SM8k4mXGKvIZqUJMRIDgfdrdKhg34pBZCXHzBeLfGik8uMlNiliePulWw2GKuTl4xWoM/YZGJBx/N0JD1KrXGxJHTyniPnPnWb+6nHJgpGBLrFj8clEtdzXYiu6ROV3pOzSJXmzC8Z0ohYh0+TNXlGH+4ccnq50kFiQyzEDAF7wwJpDgV0vIEh8NOpYc6gVsI2ho2sp+29L+WHJX63TAqIplsjKFbLH1DPFfYHhIFyrI6tuTnoXKOWsvwfPplzD5JOnbmRB9iC10g5CDKg== 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=IxkVKHgf85H/BN3wEbmJPmZ872HDJ6SOkj1qjYztVe8=; b=TIlHkBOIXrXK1d/uBS9RitgsYI4xEgUT1cLwsQzYtTSQfUwKnRZ6bmtcU6v9LHI8I0V9Q1+iER15XN6Wo3v6P6N2he8s/KvyP+v/S99fHbfE7tZFdh/Y/Y22yn/wu7UslRyN2kCGaE/iaLPsMHTQhj43M6yU8NbQd1pcHRmslyPNGYJNXG3VrTw2xHkwxQWuUXqvfxNucUCqR0pva91kkGiAbDyU4H2cMST7WB1IYYHqoxFc10F9dHHDTrZi0EtUMNREZrKe7y2JoIEg02mBmVCMUEfdTpoLU+Cmeu3MX0Ofwf0d2QV1bAfoEpMPxCvI1g1kxUIHSgskZuJnh61Wow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IxkVKHgf85H/BN3wEbmJPmZ872HDJ6SOkj1qjYztVe8=; b=Vva+hp+EkBU/c63LXwjw6X9cuYDXRmN4lfjAt4FkRKKbkRLXsm7nwO7HilUXL4A4hMMKNX2xfWB9131HPAwDf69eeQc8aMgHRXzllsl6Dh94nYKyoHA/P+oD/bRyCYoq/CH3kVWtV+0iFqsYDp2gca5i6SPtD3aP2j+2iNcod/8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by AM0PR04MB7011.eurprd04.prod.outlook.com (2603:10a6:208:193::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.30; Mon, 15 May 2023 15:02:07 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::25d3:de2:ef1:3884]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::25d3:de2:ef1:3884%4]) with mapi id 15.20.6387.030; Mon, 15 May 2023 15:02:07 +0000 From: Frank Li To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Cc: imx@lists.linux.dev Subject: [PATCH v2 1/1] arm64: dts: imx8mp: Add coresight trace components Date: Mon, 15 May 2023 11:01:49 -0400 Message-Id: <20230515150149.2790189-1-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: BYAPR05CA0075.namprd05.prod.outlook.com (2603:10b6:a03:e0::16) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|AM0PR04MB7011:EE_ X-MS-Office365-Filtering-Correlation-Id: 30bb8369-55b5-4d4c-6ef2-08db555559d5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h5l6wheQHzEzSN/j0t8Sq4YXWe+CIXRZ73ySWEB+bxKdDnxF+0xL8XuUfEV4ZLKIrLBtwLMr1x5/NTswS4xLCS7hKFdT6fTy2fvYWpyzeNFFQHmkxghnmTfTC/i0CtyhR0+y/FAHbeZAl7Gcz0bAYFqnxuWj7BSSo3Szo81Jl9DqcP4nY2cy4sfS5JxgokY0ovSBsLaEP3QZwzWySB/oRmiS8aWcrtX3iANxpVGrEbasCAV8gVTMn5S4HenafDG9q+2TJdPoCGi7CMNkH0SvUs5mj0jmQhPt0xWUPOnA7W1fuHTNEmCPD33skXcaJgibYvQc9DdHeB6Z3szeRAkTD9PktxNo/qvg0V9PBLrFCjVCCF6F+13GZymr8lpl02nYP19vCsSGhwPNNna/z7fnHo6mEZUvazC4hHI1lfJF+V17UujAN0Puw4R3QACLnuGroGu+tHFzwjHNjbJtVL963d4fJUrty1aLPvL00t3wZiG1HXhmD4XI8NSoHEM+2HOXwm/mSFUPN4jVdmSpjFipj9GaFagge3yYNG9N2yoJIaD+nHsq7gwvB4Jq/WpnQgvVLM2tO4yRNDaC4Oj2DKwpX8IA+DVo42j+onjBLhbucSnT6BQYv8B4euSC/nc/sEOFEChIxTFRm+zjDSx29u4r/TbH1LIdKFwOcqiPOkmDL1A= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4838.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(376002)(346002)(396003)(136003)(366004)(451199021)(66556008)(110136005)(478600001)(4326008)(66476007)(66946007)(6666004)(52116002)(316002)(6486002)(8936002)(2906002)(8676002)(41300700001)(7416002)(5660300002)(26005)(1076003)(921005)(86362001)(38100700002)(38350700002)(2616005)(83380400001)(6512007)(186003)(6506007)(36756003)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?3kjny1gsnkl7aVuUpIbM83DbjEbC?= =?utf-8?q?2TKzyJSab/N1AIJj5MPE9+Yf/N8PMZzuwYRZK7EjLtd0OfLrBhkRt4m/4Uoirjb6s?= =?utf-8?q?sLBtUzuWkmGrE3LSjm9DhXg+SWIWjbVFjVrHFf48xAKANMTCO420TvpzKt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Gke5LHb8MSk7FK8sWY?= =?utf-8?q?4JetG8qlsiXQf9sStf1zWTXsp25Ba8QG0c62Rzujbd5pWZnzUNQYRzDvTRihD17GX?= =?utf-8?q?W+x+CZ+B0Zsy+PG8pcybafPILiuAhHsOk75VGgBgDVkklZd1DsWb0qtMlya8CeLeX?= =?utf-8?q?+qRqT4ZsXSh9GNrbLLlVOiKYFsKWybQBQaFGd08jizEWNkoyElfGl7oSKsPEC3Anp?= =?utf-8?q?CZYOMDLb8qFBG5/DLOe2KGwWZ4waHP0rJOQHH0L9xGl1eQZS5KTgwXdPH/xHgr3+i?= =?utf-8?q?ZoFRND/Tsg5pewVBxvUcewsHvFH+9tZ8RE9LKsnLD2YCmOaHOPEkx6weq7gbsYiy0?= =?utf-8?q?IcueresU1pm0GUmRT2NWTs0LgUWPKOgV9N2yUIhh/n4uaml9YC+rU2OsjvM/wzhw6?= =?utf-8?q?7tHnMrfmDvzmTigcVVM9Vjcaz5hXWHM2iJvEBmAEa4uTecipxE3pSwFV7dyCOQMgf?= =?utf-8?q?NA0Rc3fMEvkj7x5L9HKVFyKock6Ahc6kxbBmDazKd2kZS3UCxyn/nijwSYiQ8IN9i?= =?utf-8?q?T1Wbs+1Y2jud?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 30bb8369-55b5-4d4c-6ef2-08db555559d5 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2023 15:02:07.2332 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cULbR/ewSfr+aHrPkjqRegqTZywo3ud9i6vpp1VAJTVeX4mLAJkxpQ8oren/7rBuCpPYHHsjinSbmJgXu/9W2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB7011 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add coresight trace components (ETM, ETF, ETB and Funnel). ┌───────┐ ┌───────┐ ┌───────┐ │ CPU0 ├─►│ ETM0 ├─►│ │ └───────┘ └───────┘ │ │ │ │ ┌───────┐ ┌───────┐ │ ATP │ │ CPU1 ├─►│ ETM1 ├─►│ │ └───────┘ └───────┘ │ │ │ FUNNEL│ ┌───────┐ ┌───────┐ │ │ │ CPU2 ├─►│ ETM2 ├─►│ │ └───────┘ └───────┘ │ │ ┌─────┐ ┌─────┐ │ │ │ │ │ │ ┌───────┐ ┌───────┐ │ │ │ M7 │ │ DSP │ │ CPU3 ├─►│ ETM3 ├─►│ │ │ │ │ │ └───────┘ └───────┘ └───┬───┘ └──┬──┘ └──┬──┘ AXI │ │ │ ▲ ▼ ▼ ▼ │ ┌───────────────────────────┐ ┌─────┐ ┌─┴──┐ │ ATP FUNNEL ├──►│ETF ├─► │ETR │ └───────────────────────────┘ └─────┘ └────┘ Signed-off-by: Frank Li --- Change from v1 to v2 - add new line between nodes - add new line between properties and child node arch/arm64/boot/dts/freescale/imx8mp.dtsi | 204 ++++++++++++++++++++++ 1 file changed, 204 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index a19224fe1a6a..1a25710c3a90 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -304,6 +304,210 @@ soc: soc@0 { nvmem-cells = <&imx8mp_uid>; nvmem-cell-names = "soc_unique_id"; + etm0: etm@28440000 { + compatible = "arm,coresight-etm4x", "arm,primecell"; + reg = <0x28440000 0x10000>; + arm,primecell-periphid = <0xbb95d>; + cpu = <&A53_0>; + clocks = <&clk IMX8MP_CLK_MAIN_AXI>; + clock-names = "apb_pclk"; + + out-ports { + port { + etm0_out_port: endpoint { + remote-endpoint = <&ca_funnel_in_port0>; + }; + }; + }; + }; + + etm1: etm@28540000 { + compatible = "arm,coresight-etm4x", "arm,primecell"; + reg = <0x28540000 0x10000>; + arm,primecell-periphid = <0xbb95d>; + cpu = <&A53_1>; + clocks = <&clk IMX8MP_CLK_MAIN_AXI>; + clock-names = "apb_pclk"; + + out-ports { + port { + etm1_out_port: endpoint { + remote-endpoint = <&ca_funnel_in_port1>; + }; + }; + }; + }; + + etm2: etm@28640000 { + compatible = "arm,coresight-etm4x", "arm,primecell"; + reg = <0x28640000 0x10000>; + arm,primecell-periphid = <0xbb95d>; + cpu = <&A53_2>; + clocks = <&clk IMX8MP_CLK_MAIN_AXI>; + clock-names = "apb_pclk"; + + out-ports { + port { + etm2_out_port: endpoint { + remote-endpoint = <&ca_funnel_in_port2>; + }; + }; + }; + }; + + etm3: etm@28740000 { + compatible = "arm,coresight-etm4x", "arm,primecell"; + reg = <0x28740000 0x10000>; + arm,primecell-periphid = <0xbb95d>; + cpu = <&A53_3>; + clocks = <&clk IMX8MP_CLK_MAIN_AXI>; + clock-names = "apb_pclk"; + + out-ports { + port { + etm3_out_port: endpoint { + remote-endpoint = <&ca_funnel_in_port3>; + }; + }; + }; + }; + + funnel { + /* + * non-configurable funnel don't show up on the AMBA + * bus. As such no need to add "arm,primecell". + */ + compatible = "arm,coresight-static-funnel"; + + in-ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + ca_funnel_in_port0: endpoint { + remote-endpoint = <&etm0_out_port>; + }; + }; + + port@1 { + reg = <1>; + + ca_funnel_in_port1: endpoint { + remote-endpoint = <&etm1_out_port>; + }; + }; + + port@2 { + reg = <2>; + + ca_funnel_in_port2: endpoint { + remote-endpoint = <&etm2_out_port>; + }; + }; + + port@3 { + reg = <3>; + + ca_funnel_in_port3: endpoint { + remote-endpoint = <&etm3_out_port>; + }; + }; + }; + + out-ports { + port { + ca_funnel_out_port0: endpoint { + remote-endpoint = <&hugo_funnel_in_port0>; + }; + }; + }; + }; + + funnel@28c03000 { + compatible = "arm,coresight-dynamic-funnel", "arm,primecell"; + reg = <0x28c03000 0x1000>; + clocks = <&clk IMX8MP_CLK_MAIN_AXI>; + clock-names = "apb_pclk"; + + in-ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + hugo_funnel_in_port0: endpoint { + remote-endpoint = <&ca_funnel_out_port0>; + }; + }; + + port@1 { + reg = <1>; + + hugo_funnel_in_port1: endpoint { + /* M7 input */ + }; + }; + + port@2 { + reg = <2>; + + hugo_funnel_in_port2: endpoint { + /* DSP input */ + }; + }; + /* the other input ports are not connect to anything */ + }; + + out-ports { + port { + hugo_funnel_out_port0: endpoint { + remote-endpoint = <&etf_in_port>; + }; + }; + }; + }; + + etf@28c04000 { + compatible = "arm,coresight-tmc", "arm,primecell"; + reg = <0x28c04000 0x1000>; + clocks = <&clk IMX8MP_CLK_MAIN_AXI>; + clock-names = "apb_pclk"; + + in-ports { + port { + etf_in_port: endpoint { + remote-endpoint = <&hugo_funnel_out_port0>; + }; + }; + }; + + out-ports { + port { + etf_out_port: endpoint { + remote-endpoint = <&etr_in_port>; + }; + }; + }; + }; + + etr@28c06000 { + compatible = "arm,coresight-tmc", "arm,primecell"; + reg = <0x28c06000 0x1000>; + clocks = <&clk IMX8MP_CLK_MAIN_AXI>; + clock-names = "apb_pclk"; + + in-ports { + port { + etr_in_port: endpoint { + remote-endpoint = <&etf_out_port>; + }; + }; + }; + }; + aips1: bus@30000000 { compatible = "fsl,aips-bus", "simple-bus"; reg = <0x30000000 0x400000>;