From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D84F3F54D4 for ; Thu, 18 Jun 2026 12:42:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781786545; cv=none; b=utyUjXV6D98cxBFj+FlC5REqvsxWawVcwsKclB8euooD+BXh9kw003ZVRwfI5izVIxnF4RxbtWefdTEFISlJT4DavtU5k9o7ZGtwgEyYuce9bAv15OKloiNI1MGpEWXKwUpESWnqHXS3QCQ/0UQwF+XlsvRGBkymg7gjc1DWzu0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781786545; c=relaxed/simple; bh=jI2F/ByiP5loXTu6awXWLF0O1PHvQZ02TY8duJZD+mM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=Nwlw5HW/qnxEZ33U0SdkZ5HSX0oHWSkFPdJcWzKGCxvvXOaHibZGGJHDrTJ/BR+KCUmstX4ooF2MtGWja8Qp02c61mtipRc3kmO3GOpmvVvBTUvmcNWZvBHEX48E05z291oOsezwp+nhiaf+A3dquyw2SDciTtwPAY1KHuw1ktg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kX+5H0i7; arc=none smtp.client-ip=209.85.214.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kX+5H0i7" Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-2c6d4851142so9672485ad.1 for ; Thu, 18 Jun 2026 05:42:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781786536; x=1782391336; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=Uv/Wqd9A96BxNSdILnrTOWIu5oJDMD/dfSiDHSmHZbY=; b=kX+5H0i7zoH8xu9+xeCO1KwKnmeftOhPeLL6NKyVjCbUiXKaawpHWyV94AFz0b8zM/ EmELR/G9FqWqYcoYdmAUYeIT9AswUllqZTG3QuiLZy4Xa8zHJH6kGaPLVukktbOsL9Xo iv1Frjc2Ix8GT+ypH0NQgio8Ndwogl22HYti4Z9/7cwgI50NvDm1+iV3+vzWDNZrTIJ0 B0Kde2ivPxd7g8tiky2SdKU4rrg9jkyN8t1zRQmIdPxdsPS4h4YtFESyT2m9iDqbGtP2 Jh4M/tpAiBagxNfjcim5BrrQ7B49l0TDqDCavoaS0HnkV9HbDVMOFxwaElmByCPRSIOa dH9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781786536; x=1782391336; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Uv/Wqd9A96BxNSdILnrTOWIu5oJDMD/dfSiDHSmHZbY=; b=qjrClHl5dLa6eqnsgW54QlzgaINeatvzoSyp+CxMUAohcRBXnvcK5R4wBYhVyA7YIy jSsw2023emI2sYAnr7XTMfTxBcE65vXkXym/wvvit9b/09cOSBJHYj2ygvjr3+pv1o/C /cjySss8CSIEXDNrn+kpzGrN8JhCgrNl4PN98r9GIoUA/S4fLjEyKGIni4RsgXYouan0 4I8mSwr/RxllBLfDccPb3dkydqtA7AAKFJaSfmWpDaPL5JGVL1f1keXHq7x09GrHDJ2S 5fHwNbVX5/6qogHW/zt+axCG1YpGjLRoWg3UjdVRjMyJd7TOp24BjipVHWSOv4Hd+qh2 Sa/g== X-Forwarded-Encrypted: i=1; AFNElJ+lxaarWg9dU0jmiC+4frnY92eatyEpgQNn5nb+ttPIAt/leHZOavA/O9Iy0emxz4nDr1fpsFc4e8MN@vger.kernel.org X-Gm-Message-State: AOJu0YxHttF1dfNGOjJ+VogCapu0RxCR+QYUflNipzHiMfzzESIZLtrK sWxfEyFjqIElHNx1T+k3ePinHg0n8Y/cweb4/LjvZnrlSWxsaTDCZxP9 X-Gm-Gg: AfdE7ckgKus9qRIO17mnQmRVlROK8RD9/cJKas0tTlq3oaBc0wuBQaVMYYVwZPzClRg G9Fo7p0HiO6fXz4prCJ55yvEonhjokQLH+H5zWyRX2g9gCjONAq4nwLsS/+stzdOIrV9OFyl23Q N0yI+slblFi11LX6pS3AwEbdOrOtMyYTgwfN/1yqzibZ5PXHmhpGm5N3rwF53gtetEK9fSfbFym dDD7Kj/WvrJUY72SF8YX7VCjtuTYe2cDcHt8QgL/5k6Zj5wVPL6qK/D/iZASUaq0O+QywJ3692C NJtG3rL55vkid4uHsncSp5/QNVxeJLAsSsko+W+rq+acsInR0gwaW+R0mqZ3W3h3zSoQqVHCbgq EYDIO6D5oNqyDy/AB4aoti1GC9bj5sv/nIFCtYSwPvGeQGvfv6Wbd+bT5xorVNIVZLtGQhrrrJb 5BoBLa24S4pd5pibAHAWkeDV5UvRveuGruFLuFJd4uVKc= X-Received: by 2002:a17:903:2a88:b0:2c6:8d95:fd7e with SMTP id d9443c01a7336-2c6de3dffb8mr38361875ad.6.1781786536064; Thu, 18 Jun 2026 05:42:16 -0700 (PDT) Received: from Black-Pearl.localdomain ([49.207.61.2]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-2c432d8a039sm196299455ad.62.2026.06.18.05.42.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2026 05:42:15 -0700 (PDT) From: Charan Pedumuru Date: Thu, 18 Jun 2026 12:42:07 +0000 Subject: [PATCH v2] dt-bindings: pwm: st,pwm: convert to DT schema Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260618-st-pwm-v2-1-c792d5795ce2@gmail.com> X-B4-Tracking: v=1; b=H4sIAJ7nM2oC/2WNwQ6CMBBEf4Xs2TW0KIIn/8NwqGWBNUJJW1FD+ u+2ePQ0ecmbmRUcWSYH52wFSws7NlMEuctAD2rqCbmNDDKXZV6KAp3H+TWi6Ei1VOoYBUR5ttT xexu6Nj92z9udtE/tZAzsvLGf7WkRyfsbXQQKPBwrLXVVn/JaXfpR8WOvzQhNCOELUKdX2a4AA AA= X-Change-ID: 20260613-st-pwm-1feade6cfea3 To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Pal Singh Cc: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Charan Pedumuru X-Mailer: b4 0.15.2 Convert STMicroelectronics STiH41x PWM/Capture controller binding to DT schema. Changes during conversion: - Add 'interrupts' to the required list. The text binding listed it as required and the driver unconditionally calls platform_get_irq(). - Drop pinctrl-0 from the required list as pinctrl properties are inherited and validated by the pinctrl schema. Signed-off-by: Charan Pedumuru --- Changes in v2: - Add the missing interrupts to the required following the old binding. - Modify commit message to explain the changes made. - Link to v1: https://patch.msgid.link/20260613-st-pwm-v1-1-458c2c89709a@gmail.com --- Documentation/devicetree/bindings/pwm/pwm-st.txt | 43 ----------- Documentation/devicetree/bindings/pwm/st,pwm.yaml | 93 +++++++++++++++++++++++ 2 files changed, 93 insertions(+), 43 deletions(-) diff --git a/Documentation/devicetree/bindings/pwm/pwm-st.txt b/Documentation/devicetree/bindings/pwm/pwm-st.txt deleted file mode 100644 index 19fce774cafa..000000000000 --- a/Documentation/devicetree/bindings/pwm/pwm-st.txt +++ /dev/null @@ -1,43 +0,0 @@ -STMicroelectronics PWM driver bindings --------------------------------------- - -Required parameters: -- compatible : "st,pwm" -- #pwm-cells : Number of cells used to specify a PWM. First cell - specifies the per-chip index of the PWM to use and the - second cell is the period in nanoseconds - fixed to 2 - for STiH41x. -- reg : Physical base address and length of the controller's - registers. -- pinctrl-names: Set to "default". -- pinctrl-0: List of phandles pointing to pin configuration nodes - for PWM module. - For Pinctrl properties, please refer to [1]. -- clock-names: Valid entries are "pwm" and/or "capture". -- clocks: phandle of the clock used by the PWM module. - For Clk properties, please refer to [2]. -- interrupts: IRQ for the Capture device - -Optional properties: -- st,pwm-num-chan: Number of available PWM channels. Default is 0. -- st,capture-num-chan: Number of available Capture channels. Default is 0. - -[1] Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt -[2] Documentation/devicetree/bindings/clock/clock-bindings.txt - -Example: - -pwm1: pwm@fe510000 { - compatible = "st,pwm"; - reg = <0xfe510000 0x68>; - #pwm-cells = <2>; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_pwm1_chan0_default - &pinctrl_pwm1_chan1_default - &pinctrl_pwm1_chan2_default - &pinctrl_pwm1_chan3_default>; - clocks = <&clk_sysin>; - clock-names = "pwm"; - st,pwm-num-chan = <4>; - st,capture-num-chan = <2>; -}; diff --git a/Documentation/devicetree/bindings/pwm/st,pwm.yaml b/Documentation/devicetree/bindings/pwm/st,pwm.yaml new file mode 100644 index 000000000000..a045502e0e70 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/st,pwm.yaml @@ -0,0 +1,93 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/st,pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STiH41x PWM/Capture controller + +maintainers: + - Ajit Pal Singh + +description: + The STiH41x PWM controller supports both PWM output and input capture + functionality. It provides multiple PWM output channels for generating + variable duty-cycle waveforms, and multiple input capture channels for + measuring external signal periods and pulse widths. PWM output channels + and input capture channels are configured independently via + st,pwm-num-chan and st,capture-num-chan respectively. + +allOf: + - $ref: pwm.yaml# + +properties: + compatible: + const: st,pwm + + reg: + maxItems: 1 + + "#pwm-cells": + const: 2 + + pinctrl-names: + const: default + + clock-names: + items: + enum: [pwm, capture] + minItems: 1 + maxItems: 2 + + clocks: + minItems: 1 + maxItems: 2 + + interrupts: + description: IRQ line for the capture device. + maxItems: 1 + + st,pwm-num-chan: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Number of available PWM output channels. + minimum: 0 + maximum: 4 + default: 0 + + st,capture-num-chan: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Number of available input capture channels. + minimum: 0 + maximum: 4 + default: 0 + +required: + - reg + - compatible + - "#pwm-cells" + - pinctrl-names + - clock-names + - clocks + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include + pwm@fe510000 { + compatible = "st,pwm"; + reg = <0xfe510000 0x68>; + interrupts = ; + #pwm-cells = <2>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm1_chan0_default + &pinctrl_pwm1_chan1_default + &pinctrl_pwm1_chan2_default + &pinctrl_pwm1_chan3_default>; + clocks = <&clk_sysin>; + clock-names = "pwm"; + st,pwm-num-chan = <4>; + st,capture-num-chan = <2>; + }; +... --- base-commit: c425609d6ac4012c8bbf01ec2e10e801b1923a7b change-id: 20260613-st-pwm-1feade6cfea3 Best regards, -- Charan Pedumuru