From patchwork Mon Jun 1 20:54:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 6524661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 15220C0020 for ; Mon, 1 Jun 2015 20:58:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 05C4E20494 for ; Mon, 1 Jun 2015 20:58:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9C9E2039D for ; Mon, 1 Jun 2015 20:58:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YzWl3-0000Dm-3s; Mon, 01 Jun 2015 20:56:29 +0000 Received: from mail-bn1on0111.outbound.protection.outlook.com ([157.56.110.111] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YzWky-00005O-L0 for linux-arm-kernel@lists.infradead.org; Mon, 01 Jun 2015 20:56:26 +0000 Received: from BN3PR0301CA0026.namprd03.prod.outlook.com (10.160.180.164) by BN3PR03MB1351.namprd03.prod.outlook.com (10.163.34.15) with Microsoft SMTP Server (TLS) id 15.1.172.22; Mon, 1 Jun 2015 20:56:01 +0000 Received: from BN1AFFO11FD027.protection.gbl (2a01:111:f400:7c10::176) by BN3PR0301CA0026.outlook.office365.com (2a01:111:e400:4000::36) with Microsoft SMTP Server (TLS) id 15.1.172.22 via Frontend Transport; Mon, 1 Jun 2015 20:56:01 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD027.mail.protection.outlook.com (10.58.52.87) with Microsoft SMTP Server (TLS) id 15.1.184.11 via Frontend Transport; Mon, 1 Jun 2015 20:56:00 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t51Ktu5s019145; Mon, 1 Jun 2015 13:55:57 -0700 From: To: , , Subject: [PATCH V2 1/1] ARM: dts: imx7d: add cortex-a7 coresight component Date: Tue, 2 Jun 2015 04:54:41 +0800 Message-ID: <1433192081-1131-1-git-send-email-Frank.Li@freescale.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD027; 1:yg8SuU9gZIJKaW6RXWSujXqALLKNem/4A1/WiREHiQL+PwJNjVJwtK+PUy3YB52QKz1yjI3OStqnqbZdDuF6gN8HkZRGaV9cAcH31641m15lbE2URT8Fq4DBupu4yiZpUrrE9m9dX4GtyXQCdAIrI85SrbI1AZh0Azz6uCuXrQujnNnBaKL/WuZYmZA4JFG3r3Uj3G57SQhzfAAB4mONOPyTCYrgwxkhv3qGjUM6gU4mRPmInAFWhGu6YeuNYPz/Xo1Qp7pM/p3g0FbNZlo4L7Z7shWqbJLmOtaEVks5tY8sNu6wg5udPRJ7Vl3lHS9X/1oMk7Y32EjVR8RIkkEJGw== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(199003)(189002)(68736005)(69596002)(6806004)(5001830100001)(86152002)(2201001)(47776003)(77096005)(86362001)(50986999)(64706001)(105606002)(87936001)(15975445007)(48376002)(50466002)(36756003)(50226001)(92566002)(19580405001)(19580395003)(85426001)(5001960100002)(107886002)(5001860100001)(62966003)(5001920100001)(81156007)(106466001)(104016003)(46102003)(77156002)(189998001)(229853001)(97736004)(5001770100001)(4001540100001)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR03MB1351; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB1351; 2:GQpNuPhpjQg7hTHiHcVhjIuHiV3tCaoAMILv9HzrH36iV2stEb6YUlnVAxcdzuhN; 2:ktyKoyKeoE15l8QkF33CJQouP+xAGfu8zroTPNO++JSirtpVsgS31+3S0oTE/cTYbwMo7cXlrfhrBbJHLHL1PE8SXJy0T6g84uPku9tDHNLW6RSi5ogzSon1zKvo7BMbkChm4VKDDp+Wt97aLpdviZkd0zx2KFN4e51FDQ4sceLHVp8FeYbEaU6OqRAN3izp/c/NkISefD7vSITo6SJ+FpXh8RG5IRjGFIh74DU9vhY=; 6:bABEyA0xw9V0PFqTJJerb+N9X9HaM55P+bHdXTWrKginRxb7e5IfGReRUTMINXzI3wz4o4waMrFh67rq5K2xRc0lmXAyI54xr2GTM5Cw1sksLJVn7ckhossnVPWKC4vq1kE3YBulfpklXmRtIeCPTGP5ul7/w5LBsT9DSDVHmLHtg1XB8xpyeotw6rM9oyiqAuBhlhqXDtyb59QEsQXbBy+CoX8t8eGqbPWi2BxgIdVDZXht8HAQf/MtumlVOIVXbhE3bHEldYuWguVgf9pYqsTopIiIQcY9txRZe+oddQaG9AIxf3MMtgd3sOoLRycA/+hXBSaHD2MpNihTBwpFvw==; 3:VQfpsOxNOhGwBXLuyk5tsBPehthBdzEQyopoSvCoRzkMOeAam+Ym/mzVVelJd+GtseFpOiccnIP151WBw4It0bEb0W8DDw5rw9pEeejOP4B/sh9fE1z2qJR43tF0uTpppKzSBxuhSn2uk6vR9C9fYEkV3UuAaDMLf5W8rqaTxkR1W1zOZFy6MQxTtubCYjw2LhffT3iRl8YxO88jdR7bmYsNnfSwVcMMJtqdyw5HYcHtPmK+4H6FPA8Gotrm7aJxFRbKxq4gtmN2BkcHVU9ZtFM+IF1aFXcqIUDURso7sIUPj3f2UpDEgDhR+C1qcoBh X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1351; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(520003)(3002001); SRVR:BN3PR03MB1351; BCL:0; PCL:0; RULEID:; SRVR:BN3PR03MB1351; X-Forefront-PRVS: 05947791E4 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB1351; 9:2Ai24COwmjuOIeTPdoK9CQrOtuODLOT/OnHQz+zSYc?= =?us-ascii?Q?7YO+EM+fb5lCTrACAMIhSJ+K7k7zwv2cqskBBMgCCojxkswEDMkF2iWeyAHK?= =?us-ascii?Q?H1A1dttZCdmwbiWgs4SFfDDBf1wPOS+BT42HhXaSGlCLQ66fPFMXtBX6kbRv?= =?us-ascii?Q?3j1yk0LCZOMo0qJOPkkPQWf7g/r//CwfRoUKgowhaT9aD399BhLwwSquhMfe?= =?us-ascii?Q?LPHaPGXUNVq1v+MEKmnk25uYEpMfv3NOmiyswLKUFqQ7iwvA/uhiEma+MuIN?= =?us-ascii?Q?B2ICJcQdqKgfnW+gLYK+aKow0y2CEwDG0/XuhHOd4QkdG4W8hXI5azTQpJ0x?= =?us-ascii?Q?3QcqgnUuA1seKnT+sjDmWczfrBx1rGO11UeoNO7Ltj1AQJtGl+TMcELKy4o/?= =?us-ascii?Q?ZYnfCpOhcWT9XeoMxtKuEk7CJ2mbJpp8YhdYZCW0Jt4FkD2IHPjMA6I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3NxJoCB3In0Gunj7M8eunAlExwVwH7TZR+xbL11PeGJjE0XpISKZ2aWYyFzVWzK2Ly/fkui4u11bK0y/vsOMOQS1jQzj8=; 6:+Du9wJae9JA6wSKieuAJX2MAciLBrREWHOjWVoWgiB405PrpxauS92fH/ERDEcik X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2015 20:56:00.8692 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1351 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150601_135624_936135_4B75305C X-CRM114-Status: UNSURE ( 7.86 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.1 (-) Cc: Frank Li , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Frank Li Added etm, etb, funnel and replicator usage example: echo 1 >/sys/bus/coresight/devices/30086000.etr/enable_sink echo 1 >/sys/bus/coresight/devices/3007c000.etm/enable_source coresight-tmc 30086000.etr: TMC enabled coresight-replicator replicator.1: REPLICATOR enabled coresight-tmc 30084000.tmc: TMC enabled coresight-funnel 30083000.funnel: FUNNEL inport 0 enabled coresight-funnel 30041000.funnel: FUNNEL inport 0 enabled coresight-etm3x 3007c000.etm: ETM tracing enabled etm enable here. trace data save at /dev/30086000.etr cat /dev/30086000.etr > trace.data coresight-tmc 30086000.etr: TMC read start coresight-tmc 30086000.etr: TMC read end use ptm2human(https://github.com/hwangcc23/ptm2human) to show trace data ptm2human -i trace.data Signed-off-by: Frank Li Acked-by: Mathieu Poirier --- Change from V1 to V2 - remove "0" after @ - add comments about unused funnel input port - add comments about add arm,primecell-periphid arch/arm/boot/dts/imx7d.dtsi | 202 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) diff --git a/arch/arm/boot/dts/imx7d.dtsi b/arch/arm/boot/dts/imx7d.dtsi index b4cd8fd..d715501 100644 --- a/arch/arm/boot/dts/imx7d.dtsi +++ b/arch/arm/boot/dts/imx7d.dtsi @@ -121,6 +121,208 @@ clock-output-names = "osc"; }; + etr@30086000 { + compatible = "arm,coresight-tmc", "arm,primecell"; + reg = <0x30086000 0x1000>; + + clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>; + clock-names = "apb_pclk"; + + port { + etr_in_port: endpoint { + slave-mode; + remote-endpoint = <&replicator_out_port1>; + }; + }; + }; + + tpiu@30087000 { + compatible = "arm,coresight-tpiu", "arm,primecell"; + reg = <0x30087000 0x1000>; + + clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>; + clock-names = "apb_pclk"; + port { + tpiu_in_port: endpoint@0 { + slave-mode; + remote-endpoint = <&replicator_out_port1>; + }; + }; + }; + + replicator { + /* non-configurable replicators don't show up on the + * AMBA bus. As such no need to add "arm,primecell" + */ + compatible = "arm,coresight-replicator"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + /* replicator output ports */ + port@0 { + reg = <0>; + replicator_out_port0: endpoint { + remote-endpoint = <&tpiu_in_port>; + }; + }; + + port@1 { + reg = <1>; + replicator_out_port1: endpoint { + remote-endpoint = <&etr_in_port>; + }; + }; + + /* replicator input port */ + port@2 { + reg = <0>; + replicator_in_port0: endpoint { + slave-mode; + remote-endpoint = <&etf_out_port>; + }; + }; + }; + }; + + etf@30084000 { + compatible = "arm,coresight-tmc", "arm,primecell"; + reg = <0x30084000 0x1000>; + clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>; + clock-names = "apb_pclk"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + etf_in_port: endpoint { + slave-mode; + remote-endpoint = <&hugo_funnel_out_port0>; + }; + }; + + port@1 { + reg = <0>; + etf_out_port: endpoint { + remote-endpoint = <&replicator_in_port0>; + }; + }; + }; + }; + + funnel@30083000 { + compatible = "arm,coresight-funnel", "arm,primecell"; + reg = <0x30083000 0x1000>; + clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>; + clock-names = "apb_pclk"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + /* funnel input ports */ + port@0 { + reg = <0>; + hugo_funnel_in_port0: endpoint { + slave-mode; + remote-endpoint = <&ca_funnel_out_port0>; + }; + }; + + port@1 { + reg = <1>; + hugo_funnel_in_port1: endpoint { + slave-mode; /* M4 input */ + }; + }; + + port@2 { + reg = <0>; + hugo_funnel_out_port0: endpoint { + remote-endpoint = <&etf_in_port>; + }; + }; + + /* the other input ports are not connect to anything */ + }; + }; + + funnel@30041000 { + compatible = "arm,coresight-funnel", "arm,primecell"; + reg = <0x30041000 0x1000>; + clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>; + clock-names = "apb_pclk"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + /* funnel input ports */ + port@0 { + reg = <0>; + ca_funnel_in_port0: endpoint { + slave-mode; + remote-endpoint = <&etm0_out_port>; + }; + }; + + port@1 { + reg = <1>; + ca_funnel_in_port1: endpoint { + slave-mode; + remote-endpoint = <&etm1_out_port>; + }; + }; + + /* funnel output port */ + port@2 { + reg = <0>; + ca_funnel_out_port0: endpoint { + remote-endpoint = <&hugo_funnel_in_port0>; + }; + }; + + /* the other input ports are not connect to anything */ + }; + }; + + etm@3007c000 { + compatible = "arm,coresight-etm3x", "arm,primecell"; + reg = <0x3007c000 0x1000>; + cpu = <&cpu0>; + clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>; + clock-names = "apb_pclk"; + + port { + etm0_out_port: endpoint { + remote-endpoint = <&ca_funnel_in_port0>; + }; + }; + }; + + etm@3007d000 { + compatible = "arm,coresight-etm3x", "arm,primecell"; + reg = <0x3007d000 0x1000>; + + /* System will hang if added nosmp in kernel command line + * without arm,primecell-periphid because amba bus try to + * read id and core1 power off at this time. + */ + arm,primecell-periphid = <0xbb956>; + cpu = <&cpu1>; + clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>; + clock-names = "apb_pclk"; + + port { + etm1_out_port: endpoint { + remote-endpoint = <&ca_funnel_in_port1>; + }; + }; + }; + soc { #address-cells = <1>; #size-cells = <1>;