From patchwork Thu Oct 31 12:30:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin GAIGNARD X-Patchwork-Id: 11221179 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 BD1EC15AB for ; Thu, 31 Oct 2019 12:31:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9BF1F218DE for ; Thu, 31 Oct 2019 12:31:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=st.com header.i=@st.com header.b="AXFvmehU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726650AbfJaMbR (ORCPT ); Thu, 31 Oct 2019 08:31:17 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:53926 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726462AbfJaMbR (ORCPT ); Thu, 31 Oct 2019 08:31:17 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9VCRQ5U030921; Thu, 31 Oct 2019 13:30:54 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=RgvneSBRTilulYhN5amimgSanJ3OY7+cEr1+3gGNZwE=; b=AXFvmehUqvWgmAijEaStt+aCSiGdbb364k2EzKh67ktuGnrJlA7J56zQlRpeEereshnM 4ds9IfY053aIy6FwVBvyefxPpPKbxsswu5mK2s5+wmwIedmdoYHZRiovbCIUW06XUSbn 4O4ld/G22W4FMSURAFibeLWWZld3aIk5cN8YAV3uW+8M2IU8OBtdD2FaFtSLrj+EuIXs yUB4AQXxnwSravd6ko1xEbqdkPfBKQTSBHbDkWxzxTFnzQV4Mlnu1aM7kS+IV8hbTSNe 3ptJnBFFMCJVprjQ0tmeThdTtMjNU5XLeps0z+o6qg2AbOTiIzNynmxSBOluG82rvIps YQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2vxwrnsrb3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Oct 2019 13:30:54 +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 ACBAA100034; Thu, 31 Oct 2019 13:30:50 +0100 (CET) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 98F0E2B7837; Thu, 31 Oct 2019 13:30:50 +0100 (CET) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 31 Oct 2019 13:30:50 +0100 Received: from localhost (10.201.20.122) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 31 Oct 2019 13:30:50 +0100 From: Benjamin Gaignard To: , , , , , , , , , , , CC: , , , , , Subject: [PATCH 1/4] dt-bindings: counter: Convert stm32 counter bindings to json-schema Date: Thu, 31 Oct 2019 13:30:37 +0100 Message-ID: <20191031123040.26316-2-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20191031123040.26316-1-benjamin.gaignard@st.com> References: <20191031123040.26316-1-benjamin.gaignard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.122] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-31_05:2019-10-30,2019-10-31 signatures=0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Convert the STM32 counter binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard --- .../bindings/counter/st,stm32-timer-cnt.yaml | 38 ++++++++++++++++++++++ .../bindings/counter/stm32-timer-cnt.txt | 31 ------------------ 2 files changed, 38 insertions(+), 31 deletions(-) create mode 100644 Documentation/devicetree/bindings/counter/st,stm32-timer-cnt.yaml delete mode 100644 Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt diff --git a/Documentation/devicetree/bindings/counter/st,stm32-timer-cnt.yaml b/Documentation/devicetree/bindings/counter/st,stm32-timer-cnt.yaml new file mode 100644 index 000000000000..56192d613601 --- /dev/null +++ b/Documentation/devicetree/bindings/counter/st,stm32-timer-cnt.yaml @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/counter/st,stm32-timer-cnt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STM32 Timers quadrature bindings + +description: + STM32 Timer provides quadrature encoder to detect angular position + and direction of rotary elements, from IN1 and IN2 input signals. + +maintainers: + - Benjamin Gaignard + - Fabrice Gasnier + +properties: + counter: + type: object + + description: + must be a sub-node of an STM32 Timer device tree node + + properties: + compatible: + const: st,stm32-timer-counter + + required: + - compatible + +examples: + - | + counter { + compatible = "st,stm32-timer-counter"; + }; + +... + diff --git a/Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt b/Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt deleted file mode 100644 index c52fcdd4bf6c..000000000000 --- a/Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt +++ /dev/null @@ -1,31 +0,0 @@ -STMicroelectronics STM32 Timer quadrature encoder - -STM32 Timer provides quadrature encoder to detect -angular position and direction of rotary elements, -from IN1 and IN2 input signals. - -Must be a sub-node of an STM32 Timer device tree node. -See ../mfd/stm32-timers.txt for details about the parent node. - -Required properties: -- compatible: Must be "st,stm32-timer-counter". -- pinctrl-names: Set to "default". -- pinctrl-0: List of phandles pointing to pin configuration nodes, - to set CH1/CH2 pins in mode of operation for STM32 - Timer input on external pin. - -Example: - timers@40010000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "st,stm32-timers"; - reg = <0x40010000 0x400>; - clocks = <&rcc 0 160>; - clock-names = "int"; - - counter { - compatible = "st,stm32-timer-counter"; - pinctrl-names = "default"; - pinctrl-0 = <&tim1_in_pins>; - }; - }; From patchwork Thu Oct 31 12:30:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin GAIGNARD X-Patchwork-Id: 11221177 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 499BD1668 for ; Thu, 31 Oct 2019 12:31:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 27EF2208C0 for ; Thu, 31 Oct 2019 12:31:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=st.com header.i=@st.com header.b="AVP1lXul" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726793AbfJaMbS (ORCPT ); Thu, 31 Oct 2019 08:31:18 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:3616 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726506AbfJaMbR (ORCPT ); Thu, 31 Oct 2019 08:31:17 -0400 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 x9VCQsTm029332; Thu, 31 Oct 2019 13:30:53 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=0Hh4of25kloH1WraPyDwx8oHjxU7GW8p1ddlRNtYxmg=; b=AVP1lXul65MYbAjaHrK0INCHPVyaXsHBJAWuaj3QpOUQqLedaPFm/97wWAI/FKujS98t Q1lOVFYlAC2OWFTEt5X/1Z+nNocqPIlD+g1Uw6/p/2yZxTik8GkFXWe2k8O2Vm3g0j5O KihoUkBFSeQCQlSYY/3BPzPPDGKgBbCknkRglCilPyVdO9u2+fCL6GNZYWoZPBhySzro yBVhi3zeWE7JEd7dsJ5sKDLhD4Q0TWu5A+ITP4btONKfVexLcjfgZAfd5vXXPq1ZGCNk tc/ecyZjERoLK+FGAUCAWq4TUZSOQl834+2xqor2/YpSVE5sN/NBKZxSKKP7dTOk8cZM AA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2vxwhussf8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Oct 2019 13:30:53 +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 BCD07100038; Thu, 31 Oct 2019 13:30:52 +0100 (CET) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id AB6322B7837; Thu, 31 Oct 2019 13:30:52 +0100 (CET) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS23.st.com (10.75.90.46) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 31 Oct 2019 13:30:52 +0100 Received: from localhost (10.201.20.122) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 31 Oct 2019 13:30:52 +0100 From: Benjamin Gaignard To: , , , , , , , , , , , CC: , , , , , Subject: [PATCH 2/4] dt-bindings: iio: timer: Convert stm32 IIO trigger bindings to json-schema Date: Thu, 31 Oct 2019 13:30:38 +0100 Message-ID: <20191031123040.26316-3-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20191031123040.26316-1-benjamin.gaignard@st.com> References: <20191031123040.26316-1-benjamin.gaignard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.122] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-31_05:2019-10-30,2019-10-31 signatures=0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Convert the STM32 IIO trigger binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard --- .../bindings/iio/timer/st,stm32-timer-trigger.yaml | 44 ++++++++++++++++++++++ .../bindings/iio/timer/stm32-timer-trigger.txt | 25 ------------ 2 files changed, 44 insertions(+), 25 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/timer/st,stm32-timer-trigger.yaml delete mode 100644 Documentation/devicetree/bindings/iio/timer/stm32-timer-trigger.txt diff --git a/Documentation/devicetree/bindings/iio/timer/st,stm32-timer-trigger.yaml b/Documentation/devicetree/bindings/iio/timer/st,stm32-timer-trigger.yaml new file mode 100644 index 000000000000..1c8c8b55e8cd --- /dev/null +++ b/Documentation/devicetree/bindings/iio/timer/st,stm32-timer-trigger.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/timer/st,stm32-timer-trigger.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STM32 Timers IIO timer bindings + +maintainers: + - Benjamin Gaignard + - Fabrice Gasnier + +properties: + $nodemane: + pattern: "^timer@[0-9]+$" + type: object + + description: + must be a sub-node of an STM32 Timer device tree node + + properties: + compatible: + oneOf: + - const: st,stm32-timer-trigger + - const: st,stm32h7-timer-trigger + + reg: true + + required: + - compatible + - reg + +examples: + - | + timers2: timer@40000000 { + #address-cells = <1>; + #size-cells = <0>; + timer@0 { + compatible = "st,stm32-timer-trigger"; + reg = <0>; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/iio/timer/stm32-timer-trigger.txt b/Documentation/devicetree/bindings/iio/timer/stm32-timer-trigger.txt deleted file mode 100644 index b8e8c769d434..000000000000 --- a/Documentation/devicetree/bindings/iio/timer/stm32-timer-trigger.txt +++ /dev/null @@ -1,25 +0,0 @@ -STMicroelectronics STM32 Timers IIO timer bindings - -Must be a sub-node of an STM32 Timers device tree node. -See ../mfd/stm32-timers.txt for details about the parent node. - -Required parameters: -- compatible: Must be one of: - "st,stm32-timer-trigger" - "st,stm32h7-timer-trigger" -- reg: Identify trigger hardware block. - -Example: - timers@40010000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "st,stm32-timers"; - reg = <0x40010000 0x400>; - clocks = <&rcc 0 160>; - clock-names = "int"; - - timer@0 { - compatible = "st,stm32-timer-trigger"; - reg = <0>; - }; - }; From patchwork Thu Oct 31 12:30:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin GAIGNARD X-Patchwork-Id: 11221171 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 93CC915AB for ; Thu, 31 Oct 2019 12:31:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 710DE2087F for ; Thu, 31 Oct 2019 12:31:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=st.com header.i=@st.com header.b="eWEB6+B1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726741AbfJaMbS (ORCPT ); Thu, 31 Oct 2019 08:31:18 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:13352 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726538AbfJaMbR (ORCPT ); Thu, 31 Oct 2019 08:31:17 -0400 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 x9VCQm2j029135; Thu, 31 Oct 2019 13:30:55 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=XobN5zu4BmNIGNVaY/JnEEHn+q2OpaXORVnInB3cdq4=; b=eWEB6+B1HOrepyJ4WJRDLMyuI9PXQWASN9adjrKxVIyL5yRCbF9YLcc/yPdmdPJYV3QT 2GHYgLY0xbpRqrX6IU1yZuwPpu89k2qmlIfcPZ86JtwCCIXQ1tRpT9T/Kv3zpqIzA/oz mTnH+WpF2bILB+mT+AlcIMeR7BnVHXs7M4S/PmFXdFlj6RDPwa8l5xtRULy1QdmM+RY5 wOHeANc7j91gtBY3FtBXjwUtro+MQg4q9gdJOFyeT4Z5UdvkeU+2+bTFdC8V34jMJrYx 9biD4wHrOdpRH6hCWFr6Q+2+r8qQFJnUevIcG/X3Te/Ffy/2L8xpL+2bDpkWjqvGJr9r fg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2vxwhussfa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Oct 2019 13:30:55 +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 E0C8C100039; Thu, 31 Oct 2019 13:30:53 +0100 (CET) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id CE8D12B7837; Thu, 31 Oct 2019 13:30:53 +0100 (CET) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 31 Oct 2019 13:30:53 +0100 Received: from localhost (10.201.20.122) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 31 Oct 2019 13:30:53 +0100 From: Benjamin Gaignard To: , , , , , , , , , , , CC: , , , , , Subject: [PATCH 3/4] dt-bindings: pwm: Convert stm32 pwm bindings to json-schema Date: Thu, 31 Oct 2019 13:30:39 +0100 Message-ID: <20191031123040.26316-4-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20191031123040.26316-1-benjamin.gaignard@st.com> References: <20191031123040.26316-1-benjamin.gaignard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.122] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-31_05:2019-10-30,2019-10-31 signatures=0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Convert the STM32 pwm binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard --- .../devicetree/bindings/pwm/pwm-stm32.txt | 38 ---------------- .../devicetree/bindings/pwm/st,stm32-pwm.yaml | 51 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 38 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-stm32.txt create mode 100644 Documentation/devicetree/bindings/pwm/st,stm32-pwm.yaml diff --git a/Documentation/devicetree/bindings/pwm/pwm-stm32.txt b/Documentation/devicetree/bindings/pwm/pwm-stm32.txt deleted file mode 100644 index a8690bfa5e1f..000000000000 --- a/Documentation/devicetree/bindings/pwm/pwm-stm32.txt +++ /dev/null @@ -1,38 +0,0 @@ -STMicroelectronics STM32 Timers PWM bindings - -Must be a sub-node of an STM32 Timers device tree node. -See ../mfd/stm32-timers.txt for details about the parent node. - -Required parameters: -- compatible: Must be "st,stm32-pwm". -- pinctrl-names: Set to "default". -- pinctrl-0: List of phandles pointing to pin configuration nodes for PWM module. - For Pinctrl properties see ../pinctrl/pinctrl-bindings.txt -- #pwm-cells: Should be set to 3. This PWM chip uses the default 3 cells - bindings defined in pwm.txt. - -Optional parameters: -- st,breakinput: One or two to describe break input configurations. - "index" indicates on which break input (0 or 1) the configuration - should be applied. - "level" gives the active level (0=low or 1=high) of the input signal - for this configuration. - "filter" gives the filtering value to be applied. - -Example: - timers@40010000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "st,stm32-timers"; - reg = <0x40010000 0x400>; - clocks = <&rcc 0 160>; - clock-names = "int"; - - pwm { - compatible = "st,stm32-pwm"; - #pwm-cells = <3>; - pinctrl-0 = <&pwm1_pins>; - pinctrl-names = "default"; - st,breakinput = <0 1 5>; - }; - }; diff --git a/Documentation/devicetree/bindings/pwm/st,stm32-pwm.yaml b/Documentation/devicetree/bindings/pwm/st,stm32-pwm.yaml new file mode 100644 index 000000000000..d3f8180edd88 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/st,stm32-pwm.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/st,stm32-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STM32 Timers PWM bindings + +maintainers: + - Benjamin Gaignard + - Fabrice Gasnier + +properties: + pwn: + type: object + + description: + must be a sub-node of an STM32 Timer device tree node + + properties: + compatible: + const: st,stm32-pwm + + "#pwm-cells": + const: 3 + + st,breakinput: + description: | + One or two to describe break input configurations. + "index" indicates on which break input (0 or 1) the configuration should be applied. + "level" gives the active level (0=low or 1=high) of the input signal for this configuration. + "filter" gives the filtering value (up to 15) to be applied. + + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + - maxItems: 3 + + required: + - "#pwm-cells" + - compatible + +examples: + - | + pwm { + compatible = "st,stm32-pwm"; + #pwm-cells = <3>; + st,breakinput = <0 1 5>; + }; + +... From patchwork Thu Oct 31 12:30:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin GAIGNARD X-Patchwork-Id: 11221173 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 E8FDC1599 for ; Thu, 31 Oct 2019 12:31:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BCA85208C0 for ; Thu, 31 Oct 2019 12:31:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=st.com header.i=@st.com header.b="Kwtc8Tio" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726985AbfJaMbX (ORCPT ); Thu, 31 Oct 2019 08:31:23 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:53970 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726940AbfJaMbW (ORCPT ); Thu, 31 Oct 2019 08:31:22 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9VCRPmo030912; Thu, 31 Oct 2019 13:30:58 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=aZeNX32KSli90XKXWchUAswfK5k6VsimvWJDcqy8S5M=; b=Kwtc8TioPPfrODyqoqVMlx44m++9g1f7f0H9sXtnQTThIFVQdmiis654DrUAk/dSYvXm 5WNe/HtNL0g6/bQMA+exNO0kcSTUsYNv5w3rTwIqG23/s7dpBhELuSy75P7NjxRU3qe0 tiRlpptJN4AgeBCHbjofaPj+nmhRIty+eONnIbkNKCctnS4w6AlGmvi29mmr3M14kbSN TRA4suQRL/ofABntecO7TPHRWt6E9LBGeh1o2S5zgRYdC77VtFRCXOewGYy6KTTXUvpo DazjRNSvq7/k8P+ffxYyq9a2VJxBdRmBFwBXHLwVOCR6bIitOzSC/dgYNPWFNe6TUf8/ wA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2vxwrnsrbu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Oct 2019 13:30:58 +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 D4194100038; Thu, 31 Oct 2019 13:30:56 +0100 (CET) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id B72372B7837; Thu, 31 Oct 2019 13:30:56 +0100 (CET) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 31 Oct 2019 13:30:56 +0100 Received: from localhost (10.201.20.122) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 31 Oct 2019 13:30:54 +0100 From: Benjamin Gaignard To: , , , , , , , , , , , CC: , , , , , Subject: [PATCH 4/4] dt-bindings: mfd: Convert stm32 timers bindings to json-schema Date: Thu, 31 Oct 2019 13:30:40 +0100 Message-ID: <20191031123040.26316-5-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20191031123040.26316-1-benjamin.gaignard@st.com> References: <20191031123040.26316-1-benjamin.gaignard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.122] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-31_05:2019-10-30,2019-10-31 signatures=0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Convert the STM32 timers binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard --- .../devicetree/bindings/mfd/st,stm32-timers.yaml | 91 ++++++++++++++++++++++ .../devicetree/bindings/mfd/stm32-timers.txt | 73 ----------------- 2 files changed, 91 insertions(+), 73 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml delete mode 100644 Documentation/devicetree/bindings/mfd/stm32-timers.txt diff --git a/Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml b/Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml new file mode 100644 index 000000000000..3f0a65fb2bc0 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml @@ -0,0 +1,91 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/st,stm32-timers.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STM32 Timers bindings + +description: | + This hardware block provides 3 types of timer along with PWM functionality: \ + - advanced-control timers consist of a 16-bit auto-reload counter driven by a programmable \ + prescaler, break input feature, PWM outputs and complementary PWM ouputs channels. \ + - general-purpose timers consist of a 16-bit or 32-bit auto-reload counter driven by a \ + programmable prescaler and PWM outputs.\ + - basic timers consist of a 16-bit auto-reload counter driven by a programmable prescaler. + +maintainers: + - Benjamin Gaignard + - Fabrice Gasnier + +allOf: + - $ref: "../pwm/st,stm32-pwm.yaml#" + - $ref: "../iio/timer/st,stm32-timer-trigger.yaml#" + - $ref: "../counter/st,stm32-timer-cnt.yaml#" + +properties: + compatible: + const: st,stm32-timers + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: int + + reset: + maxItems: 1 + + dmas: true + + dma-names: true + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +required: + - "#address-cells" + - "#size-cells" + - compatible + - reg + - clocks + - clock-names + +examples: + - | + #include + timers2: timer@40000000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "st,stm32-timers"; + reg = <0x40000000 0x400>; + clocks = <&rcc TIM2_K>; + clock-names = "int"; + dmas = <&dmamux1 18 0x400 0x1>, + <&dmamux1 19 0x400 0x1>, + <&dmamux1 20 0x400 0x1>, + <&dmamux1 21 0x400 0x1>, + <&dmamux1 22 0x400 0x1>; + dma-names = "ch1", "ch2", "ch3", "ch4", "up"; + pwm { + compatible = "st,stm32-pwm"; + #pwm-cells = <3>; + st,breakinput = <0 1 5>; + }; + timer@0 { + compatible = "st,stm32-timer-trigger"; + reg = <0>; + }; + counter { + compatible = "st,stm32-timer-counter"; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/mfd/stm32-timers.txt b/Documentation/devicetree/bindings/mfd/stm32-timers.txt deleted file mode 100644 index 15c3b87f51d9..000000000000 --- a/Documentation/devicetree/bindings/mfd/stm32-timers.txt +++ /dev/null @@ -1,73 +0,0 @@ -STM32 Timers driver bindings - -This IP provides 3 types of timer along with PWM functionality: -- advanced-control timers consist of a 16-bit auto-reload counter driven by a programmable - prescaler, break input feature, PWM outputs and complementary PWM ouputs channels. -- general-purpose timers consist of a 16-bit or 32-bit auto-reload counter driven by a - programmable prescaler and PWM outputs. -- basic timers consist of a 16-bit auto-reload counter driven by a programmable prescaler. - -Required parameters: -- compatible: must be "st,stm32-timers" - -- reg: Physical base address and length of the controller's - registers. -- clock-names: Set to "int". -- clocks: Phandle to the clock used by the timer module. - For Clk properties, please refer to ../clock/clock-bindings.txt - -Optional parameters: -- resets: Phandle to the parent reset controller. - See ../reset/st,stm32-rcc.txt -- dmas: List of phandle to dma channels that can be used for - this timer instance. There may be up to 7 dma channels. -- dma-names: List of dma names. Must match 'dmas' property. Valid - names are: "ch1", "ch2", "ch3", "ch4", "up", "trig", - "com". - -Optional subnodes: -- pwm: See ../pwm/pwm-stm32.txt -- timer: See ../iio/timer/stm32-timer-trigger.txt -- counter: See ../counter/stm32-timer-cnt.txt - -Example: - timers@40010000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "st,stm32-timers"; - reg = <0x40010000 0x400>; - clocks = <&rcc 0 160>; - clock-names = "int"; - - pwm { - compatible = "st,stm32-pwm"; - pinctrl-0 = <&pwm1_pins>; - pinctrl-names = "default"; - }; - - timer@0 { - compatible = "st,stm32-timer-trigger"; - reg = <0>; - }; - - counter { - compatible = "st,stm32-timer-counter"; - pinctrl-names = "default"; - pinctrl-0 = <&tim1_in_pins>; - }; - }; - -Example with all dmas: - timer@40010000 { - ... - dmas = <&dmamux1 11 0x400 0x0>, - <&dmamux1 12 0x400 0x0>, - <&dmamux1 13 0x400 0x0>, - <&dmamux1 14 0x400 0x0>, - <&dmamux1 15 0x400 0x0>, - <&dmamux1 16 0x400 0x0>, - <&dmamux1 17 0x400 0x0>; - dma-names = "ch1", "ch2", "ch3", "ch4", "up", "trig", "com"; - ... - child nodes... - };