From patchwork Fri Mar 3 06:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 9602143 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 226886016C for ; Fri, 3 Mar 2017 07:54:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01BC628614 for ; Fri, 3 Mar 2017 07:54:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9DFE285D8; Fri, 3 Mar 2017 07:54:17 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4176D285D8 for ; Fri, 3 Mar 2017 07:54:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751445AbdCCHyQ (ORCPT ); Fri, 3 Mar 2017 02:54:16 -0500 Received: from mail-pg0-f44.google.com ([74.125.83.44]:34433 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751340AbdCCHyP (ORCPT ); Fri, 3 Mar 2017 02:54:15 -0500 Received: by mail-pg0-f44.google.com with SMTP id 16so7133643pga.1 for ; Thu, 02 Mar 2017 23:52:39 -0800 (PST) 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=UKW7S867GiZUArFzlrAyesd2OS2PXu7XYgdnXMQZKOk=; b=QRCxPF+8HYunum73e3tBOYF+1J7lJ+BIK4i3rR7DnHfVtbTBv0kcY4gJqsZnQb3cyw CbEZUMH8zXYYHQMIFzhnNYXOf1y537dptAdp/1EzZiidZ94WeMWBAPcTBdJ1h76oqbJA wq2enMMnlYDb/OPbbdJHlWJCblrscHyM/NwZM= 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=UKW7S867GiZUArFzlrAyesd2OS2PXu7XYgdnXMQZKOk=; b=oJ0/+Z4Kalo5HEmXgPXPbuZ3alr3TrXpYgT0FPn8CRYW3LlbuRrjgxmwqYAkmpZyhf MftiFve6UD8RFGtoV89F5VQstmgdKLUsMBjprvijfeQYBrJEt0iNSe9aTVzplLznCSBo GKNZOlzzdAUnqJNO+SYxO9UywxDGl+gMOuR33amsRjiNczDCPIFKpNXyZUPZevwjptet 5qLonjIWfCnn0raeX879oLSJnjDYandJjFQhs2QOi2F0fQHtiWcOsncnLcC5MRdRswhN PAqNQ79Vk3QgX0x/9DSjMW9dRgymjDLV3iMr8TYzM7cOIsAOrKtj8KdYq2Kv8QHTTWes Kz2Q== X-Gm-Message-State: AMke39mZlo9vvNOW+MtVWMgCZMSCiOhBA50QkS/CDKk2plWNwielXnG4aq1+U23mg+BHQvDi X-Received: by 10.84.225.149 with SMTP id u21mr1769743plj.2.1488520837646; Thu, 02 Mar 2017 22:00:37 -0800 (PST) Received: from localhost.localdomain (61-216-91-114.HINET-IP.hinet.net. [61.216.91.114]) by smtp.gmail.com with ESMTPSA id s13sm20541405pfk.26.2017.03.02.22.00.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Mar 2017 22:00:36 -0800 (PST) From: Leo Yan To: Rob Herring , Mark Rutland , Wei Xu , Catalin Marinas , Will Deacon , Michael Turquette , Stephen Boyd , Mathieu Poirier , John Stultz , Guodong Xu , Haojian Zhuang , Greg Kroah-Hartman , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, mike.leach@linaro.org Cc: Leo Yan Subject: [PATCH v3 1/5] coresight: bindings for debug module Date: Fri, 3 Mar 2017 14:00:05 +0800 Message-Id: <1488520809-31670-2-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488520809-31670-1-git-send-email-leo.yan@linaro.org> References: <1488520809-31670-1-git-send-email-leo.yan@linaro.org> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.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 --- .../devicetree/bindings/arm/coresight-debug.txt | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/coresight-debug.txt diff --git a/Documentation/devicetree/bindings/arm/coresight-debug.txt b/Documentation/devicetree/bindings/arm/coresight-debug.txt new file mode 100644 index 0000000..92e5003 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/coresight-debug.txt @@ -0,0 +1,40 @@ +* CoreSight Debug Component: + +CoreSight 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-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. + +Example: + + debug@f6590000 { + compatible = "arm,coresight-debug","arm,primecell"; + reg = <0 0xf6590000 0 0x1000>; + clocks = <&sys_ctrl HI6220_DAPB_CLK>; + clock-names = "apb_pclk"; + cpu = <&cpu0>; + };