public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	devicetree@vger.kernel.org, linux-pwm@vger.kernel.org,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] dt-bindings: pwm: imx-pwm: Add constraints for #pwm-cells
Date: Mon, 06 Nov 2023 11:49:19 +0100	[thread overview]
Message-ID: <8300676.T7Z3S40VBb@steina-w> (raw)
In-Reply-To: <20231106103621.2fh6fkpdafpz4toa@pengutronix.de>

Hello Uwe,

Am Montag, 6. November 2023, 11:36:21 CET schrieb Uwe Kleine-König:
> Hello,
> 
> [dropped Philippe Schenker from Cc as his email bounced in the past]
> 
> On Mon, Nov 06, 2023 at 10:52:03AM +0100, Alexander Stein wrote:
> > Only fsl,imx1-pwm comptabile devices use #pwm-cells = <2>. Newer SoCs
> > supportinverted PWM output, thus #pwm-cells needs to be set to 3.
> > 
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > ---
> > 
> >  .../devicetree/bindings/pwm/imx-pwm.yaml      | 20 ++++++++++++++++---
> >  1 file changed, 17 insertions(+), 3 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> > b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml index
> > c01dff3b7f843..59a981c0f39ab 100644
> > --- a/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> > +++ b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
> > @@ -9,9 +9,6 @@ title: Freescale i.MX PWM controller
> > 
> >  maintainers:
> >    - Philipp Zabel <p.zabel@pengutronix.de>
> > 
> > -allOf:
> > -  - $ref: pwm.yaml#
> > -
> > 
> >  properties:
> >    "#pwm-cells":
> >      description: |
> > 
> > @@ -74,6 +71,23 @@ required:
> >  additionalProperties: false
> > 
> > +allOf:
> > +  - $ref: pwm.yaml#
> > +
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: fsl,imx1-pwm
> > +    then:
> > +      properties:
> > +        "#pwm-cells":
> > +          enum: [2]
> 
> Given that arch/arm/boot/dts/nxp/imx/imx1.dtsi has:
> 
> 	pwm: pwm@208000 {
> 		#pwm-cells = <3>;
> 		compatible = "fsl,imx1-pwm";
> 		...
> 
> this looks wrong.

Indeed, something i doesn't match. Checking with [1] section 22.4.1 there are 
no bits regarding output inversion. Also pwm_imx1_apply returns -EINVAL if 
state->polarity != PWM_POLARITY_NORMAL.
So IMO "#pwm-cells = <3>" is wrong for imx1. If fixed to 2, this also matches 
the description for the value of #pwm-cells in imx-pwm.yaml.

Best regards,
Alexander

[1] https://www.nxp.com/docs/en/reference-manual/MC9328MX1RM.pdf

> 
> Best regards
> Uwe


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-11-06 10:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-06  9:52 [PATCH 0/3] imx8qm/imx8qxp: Support for inverted PWM Alexander Stein
2023-11-06  9:52 ` [PATCH 1/3] dt-bindings: pwm: imx-pwm: Add constraints for #pwm-cells Alexander Stein
2023-11-06 10:36   ` Uwe Kleine-König
2023-11-06 10:49     ` Alexander Stein [this message]
2023-11-06 11:02       ` Uwe Kleine-König
2023-12-05 12:36   ` Shawn Guo
2023-12-05 12:37     ` Shawn Guo
2023-11-06  9:52 ` [PATCH 2/3] arm64: dts: freescale: imx8-ss-lsio: Fix #pwm-cells Alexander Stein
2023-11-06 10:48   ` Uwe Kleine-König
2023-11-06  9:52 ` [PATCH 3/3] arm64: dts: freescale: imx8-ss-dma: " Alexander Stein
2023-11-06 10:49   ` Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8300676.T7Z3S40VBb@steina-w \
    --to=alexander.stein@ew.tq-group.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-pwm@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox