From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 0F03B3F4DC2 for ; Thu, 18 Jun 2026 12:42:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781786543; cv=none; b=JwtwW7RLyRvUmMfoES/OKmdGBDkq+E79ivbVJZlVT1JQ3jxi5c+42ITRyN5rIMwQ9pszPo30NGDBrhCW2zVqM3F8guQ7MHX/eDAm4GMNsY5ZueqtWoNMW3xEqKQglJF/Dk8Up0oqKNoa/RajbgZFRN0rp4aQsW6VvANTG8Md6vk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781786543; c=relaxed/simple; bh=jI2F/ByiP5loXTu6awXWLF0O1PHvQZ02TY8duJZD+mM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=tGmKbI7MTf/XAIaSIjM7LFNHHoPye3DI6cjnrTil2NpmrUXzLUOjy7t9lPjC7lQ8+mbd2J/hgggtHce0hVa1oDNtn0N0pXE8qgUmDSV9dB3HG0/+nGb5CxKa1M313GZKbLP/YAVlOnl72jkGNYJkYaFsEAk5YEWYI0HFXdi39xU= 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.173 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-f173.google.com with SMTP id d9443c01a7336-2c68190ade4so15143275ad.0 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=GhUcqNLdlHFkIOnxYjb4Ilbf38DZnOCl42/j3jXyqTIxdkjurmibgYVUzBBXdMOceC IgsRyKGdPiXwaSsTHTwItFd2Eqm6HUqdv2uI8lb035pk9Ed3HIfktCIeoxtgTgL4LTJR jnasuGA8mPYfww648r/CLtENnhjlx+TwWFoUXIPUeTUzCz0cUQw1VZEacnZ2dSByQ1mz /nQLNTRQseTRkCE0htX/+SB6aLDvOJxY3UFlTQ4fCTck7oRdUcGZWIXS25/KVRGoYUXT 5qFZOeu5Buh2XPTycmZkz4x3MLJnF6vbXWPPUT0/4kIGt5aNhqNLkK8pOKazME1m1OMO pLBg== X-Forwarded-Encrypted: i=1; AFNElJ+Sk1gJs5Mz/FsaDBsUQWXXzHM8q98gAzihT3Gskzw9lgIyqnTdiw0RJH02mLzzP93Qeo80V1FQzHO6D4s=@vger.kernel.org X-Gm-Message-State: AOJu0YzHoSWns3TI4YOg1fc4k6C3v3oM5cgqxgczLgRuksSG78yYU3vZ Lb1nzhgGhCtivEGZYcmH4SJIrArYkllYraclXHksggV0SiezQHQtyN8e X-Gm-Gg: AfdE7cmDDY7PMxUr46+p4aHd99XUxt/Ka6BJb22/jCXdIqclyAUARjX+Qjs9TbjNebe Ms30XKS7Oizrgklh4K9n9QNcRjwWJ0GLkqJ+n+zMhtmSEmEwWzK82B+3xQSkEpQ7b95k0rAThXH 6Z7UVcp7FNcUzLIe6gGvI0G9g1ujsuKkv6i0bE09BbakUeg73ejSD5uGYsS2gaEi9VQ23ZgSuj7 TuUnDhC59z55SNda5I/hObuqji+St9ggOiD08N/j/2enCpMsJo56V3L+zJTnAEckHgNGrSv6CLb lB5Jyi1VEkxyyvAWhuMBpHR1EioqA9JqYuaR3NpsqZpYDfkOlAGFomhCmKGxzuRBcGI/8VO9uc/ OWDo4yuqbT9OVIgiy/+q8UI3TUIoNG28fxXTS2i2JcAcTcERrSsMWUoJI0b2hC/4uwwpM41CGIA KGkt7/wOs8+0WPhp7LxJRLkqfXH7EZJOptLQgid3QtDYw= 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: linux-kernel@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