From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f169.google.com (mail-dy1-f169.google.com [74.125.82.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 04B683C2B9C for ; Thu, 25 Jun 2026 11:24:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782386664; cv=none; b=EMnLSd3/Kc8kqCsBNk6b8wml3HS5ow1l+nzk0CGJGPe/90GxH+RxqEdSgooVD1u71SGPftO9xS4ibv6hlBHnKM2KXdNSRw7uRjxyV9orzjIAZF/Ley5O0TTclOu9VGBt3oxDL+K08nMAHvdpmLN+nxxYl/qDZuUzis03uWgPNzU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782386664; c=relaxed/simple; bh=z6Gw1SPw/lmw93dnDilsrhDw8RqP2rNo7ttvYQy1Rlc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=Hqcgq7QNzbgx5RS4Un6XrrcNAT80NeKe6a2GM7+Epp2ifsdmaDZKWJof1fVLh205A+n15iCN7TV9BZRnBcSkrbT8L18jTEJrTMOOQ2Jk7R8clVaWSC4VIjq28VueFTTg+sU0Xc2X7m31UKDDMwU77/mP1M3EZ3ndZ29dePrRlIM= 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=Ppza4FFM; arc=none smtp.client-ip=74.125.82.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="Ppza4FFM" Received: by mail-dy1-f169.google.com with SMTP id 5a478bee46e88-30c591fb1cbso3136321eec.1 for ; Thu, 25 Jun 2026 04:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782386662; x=1782991462; 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=SU+MC387FWgefKqGRXg3QcxpIQf2/exgLisxfx7HExg=; b=Ppza4FFMEJlyPOD8/R28Bv5PS1NuUcfhAzDGv+Xqn3IMqDGWC8UQWUJoqVOR+Uu35V 2hPGl7qb4I3elgGxJD6H73MSZ1t/afVPxtPKhHJnjmNvTPJCqYG6dXK01fcXIUfhcjZH cAcbY/OLWBL3JOiFDh0H4ZdHVrXtI2XHHOXehVG+0pCdz+R8sg3ExR0+ktksiDT5x4tv ZlCs6Mme2ASBIq+FWdRTFEmiomrDpRfDqDrYffntHyRpAJDNIRS3ZXj7m6C/LgtwoZsk XYGUjMIxOjQo6jnaXotPGwDgaf+a2vujUcZnPIJjw3uUCd+COCZUmkdRimI0cYf74Q71 /8/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782386662; x=1782991462; 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=SU+MC387FWgefKqGRXg3QcxpIQf2/exgLisxfx7HExg=; b=NrMZJ6xHaU+jT0rmSVrO7r2mVg/rrF726NLJ9TeUFOFFthkg2MrWEg/4S723nr59eg U0wuxKaeX/l/pOBgnp230YX1bRIYPBka5oxMlgzIybU8JI8AQAPhYG8yv6rdmMCWE6Mj H5UpZuWsZn7mUnPGscxjZ62hb86bXnXEU6geAlXWQaYUhYwhVb2gyblYP5EoNEU0cq3T J7fqbCefmxg68UhtuRJyf+cR5gOXcYWxsOtlk8XgTCWoYsO9lw7yoSl7R6z5wNi4sRuQ hjIMRzjaRxD7D+kMYADZJyIzvKnQdiFkVLc9ld8cgINKkJf18FY07+W1Zk8kURvVlAiH VLWg== X-Forwarded-Encrypted: i=1; AHgh+Rrj0mlcymxUHdMgdCE4j6bXX4OHWia39z/wSyhURlJvQSiq0J1PyOhf/HYUEdoRregH6xtynNPhL1jFMnM=@vger.kernel.org X-Gm-Message-State: AOJu0YwKGmh7QTVT86QwWCVJEcgmJzgX5v5XgmqdUKKCMEEl46FFHxbq CKmLB45eyKPaUKPTjE5sS20d1kCVSoHkcewilFjj3jb5OkGeGYnte9sN X-Gm-Gg: AfdE7ckBB5sbS5rAtah//tySbwlg5EhCtdSqk99pKOkXQsq5KlJ7ZkQXU1ei5f+XdNQ q57Of8eEYNxISzBeyVFkCbD3AAAgkivA7/4zdGxYTis/EHUyOwh+AQIbQWBKNy4mRHhyTAsmgjJ qJ8xoxRfuy94d6xpHFh0qCnW/sKaReBrNUM4XMfhV5mz3aMmEVzjfMvx70yqIl9Ucbee1hbuBGm aDFyP5dBRPoocBIm5ZG2h/E+gisoMcqrC9pUZ/JT8ojqZKRMmOzVmVlER+xKhcNBuif88Xtjiu4 JBg3VUMFFW9ks23T/NOiru2DpLoLfg8spPAeOE/ADRWn7svoRGDaMj6Kvj7uBfA5rrLENNgmMWY n+nTo9Ms7k8fWax+0bhOl3l9ZNo6Fo8EQGAPI+acSwpGbPHOt1dmFMNwa+NVDYB1fL6D5EaUQr4 hXRdE2TuUf/Q/w+BKA9wPI3eK1/Mx1ZW2PMg== X-Received: by 2002:a05:7301:e2a:b0:30c:72ab:89df with SMTP id 5a478bee46e88-30c84dc2b24mr2058486eec.29.1782386662131; Thu, 25 Jun 2026 04:24:22 -0700 (PDT) Received: from Black-Pearl.localdomain ([49.207.56.32]) by smtp.googlemail.com with ESMTPSA id 5a478bee46e88-30c7c9e9214sm8357352eec.20.2026.06.25.04.24.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2026 04:24:21 -0700 (PDT) From: Charan Pedumuru Date: Thu, 25 Jun 2026 11:24:15 +0000 Subject: [PATCH v4] dt-bindings: pwm: st,sti-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: <20260625-st-pwm-v4-1-958d7d6bdf39@gmail.com> X-B4-Tracking: v=1; b=H4sIAN4PPWoC/2XNTQ6CMBAF4KuQrq2hA4XWlfcwLsowQI38hCJqC He3YEKIriYved+biTnqLTl2CibW02idbRsf4kPAsDJNSdzmPjMIIQkTEXE38O5Zc1GQySlBfyL my11PhX2tQ5frN7tHdiMcFr00KuuGtn+vn0ax9P5GR8EFj6VCQKXTUJtzWRt7P2Jbs2V0hD1TG wPPMNWQy1RLJPhl0Y6B3FjkmUHSWVEoJUHv2TzPHyxRJtwcAQAA X-Change-ID: 20260613-st-pwm-1feade6cfea3 To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones 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: - Fix compatible string from "st,pwm" to "st,sti-pwm" to match the actual hardware variant naming convention used across STi bindings. - Drop pinctrl-names from the required list as pinctrl properties are inherited and validated by the pinctrl schema. Signed-off-by: Charan Pedumuru --- Changes in v4: - Fix compatible to "st,sti-pwm" in examples. - Modify subject line to point to the correct YAML file. - Link to v3: https://patch.msgid.link/20260625-st-pwm-v3-1-ace9bff88529@gmail.com Changes in v3: - Fix compatible to "st,sti-pwm". - Drop pinctrl-names from required. - Modify the commit message to explain the changes made. - Change maintainer to "Lee Jones ". - Link to v2: https://patch.msgid.link/20260618-st-pwm-v2-1-c792d5795ce2@gmail.com Changes in v2: - Add the missing interrupts to the required following the old binding. - Modify the 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 ---------- .../devicetree/bindings/pwm/st,sti-pwm.yaml | 92 ++++++++++++++++++++++ 2 files changed, 92 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,sti-pwm.yaml b/Documentation/devicetree/bindings/pwm/st,sti-pwm.yaml new file mode 100644 index 000000000000..e980c76b54e7 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/st,sti-pwm.yaml @@ -0,0 +1,92 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/st,sti-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STiH41x PWM/Capture controller + +maintainers: + - Lee Jones + +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,sti-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" + - clock-names + - clocks + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include + pwm@fe510000 { + compatible = "st,sti-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