Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp26074ybl; Mon, 2 Dec 2019 07:07:20 -0800 (PST) X-Google-Smtp-Source: APXvYqwgI0vh+M/5xnb9dtzj+CPrUL0mqZZqLvi9C/OocOWik2fBbnudMPXUflfQY8LfLb5fZY4P X-Received: by 2002:aa7:d8c4:: with SMTP id k4mr27702180eds.299.1575299240304; Mon, 02 Dec 2019 07:07:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575299240; cv=none; d=google.com; s=arc-20160816; b=E7gOGdw38SAcBvagZqx0ijt5VqHmI/AkqiVQwivkmqt8q4dHqLkWE++wuKkfY89Z5B UgIOxup44TnZko6d5pYQs6RziAnp3lHPmezzYUav5kt1RTh353mea3ErnULZU1sfycGo mT/qYnOJssZQIgvZERH9ZzIHMnc2Y0mCNCrZwjMbBdQvOrSJ76o3uEEf/Fsv0P3HgUWx LYGgyvvTsnZ9qaEDFVAjjAQdZTLB8MJpgwOThsm6iFBEW9eOoMy+sgr3cSYUiL5nFk+r 25+RG69U8DwHjtmU6RQ7ri7j+QFVM4T/LZUxCF+V6onAEPHUQWi8UQswElFwnbwARQFY HnVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=TVle+DE3dnCA7IhmRgC1AN/Md8I3hWUb219+dQQGb4c=; b=af9/ZC97vOYKnwUnHff7K5c204/QHP/mZgzqSAnWU3iejp4icyNBfN6yQTgTnVtcL+ Qg4nfDE7Ar7WMXIVgw8pPt4kHfiRYWgG2eFJrxF8j816IFrwBYBMk0QWKaLwI+BRMGLU GxAvbMLyzDdEHLto9jFVIqMnFWahSmLUezDP+GqUTWHAA2vhv1DGLHKdWD4iX5AGGQOo mqsVJM5pji3zWFJ/3e91ysMU83nObJAs498X2OhQ9/2FGdv/KTd+tvP0ZSGZiMXZ3dU1 rpq8RqYp1ycGO1NcbXvza+LzEWhb9sMCWK3uNjz1z51xuydw678PNJDpEyikM141ksF7 zijQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=KhbYeHhw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j21si20951138ejd.265.2019.12.02.07.06.49; Mon, 02 Dec 2019 07:07:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=KhbYeHhw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727519AbfLBPEL (ORCPT + 99 others); Mon, 2 Dec 2019 10:04:11 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:27014 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727480AbfLBPEL (ORCPT ); Mon, 2 Dec 2019 10:04:11 -0500 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xB2Eqcve006818; Mon, 2 Dec 2019 16:03:57 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=TVle+DE3dnCA7IhmRgC1AN/Md8I3hWUb219+dQQGb4c=; b=KhbYeHhwb4lDOLTJQC8Ipqj5iCfMPlGEmXqeEMsxdSyx3+4yx0Sl6hOlixYI+qzy5aaz KY8BRCStBKfkRKl93rVv0R3nJf8cc9S+GVZvJEGt87WL5bwCxflG1BOvaN7XnpdBL19s SUwUjGNuQX7yRXwno+oGOyNP/NF9+7X3Q1gbzoQzalRv8ZMLtcPrtevWtpiBSZlQE8cp uZ1ZXSJincuEzfUQw7LwA6mvE3WQAQv1pXyH4fhqZfFCKmjLn75k3w/BnxW0uBgndgy5 MUPg+FHzJjKKyfuZ6ZdL65WMDwRsxDbTXP44M07687NOA4moswH0M5svfka4oYuXBJPU kg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2wkee9tk0a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Dec 2019 16:03:57 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DB08C10002A; Mon, 2 Dec 2019 16:03:56 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag4node2.st.com [10.75.127.11]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id BDD662D3783; Mon, 2 Dec 2019 16:03:56 +0100 (CET) Received: from localhost (10.75.127.49) by SFHDAG4NODE2.st.com (10.75.127.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 2 Dec 2019 16:03:56 +0100 From: To: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Maxime Coquelin , Alexandre Torgue CC: , , , , , Gabriel Fernandez Subject: [PATCH] dt-bindings: rcc: Convert stm32mp1 rcc bindings to json-schema Date: Mon, 2 Dec 2019 16:03:43 +0100 Message-ID: <20191202150343.27854-1-gabriel.fernandez@st.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.49] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG4NODE2.st.com (10.75.127.11) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-02_02:2019-11-29,2019-12-02 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gabriel Fernandez Convert the STM32MP1 RCC binding to DT schema format using json-schema. Signed-off-by: Gabriel Fernandez --- .../bindings/clock/st,stm32mp1-rcc.txt | 60 -------------- .../bindings/clock/st,stm32mp1-rcc.yaml | 79 +++++++++++++++++++ 2 files changed, 79 insertions(+), 60 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.txt create mode 100644 Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.txt b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.txt deleted file mode 100644 index fb9495ea582c..000000000000 --- a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.txt +++ /dev/null @@ -1,60 +0,0 @@ -STMicroelectronics STM32 Peripheral Reset Clock Controller -========================================================== - -The RCC IP is both a reset and a clock controller. - -RCC makes also power management (resume/supend and wakeup interrupt). - -Please also refer to reset.txt for common reset controller binding usage. - -Please also refer to clock-bindings.txt for common clock controller -binding usage. - - -Required properties: -- compatible: "st,stm32mp1-rcc", "syscon" -- reg: should be register base and length as documented in the datasheet -- #clock-cells: 1, device nodes should specify the clock in their - "clocks" property, containing a phandle to the clock device node, - an index specifying the clock to use. -- #reset-cells: Shall be 1 -- interrupts: Should contain a general interrupt line and a interrupt line - to the wake-up of processor (CSTOP). - -Example: - rcc: rcc@50000000 { - compatible = "st,stm32mp1-rcc", "syscon"; - reg = <0x50000000 0x1000>; - #clock-cells = <1>; - #reset-cells = <1>; - interrupts = , - ; - }; - -Specifying clocks -================= - -All available clocks are defined as preprocessor macros in -dt-bindings/clock/stm32mp1-clks.h header and can be used in device -tree sources. - -Specifying softreset control of devices -======================================= - -Device nodes should specify the reset channel required in their "resets" -property, containing a phandle to the reset device node and an index specifying -which channel to use. -The index is the bit number within the RCC registers bank, starting from RCC -base address. -It is calculated as: index = register_offset / 4 * 32 + bit_offset. -Where bit_offset is the bit offset within the register. - -For example on STM32MP1, for LTDC reset: - ltdc = APB4_RSTSETR_offset / 4 * 32 + LTDC_bit_offset - = 0x180 / 4 * 32 + 0 = 3072 - -The list of valid indices for STM32MP1 is available in: -include/dt-bindings/reset-controller/stm32mp1-resets.h - -This file implements defines like: -#define LTDC_R 3072 diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml new file mode 100644 index 000000000000..b8f91e444d2f --- /dev/null +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.yaml @@ -0,0 +1,79 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bindings/clock/st,stm32mp1-rcc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Reset Clock Controller Binding + +maintainers: + - Gabriel Fernandez + +description: | + The RCC IP is both a reset and a clock controller. + RCC makes also power management (resume/supend and wakeup interrupt). + Please also refer to reset.txt for common reset controller binding usage. + + This binding uses common clock bindings + Documentation/devicetree/bindings/clock/clock-bindings.txt + + Specifying clocks + ================= + + All available clocks are defined as preprocessor macros in + dt-bindings/clock/stm32mp1-clks.h header and can be used in device + tree sources. + + Specifying softreset control of devices + ======================================= + + Device nodes should specify the reset channel required in their "resets" + property, containing a phandle to the reset device node and an index specifying + which channel to use. + The index is the bit number within the RCC registers bank, starting from RCC + base address. + It is calculated as: index = register_offset / 4 * 32 + bit_offset. + Where bit_offset is the bit offset within the register. + + For example on STM32MP1, for LTDC reset: + ltdc = APB4_RSTSETR_offset / 4 * 32 + LTDC_bit_offset + = 0x180 / 4 * 32 + 0 = 3072 + + The list of valid indices for STM32MP1 is available in: + include/dt-bindings/reset-controller/stm32mp1-resets.h + + This file implements defines like: + #define LTDC_R 3072 + +properties: + "#clock-cells": + const: 1 + + "#reset-cells": + const: 1 + + compatible: + items: + - const: st,stm32mp1-rcc + - const: syscon + + reg: + maxItems: 1 + +required: + - "#clock-cells" + - "#reset-cells" + - compatible + - reg + +additionalProperties: false + +examples: + - | + rcc: rcc@50000000 { + compatible = "st,stm32mp1-rcc", "syscon"; + reg = <0x50000000 0x1000>; + #clock-cells = <1>; + #reset-cells = <1>; + }; +... -- 2.17.1