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: 9644725 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DF71E601D7 for ; Sat, 25 Mar 2017 18:25:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE68826220 for ; Sat, 25 Mar 2017 18:25:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C272F27FB1; Sat, 25 Mar 2017 18:25:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3507F26220 for ; Sat, 25 Mar 2017 18:25:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=99ARBdSdIzgJXbeXEHyNe3P6cU//NCF3iFH2p7hdzKg=; b=YWR9qoGlrIF2MGTrU/NnxAQQ0s inhGFVNopV98vMHjr5ibp9cXTSb7/XFbQWGX+dgMmvuKLs1kKMCShyUqaMvg/bOI9SGUaDwgPoG6W qneFVpkO+tLItzUWmLZWLYM0nJDcXhwLwJjprTm+iLkMeFjK25vKDxhi5auIPLw8zpSyn/ARBn0Xf wBYHSdlYs0eS8j4OvwXx0rh01dCCYU8br5VDO6DCir81f3FHpSrV9HbpGmnH4LlTe4iOuKv7oCcXA av1Rtc81Qm6k+diewYBIqbGOTCx/Y+p9NsyCXkxUeVStw76U7qHMSVcL4Wi81EihHHBhPkT48cTgi G4NE427w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1crqNF-00064a-Tt; Sat, 25 Mar 2017 18:25:13 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1crqMQ-0005lM-Pw for linux-arm-kernel@lists.infradead.org; Sat, 25 Mar 2017 18:24:24 +0000 Received: by mail-wm0-x235.google.com with SMTP id n11so33993502wma.1 for ; Sat, 25 Mar 2017 11:24:02 -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=RDHWlw7Hmko8zePlXMh/X/shaufV0xqBMSWpnMBwf0jv9aJve8NnQgivBj3pIXN8qs 1v7zjwbZHP3CW4G7Fq+sEYuiMV9bZLH3VNaP8GJ3qdP0n8f0B+8FbbrwDEVznLU9xsmz QvPb/v1g5dOSlAl3JiZD/EU0F2CM43lBjDwSd/lfxSGT8d+RsU7bvjfSNTRCnP8FKlqZ mAlN8DaOOZjwvcMEEDgGJ+fVK7A3ShG+78e+/RTLe87mEtk6t63t30wLN5VJlsbx/s9v iglBi/XPRNetQ24XclqpUi7FUAgqlaElEGH0v+yYrILMFbjW+z/tLHccMv9WHtpjdQUA SPvg== X-Gm-Message-State: AFeK/H2M6chnGltSs8SZEIYYi6NuROyTBhBUqcj2Hwqjyl1WyBtIDfhzfO22e+1kBpZAqlXu 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170325_112423_003863_AB14AABF X-CRM114-Status: GOOD ( 17.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leo Yan MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Rob Herring Reviewed-by: Suzuki K Poulose --- .../bindings/arm/coresight-cpu-debug.txt | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt 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>; + };