From patchwork Fri Mar 10 06:27:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anurup M X-Patchwork-Id: 9615121 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 1CF7760417 for ; Fri, 10 Mar 2017 06:28:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0ED60286F6 for ; Fri, 10 Mar 2017 06:28:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03500286FB; Fri, 10 Mar 2017 06:28:49 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM autolearn=unavailable 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 9BC48286F6 for ; Fri, 10 Mar 2017 06:28:48 +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: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:In-Reply-To: References:List-Owner; bh=cta3s8Rl9WHOtZyOu/OHI25wZpS5u51N9869/IDeQco=; b=bDF NFTTEWcDr3UFCv4Cf9QPNrzAnSDtoguOtYe4QBPoQJTfq+TL0rULByBZre9/2MWUgtFd+Xho+Ttgr +aQ6Kq/z9MjdPBCrfPz6VXHLkMUJC9Z1Yv3qXAnqyMJ9RcuhILnquXu7y8b87fAJVhwLmUtD/B8mh UXV8dfQ7grybZ8ZlLqIISxuewORb5rSSicNt92G0/zi+746kbmmkaee7/nlUeAZvcWLdiCQ16t7z3 zuTh0hoa6ZlrxBBaEhXnlBbCFL1JH1Z/D3UaeYkyeMV48dBHCPEdP0CcW/NDo+j+XjtFjI7EBd3rv IeBk23YhWrKM3w5XLbKFvXJaxoOI6wQ==; 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 1cmE2h-0000rz-FJ; Fri, 10 Mar 2017 06:28:47 +0000 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cmE1v-0000Dk-C1 for linux-arm-kernel@lists.infradead.org; Fri, 10 Mar 2017 06:28:01 +0000 Received: by mail-pg0-x243.google.com with SMTP id 77so9208482pgc.0 for ; Thu, 09 Mar 2017 22:27:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3jSsfQ9DLKsFRz5412yKJeIThjw08ovQBlZRzZSyixA=; b=PNR98/FMukIK5D0FMWTHxukVrI/sKyj2N7sk2KvcoPok3j1PVCxkS1jNu4Laks1JIO LxHZSbcUJxVFlh5mCJTP4+HBtQ+fM7KfBzar9q8HjDnxu8kOEfTfFAYEn7GmCxNVY4vA n2q7R7J4VOL4Fnqm/0wsZomyzAdiROW3vgh8roSVZ67OXCNJn7X99oZ4t4eNJbwijBVX xGOlyAJZSP8fn4eN3gZILtsTPrjyBXtCDDqPe6uLBnlLS8wwUy2Kbwd1Dlrbod89wHRL 3z/LRZhBaCJsvpD5PSnKLd50HFrZFmTALGorBUHuMlLi445j+klvLHTNeXZPjHh/XVGM O9AA== 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; bh=3jSsfQ9DLKsFRz5412yKJeIThjw08ovQBlZRzZSyixA=; b=Ct9aXL/K8TiNPq9QCQcgfPONcKZefHN3jVLBt7A+h6KHVEpOHZ/ksFO+U3eipxAKJd pPLEW5WGlLQ5wiLoAG73NCpNZoiMEBnjsSa3Ffo/gYpLOpOcSRG8Fc8yRQDvNy63dloj 6LWMSaKgg+JCI2qGhmsAURne3+zCZ11jCwBpwP9KoWJN5oVvz2J/sOIpZQ/h8FL7q+Dv 9Kzz5kZ4KN88aN8siCNJ6+LKVSI2rqtsv9ogMY06j7Jz14YLPbYISMbn+G2lvfHebGYJ g2HQf9KN+n/4jfzd3PGxIAI/Eey+vcinqLKfuLjsPjpARN8iuFMlogtqx2Obquv2ys74 IO4g== X-Gm-Message-State: AMke39lylZ+EHURXkGqglEqBUwgDQClgnxcBLIKzmbJl4RFd59vkoOY2IerEB+0kNFId9Q== X-Received: by 10.99.116.70 with SMTP id e6mr18145234pgn.135.1489127258458; Thu, 09 Mar 2017 22:27:38 -0800 (PST) Received: from localhost.localdomain ([14.141.5.98]) by smtp.gmail.com with ESMTPSA id b195sm16021041pfb.106.2017.03.09.22.27.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Mar 2017 22:27:38 -0800 (PST) From: Anurup M X-Google-Original-From: Anurup M To: robh+dt@kernel.org, mark.rutland@arm.com, will.deacon@arm.com Subject: [PATCH v6 03/11] dt-bindings: perf: hisi: Add Devicetree bindings for Hisilicon SoC PMU Date: Fri, 10 Mar 2017 01:27:27 -0500 Message-Id: <1489127248-112605-1-git-send-email-anurup.m@huawei.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170309_222759_451042_4F3600AE X-CRM114-Status: GOOD ( 14.25 ) 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: dikshit.n@huawei.com, devicetree@vger.kernel.org, wangkefeng.wang@huawei.com, anurupvasu@gmail.com, gabriele.paoloni@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, shyju.pv@huawei.com, linux-kernel@vger.kernel.org, xuwei5@hisilicon.com, linuxarm@huawei.com, zhangshaokun@hisilicon.com, sanil.kumar@hisilicon.com, linux-arm-kernel@lists.infradead.org, shiju.jose@huawei.com, tanxiaojun@huawei.com, anurup.m@huawei.com 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 1) Device tree bindings for Hisilicon SoC PMU. 2) Add example for Hisilicon L3 cache and MN PMU. 3) Add child nodes of L3C and MN in djtag bindings example. Signed-off-by: Anurup M Signed-off-by: Shaokun Zhang Acked-by: Rob Herring --- .../devicetree/bindings/arm/hisilicon/djtag.txt | 25 +++++++ .../devicetree/bindings/arm/hisilicon/pmu.txt | 87 ++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/pmu.txt diff --git a/Documentation/devicetree/bindings/arm/hisilicon/djtag.txt b/Documentation/devicetree/bindings/arm/hisilicon/djtag.txt index fde5bab..5c46a9c 100644 --- a/Documentation/devicetree/bindings/arm/hisilicon/djtag.txt +++ b/Documentation/devicetree/bindings/arm/hisilicon/djtag.txt @@ -27,6 +27,31 @@ Example 1: Djtag for CPU die in HiP07 hisilicon,scl-id = <0x03>; /* All connecting components will appear as child nodes */ + + pmul3c0 { + compatible = "hisilicon,hip07-pmu-l3c-v2"; + hisilicon,module-id = <0x01 0x01>; + }; + + pmul3c1 { + compatible = "hisilicon,hip07-pmu-l3c-v2"; + hisilicon,module-id = <0x02 0x01>; + }; + + pmul3c2 { + compatible = "hisilicon,hip07-pmu-l3c-v2"; + hisilicon,module-id = <0x03 0x01>; + }; + + pmul3c3 { + compatible = "hisilicon,hip07-pmu-l3c-v2"; + hisilicon,module-id = <0x04 0x01>; + }; + + pmumn0 { + compatible = "hisilicon,hip07-pmu-mn-v2"; + hisilicon,module-id = <0x21>; + }; }; Hisilicon HiP05/06/07 djtag for IO die diff --git a/Documentation/devicetree/bindings/arm/hisilicon/pmu.txt b/Documentation/devicetree/bindings/arm/hisilicon/pmu.txt new file mode 100644 index 0000000..ad38cf4 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/hisilicon/pmu.txt @@ -0,0 +1,87 @@ +Hisilicon SoC HiP05/06/07 ARMv8 PMU +=================================== + +The Hisilicon SoC chips like HiP05/06/07 etc. consist of various independent +system device PMUs such as L3 cache (L3C) and Miscellaneous Nodes(MN). These +PMU devices are independent and have hardware logic to gather statistics and +performance information. + +HiSilicon SoC chip is encapsulated by multiple CPU and IO dies. The CPU die +is called as Super CPU cluster (SCCL) which includes 16 cpu-cores. Every SCCL +in HiP05/06/07 chips are further grouped as CPU clusters (CCL) which includes +4 cpu-cores each. +e.g. In the case of HiP05/06/07, each SCCL has 1 L3 cache and 1 MN PMU device. +The L3 cache is further grouped as 4 L3 cache banks in a SCCL. + +The Hisilicon SoC PMU DT node bindings for uncore PMU devices are as below. +For PMU devices like L3 cache. MN etc. which are accessed using the djtag, +the parent node will be the djtag node of the corresponding CPU die (SCCL). + +L3 cache +--------- +The L3 cache is dedicated for each SCCL. Each SCCL in HiP05/06/07 chips have 4 +L3 cache banks. Each L3 cache bank have separate DT nodes. + +Required properties: + + - compatible : This value should be as follows + (a) "hisilicon,hip05-pmu-l3c-v1" for v1 hw in HiP05 chipset + (b) "hisilicon,hip06-pmu-l3c-v1" for v1 hw in HiP06 chipset + (c) "hisilicon,hip07-pmu-l3c-v2" for v2 hw in HiP07 chipset + + - hisilicon,module-id : This property is a combination of two values + in the below order. + a) Module ID: The module identifier for djtag. + b) Instance or Bank ID: This will identify the L3 cache bank + or instance. + + *The counter overflow IRQ is not supported in v1, v2 hardware (HiP05/06/07). + +Miscellaneous Node +------------------ +The MN is dedicated for each SCCL and hence there are separate DT nodes for MN +for each SCCL. + +Required properties: + + - compatible : This value should be as follows + (a) "hisilicon,hip05-pmu-mn-v1" for v1 hw in HiP05 chipset + (b) "hisilicon,hip06-pmu-mn-v1" for v1 hw in HiP06 chipset + (c) "hisilicon,hip07-pmu-mn-v2" for v2 hw in HiP07 chipset + + - hisilicon,module-id : Module ID to input for djtag. + + *The counter overflow IRQ is not supported in v1, v2 hardware (HiP05/06/07). + +Example: + + djtag0: djtag@60010000 { + compatible = "hisilicon,hip07-cpu-djtag-v2"; + reg = <0x0 0x60010000 0x0 0x10000>; + hisilicon,scl-id = <0x03>; + + pmul3c0 { + compatible = "hisilicon,hip07-pmu-l3c-v2"; + hisilicon,module-id = <0x01 0x01>; + }; + + pmul3c1 { + compatible = "hisilicon,hip07-pmu-l3c-v2"; + hisilicon,module-id = <0x02 0x01>; + }; + + pmul3c2 { + compatible = "hisilicon,hip07-pmu-l3c-v2"; + hisilicon,module-id = <0x03 0x01>; + }; + + pmul3c3 { + compatible = "hisilicon,hip07-pmu-l3c-v2"; + hisilicon,module-id = <0x04 0x01>; + }; + + pmumn0 { + compatible = "hisilicon,hip07-pmu-mn-v2"; + hisilicon,module-id = <0x21>; + }; + };