diff mbox series

[v1,2/2] dt-binding: iio: time: add capture-tiecap.yaml

Message ID 20220726072553.5136-3-jpanis@baylibre.com
State New
Headers show
Series ECAP support on TI AM62x SoC | expand

Commit Message

Julien Panis July 26, 2022, 7:25 a.m. UTC
This commit adds a YAML binding for TI ECAP used in capture operating mode.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
---
 .../bindings/iio/time/capture-tiecap.yaml     | 53 +++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/time/capture-tiecap.yaml

Comments

Krzysztof Kozlowski July 26, 2022, 9:29 a.m. UTC | #1
On 26/07/2022 09:25, Julien Panis wrote:
> This commit adds a YAML binding for TI ECAP used in capture operating mode.
> 
> Signed-off-by: Julien Panis <jpanis@baylibre.com>
> ---
>  .../bindings/iio/time/capture-tiecap.yaml     | 53 +++++++++++++++++++
>  1 file changed, 53 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/time/capture-tiecap.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/time/capture-tiecap.yaml b/Documentation/devicetree/bindings/iio/time/capture-tiecap.yaml
> new file mode 100644
> index 000000000000..4f08e49a8506
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/time/capture-tiecap.yaml

Use filename based on compatible, so:
ti,am62-ecap-capture.yaml

> @@ -0,0 +1,53 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/capture-tiecap.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments Enhanced Capture (eCAP) Module
> +
> +maintainers:
> +  - Julien Panis <jpanis@baylibre.com>
> +
> +description: |
> +  The eCAP module resources can be used to capture timestamps
> +  on input signal events (falling/rising edges).
> +
> +properties:
> +  compatible:
> +    const: ti,am62-ecap-capture
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    const: fck
> +
> +  power-domains:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    ecap0: capture@23100000 { /* eCAP in capture mode on am62x */
> +        compatible = "ti,am62-ecap-capture";
> +        reg = <0x00 0x23100000 0x00 0x100>;
> +        interrupts = <GIC_SPI 113 IRQ_TYPE_EDGE_RISING>;
> +        power-domains = <&k3_pds 51 TI_SCI_PD_EXCLUSIVE>;

Does not look like you tested the bindings. Please run `make
dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).

> +        clocks = <&k3_clks 51 0>;
> +        clock-names = "fck";
> +    };


Best regards,
Krzysztof
Julien Panis July 26, 2022, 9:42 a.m. UTC | #2
On 26/07/2022 11:29, Krzysztof Kozlowski wrote:
> On 26/07/2022 09:25, Julien Panis wrote:
>> This commit adds a YAML binding for TI ECAP used in capture operating mode.
>>
>> Signed-off-by: Julien Panis <jpanis@baylibre.com>
>> ---
>>   .../bindings/iio/time/capture-tiecap.yaml     | 53 +++++++++++++++++++
>>   1 file changed, 53 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/iio/time/capture-tiecap.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/iio/time/capture-tiecap.yaml b/Documentation/devicetree/bindings/iio/time/capture-tiecap.yaml
>> new file mode 100644
>> index 000000000000..4f08e49a8506
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/iio/time/capture-tiecap.yaml
> Use filename based on compatible, so:
> ti,am62-ecap-capture.yaml
>
>> @@ -0,0 +1,53 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/iio/capture-tiecap.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Texas Instruments Enhanced Capture (eCAP) Module
>> +
>> +maintainers:
>> +  - Julien Panis <jpanis@baylibre.com>
>> +
>> +description: |
>> +  The eCAP module resources can be used to capture timestamps
>> +  on input signal events (falling/rising edges).
>> +
>> +properties:
>> +  compatible:
>> +    const: ti,am62-ecap-capture
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  interrupts:
>> +    maxItems: 1
>> +
>> +  clocks:
>> +    maxItems: 1
>> +
>> +  clock-names:
>> +    const: fck
>> +
>> +  power-domains:
>> +    maxItems: 1
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - interrupts
>> +  - clocks
>> +  - clock-names
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    ecap0: capture@23100000 { /* eCAP in capture mode on am62x */
>> +        compatible = "ti,am62-ecap-capture";
>> +        reg = <0x00 0x23100000 0x00 0x100>;
>> +        interrupts = <GIC_SPI 113 IRQ_TYPE_EDGE_RISING>;
>> +        power-domains = <&k3_pds 51 TI_SCI_PD_EXCLUSIVE>;
> Does not look like you tested the bindings. Please run `make
> dt_binding_check` (see
> Documentation/devicetree/bindings/writing-schema.rst for instructions).


I did not indeed, sorry. I thought that checkpath also checked binding.

Thank you for your feedback. I'm going to prepare a new version.


>
>> +        clocks = <&k3_clks 51 0>;
>> +        clock-names = "fck";
>> +    };
>
> Best regards,
> Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/time/capture-tiecap.yaml b/Documentation/devicetree/bindings/iio/time/capture-tiecap.yaml
new file mode 100644
index 000000000000..4f08e49a8506
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/time/capture-tiecap.yaml
@@ -0,0 +1,53 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/capture-tiecap.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments Enhanced Capture (eCAP) Module
+
+maintainers:
+  - Julien Panis <jpanis@baylibre.com>
+
+description: |
+  The eCAP module resources can be used to capture timestamps
+  on input signal events (falling/rising edges).
+
+properties:
+  compatible:
+    const: ti,am62-ecap-capture
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: fck
+
+  power-domains:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    ecap0: capture@23100000 { /* eCAP in capture mode on am62x */
+        compatible = "ti,am62-ecap-capture";
+        reg = <0x00 0x23100000 0x00 0x100>;
+        interrupts = <GIC_SPI 113 IRQ_TYPE_EDGE_RISING>;
+        power-domains = <&k3_pds 51 TI_SCI_PD_EXCLUSIVE>;
+        clocks = <&k3_clks 51 0>;
+        clock-names = "fck";
+    };