diff mbox series

[1/6] dt-bindings: pwm: add dt-bindings for mule pwm-over-i2c controller

Message ID 20240529-buzzer_support-v1-1-fd3eb0a24442@cherry.de (mailing list archive)
State New
Headers show
Series Add Mule PWM-over-I2C support | expand

Commit Message

Farouk Bouabid May 29, 2024, 10:10 a.m. UTC
Mule is a device that controls a PWM output signal based on I2C commands.

Signed-off-by: Farouk Bouabid <farouk.bouabid@cherry.de>
---
 .../devicetree/bindings/pwm/tsd,pwm-mule.yaml      | 46 ++++++++++++++++++++++
 1 file changed, 46 insertions(+)

Comments

Conor Dooley May 29, 2024, 8:29 p.m. UTC | #1
On Wed, May 29, 2024 at 12:10:30PM +0200, Farouk Bouabid wrote:
> Mule is a device that controls a PWM output signal based on I2C commands.
> 
> Signed-off-by: Farouk Bouabid <farouk.bouabid@cherry.de>
> ---
>  .../devicetree/bindings/pwm/tsd,pwm-mule.yaml      | 46 ++++++++++++++++++++++
>  1 file changed, 46 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/pwm/tsd,pwm-mule.yaml b/Documentation/devicetree/bindings/pwm/tsd,pwm-mule.yaml
> new file mode 100644
> index 000000000000..71a940a2a644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/tsd,pwm-mule.yaml
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pwm/tsd,pwm-mule.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Mule PWM-over-I2C controller
> +
> +description: |

This | is not needed.

> +  A device that outputs a PWM signal based on I2C commands.
> +
> +maintainers:
> +  - Farouk Bouabid <farouk.bouabid@cherry.de>
> +  - Quentin Schulz <quentin.schulz@cherry.de>
> +
> +allOf:
> +  - $ref: pwm.yaml#
> +
> +properties:
> +  compatible:
> +    const: tsd,pwm-mule
> +
> +  reg:
> +    maxItems: 1
> +
> +  "#pwm-cells":
> +    const: 2

No clocks or supplies?
I tried to google for some documentation for this device, but only found
archives of this mail thread..

Thanks,
Conor.

> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      pwm@18 {
> +        compatible = "tsd,pwm-mule";
> +        reg = <0x18>;
> +        #pwm-cells = <2>;
> +      };
> +    };
> 
> -- 
> 2.34.1
>
Farouk Bouabid May 31, 2024, 4:19 p.m. UTC | #2
Hi Conor,

On 29.05.24 22:29, Conor Dooley wrote:
> On Wed, May 29, 2024 at 12:10:30PM +0200, Farouk Bouabid wrote:


...


>> +  A device that outputs a PWM signal based on I2C commands.
>> +
>> +maintainers:
>> +  - Farouk Bouabid <farouk.bouabid@cherry.de>
>> +  - Quentin Schulz <quentin.schulz@cherry.de>
>> +
>> +allOf:
>> +  - $ref: pwm.yaml#
>> +
>> +properties:
>> +  compatible:
>> +    const: tsd,pwm-mule
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  "#pwm-cells":
>> +    const: 2
> No clocks or supplies?
> I tried to google for some documentation for this device, but only found
> archives of this mail thread..

You can't find documentation for this device because we don't sell it 
standalone. It is part of our boards.

This device handles its clock internally. So there is no need for clock. 
As for the power-supply, it is so far

always enabled but I will add a property.


Cheers,

Farouk
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pwm/tsd,pwm-mule.yaml b/Documentation/devicetree/bindings/pwm/tsd,pwm-mule.yaml
new file mode 100644
index 000000000000..71a940a2a644
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/tsd,pwm-mule.yaml
@@ -0,0 +1,46 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/tsd,pwm-mule.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mule PWM-over-I2C controller
+
+description: |
+  A device that outputs a PWM signal based on I2C commands.
+
+maintainers:
+  - Farouk Bouabid <farouk.bouabid@cherry.de>
+  - Quentin Schulz <quentin.schulz@cherry.de>
+
+allOf:
+  - $ref: pwm.yaml#
+
+properties:
+  compatible:
+    const: tsd,pwm-mule
+
+  reg:
+    maxItems: 1
+
+  "#pwm-cells":
+    const: 2
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      pwm@18 {
+        compatible = "tsd,pwm-mule";
+        reg = <0x18>;
+        #pwm-cells = <2>;
+      };
+    };