From patchwork Thu Sep 10 10:44:02 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: 1361468 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-pwm-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=selector1 header.b=A5DZnhuj; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4BnFvb2G23z9sTd for ; Thu, 10 Sep 2020 20:47:23 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730256AbgIJKrJ (ORCPT ); Thu, 10 Sep 2020 06:47:09 -0400 Received: from mail-dm6nam12on2075.outbound.protection.outlook.com ([40.107.243.75]:54274 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730309AbgIJKpH (ORCPT ); Thu, 10 Sep 2020 06:45:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yjy0HS5G36unS4bTJm1hEvy2mSKtc8q1lH9Q7sYino1L/FY8zVqrFEASOJFDVJuabutFuHzGs1C7W6jmUAhEMIA6BYajTiZTsBhxz02VgzMYY3D84mQurBfSVFGUJRF+wBAAO+MJWW5UT5CCbPnjB8XTXLfvnBPUROKItO4POYhU22m81d2guLFJ3idSvlAKeXHLtbddyr0Ay71UyeEf9fYhJgS3QG7ttubj/nqaj3ovhZ3XvmA0Ke9cN6MIATQVo7DkEO3eXHeRParfSLZO6GxFRuFp4ZvZSy8c/kDgXYT+ml6UwoIt/WQ6Bbb+MHmtUsk4mhtnQyth79wuLbQIwA== 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=C/Y5UFAS8jg3hwNSRezgrUk3SZSrwCM5pFV1VsZZCQI=; b=XrBnKt7RMaPlFReVL48VJEWPz1/M9G8WQt1OU/+XZB5EoTt6R9XO8Itm/vTs7X3wnpg9Swz18cjS5Bmo/bSQ5Q2oXuRfe9EdEF526hZmGzKK7jn3dtVtxgkmTvfEQyqnpp9Zz2Xbdjh3DPccTkNR89Ih4Tu1jYr+v+3Vjx1rZx/zp5vR6hlY5C8IzRMEc7kT4UNfs8V4nbDKSGBUCsbW5Osk8BQCE690zxj+TxDx3LY25ItqA/x4UEbdz2c0BZZbLeDSZVXHXkHC/meGL8nOF5EvXdHjHR3l92So2LYGaCAaBYIOQt43HKh57cpeJmIXsdZVJwaU+rBfcHxTLzLNNw== 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=C/Y5UFAS8jg3hwNSRezgrUk3SZSrwCM5pFV1VsZZCQI=; b=A5DZnhujmkNu74Ghz6Jk3NKlqXTyrOulr6GRI83465llCTEp1jBbDvx7xn8dPlvDQLemRXPP7hEGVNIxlImr8tZUg/31qiHCm2dx8eOcbDVK1ZQAfyNVCY/Esx9OvCIWZBGpk2RSMPhoyXdSd/F1r2lfi/rOoOEUWuH/fCVt6z8= 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 DM5PR1301MB2106.namprd13.prod.outlook.com (2603:10b6:4:32::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.5; Thu, 10 Sep 2020 10:44:32 +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.3370.016; Thu, 10 Sep 2020 10:44:32 +0000 From: Sagar Kadam To: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org Cc: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, tglx@linutronix.de, jason@lakedaemon.net, maz@kernel.org, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, lee.jones@linaro.org, aou@eecs.berkeley.edu, yash.shah@sifive.com, Sagar Kadam Subject: [PATCH v1 1/3] dt-bindings: fu540: prci: convert PRCI bindings to json-schema Date: Thu, 10 Sep 2020 16:14:02 +0530 Message-Id: <1599734644-4791-2-git-send-email-sagar.kadam@sifive.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1599734644-4791-1-git-send-email-sagar.kadam@sifive.com> References: <1599734644-4791-1-git-send-email-sagar.kadam@sifive.com> X-ClientProxiedBy: BMXPR01CA0087.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:54::27) 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 BMXPR01CA0087.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:54::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3326.19 via Frontend Transport; Thu, 10 Sep 2020 10:44:26 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [159.117.144.156] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: efee3447-8780-43a4-a909-08d85576801d X-MS-TrafficTypeDiagnostic: DM5PR1301MB2106: 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: ncxYyA2RS9/LZ7/7Z22wEsDQpkNVPp+Ro1qeG2pIvBDjK0U68Y5YkrO87ilufXfYpD3g3wXgOqQJK9zMWPEo3XmQ09o6BfhcTE80/Cs8x42h2r5OS7o+6X6+6ez5QV6ApxFGvZjqbM/pcl3LnPZoU0Hr+tQ1IHTin11gMAhsxcS74eh1a9r42nKsSlCT2MCdCRhiGJx2z+GUa8yFZC8Kba/ooVmwY5YCQFjtOId2NxGlBlhRILe/sbvhHrbpFbmZYjfAzKH5ofKKpLKE1MED3o/mYBWesm8zWs7eEu6O3ZH32W0aSdfyFwJtBmfs6hTxE1gt9uiu1DcLmVTznM0TjiD6+LDvivagWILj7wVhc2r8ulwmwTax3qUaCKNtFA1PWu8scFJ249do5yz4oqDilA== 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:(39850400004)(346002)(376002)(136003)(366004)(396003)(6666004)(6512007)(316002)(26005)(966005)(8676002)(6486002)(66556008)(66476007)(52116002)(2616005)(956004)(186003)(66946007)(5660300002)(4326008)(42882007)(107886003)(8936002)(36756003)(2906002)(478600001)(83380400001)(6506007)(83170400001)(7416002)(16526019)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: gT2Ybo/8DLkJMLa+h3uxKQymENYb5G1OTOMAJoFE6GXJbV7jLWrQhebrBo9CeFZRGGM0xlnvEH3bxCM8u+vr6kWMChZUObIdxkGDj9e7xyppp3sxQhvjl0LfOKcmjMPU5kseF8TdiEvWVbuJJKwiIAxWYhF1qR51+LBjlVD86/3egxTiRDHwH/zR9qp70Wbk34vji3mV9eQVJspu+hJeJrphcWtH8KDMbNTGwW+BgpVUPWF9VMu4Y6X+lx1JAHmjBR0DApUsBq9EN704+ynN6IpH2WHQ/PN7/3sqN+5vHZGb4b7oGbKzFcmzHFz3NYgLb483Y30lVCPdzZB6jJOU1QrFS91rq5+Qe4g7asnuPZLCCKCGR6e3gTef1swt0S9O9VSoJ/Ze+ovcSQVZKLD9lOXsBT4C5I0B5njzmPndtv7uL78xk0/iWKksplrHlBE6LNKMnqx55FBELuvFv/6iwTvSvN4Dwbl+OKosMmVmogjtm/FV4rjNl/DzTXRKs/8vKoNjs6qSVZhkxlFHCL1AgGoznoPwpsv3xeHvWGhcImRPjOVWRX+8D0qa1LYS7NsVS320mK5i3PdHsBW3hPPte1uuG0vWmwlmNGXUKbzbjDhL3q23yBijg8SiofVJqJbSw8CS4AGpFbC0TwO4YmbzhQ== X-OriginatorOrg: sifive.com X-MS-Exchange-CrossTenant-Network-Message-Id: efee3447-8780-43a4-a909-08d85576801d X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB3451.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2020 10:44:31.8863 (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: XFKbIT7/FdOkiJsEZPFfb2GZl2fBsSqDjInXUtfsSL0AMvaxInV9MCaRmbzSOqv4tbOV0ZEu5h9BAvYiAXHX2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1301MB2106 Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.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 | 75 ++++++++++++++++++++++ 2 files changed, 75 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..49386cd --- /dev/null +++ b/Documentation/devicetree/bindings/clock/sifive/fu540-prci.yaml @@ -0,0 +1,75 @@ +# 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: + enum: + - sifive,fu540-c000-prci + description: + Should have "sifive,-prci", only one value is supported + + reg: + maxItems: 1 + description: Describe the PRCI's register target physical address region + + clocks: + description: + 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": + const: 1 + +required: + - compatible + - reg + - clocks + - "#clock-cells" + +additionalProperties: false + +examples: + - | + //hfclk and rtcclk present 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 = <0x10000000 0x1000>; + clocks = <&hfclk>, <&rtcclk>; + #clock-cells = <1>; + }; From patchwork Thu Sep 10 10:44:03 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: 1361474 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-pwm-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=selector1 header.b=C759Uyjl; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4BnFz36SvKz9sPB for ; Thu, 10 Sep 2020 20:50:23 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728015AbgIJKuQ (ORCPT ); Thu, 10 Sep 2020 06:50:16 -0400 Received: from mail-co1nam11on2077.outbound.protection.outlook.com ([40.107.220.77]:61697 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730177AbgIJKon (ORCPT ); Thu, 10 Sep 2020 06:44:43 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bgV+4+KyGh3BiLjgq0f++tuPwWkk9POvfqmDtPfh4LE652/WAK2YhYRMb5xy05HVu+eJDV15X8QcNLAnachXQZ7AOX/Utco7kIFzFqQI2pTDjoo0r3g3/O1hVAiw5uPi88nzx7ad5FvFqWkMI41WZsaVj6BaQy62pnSP2Ef7d3zmNn94YAeT966F8Qz29mcLRaMDigmFf6eX9/NKM6HeJW7GORzJH8pEwMTZxwmzxi2TGKEKh1IPXoAlgp6GyQy0MtTEXAjZmO0ZlKb2iyRncO+i1pqJ0q5Fxr3H6p0usuQD9ZJIkeHbXAxd7asVp5BHFZRWYbEFg8HnXIKecp7wyw== 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=kaqaCUJhAgi3lAVJYsBD4YdiLhY9UQ3wJ2FV2BnLYxY=; b=eFJ1PBadgQ1VOyDM+XfvUOgLgxL9Om8xp9i+DNmp6PeknyiiMEtDNccsepR5Kpkpq5rfmNWNGCPz5jno+WS9NLbZ+aI38sOEVPxAeut8/OR3IenXD3IrQjr3XmcOwBFw6ajoZPj20+Ya9r/i00sSx4Ezu5fWdqvSiltzxlhZhQW038jvv7D7LOdBLZ8x1dpE0QfhmnjZLw6HcqO2d8Bt8L3PJZ3jUcHq/+opVIHsqzM4unPmGh8SFwa6NaJnCPDwT6xpMhM474HiG4oA0+IQ13stXtf1yqLvMg0p2HH8OLpNFyQcwkcTPnm0+KrLuC9tqlLQTnpvZIipprBhe0jwFA== 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=kaqaCUJhAgi3lAVJYsBD4YdiLhY9UQ3wJ2FV2BnLYxY=; b=C759Uyjl6XJudP6E9ns+sMbVp+usZSMrwfDs4rzj5qQ+9C9g4WaBXC0qNOY2OEA3pgYVSmbDPLdF/4GQcLSJrAfDTNGqQVlcTgi8noIgOD3v7gCVCNa4rPaYD9omriDJqy2xgpiNHTYHL2auRY/pPQlnNfdiIXU4FS9Gn0eAPQM= 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 DM6PR13MB4330.namprd13.prod.outlook.com (2603:10b6:5:163::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.5; Thu, 10 Sep 2020 10:44:39 +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.3370.016; Thu, 10 Sep 2020 10:44:39 +0000 From: Sagar Kadam To: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org Cc: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, tglx@linutronix.de, jason@lakedaemon.net, maz@kernel.org, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, lee.jones@linaro.org, aou@eecs.berkeley.edu, yash.shah@sifive.com, Sagar Kadam Subject: [PATCH v1 2/3] dt-bindings: riscv: convert plic bindings to json-schema Date: Thu, 10 Sep 2020 16:14:03 +0530 Message-Id: <1599734644-4791-3-git-send-email-sagar.kadam@sifive.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1599734644-4791-1-git-send-email-sagar.kadam@sifive.com> References: <1599734644-4791-1-git-send-email-sagar.kadam@sifive.com> X-ClientProxiedBy: BMXPR01CA0087.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:54::27) 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 BMXPR01CA0087.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:54::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3326.19 via Frontend Transport; Thu, 10 Sep 2020 10:44:34 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [159.117.144.156] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 592754f1-4337-4731-e574-08d855768495 X-MS-TrafficTypeDiagnostic: DM6PR13MB4330: 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: 6bNywqtqZjs+rq9UdGtB1x7uhg/Ij7qtZS6tvE3GoJ7Uwc+p4CaYzZNPfV2g4UEdhvGrBTRzZv+/1UNl3yShwaiYI8+M/Ik7kJ/SgFMsCsHbXrubfZ/enMd8yR3s6IMGz5qMXQHOvJE6BDTiEpRVi1ZC95C8tVvReRxXTgFDIPMpj3Jt+sNCwaT5ZRj+hTg9sVXXBwuZ+iCz+VsTnP++3cV7Mu+xIB5d6QLmaM0kNm4osETycCytG6o/6MAUgEP7P+mCnUhySVqLEjlXSgw3t3VxUyYuKOQKoLIKCXF3CTHhmQgG2o3FQPN/108TePF9nrP1LrrEpCE03jtH5AlLEc8wLvz5t3u+xeubPNCyCtNBqv8wQ4WRgSRxD7mANBcwWbIcalfpdKXL+H4PWayGqg== 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:(366004)(376002)(136003)(396003)(39850400004)(346002)(66946007)(83380400001)(6486002)(6506007)(83170400001)(6512007)(52116002)(316002)(66556008)(66476007)(42882007)(5660300002)(36756003)(107886003)(8676002)(26005)(6666004)(44832011)(2906002)(7416002)(4326008)(16526019)(966005)(8936002)(478600001)(2616005)(956004)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: wPt1b0XItDYoA8SDJnWHU7+jcA7eET/6CWK1xeROZdRpSa1uPQLmzzqycSiv/7F8t5w0Hj48SFZGnM/jAMMmDYQXv3Y85Ab9eeHeeAQZds8OQ2+ZjvEtgyI/Lz0CtNkJxZ9L36yHP2j9aYtnVkYFwDIKFFz4XVlext1SvyIRA+orXoi7O8sv+IYw/3cfoIlCPz7JNDubbYQ9n4nTRuf/O2l6f9aUj0fqdOA6I4dDjcdQbmeNDgXfldx3gitYKSDCCM/q8sEhZIM/cBEJGBOn13GNC1lNIzMygGFlJ0qtvJCAiJvC4XZRTtTUvl8CLZD4ca4Efi7oyaOCvmpmi3h3t5SwFdLAm1pY2n8IB9A2shQvHRPh3LaVyJ6LXWc+9zM1+bDByU5eq2+SEwB+O9DjsT7nOYk/I5SUOitZXn7HIElxkve1wnOeqTzuLdBvPhJjNo6cLOnat8S0F19pufd6F2Cva6zScneS0nKWqHQqMFdoMlOoV2LBaIFSHWmdo0R8z6AN7YWa74EBuD1819+VzM1A+ZT9WjMDqijdqhQnJRjWacE3tLV+2Ug5XBVaW12DFh1aNVInHZdsLf2FIlB42ceX0WGEVNPQUYtpm7mTbxKWSUX3RyzsXVi6gbYclcG7tuyJ1w0g7fyhSsiOzjOfFQ== X-OriginatorOrg: sifive.com X-MS-Exchange-CrossTenant-Network-Message-Id: 592754f1-4337-4731-e574-08d855768495 X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB3451.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2020 10:44:39.3442 (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: Qi4Ryw6U9oavVi7i8OaFvKXzrF56pLTI/CcVlVFKlbphIt9hg4UxOAk+nCstEQ8wK+xOHa4ObA8AnsMIfaDg1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB4330 Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.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 | 107 +++++++++++++++++++++ 2 files changed, 107 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..95c8c85 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml @@ -0,0 +1,107 @@ +# 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 + +allOf: + - $ref: /schemas/interrupt-controller.yaml# + +properties: + compatible: + items: + - const: sifive,plic-1.0.0 + - const: sifive,fu540-c000-plic + + description: + Should be "sifive,plic-1.0.0" and a string identifying the actual + detailed implementation in case that specific bugs need to be worked around. + + reg: + maxItems: 1 + description: Should contain 1 register range (address and length). + + '#address-cells': + const: 0 + description: Should be <0> or more. + + '#interrupt-cells': + const: 1 + description: Should be <1> or more. + + 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,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>; + }; From patchwork Thu Sep 10 10:44:04 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: 1361470 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-pwm-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=selector1 header.b=CY1LskH9; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4BnFw24DVmz9sTg for ; Thu, 10 Sep 2020 20:47:46 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730280AbgIJKrj (ORCPT ); Thu, 10 Sep 2020 06:47:39 -0400 Received: from mail-bn8nam11on2059.outbound.protection.outlook.com ([40.107.236.59]:50081 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730349AbgIJKpa (ORCPT ); Thu, 10 Sep 2020 06:45:30 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W5kPT2MoEfqw+CLLdyffSygM4w8CtBx/6lhHbFeqMxUTcu+eCL4TuEAJFXEowqDlLJEmAcrcnPQWwqQ71rVkTNKL8FolKWmKaWQv/NY6w+sXg8B3CWaLWrbEzHYiqWLRJD2ZPliund16/gpRRPWYW/+iiJ61ilN1hTBrtghR1j7MgYZKJhv5DSJlTBqWw5xCQmCMzDoVgzRHsudSfHZ91JvBEwTei7TtjWA+JVk019WDCygc4q0xh9xn2tJhqdoRBzQ7a1gx25wQJi6SXdS6BhJoKkJH7MTyqwR/bX4AR88Jbg3CN8rR4iXvhvplsVgDsHWepDrPtgcwT85DQ+gwpQ== 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=LDCNfmA2VpqnqjSQXmP74QoaUphwEGVSFL9m2GB7xF0=; b=EmAVWC9UqohJDTbKCuL40+6O1j6gOogCFFa1ryT8XOtI/KCq+Ujfu7xLIU4bS/rqOHKE5GHcjK65YR/x9MAculzxhPqSgNVREHeaQPkZxRD9SFiSdiuVeXAR2cA9kU4iabrG0a6XdbL6QzULAkHj4dPT4i7V0ef0FLZK5F0AHNnOMp3kFdIyFXkADGmn+VT1mjrKwTDFwpFW5+8m8+nLDcmAZUYgRdBGO9nRU6xpz+lnS2aa8GWk8T46B+ni0hEHK1v/9Puq4suDYgFRzW2JlQLCDnyiomI4xyKq6KkpiKNNagHOxMlz4jNp5c6Y4qiFJ90taDZhEebnuApqrJkMnA== 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=LDCNfmA2VpqnqjSQXmP74QoaUphwEGVSFL9m2GB7xF0=; b=CY1LskH9AxVcNelSCZLw34SfGKN/U/+ljmgNNq9obKqWtubAzMMfFPll6Zh913LPyiwFgDZ2lISsrC/F20m6KdUAmqe9+ibkkIjprG+qd0wQDf0VaToy4B0vxV4Jx5LHPm38W9U1qwm0S2n5q+yuyRFOH5yMJ1AFdf8KFLWB2Gc= 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 DM6PR13MB4330.namprd13.prod.outlook.com (2603:10b6:5:163::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.5; Thu, 10 Sep 2020 10:44:46 +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.3370.016; Thu, 10 Sep 2020 10:44:46 +0000 From: Sagar Kadam To: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org Cc: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, tglx@linutronix.de, jason@lakedaemon.net, maz@kernel.org, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, lee.jones@linaro.org, aou@eecs.berkeley.edu, yash.shah@sifive.com, Sagar Kadam Subject: [PATCH v1 3/3] dt-bindings: riscv: convert pwm bindings to json-schema Date: Thu, 10 Sep 2020 16:14:04 +0530 Message-Id: <1599734644-4791-4-git-send-email-sagar.kadam@sifive.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1599734644-4791-1-git-send-email-sagar.kadam@sifive.com> References: <1599734644-4791-1-git-send-email-sagar.kadam@sifive.com> X-ClientProxiedBy: BMXPR01CA0087.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:54::27) 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 BMXPR01CA0087.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:54::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3326.19 via Frontend Transport; Thu, 10 Sep 2020 10:44:41 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [159.117.144.156] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 152f3faf-a43f-43a4-59ec-08d85576890f X-MS-TrafficTypeDiagnostic: DM6PR13MB4330: 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: 8xTg06r18EcHvaSl2GS1ZKR0ut+Q8cFjcCcoaeW/uGfpMRxT9ZVHHXFw7sF/h3ALK+4XT86eFDz7t5inwb6YM0JV8STwRPBrNk8uTPm3+P8qp0mPCXLOc/iTc/Z2VFKzVIHM2g5USdWnOcrD6onCyElhfzG/vB6RYgPPqv5fcxWafcMCaDR3gCpXdrPuQrWKyo4lo7sUHkIy+7k5IJ8cnaSJ4S7+kON22kWEjzuaukhL0hj+1Do1otYOjE8NdPGVMpeJABq9JbN4ZaP3nIgvjAavp3L3Iv3Kx+28HpJr4xund7YW6vNGvhK9Uf2YD0oqvW5mnjuw20jssmnyYkFqQTsWekXOPR5hil0W6f2bNYuhOiX33k/S0CVIoteIWsa6ui186KFES5w+1Y7JBWu2Rw== 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:(366004)(376002)(136003)(396003)(39850400004)(346002)(66946007)(83380400001)(6486002)(6506007)(83170400001)(6512007)(52116002)(316002)(66556008)(66476007)(42882007)(5660300002)(36756003)(107886003)(8676002)(26005)(6666004)(44832011)(2906002)(7416002)(4326008)(16526019)(966005)(8936002)(478600001)(2616005)(956004)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: i/qrLlDPQDrLz/F1WDR1fk6ujykA/4vESuKqv/TL4yDDRvd45MZPjQD6kGCIONxlRmfzsRuqWG421sxK5gXRSq2FWdQikHzA5f9T1qaKYJ4iDr3fa8ypSa+HfW2jx8Wo1E4S6is8tSXRYGdwqbCm1pdifOD97WH2nO1Hv9R8Eypca0iIJ0avsi/kCX4lX7MKDkL9s08OqdCej/1hBzjNfumzFEj6EfYR53Qsp6ryf+1fziDi2+zd9yU1J9RGNdKp0gI5ANrLLgqfMci4hOV7Igy4KfR35rDCBBKdVaZcUaZz9FjJgmi/hKv7zBgWTthAdWEMbk6R4U0PAK9pqazPXZeQhIGB5LZzorHLUb1Lqc+ry2yISiTWS6vxBjHliZDZpXc1TjGM1zTiFUQnxILSVBj9XhSXuGcxEgEkjykgCpQQg7vlM21GVXrGYN8cl1dxFC0HqoujpfSjTifmKNT7sfpBo/Ockw4igMlYpOqdhSgGfsJMbe/Izp5O3JezRqpzUglgxDNXaVBS21rsNx2H8Yxm/72hull6f6aVgnIRS1HN8J8uRhNgKR6foWwQg3bbqRTVLP3IrYCffi0tGqskmHdbNJTxQv58I1Otlyr2xOlDktkb6NRLYoQ1JclRy62XU3wMtzqJzZPsuPDmucAFSA== X-OriginatorOrg: sifive.com X-MS-Exchange-CrossTenant-Network-Message-Id: 152f3faf-a43f-43a4-59ec-08d85576890f X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB3451.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2020 10:44:46.8760 (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: cz5Ap5IhNvqdhl8Cfr4iXjWoT0LEo8Ygp19D1ryqoqQqvO28VXQ2fXCVlkMzpoNDhcpBJCk7dAYsQ9qOrOjkmw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB4330 Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.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 | 72 ++++++++++++++++++++++ 2 files changed, 72 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..415d053 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-sifive.yaml @@ -0,0 +1,72 @@ +# 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 + description: Physical base address and length of the controller's registers + + clocks: + description: Should contain a clock identifier for the PWM's parent clock. + + "#pwm-cells": + const: 3 + description: + Should be 3. See pwm.yaml in this directory for a description of the + cell format. + + interrupts: + maxItems: 1 + description: One interrupt per PWM channel. + +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>; + };