From patchwork Sat Mar 25 18:23:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 96005 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp566018qgd; Sat, 25 Mar 2017 11:27:15 -0700 (PDT) X-Received: by 10.98.59.151 with SMTP id w23mr16164805pfj.235.1490466435829; Sat, 25 Mar 2017 11:27:15 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si6964962pld.330.2017.03.25.11.27.15; Sat, 25 Mar 2017 11:27:15 -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 S1751945AbdCYSZ5 (ORCPT + 15 others); Sat, 25 Mar 2017 14:25:57 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35802 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751616AbdCYSYr (ORCPT ); Sat, 25 Mar 2017 14:24:47 -0400 Received: by mail-wm0-f42.google.com with SMTP id u132so34020213wmg.0 for ; Sat, 25 Mar 2017 11:24:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=A17f8qSI5MvRWY4Oasa54d757sUueDPn7wxjfG2rCMo=; b=MnkzzwXkZfQSWZJNcz71lM0lcg667o7uxd+dz5ZBTj/fJTEeOzp1dRj33gEy/2+fEQ 1slxcr7t1msGByqEYzyyhfID2JLaS9zxMffqdp7MbJ6wHV7ewtS0E5BiV1I4GJ4Ut12e 2HCDBMiCzJ4miUQuG5MoyKjQfSZstn7Rid3DY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=A17f8qSI5MvRWY4Oasa54d757sUueDPn7wxjfG2rCMo=; b=lH4H2pq4oqUIiOZ6VQHQzILekQ+eTbGq+Dsje5OoUoeoktnkUknToGYK/fSKxxb8Xf rHSkZAJQAGepSO35w5yi69trDsfdtht2ZFgg8aOC7JBmOLWtf7+OUWRzeZEXqAA5x93C TyXuBUG3VOhgTP2zKze/tvwMQ0j2QDgjsPqYw0Jg8LtVdMNhZNZH8TWiV5W7ZmKgr6HU NYVL337H5fV3t17BIuc3kzlq3UtL9Slry5vLHM5uBJ9b90DmvOSrgrCsIjDCQ+vNGifA N3vs7901NMnr3jlhKNYAlIa32RY4TJTAHsMMHabeDz1g2Up+sOPAqSuZNOeVSit8LWz5 90CQ== X-Gm-Message-State: AFeK/H11ilJQXbr+4IOkq3Pj6sIm7gwweRD2rXL0V7uCmnrYWLeoKjgn0c8p0/xmyJhSdjZi X-Received: by 10.28.86.68 with SMTP id k65mr2912508wmb.112.1490466240762; Sat, 25 Mar 2017 11:24:00 -0700 (PDT) Received: from localhost.localdomain (li1529-187.members.linode.com. [139.162.244.187]) by smtp.gmail.com with ESMTPSA id e72sm7464075wma.5.2017.03.25.11.23.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 25 Mar 2017 11:23:59 -0700 (PDT) From: Leo Yan To: Jonathan Corbet , Rob Herring , Mark Rutland , Wei Xu , Catalin Marinas , Will Deacon , Andy Gross , David Brown , Michael Turquette , Stephen Boyd , Mathieu Poirier , Guodong Xu , John Stultz , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@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 Cc: Leo Yan Subject: [PATCH v5 1/9] coresight: bindings for CPU debug module Date: Sun, 26 Mar 2017 02:23:09 +0800 Message-Id: <1490466197-29163-2-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490466197-29163-1-git-send-email-leo.yan@linaro.org> References: <1490466197-29163-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 | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt -- 2.7.4 Reviewed-by: Suzuki K Poulose 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..7ef3824 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt @@ -0,0 +1,48 @@ +* 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 the debug power domain. We use "power-domains" + binding to turn on the debug logic if it has own dedicated + power domain and if necessary to use "idle_constraint" in + kernel command line or debugfs node to constrain idle states + to ensure registers in the CPU power domain are accessible. + +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>; + };