From patchwork Tue Sep 29 15:32:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagar Shrikant Kadam X-Patchwork-Id: 11806291 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1282A112C for ; Tue, 29 Sep 2020 15:33:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A0C2220773 for ; Tue, 29 Sep 2020 15:33:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tH25QASt"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sifive.com header.i=@sifive.com header.b="lgMMMP9Y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0C2220773 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=V0mcNJzqfqIeB8ViLLz+8gZqLgX7/mZPFdVCCmBi4Qc=; b=tH25QAStV4pLeKZ75G8nbZqNH KBfIjnw+zUbBMH/ZOv1+XMeyb+7ejY3ufvJAa7pe2UbbuCLOwJLq9wXhipULk2ZueGffZB0Z6UFX5 mfgrUA9w+tjE4owTJMT44WHqFIfgbsaDKkUtSoRDq1IZjq0JRZSh1AKnraVuEezdWNTNe69uEgNYC WfdIHq9RniPNf456YkeLakFsJSngoBxNkV9HLv8ESH3GTsHkzHxZTePK6G7qshQXc28xqQm9C0cOp +di7eoeRyCR7qfZSEF9URt5FeRJ2DCCo6pGR8vX1z58bR4vIXMu3NidPecaJbubYvoHwgl/f24NHy PJpv8uBcA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNHdA-0003YM-Ry; Tue, 29 Sep 2020 15:33:28 +0000 Received: from mail-bn7nam10on2088.outbound.protection.outlook.com ([40.107.92.88] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNHd8-0003XQ-Vx for linux-riscv@lists.infradead.org; Tue, 29 Sep 2020 15:33:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q9Vw2pfLGqWkXDazY3g3pPWj3LFH90B4zdfJH89Wsl04uOLTc4slj5EKDTVqmsRsBcYLL/8ZqLFQVP0/ZLxlSteYdNtqZM4mVWAS+BxRDMujsgL2hxoVybqOECii2rAwvwJpyzuCQ7kB0nxHyuAF09aKh91Y3eXSHCfkQp5Iv+UjLT7q0N34i4x5ocuOifWkRPSNcth8s6TeOfO7ZElslLqlrcojIeX85rxjjB3cykpqYcI9A2OUv/R40MJ1iq4uCQ/89ePB+Y09WzQTflGkoxBQrhMVzTWCGrtP4N9U4Qprcy9ZBiC5sJ43akkqrjWUjRToMP4RVOIoS58n5xEasw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pVLi3hm8dY8UAaD88swyGcKhsfg8xrioM5NGLIP9jHM=; b=Mq8naD86rqlP+pvEClvThFyY7Z1jigXU+tdCEADQpwTY+y/i+1ILgkXDDItzgy10Mr2s0qgDBhT3hTMJNCYeGqUqu2Kvp0Pr30QnyOTvDNGRpEL43GmQVViLdeRjQOD9v89lt04qd3FP+SilX5kumnFPln+qw0HWAb1+snU84Nk1nEYOTFy1qAkj5gechSPshMetp5WglEow7SE5y7ELLzuklnHgGN402sJybu3o7/4N0J/6+5cTt4cFNWWocEVN+iQTSHBNdNcALBVf7knW9w5a3S89IAidG1RpAqiagwXcP0RWravv2Rdv9CvRIYN35fJdZ3/H9JaGlL0QsjTW1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=openfive.com; dmarc=pass action=none header.from=sifive.com; dkim=pass header.d=sifive.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pVLi3hm8dY8UAaD88swyGcKhsfg8xrioM5NGLIP9jHM=; b=lgMMMP9YhLNvw6lrQX80hUTZLyfpBXO6x2nluI/5gLtAeM3WQM6EttmBQ2c+lgeUmoXpOh/cA9HQ9aaZbgjpZrPrJXMznWj3FSng7RmF9bX5FHFSDgXkSSYCpKXgQLJTyWuIJael8fkumucINaihy8MwulOsi7zBtkmVZkLNz/Q= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=sifive.com; Received: from DM6PR13MB3451.namprd13.prod.outlook.com (2603:10b6:5:1c3::10) by DM6PR13MB2412.namprd13.prod.outlook.com (2603:10b6:5:c3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.14; Tue, 29 Sep 2020 15:33:24 +0000 Received: from DM6PR13MB3451.namprd13.prod.outlook.com ([fe80::a48a:1f7c:267c:876]) by DM6PR13MB3451.namprd13.prod.outlook.com ([fe80::a48a:1f7c:267c:876%7]) with mapi id 15.20.3433.032; Tue, 29 Sep 2020 15:33:24 +0000 From: Sagar Kadam To: linux-clk@vger.kernel.org Subject: [PATCH v2 1/3] dt-bindings: fu540: prci: convert PRCI bindings to json-schema Date: Tue, 29 Sep 2020 21:02:09 +0530 Message-Id: <1601393531-2402-2-git-send-email-sagar.kadam@sifive.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1601393531-2402-1-git-send-email-sagar.kadam@sifive.com> References: <1601393531-2402-1-git-send-email-sagar.kadam@sifive.com> X-Originating-IP: [159.117.144.156] X-ClientProxiedBy: SG2PR02CA0101.apcprd02.prod.outlook.com (2603:1096:4:92::17) To DM6PR13MB3451.namprd13.prod.outlook.com (2603:10b6:5:1c3::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from osubuntu003.open-silicon.com (159.117.144.156) by SG2PR02CA0101.apcprd02.prod.outlook.com (2603:1096:4:92::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3433.32 via Frontend Transport; Tue, 29 Sep 2020 15:33:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eeafea32-6ad6-4c44-75c0-08d8648d0120 X-MS-TrafficTypeDiagnostic: DM6PR13MB2412: X-LD-Processed: 22f88e9d-ae0d-4ed9-b984-cdc9be1529f1,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lSY30/lGufjhArTjubrX8YweZ7f39kMG/tljBmWeTko0SN4yooyh8pJlQbDn2+QeLqdwkORJ2gKOaI2ovPf1zJD6ueU6LaOePaXUFE66IhDZeI7S+STPGL84j5KOR/O/BjPkFSs0aLHrIoOoHRkZOdmddRSKW+yaHJTYuc7pFgKi9vYQV1xjJeYocxnWYnr2jUrUTRv7TSe44mi2jpVN7fhnnvvayTtTkol2O3vTWLmcoIAxfTFObzNyjPDl2tQk8yk7alnqA+oKSJQWAkpo2DHNjrNA0JmiEKX6D0QblkLeWvwVPoQJnk1lOSPv2RdBO1FY+KfA5iIjNfydVDOIwlaNMFPyeRZ5ck0flXn4cuOEs9rUU/nugjn+L+2zS9dCNlNtiOiLzFKzz3NOr1Zn9w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR13MB3451.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(366004)(396003)(346002)(376002)(39850400004)(6512007)(966005)(44832011)(83380400001)(4326008)(66946007)(7416002)(52116002)(8676002)(83080400001)(2906002)(5660300002)(107886003)(6506007)(66476007)(66556008)(83170400001)(6666004)(36756003)(8936002)(2616005)(478600001)(6486002)(956004)(316002)(186003)(16526019)(26005)(42882007)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 5ajK3skSfIGikgPF5RQoSGOya3TpQOIwKt4TIXg561V0mVDDTyAGIEa1uv0dCgaiuVWltyOzjofJuUar/b8eBk2Ek4FqvqQ7ZqysVnCRSmDohalMa+IVFThsK2n98hIsCnvTivnoY9mw9BuUd3ymkczjfzv/MbeIxzZVXZ2FAy6uLSIqGP2RPWEPAKq4leXvadnCzs+zuV7ckO2Jf2lNrbNEIFlkzne16RH1KjexxqxJpVo8Czpcd6JNEuZ5bY1FfqKANGrEX0dEs2rW/q39och3GkS9Gup2Uwjeap7+s8KgZf38SPAMgv6+14/zhoX27oWYVV4VHnZIhu4fw6KTql3FUQo/nJ2vpMjt4klwixg0KBdFERlJ+DceMkN6YuZUhD1gR0o8G/qgNofvofi4j33O+Jdd1vbpAzpwVCWx4+Tz93jEZ/beRz2QoTDA2QFz3SyIw5pAxPblYXNpO2rI+Nnuu8NA4NU7kpkTYaPgBt/er/W/Xo/4Gi3FQzmoJp4PfJYcN+4UaMKFKZNh0CoQ2ZmJfHxx3D1L9ZhjKGo0QdhNl0PNS5gzWLsHHSd4zKM3nELOTMGNx7986KpsrpqvScbBM6xUcQ8KXaUNYY98DGwImtgB9SOFs0m1T7Mqj65QCFg75qKnvVn6dPSyAquw9Q== X-OriginatorOrg: sifive.com X-MS-Exchange-CrossTenant-Network-Message-Id: eeafea32-6ad6-4c44-75c0-08d8648d0120 X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB3451.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2020 15:33:24.7184 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 22f88e9d-ae0d-4ed9-b984-cdc9be1529f1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eoR1K6CU8kZCCkzKiF/nHZiF9rOCdbDRr0egfVpBopy+fhcQO6IpgA/bpf6PXsTCldqMG7r6V+84IiTI/n/DyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB2412 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200929_113327_036750_188D4ACE X-CRM114-Status: GOOD ( 19.04 ) X-Spam-Score: -0.5 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.92.88 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.6 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.92.88 listed in wl.mailspike.net] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, aou@eecs.berkeley.edu, jason@lakedaemon.net, linux-pwm@vger.kernel.org, sboyd@kernel.org, maz@kernel.org, mturquette@baylibre.com, u.kleine-koenig@pengutronix.de, linux-kernel@vger.kernel.org, yash.shah@sifive.com, robh+dt@kernel.org, palmer@dabbelt.com, Sagar Kadam , paul.walmsley@sifive.com, thierry.reding@gmail.com, linux-riscv@lists.infradead.org, lee.jones@linaro.org, tglx@linutronix.de Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org FU540-C000 SoC from SiFive has a PRCI block, here we convert the device tree bindings from txt to YAML. Signed-off-by: Sagar Kadam --- .../bindings/clock/sifive/fu540-prci.txt | 46 ----------------- .../bindings/clock/sifive/fu540-prci.yaml | 60 ++++++++++++++++++++++ 2 files changed, 60 insertions(+), 46 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/sifive/fu540-prci.txt create mode 100644 Documentation/devicetree/bindings/clock/sifive/fu540-prci.yaml diff --git a/Documentation/devicetree/bindings/clock/sifive/fu540-prci.txt b/Documentation/devicetree/bindings/clock/sifive/fu540-prci.txt deleted file mode 100644 index 349808f..0000000 --- a/Documentation/devicetree/bindings/clock/sifive/fu540-prci.txt +++ /dev/null @@ -1,46 +0,0 @@ -SiFive FU540 PRCI bindings - -On the FU540 family of SoCs, most system-wide clock and reset integration -is via the PRCI IP block. - -Required properties: -- compatible: Should be "sifive,-prci". Only one value is - supported: "sifive,fu540-c000-prci" -- reg: Should describe the PRCI's register target physical address region -- clocks: Should point to the hfclk device tree node and the rtcclk - device tree node. The RTC clock here is not a time-of-day clock, - but is instead a high-stability clock source for system timers - and cycle counters. -- #clock-cells: Should be <1> - -The clock consumer should specify the desired clock via the clock ID -macros defined in include/dt-bindings/clock/sifive-fu540-prci.h. -These macros begin with PRCI_CLK_. - -The hfclk and rtcclk nodes are required, and represent physical -crystals or resonators located on the PCB. These nodes should be present -underneath /, rather than /soc. - -Examples: - -/* under /, in PCB-specific DT data */ -hfclk: hfclk { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = <33333333>; - clock-output-names = "hfclk"; -}; -rtcclk: rtcclk { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = <1000000>; - clock-output-names = "rtcclk"; -}; - -/* under /soc, in SoC-specific DT data */ -prci: clock-controller@10000000 { - compatible = "sifive,fu540-c000-prci"; - reg = <0x0 0x10000000 0x0 0x1000>; - clocks = <&hfclk>, <&rtcclk>; - #clock-cells = <1>; -}; diff --git a/Documentation/devicetree/bindings/clock/sifive/fu540-prci.yaml b/Documentation/devicetree/bindings/clock/sifive/fu540-prci.yaml new file mode 100644 index 0000000..c3be1b6 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/sifive/fu540-prci.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2020 SiFive, Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/sifive/fu540-prci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SiFive FU540 Power Reset Clock Interrupt Controller (PRCI) + +maintainers: + - Sagar Kadam + - Paul Walmsley + +description: + On the FU540 family of SoCs, most system-wide clock and reset integration + is via the PRCI IP block. + The clock consumer should specify the desired clock via the clock ID + macros defined in include/dt-bindings/clock/sifive-fu540-prci.h. + These macros begin with PRCI_CLK_. + + The hfclk and rtcclk nodes are required, and represent physical + crystals or resonators located on the PCB. These nodes should be present + underneath /, rather than /soc. + +properties: + compatible: + const: sifive,fu540-c000-prci + + reg: + maxItems: 1 + + clocks: + items: + - description: high frequency clock. + - description: RTL clock. + + clock-names: + items: + - const: hfclk + - const: rtcclk + + "#clock-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - "#clock-cells" + +additionalProperties: false + +examples: + - | + prci: clock-controller@10000000 { + compatible = "sifive,fu540-c000-prci"; + reg = <0x10000000 0x1000>; + clocks = <&hfclk>, <&rtcclk>; + #clock-cells = <1>; + }; From patchwork Tue Sep 29 15:32:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagar Shrikant Kadam X-Patchwork-Id: 11806297 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B4C4F6CA for ; Tue, 29 Sep 2020 15:33:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 46B67207F7 for ; Tue, 29 Sep 2020 15:33:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gGt/Oezz"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sifive.com header.i=@sifive.com header.b="Aftxkgvi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46B67207F7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=pjKc4ZaPu/fj1Lg828Ij4I+/vb+vqY7pZdxe9ydMylo=; b=gGt/OezzMpvEbiQNyBtO5XpFb 2xoSXV9kUwEe8bQrcMtdtwQ5hS7xWbqnZf3u6LYW57hNdvS6+cGg5veC2sXZMDuaSWyHsPbqa99A1 6yOZ2EnVGNAm57zan+eYJrNGhVUfpY1/SpuRYSgnytZbdGJc0fdfo8AjQNgjhdM34iLGc2owukyRy karualeMqyUwgkz2VTU18IUfv2jmdHluEjSMiof1mVaKXpVzdUi38hp+nxy4CCwHpfsC6KaK0iG6w YI1/NYRYHemKAsfjzgbFnzdW8onRU2nk/D8ICNDB/WMZiyVBXEVtoDMSEKQSAEbOovJok9YIsEBz8 BJnFIM/VA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNHdK-0003ja-DQ; Tue, 29 Sep 2020 15:33:38 +0000 Received: from mail-bn7nam10on2073.outbound.protection.outlook.com ([40.107.92.73] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNHdH-0003hS-90 for linux-riscv@lists.infradead.org; Tue, 29 Sep 2020 15:33:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YH63rmnadopM55OpHgJObL+ytpI1jeY+4fue6kEh3yboeQh3hKdEWlfacNCoNdqI5t9Z5VIAnpFcXrBAnf/C4tPAXBgeMRC6mKqZAgAfraTaXTL4Fz5+CjG/hVnz8Zh4sH8Y+7sBEsvzIew90wiJAONrBt4gDahuqO5esef2oXLylfZPPm1UNMxtyckJqp1r0PHEw4Qmf/Yx+69r/L8TQpaEHDsmcC+oGfr+rGvkmhECrggblb6hbRvDJovHMcIMNVMGMxO3e4VnycSMsDPbjf5gtLic6CxtLaG3aw8UUvBa7ERNx+dbI1g08hqsj3Zs8M4MaqirSdFIX9iniWppKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QoIZsdP7InlTxi+nyYDYZW7kYZb9x0R1JD9jtVYi70s=; b=kf2pXsNu9vqzj9Y0VXfrTkPnwSg0Vhlhx/3AbOc4kIQg3V4lDdHjrFzVjQMQyKvc5vn4S5os1d6RM1a3Xt/4XkRzepVt74msxhgyRW+VOXtw6aWOVktjU5Kpiy59HZlbWo+b99LuDsk2xp+y7xPyBJ9NSLucZBYJsSvtRTFiKbjscEqYcqVX71CrKFD+UmeEPvBVjYDHSe5Z8ZW6XpRvbLAJ5rkDJn42d/XeHf3AH/9owju1KvRc/G+YiZUX4wWXk3/J2ltMI7CBHjXXtoS2nrNvDT4tDZQ8zK6COsAhq0TvjC8XeScNsD+VAl5kl38JqBb150cF8gpc0BdGaC7EGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=openfive.com; dmarc=pass action=none header.from=sifive.com; dkim=pass header.d=sifive.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QoIZsdP7InlTxi+nyYDYZW7kYZb9x0R1JD9jtVYi70s=; b=AftxkgviHoYOVMA1dcVnRwL5iPFx2qJHlaq0ZMG5fVBCEVdJyHse4E4d2k8uYZpeZy3VeHCRF0I+g8WU8+BE+gU1XDdCYpcVWrq2APYBU1eXxhDFPkYR84qV1b5T4VOfpIYZU6drdIpf/9emN/Vd4/wFGz9+c061Wt63RByVXsw= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=sifive.com; Received: from DM6PR13MB3451.namprd13.prod.outlook.com (2603:10b6:5:1c3::10) by DM6PR13MB2412.namprd13.prod.outlook.com (2603:10b6:5:c3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.14; Tue, 29 Sep 2020 15:33:33 +0000 Received: from DM6PR13MB3451.namprd13.prod.outlook.com ([fe80::a48a:1f7c:267c:876]) by DM6PR13MB3451.namprd13.prod.outlook.com ([fe80::a48a:1f7c:267c:876%7]) with mapi id 15.20.3433.032; Tue, 29 Sep 2020 15:33:33 +0000 From: Sagar Kadam To: linux-clk@vger.kernel.org Subject: [PATCH v2 2/3] dt-bindings: riscv: convert plic bindings to json-schema Date: Tue, 29 Sep 2020 21:02:10 +0530 Message-Id: <1601393531-2402-3-git-send-email-sagar.kadam@sifive.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1601393531-2402-1-git-send-email-sagar.kadam@sifive.com> References: <1601393531-2402-1-git-send-email-sagar.kadam@sifive.com> X-Originating-IP: [159.117.144.156] X-ClientProxiedBy: SG2PR02CA0101.apcprd02.prod.outlook.com (2603:1096:4:92::17) To DM6PR13MB3451.namprd13.prod.outlook.com (2603:10b6:5:1c3::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from osubuntu003.open-silicon.com (159.117.144.156) by SG2PR02CA0101.apcprd02.prod.outlook.com (2603:1096:4:92::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3433.32 via Frontend Transport; Tue, 29 Sep 2020 15:33:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f4cde846-e206-4cf6-0533-08d8648d062f X-MS-TrafficTypeDiagnostic: DM6PR13MB2412: X-LD-Processed: 22f88e9d-ae0d-4ed9-b984-cdc9be1529f1,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N8ZkMeF0IGEJqmgYlEjYddVFdJoAHat3FyVL/BGJWBuWkIoFqJVy8kDiMMRq27q9FLXEs0haQmTbgftpvdY5QvwDX5Myy3uqq0Lqpc5R2IRgD1A+rAonLI7C1mFOgUGUg1KVoTc6mu0Ky35MBXXwxYfFZ+5Gdd4hnmVMc05Kv/enArgdUp5fmG5e8giMsHbMtvUxI714GU7EbPqHngJDO5V7WULodxN8jXMX7XsIUPkpG/l/TM7/DmPqafdHf31nvpRHSMhkJEEedMmRLL8WnBijJOP1PfeOkdmiUAgbrlDXsjpwnyNgI33IlqEJbZhGIxEvyqI+6lH0S70ok2PkNnpTSgGcl44NEDAVN1F3t9stsSXuP1693WGrqJFy0Wkwgm8psOpnU+E2gELBl2iEPQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR13MB3451.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(366004)(396003)(346002)(376002)(39850400004)(6512007)(966005)(44832011)(83380400001)(4326008)(66946007)(7416002)(52116002)(8676002)(83080400001)(2906002)(5660300002)(107886003)(6506007)(66476007)(66556008)(83170400001)(6666004)(36756003)(8936002)(2616005)(478600001)(6486002)(956004)(316002)(186003)(16526019)(26005)(42882007)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: ybG+ME/Jx1lvmG+xSxGUNyUFfJLzUf0bu2mFJ8GfPdm+T1BhlTA1TJkAI+vpItkVBGj3qvHpv7qImJuxnlTgxLjEeCh9T8fVqnB+IfK66aylyBuXD7wpLtDvjFaLmTq1FQ49cWzuNkSvUGrkTVb559dH/GXHGEOLJhkiF9zyJDNUqPEdjjolJKoYT9AYFYGBHoXDKsLh0sX8pAl5WVP07nHOMQVsAD7Ge+6Ri2YZ+JbvtEnzFl47z5NQktr07KDdjYVZ9wiUiaAVZsMF1DoLhbvfakavm4Tvm9vWWl79Qt8d4w27uyDA3yB9Mo5fQrLnVQ0dVGb+StgGidAG2gceixsocMnbNdEpIdObpjCWuGvaZcXRwPXBJ+0aa24I1wEQxnjcR5wXWWOoyXynsEWHZMuRIoOhnYJ0qfbY482CNcPe7iavc3sxdZwvkqJe10k9bRGMw/O4vL6z1MeqHwKpBZIC7k6paplybA/ePzx0/oNnZNWXofOuR/u6B6mi0rRUYvWFw4MTPTMkSTJpbTyn+IKCs1mZtrdAYs2bLlMd04uHMm+IYQsN/wIwbTqe2dhacgOfxfUVJkqWfHNSqpuMd5KTqAay1Utyyziglp7Xqpxei6Q/CKC9AVUzfscVjbmICXwtY1ACmFln7zwACvjL3w== X-OriginatorOrg: sifive.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4cde846-e206-4cf6-0533-08d8648d062f X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB3451.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2020 15:33:33.1375 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 22f88e9d-ae0d-4ed9-b984-cdc9be1529f1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OWYzfbzJzvgHYqOE1yl/+UP7d6uaA3zDXnboOMyCCFMPewGI8/TB40KMwH2uOs4W9zIH3XvRON3OCFjZBYbx2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB2412 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200929_113335_339317_2CD6CE2F X-CRM114-Status: GOOD ( 22.24 ) X-Spam-Score: -0.5 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.92.73 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.6 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.92.73 listed in wl.mailspike.net] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, aou@eecs.berkeley.edu, jason@lakedaemon.net, linux-pwm@vger.kernel.org, sboyd@kernel.org, maz@kernel.org, mturquette@baylibre.com, u.kleine-koenig@pengutronix.de, linux-kernel@vger.kernel.org, yash.shah@sifive.com, robh+dt@kernel.org, palmer@dabbelt.com, Sagar Kadam , paul.walmsley@sifive.com, thierry.reding@gmail.com, linux-riscv@lists.infradead.org, lee.jones@linaro.org, tglx@linutronix.de Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org Convert device tree bindings for SiFive's PLIC to YAML format Signed-off-by: Sagar Kadam --- .../interrupt-controller/sifive,plic-1.0.0.txt | 58 ------------- .../interrupt-controller/sifive,plic-1.0.0.yaml | 97 ++++++++++++++++++++++ 2 files changed, 97 insertions(+), 58 deletions(-) delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.txt create mode 100644 Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.txt b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.txt deleted file mode 100644 index 6adf7a6..0000000 --- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.txt +++ /dev/null @@ -1,58 +0,0 @@ -SiFive Platform-Level Interrupt Controller (PLIC) -------------------------------------------------- - -SiFive SOCs include an implementation of the Platform-Level Interrupt Controller -(PLIC) high-level specification in the RISC-V Privileged Architecture -specification. The PLIC connects all external interrupts in the system to all -hart contexts in the system, via the external interrupt source in each hart. - -A hart context is a privilege mode in a hardware execution thread. For example, -in an 4 core system with 2-way SMT, you have 8 harts and probably at least two -privilege modes per hart; machine mode and supervisor mode. - -Each interrupt can be enabled on per-context basis. Any context can claim -a pending enabled interrupt and then release it once it has been handled. - -Each interrupt has a configurable priority. Higher priority interrupts are -serviced first. Each context can specify a priority threshold. Interrupts -with priority below this threshold will not cause the PLIC to raise its -interrupt line leading to the context. - -While the PLIC supports both edge-triggered and level-triggered interrupts, -interrupt handlers are oblivious to this distinction and therefore it is not -specified in the PLIC device-tree binding. - -While the RISC-V ISA doesn't specify a memory layout for the PLIC, the -"sifive,plic-1.0.0" device is a concrete implementation of the PLIC that -contains a specific memory layout, which is documented in chapter 8 of the -SiFive U5 Coreplex Series Manual . - -Required properties: -- compatible : "sifive,plic-1.0.0" and a string identifying the actual - detailed implementation in case that specific bugs need to be worked around. -- #address-cells : should be <0> or more. -- #interrupt-cells : should be <1> or more. -- interrupt-controller : Identifies the node as an interrupt controller. -- reg : Should contain 1 register range (address and length). -- interrupts-extended : Specifies which contexts are connected to the PLIC, - with "-1" specifying that a context is not present. Each node pointed - to should be a riscv,cpu-intc node, which has a riscv node as parent. -- riscv,ndev: Specifies how many external interrupts are supported by - this controller. - -Example: - - plic: interrupt-controller@c000000 { - #address-cells = <0>; - #interrupt-cells = <1>; - compatible = "sifive,plic-1.0.0", "sifive,fu540-c000-plic"; - interrupt-controller; - interrupts-extended = < - &cpu0-intc 11 - &cpu1-intc 11 &cpu1-intc 9 - &cpu2-intc 11 &cpu2-intc 9 - &cpu3-intc 11 &cpu3-intc 9 - &cpu4-intc 11 &cpu4-intc 9>; - reg = <0xc000000 0x4000000>; - riscv,ndev = <10>; - }; diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml new file mode 100644 index 0000000..b9a61c9 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml @@ -0,0 +1,97 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +# Copyright (C) 2020 SiFive, Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interrupt-controller/sifive,plic-1.0.0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SiFive Platform-Level Interrupt Controller (PLIC) + +description: + SiFive SOCs include an implementation of the Platform-Level Interrupt Controller + (PLIC) high-level specification in the RISC-V Privileged Architecture + specification. The PLIC connects all external interrupts in the system to all + hart contexts in the system, via the external interrupt source in each hart. + + A hart context is a privilege mode in a hardware execution thread. For example, + in an 4 core system with 2-way SMT, you have 8 harts and probably at least two + privilege modes per hart; machine mode and supervisor mode. + + Each interrupt can be enabled on per-context basis. Any context can claim + a pending enabled interrupt and then release it once it has been handled. + + Each interrupt has a configurable priority. Higher priority interrupts are + serviced first. Each context can specify a priority threshold. Interrupts + with priority below this threshold will not cause the PLIC to raise its + interrupt line leading to the context. + + While the PLIC supports both edge-triggered and level-triggered interrupts, + interrupt handlers are oblivious to this distinction and therefore it is not + specified in the PLIC device-tree binding. + + While the RISC-V ISA doesn't specify a memory layout for the PLIC, the + "sifive,plic-1.0.0" device is a concrete implementation of the PLIC that + contains a specific memory layout, which is documented in chapter 8 of the + SiFive U5 Coreplex Series Manual . + +maintainers: + - Sagar Kadam + - Paul Walmsley + - Palmer Dabbelt + +properties: + compatible: + items: + - const: sifive,fu540-c000-plic + - const: sifive,plic-1.0.0 + + reg: + maxItems: 1 + + '#address-cells': + const: 0 + + '#interrupt-cells': + const: 1 + + interrupt-controller: true + + interrupts-extended: + minItems: 1 + description: + Specifies which contexts are connected to the PLIC, with "-1" specifying + that a context is not present. Each node pointed to should be a + riscv,cpu-intc node, which has a riscv node as parent. + + riscv,ndev: + $ref: "/schemas/types.yaml#/definitions/uint32" + description: + Specifies how many external interrupts are supported by this controller. + +required: + - compatible + - '#address-cells' + - '#interrupt-cells' + - interrupt-controller + - reg + - interrupts-extended + - riscv,ndev + +additionalProperties: false + +examples: + - | + plic: interrupt-controller@c000000 { + #address-cells = <0>; + #interrupt-cells = <1>; + compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0"; + interrupt-controller; + interrupts-extended = < + &cpu0_intc 11 + &cpu1_intc 11 &cpu1_intc 9 + &cpu2_intc 11 &cpu2_intc 9 + &cpu3_intc 11 &cpu3_intc 9 + &cpu4_intc 11 &cpu4_intc 9>; + reg = <0xc000000 0x4000000>; + riscv,ndev = <10>; + }; From patchwork Tue Sep 29 15:32:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagar Shrikant Kadam X-Patchwork-Id: 11806301 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1EEE7112C for ; Tue, 29 Sep 2020 15:33:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AFCCA20773 for ; Tue, 29 Sep 2020 15:33:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="t3T3tiuq"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sifive.com header.i=@sifive.com header.b="JcvSrAfs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFCCA20773 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=81u5bEaCzmVdt0AHcYn/UD4Tp8VUYKFlIPn/qmF2Dmc=; b=t3T3tiuqmeFytnpWl2DFl7Nyd MUkqfxTnIF+f5iroQiG/ryDXN2ZqAGQGiT0pfzBFfMrI9q3Q0avOSEZyWVEaN/rabyyD+Vqk7sbkJ Xih6tODsUjFiPqi++YPtCq6nkdffeY10PFPce4bx18DIx9atnzI3EMLpWTFEljKsbOkqszTt6ICB1 Pb9fohVUOLjjcXN9qfz7w1+sUjvCwoLJeJzPxeaLBkgESDJXSF4NOwPL3O6msIu/3eohsQTsKIeF8 oN1x7YISkoBrbiELyTBa7QHSZsWq8gFU4CMo5JBzxfGdJWzB9TrYVEKutiQj3rxiPLjnZ2+uNz1/2 hdP8NZL6w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNHdT-0003ms-6E; Tue, 29 Sep 2020 15:33:47 +0000 Received: from mail-bn7nam10on2066.outbound.protection.outlook.com ([40.107.92.66] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNHdP-0003kx-Se for linux-riscv@lists.infradead.org; Tue, 29 Sep 2020 15:33:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cjpv92j2oo3ZdGNqg/LcfOJsCjgvs8e5JM5Jyow7/aUyt1SJRNo5buR5DeisX8QAcb3D1twXwfUA7TXXN1RTw5mu4+8iF1tnPGWv09pfh29FkEKPUXpGAJYZms1A3qkRdkgaN8skMLiryi2llsGxBXEn069IiURCsNomQNn5TSyACkOkB46EU1CMGrQoFU9A23vIBwaf7g2J/De2NSNHSsY97HVG9NUxFGtpIWNlPSdygw+H9j9Z83qUtpcKezhE1d98C1g3K8UehNW2KQ0YmaewMZPA9Nbnq+Rk3DCCZ9eZTTrDkZxgT7gmthyQqERTtv5tY4OSkwaRo7tkvBAIDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u3Ulm3ee2XLjQQ6jk3sWu1TMLDoYUWn2nb7NWclCEnU=; b=aD76apwZAa2eWLq3i5rnPefnHfNJ4fpBeIgBrQyDnD8MDokJDv3zYL6lf9Zar25eXQQvf5SS69aoHh7N5LqPq8U7wCxW2NFsmcLtoxF31+8uavxAbKUD3DHHhveqr13xn2S2HDEzOrXNWGvU/peLLXkbPMxRlgDy7gELrRKg0bWhqQDv7tcjgNaay49P0DqBXYwxLjF5rHbXqsGqhvj1sUTFAT7+V9l5OK5GrSQKdHb5enHnJmx1rReXW+rjSRN5WUFyJZo/mM4+KBxxGVwdkQnLc6inbni2JPAoK+Ha6IUG0P0Lsspp8FghpGHqXNHdAA+6FzZFtVY6uI0Sj8/zdA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=openfive.com; dmarc=pass action=none header.from=sifive.com; dkim=pass header.d=sifive.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u3Ulm3ee2XLjQQ6jk3sWu1TMLDoYUWn2nb7NWclCEnU=; b=JcvSrAfsqK0otYPTY1hjikjfQbOPRP4lOvRm4T3NIurJc/WjY39SIxPFhrzo6fclW1XTidhoLOPe0BfvqlXJ/1sCcoEFVo/4XNDZ/sH5b7BdPPMAV6foM1kcym84UIbEfmg/nOZaUbxFNm3PRfgEVD+GNMoke8HoU5oEtkWB2wE= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=sifive.com; Received: from DM6PR13MB3451.namprd13.prod.outlook.com (2603:10b6:5:1c3::10) by DM6PR13MB2412.namprd13.prod.outlook.com (2603:10b6:5:c3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.14; Tue, 29 Sep 2020 15:33:41 +0000 Received: from DM6PR13MB3451.namprd13.prod.outlook.com ([fe80::a48a:1f7c:267c:876]) by DM6PR13MB3451.namprd13.prod.outlook.com ([fe80::a48a:1f7c:267c:876%7]) with mapi id 15.20.3433.032; Tue, 29 Sep 2020 15:33:41 +0000 From: Sagar Kadam To: linux-clk@vger.kernel.org Subject: [PATCH v2 3/3] dt-bindings: riscv: convert pwm bindings to json-schema Date: Tue, 29 Sep 2020 21:02:11 +0530 Message-Id: <1601393531-2402-4-git-send-email-sagar.kadam@sifive.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1601393531-2402-1-git-send-email-sagar.kadam@sifive.com> References: <1601393531-2402-1-git-send-email-sagar.kadam@sifive.com> X-Originating-IP: [159.117.144.156] X-ClientProxiedBy: SG2PR02CA0101.apcprd02.prod.outlook.com (2603:1096:4:92::17) To DM6PR13MB3451.namprd13.prod.outlook.com (2603:10b6:5:1c3::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from osubuntu003.open-silicon.com (159.117.144.156) by SG2PR02CA0101.apcprd02.prod.outlook.com (2603:1096:4:92::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3433.32 via Frontend Transport; Tue, 29 Sep 2020 15:33:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 39f21467-2767-4cf2-259f-08d8648d0aaf X-MS-TrafficTypeDiagnostic: DM6PR13MB2412: X-LD-Processed: 22f88e9d-ae0d-4ed9-b984-cdc9be1529f1,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xyKLjQnNOW1/MqAb8gRuzDsxVBaNrV6Qlm3IFTcJ/Yo5fTJLLv4S8xYZO/wsy/cg4VBZ+l7+Qma8mFpimBScUqnQkxregIO1+4TGD8d9iaHTq8PKsFQFhunx3EirTEAc/oR9Yjwba19ZyKlHiIa8k2XsFjgalSzP6lS28nddbcHF1e5dpBwobU10Vnv0BWe3pOOnzR4Vib5JZ9azAhsBdnsqMfwWF1L0TheZ5yChop4vv0G2MNNG268KleScnLFfU38prJQrsU6A0YyQEz35DJb2S2f07elKF45UBUcv3IK8l78y09UPIA2ZveWvdHeicqIX2ApdVEfObVu3UIWLolo3Giyg5Egu1SiadfFTqcVQGQWS8cz1CjFXgmDhTuqMsCCK3sA3Gn6SiVG8VxBVhA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR13MB3451.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(366004)(396003)(346002)(376002)(39850400004)(6512007)(966005)(44832011)(83380400001)(4326008)(66946007)(7416002)(52116002)(8676002)(83080400001)(2906002)(5660300002)(107886003)(6506007)(66476007)(66556008)(83170400001)(6666004)(36756003)(8936002)(2616005)(478600001)(6486002)(956004)(316002)(186003)(16526019)(26005)(42882007)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: ZsBFYqPpdmZxxdGC2lnOVLn6r/VS4QRy/wcw/c8D1WLrG56onY0AWMk4swRRldhV4zcUXoKLFZaSYTMeOfbr+iMxdYPBECX7jTi6ZeRVVdUSOXsyumtLJaMFPWGw0JC3BARXKY6RwNTfvLnVzsmd3TSnatIKYUZRDnj7o0koUfIOQCTdDYdSwLYfIf1ND2baLOTiWKzWgtgLeSz8VA67CPCH4F2PhV8+wYyilii/iiH+XLxs9D28uyc61QDhRzv9Bzlr5zdnUjww8422cnApxF3nRxFq6HJMdaXfJa4G0k3B2XSku4BqCz1KzAl9L31qsw7BeLPasEKNXhs9qYgr/jyJX3Vd8fLT52C7DTk0UPeiZ8Q81YXSR88jrISz5w1ZKZIxwds+999pVDKcsCL3o3K24XfZXcAbL7wx5KfptxGjsq5UTzWc/He3jg/2UVi62QoLEIVlPE8DGHIFWiG8Y81kx8e5pDlwEu6yZbxliQiu/qLlI+UCJUKh47KITgbdCnBsRzlpLJ3evd40ZnqHc2QTvlEQ9jghVAZvDMDSorvSGQ9CP8YQFQz8nzmkZXk1NVSnz++C+ywAr1QyDj0HRooAaKrAzUzx7g5JPWkSOYZANu83a/LqtzIZF5gmkL8Zk7+cjrVtY3egaP9ipC39TA== X-OriginatorOrg: sifive.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39f21467-2767-4cf2-259f-08d8648d0aaf X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB3451.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2020 15:33:40.8300 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 22f88e9d-ae0d-4ed9-b984-cdc9be1529f1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: snonmJ+CmwWVMKYBqLN3NUxQWzQ1WxZ31NpJQ98DByYbJEHhp2KEDNm40AY3YkF1ML4UxVUnCkY+6jiZ6q03SA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB2412 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200929_113343_937388_E843FBE4 X-CRM114-Status: GOOD ( 18.24 ) X-Spam-Score: -0.5 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.92.66 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.6 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.92.66 listed in wl.mailspike.net] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, aou@eecs.berkeley.edu, jason@lakedaemon.net, linux-pwm@vger.kernel.org, sboyd@kernel.org, maz@kernel.org, mturquette@baylibre.com, u.kleine-koenig@pengutronix.de, linux-kernel@vger.kernel.org, yash.shah@sifive.com, robh+dt@kernel.org, palmer@dabbelt.com, Sagar Kadam , paul.walmsley@sifive.com, thierry.reding@gmail.com, linux-riscv@lists.infradead.org, lee.jones@linaro.org, tglx@linutronix.de Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org Convert device tree bindings for SiFive's PWM controller to YAML format. Signed-off-by: Sagar Kadam --- .../devicetree/bindings/pwm/pwm-sifive.txt | 33 ----------- .../devicetree/bindings/pwm/pwm-sifive.yaml | 69 ++++++++++++++++++++++ 2 files changed, 69 insertions(+), 33 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-sifive.txt create mode 100644 Documentation/devicetree/bindings/pwm/pwm-sifive.yaml diff --git a/Documentation/devicetree/bindings/pwm/pwm-sifive.txt b/Documentation/devicetree/bindings/pwm/pwm-sifive.txt deleted file mode 100644 index 3d1dd7b0..0000000 --- a/Documentation/devicetree/bindings/pwm/pwm-sifive.txt +++ /dev/null @@ -1,33 +0,0 @@ -SiFive PWM controller - -Unlike most other PWM controllers, the SiFive PWM controller currently only -supports one period for all channels in the PWM. All PWMs need to run at -the same period. The period also has significant restrictions on the values -it can achieve, which the driver rounds to the nearest achievable period. -PWM RTL that corresponds to the IP block version numbers can be found -here: - -https://github.com/sifive/sifive-blocks/tree/master/src/main/scala/devices/pwm - -Required properties: -- compatible: Should be "sifive,-pwm" and "sifive,pwm". - Supported compatible strings are: "sifive,fu540-c000-pwm" for the SiFive - PWM v0 as integrated onto the SiFive FU540 chip, and "sifive,pwm0" for the - SiFive PWM v0 IP block with no chip integration tweaks. - Please refer to sifive-blocks-ip-versioning.txt for details. -- reg: physical base address and length of the controller's registers -- clocks: Should contain a clock identifier for the PWM's parent clock. -- #pwm-cells: Should be 3. See pwm.yaml in this directory - for a description of the cell format. -- interrupts: one interrupt per PWM channel - -Examples: - -pwm: pwm@10020000 { - compatible = "sifive,fu540-c000-pwm", "sifive,pwm0"; - reg = <0x0 0x10020000 0x0 0x1000>; - clocks = <&tlclk>; - interrupt-parent = <&plic>; - interrupts = <42 43 44 45>; - #pwm-cells = <3>; -}; diff --git a/Documentation/devicetree/bindings/pwm/pwm-sifive.yaml b/Documentation/devicetree/bindings/pwm/pwm-sifive.yaml new file mode 100644 index 0000000..5ac2527 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-sifive.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2020 SiFive, Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/pwm-sifive.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SiFive PWM controller + +maintainers: + - Yash Shah + - Sagar Kadam + - Paul Walmsley + +description: + Unlike most other PWM controllers, the SiFive PWM controller currently + only supports one period for all channels in the PWM. All PWMs need to + run at the same period. The period also has significant restrictions on + the values it can achieve, which the driver rounds to the nearest + achievable period. PWM RTL that corresponds to the IP block version + numbers can be found here - + + https://github.com/sifive/sifive-blocks/tree/master/src/main/scala/devices/pwm + +properties: + compatible: + items: + - const: sifive,fu540-c000-pwm + - const: sifive,pwm0 + description: + Should be "sifive,-pwm" and "sifive,pwm". Supported + compatible strings are "sifive,fu540-c000-pwm" for the SiFive PWM v0 + as integrated onto the SiFive FU540 chip, and "sifive,pwm0" for the + SiFive PWM v0 IP block with no chip integration tweaks. + Please refer to sifive-blocks-ip-versioning.txt for details. + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + "#pwm-cells": + const: 3 + + interrupts: + maxItems: 4 + description: + Each PWM instance in FU540-C000 has 4 comparators. One interrupt per comparator. + +required: + - compatible + - reg + - clocks + - "#pwm-cells" + - interrupts + +additionalProperties: false + +examples: + - | + pwm: pwm@10020000 { + compatible = "sifive,fu540-c000-pwm", "sifive,pwm0"; + reg = <0x10020000 0x1000>; + clocks = <&tlclk>; + interrupt-parent = <&plic>; + interrupts = <42>, <43>, <44>, <45>; + #pwm-cells = <3>; + };