From patchwork Fri Mar 17 15:02:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 95429 Delivered-To: patch@linaro.org Received: by 10.140.89.134 with SMTP id v6csp346768qgd; Fri, 17 Mar 2017 08:05:44 -0700 (PDT) X-Received: by 10.99.2.139 with SMTP id 133mr16734182pgc.168.1489763144864; Fri, 17 Mar 2017 08:05:44 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5si8869774pgh.227.2017.03.17.08.05.44; Fri, 17 Mar 2017 08:05:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751430AbdCQPF3 (ORCPT + 12 others); Fri, 17 Mar 2017 11:05:29 -0400 Received: from mail-pg0-f50.google.com ([74.125.83.50]:36529 "EHLO mail-pg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751087AbdCQPEX (ORCPT ); Fri, 17 Mar 2017 11:04:23 -0400 Received: by mail-pg0-f50.google.com with SMTP id g2so42834491pge.3 for ; Fri, 17 Mar 2017 08:03:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=9X1RacVAzSXKsWvS2e4e2ehj1MFIxr+OfNyxCovT4eo=; b=ZI87j0y81r45CUkRT0svQLr0+bTUPW7LXsfBNDUfVb2nuzNtXX+oBIRwbg7M2IUMpX f4iuajK/XD6nn5n1mo3diB/bBxJNd9nSpA56z32504K7YNZfhrkv770dSWzQUC5Nlow7 rvuJKhnVtufkEQqVWVmGLLCYW16wjcFE1t06Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=9X1RacVAzSXKsWvS2e4e2ehj1MFIxr+OfNyxCovT4eo=; b=NYFveRf8VLLz7tyIvueT6qAEmzuEFcMt8TDUsERuGUnWCVoZFqdvulVT1YvfAS01zW K74UXKiaaQPucxXcykSP/NaO82oAIUm2gaz3fqhaGcShZGCTaM4lHlG9QR0Z93BwlSsF BZljXPCJA2rhnc7A92ZxpTyil9jmG26kH3DY1zavso+rH/bOE8vsOLvXJueqxQ7DCYub fys4ptIQPKmgaE2TYtTZ/X+1RCiNza5ObRq9AyfWL0nnXLUX4jMu+ACZUuf7mEcnvgr+ N6Kh2LpYQN2gFoMVFS6dtY+4KCyz0o93pBcGdkzgZEnV0iJsBQxPDK+/D+7RUcHNG26P D8Ag== X-Gm-Message-State: AFeK/H2DRleC+M/kaLNUOuZFkvoWS5dsr63DFVFaBe5sQgauSAJN/E+jlDTQRztt+NAnEl5G X-Received: by 10.84.231.135 with SMTP id g7mr111621plk.12.1489763030616; Fri, 17 Mar 2017 08:03:50 -0700 (PDT) Received: from localhost.localdomain ([103.230.219.215]) by smtp.gmail.com with ESMTPSA id f125sm17482582pfc.4.2017.03.17.08.03.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Mar 2017 08:03:49 -0700 (PDT) From: Leo Yan To: Rob Herring , Mark Rutland , Wei Xu , Catalin Marinas , Will Deacon , Andy Gross , David Brown , Michael Turquette , Stephen Boyd , Mathieu Poirier , Leo Yan , Guodong Xu , John Stultz , Greg Kroah-Hartman , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-clk@vger.kernel.org, mike.leach@linaro.org, Suzuki.Poulose@arm.com, sudeep.holla@arm.com Subject: [PATCH v4 1/7] coresight: bindings for CPU debug module Date: Fri, 17 Mar 2017 23:02:17 +0800 Message-Id: <1489762943-25849-2-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1489762943-25849-1-git-send-email-leo.yan@linaro.org> References: <1489762943-25849-1-git-send-email-leo.yan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to ARMv8 architecture reference manual (ARM DDI 0487A.k) Chapter 'Part H: External debug', the CPU can integrate debug module and it can support self-hosted debug and external debug. Especially for supporting self-hosted debug, this means the program can access the debug module from mmio region; and usually the mmio region is integrated with coresight. So add document for binding debug component, includes binding to APB clock; and also need specify the CPU node which the debug module is dedicated to specific CPU. Suggested-by: Mike Leach Reviewed-by: Mathieu Poirier Signed-off-by: Leo Yan --- .../bindings/arm/coresight-cpu-debug.txt | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt -- 2.7.4 diff --git a/Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt b/Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt new file mode 100644 index 0000000..f6855c3 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt @@ -0,0 +1,46 @@ +* CoreSight CPU Debug Component: + +CoreSight cpu debug component are compliant with the ARMv8 architecture +reference manual (ARM DDI 0487A.k) Chapter 'Part H: External debug'. The +external debug module is mainly used for two modes: self-hosted debug and +external debug, and it can be accessed from mmio region from Coresight +and eventually the debug module connects with CPU for debugging. And the +debug module provides sample-based profiling extension, which can be used +to sample CPU program counter, secure state and exception level, etc; +usually every CPU has one dedicated debug module to be connected. + +Required properties: + +- compatible : should be + * "arm,coresight-cpu-debug"; supplemented with "arm,primecell" + since this driver is using the AMBA bus interface. + +- reg : physical base address and length of the register set. + +- clocks : the clock associated to this component. + +- clock-names : the name of the clock referenced by the code. Since we are + using the AMBA framework, the name of the clock providing + the interconnect should be "apb_pclk" and the clock is + mandatory. The interface between the debug logic and the + processor core is clocked by the internal CPU clock, so it + is enabled with CPU clock by default. + +- cpu : the cpu phandle the debug module is affined to. When omitted + the module is considered to belong to CPU0. + +Optional properties: + +- power-domains: a phandle to power domain node for debug module. We can + use "nohlt" to ensure CPU power domain is enabled. + + +Example: + + debug@f6590000 { + compatible = "arm,coresight-cpu-debug","arm,primecell"; + reg = <0 0xf6590000 0 0x1000>; + clocks = <&sys_ctrl HI6220_DAPB_CLK>; + clock-names = "apb_pclk"; + cpu = <&cpu0>; + };