* [PATCH 1/3] dt-bindings: pwm: add support for MC33XS2410
[not found] <20240228133236.748225-1-dima.fedrau@gmail.com>
@ 2024-02-28 13:32 ` Dimitri Fedrau
2024-02-28 13:59 ` Krzysztof Kozlowski
0 siblings, 1 reply; 4+ messages in thread
From: Dimitri Fedrau @ 2024-02-28 13:32 UTC (permalink / raw)
Cc: Dimitri Fedrau, Uwe Kleine-König, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-pwm, devicetree,
linux-kernel
Adding documentation for MC33XS2410 pwm driver.
Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com>
---
.../bindings/pwm/nxp,mc33xs2410.yaml | 105 ++++++++++++++++++
1 file changed, 105 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml
diff --git a/Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml b/Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml
new file mode 100644
index 000000000000..bd387dbe69be
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml
@@ -0,0 +1,105 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/nxp,mc33xs2410.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MC33XS2410 PWM driver
+
+maintainers:
+ - Dimitri Fedrau <dima.fedrau@gmail.com>
+
+allOf:
+ - $ref: pwm.yaml#
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+ compatible:
+ const: nxp,mc33xs2410
+
+ reg:
+ maxItems: 1
+
+ spi-max-frequency:
+ maximum: 10000000
+
+ spi-cpha: true
+
+ spi-cs-setup-delay-ns:
+ minimum: 100
+ default: 100
+
+ spi-cs-hold-delay-ns:
+ minimum: 10
+ default: 10
+
+ spi-cs-inactive-delay-ns:
+ minimum: 300
+ default: 300
+
+ reset-gpios:
+ description:
+ GPIO connected to the active low reset pin.
+ maxItems: 1
+
+ "#pwm-cells":
+ const: 3
+
+ pwms:
+ description:
+ Direct inputs(di0-3) are used to directly turn-on or turn-off the
+ outputs. The external PWM clock can be used if the internal clock
+ doesn't meet timing requirements.
+ maxItems: 5
+
+ pwm-names:
+ items:
+ - const: di0
+ - const: di1
+ - const: di2
+ - const: di3
+ - const: ext_clk
+
+ vdd-supply:
+ description:
+ Logic supply voltage
+
+ vspi-supply:
+ description:
+ Supply voltage for SPI
+
+ vpwr-supply:
+ description:
+ Power switch supply
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pwm@0 {
+ compatible = "nxp,mc33xs2410";
+ reg = <0x0>;
+ spi-max-frequency = <4000000>;
+ spi-cpha;
+ spi-cs-setup-delay-ns = <100>;
+ spi-cs-hold-delay-ns = <10>;
+ spi-cs-inactive-delay-ns = <300>;
+ reset-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
+ #pwm-cells = <3>;
+ vdd-supply = <®_3v3>;
+ vspi-supply = <®_3v3>;
+ vpwr-supply = <®_24v0>;
+ };
+ };
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] dt-bindings: pwm: add support for MC33XS2410
2024-02-28 13:32 ` [PATCH 1/3] dt-bindings: pwm: add support for MC33XS2410 Dimitri Fedrau
@ 2024-02-28 13:59 ` Krzysztof Kozlowski
2024-02-28 15:41 ` Dimitri Fedrau
0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-28 13:59 UTC (permalink / raw)
To: Dimitri Fedrau
Cc: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-pwm, devicetree, linux-kernel
On 28/02/2024 14:32, Dimitri Fedrau wrote:
> Adding documentation for MC33XS2410 pwm driver.
Driver as Linux driver? If so, please rephrase to describe hardware.
>
> Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com>
> ---
> .../bindings/pwm/nxp,mc33xs2410.yaml | 105 ++++++++++++++++++
> 1 file changed, 105 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml
>
> diff --git a/Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml b/Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml
> new file mode 100644
> index 000000000000..bd387dbe69be
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml
> @@ -0,0 +1,105 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pwm/nxp,mc33xs2410.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MC33XS2410 PWM driver
Driver as Linux driver? If so, please rephrase to describe hardware.
> +
> +maintainers:
> + - Dimitri Fedrau <dima.fedrau@gmail.com>
> +
> +allOf:
> + - $ref: pwm.yaml#
> + - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +properties:
> + compatible:
> + const: nxp,mc33xs2410
> +
> + reg:
> + maxItems: 1
> +
> + spi-max-frequency:
> + maximum: 10000000
> +
> + spi-cpha: true
> +
> + spi-cs-setup-delay-ns:
> + minimum: 100
> + default: 100
> +
> + spi-cs-hold-delay-ns:
> + minimum: 10
> + default: 10
> +
> + spi-cs-inactive-delay-ns:
> + minimum: 300
> + default: 300
> +
> + reset-gpios:
> + description:
> + GPIO connected to the active low reset pin.
> + maxItems: 1
> +
> + "#pwm-cells":
> + const: 3
> +
> + pwms:
> + description:
> + Direct inputs(di0-3) are used to directly turn-on or turn-off the
> + outputs. The external PWM clock can be used if the internal clock
> + doesn't meet timing requirements.
pwm is input for pwm?
> + maxItems: 5
> +
> + pwm-names:
> + items:
> + - const: di0
> + - const: di1
> + - const: di2
> + - const: di3
> + - const: ext_clk
Aren't these clocks?
> +
> + vdd-supply:
> + description:
> + Logic supply voltage
> +
> + vspi-supply:
> + description:
> + Supply voltage for SPI
> +
> + vpwr-supply:
> + description:
> + Power switch supply
> +
> + interrupts:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
Instead:
unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + spi {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + pwm@0 {
> + compatible = "nxp,mc33xs2410";
> + reg = <0x0>;
> + spi-max-frequency = <4000000>;
> + spi-cpha;
> + spi-cs-setup-delay-ns = <100>;
> + spi-cs-hold-delay-ns = <10>;
> + spi-cs-inactive-delay-ns = <300>;
> + reset-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
> + #pwm-cells = <3>;
Make example complete, so provide all properties, like interrupts, pwms
and whatever you have in the binding.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] dt-bindings: pwm: add support for MC33XS2410
2024-02-28 13:59 ` Krzysztof Kozlowski
@ 2024-02-28 15:41 ` Dimitri Fedrau
2024-02-29 7:45 ` Krzysztof Kozlowski
0 siblings, 1 reply; 4+ messages in thread
From: Dimitri Fedrau @ 2024-02-28 15:41 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-pwm, devicetree, linux-kernel
Am Wed, Feb 28, 2024 at 02:59:48PM +0100 schrieb Krzysztof Kozlowski:
> On 28/02/2024 14:32, Dimitri Fedrau wrote:
> > Adding documentation for MC33XS2410 pwm driver.
>
> Driver as Linux driver? If so, please rephrase to describe hardware.
>
Will fix it.
> >
> > Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com>
> > ---
> > .../bindings/pwm/nxp,mc33xs2410.yaml | 105 ++++++++++++++++++
> > 1 file changed, 105 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml b/Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml
> > new file mode 100644
> > index 000000000000..bd387dbe69be
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml
> > @@ -0,0 +1,105 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/pwm/nxp,mc33xs2410.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: MC33XS2410 PWM driver
>
> Driver as Linux driver? If so, please rephrase to describe hardware.
>
Will fix it.
> > +
> > +maintainers:
> > + - Dimitri Fedrau <dima.fedrau@gmail.com>
> > +
> > +allOf:
> > + - $ref: pwm.yaml#
> > + - $ref: /schemas/spi/spi-peripheral-props.yaml#
> > +
> > +properties:
> > + compatible:
> > + const: nxp,mc33xs2410
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + spi-max-frequency:
> > + maximum: 10000000
> > +
> > + spi-cpha: true
> > +
> > + spi-cs-setup-delay-ns:
> > + minimum: 100
> > + default: 100
> > +
> > + spi-cs-hold-delay-ns:
> > + minimum: 10
> > + default: 10
> > +
> > + spi-cs-inactive-delay-ns:
> > + minimum: 300
> > + default: 300
> > +
> > + reset-gpios:
> > + description:
> > + GPIO connected to the active low reset pin.
> > + maxItems: 1
> > +
> > + "#pwm-cells":
> > + const: 3
> > +
> > + pwms:
> > + description:
> > + Direct inputs(di0-3) are used to directly turn-on or turn-off the
> > + outputs. The external PWM clock can be used if the internal clock
> > + doesn't meet timing requirements.
>
> pwm is input for pwm?
>
Yes.
> > + maxItems: 5
> > +
> > + pwm-names:
> > + items:
> > + - const: di0
> > + - const: di1
> > + - const: di2
> > + - const: di3
> > + - const: ext_clk
>
> Aren't these clocks?
>
di0-3 are PWM input signals which are translated to output voltage "vpwr".
ext_clk is described as PWM clock in the datasheet. Didn't used it, just
mentioned it here for completeness.
> > +
> > + vdd-supply:
> > + description:
> > + Logic supply voltage
> > +
> > + vspi-supply:
> > + description:
> > + Supply voltage for SPI
> > +
> > + vpwr-supply:
> > + description:
> > + Power switch supply
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > +required:
> > + - compatible
> > + - reg
> > +
> > +additionalProperties: false
>
> Instead:
> unevaluatedProperties: false
>
Will fix it.
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/gpio/gpio.h>
> > + spi {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + pwm@0 {
> > + compatible = "nxp,mc33xs2410";
> > + reg = <0x0>;
> > + spi-max-frequency = <4000000>;
> > + spi-cpha;
> > + spi-cs-setup-delay-ns = <100>;
> > + spi-cs-hold-delay-ns = <10>;
> > + spi-cs-inactive-delay-ns = <300>;
> > + reset-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
> > + #pwm-cells = <3>;
>
> Make example complete, so provide all properties, like interrupts, pwms
> and whatever you have in the binding.
>
I could make the binding complete, but I haven't used all properties nor
does the driver supports them.
> Best regards,
> Krzysztof
>
Best regards,
Dimitri
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] dt-bindings: pwm: add support for MC33XS2410
2024-02-28 15:41 ` Dimitri Fedrau
@ 2024-02-29 7:45 ` Krzysztof Kozlowski
0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-29 7:45 UTC (permalink / raw)
To: Dimitri Fedrau
Cc: Uwe Kleine-König, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-pwm, devicetree, linux-kernel
On 28/02/2024 16:41, Dimitri Fedrau wrote:
>>> + maxItems: 5
>>> +
>>> + pwm-names:
>>> + items:
>>> + - const: di0
>>> + - const: di1
>>> + - const: di2
>>> + - const: di3
>>> + - const: ext_clk
>>
>> Aren't these clocks?
>>
> di0-3 are PWM input signals which are translated to output voltage "vpwr".
> ext_clk is described as PWM clock in the datasheet. Didn't used it, just
> mentioned it here for completeness.
Then it looks more like a clock, so clocks: property.
>>> +
>>> + vdd-supply:
>>> + description:
>>> + Logic supply voltage
>>> +
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-29 7:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240228133236.748225-1-dima.fedrau@gmail.com>
2024-02-28 13:32 ` [PATCH 1/3] dt-bindings: pwm: add support for MC33XS2410 Dimitri Fedrau
2024-02-28 13:59 ` Krzysztof Kozlowski
2024-02-28 15:41 ` Dimitri Fedrau
2024-02-29 7:45 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).