devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Li <Frank.Li@nxp.com>
To: "Uwe Kleine-König" <ukleinek@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Philipp Zabel" <p.zabel@pengutronix.de>
Cc: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
	 imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org, Frank Li <Frank.Li@nxp.com>
Subject: [PATCH 1/3] dt-bindings: pwm: imx: Add compatible string imx8qxp-mipi-pwm
Date: Thu, 11 Jul 2024 17:08:56 -0400	[thread overview]
Message-ID: <20240711-pwm-v1-1-4d5766f99b8b@nxp.com> (raw)
In-Reply-To: <20240711-pwm-v1-0-4d5766f99b8b@nxp.com>

The pwm in imx8qxp mipi subsystem require one extra '32k' clock. So add
compatible string 'imx8qxp-mipi-pwm'. Increase maxItems for clock and
clock-names. Add allOf check to make sure other compatible string keep the
same restriction.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 Documentation/devicetree/bindings/pwm/imx-pwm.yaml | 29 +++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.yaml b/Documentation/devicetree/bindings/pwm/imx-pwm.yaml
index 04148198e34d0..750636985f937 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:
@@ -42,6 +39,7 @@ properties:
               - fsl,imx8mp-pwm
               - fsl,imx8mq-pwm
               - fsl,imx8qxp-pwm
+              - fsl,imx8qxp-mipi-pwm
           - const: fsl,imx27-pwm
 
   reg:
@@ -51,11 +49,15 @@ properties:
     items:
       - description: SoC PWM ipg clock
       - description: SoC PWM per clock
+      - description: 32k clock
+    minItems: 2
 
   clock-names:
     items:
       - const: ipg
       - const: per
+      - const: 32k
+    minItems: 2
 
   interrupts:
     maxItems: 1
@@ -69,6 +71,27 @@ required:
   - clocks
   - clock-names
 
+allOf:
+  - $ref: pwm.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - fsl,imx8qxp-mipi-pwm
+    then:
+      properties:
+        clock:
+          minItems: 3
+        clock-names:
+          minItems: 3
+    else:
+      properties:
+        clock:
+          maxItems: 2
+        clock-name:
+          maxItems: 2
+
 additionalProperties: false
 
 examples:

-- 
2.34.1


  reply	other threads:[~2024-07-11 21:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-11 21:08 [PATCH 0/3] pwm: imx: add 32k clock for 8qm/qxp and workaround a chip issue Frank Li
2024-07-11 21:08 ` Frank Li [this message]
2024-07-12 14:09   ` [PATCH 1/3] dt-bindings: pwm: imx: Add compatible string imx8qxp-mipi-pwm Rob Herring
2024-07-11 21:08 ` [PATCH 2/3] pwm: imx27: Add 32k clock for pwm in i.MX8QXP MIPI subsystem Frank Li
2024-07-12 14:06   ` Rob Herring
2024-07-11 21:08 ` [PATCH 3/3] pwm: imx27: workaround of the pwm output bug when decrease the duty cycle Frank Li
2024-07-12  6:26   ` Stefan Wahren
2024-07-12 14:40     ` Frank Li

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=20240711-pwm-v1-1-4d5766f99b8b@nxp.com \
    --to=frank.li@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=ukleinek@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).