From patchwork Mon May 27 11:28:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 1939880 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=gmx.net header.i=wahrenst@gmx.net header.a=rsa-sha256 header.s=s31663417 header.b=JA5WzdPd; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; envelope-from=devicetree+bounces-69476-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [IPv6:2604:1380:45d1:ec00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VntjQ6rDjz20ds for ; Mon, 27 May 2024 21:30:02 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 25A8F1C21F0C for ; Mon, 27 May 2024 11:30:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47159152DF5; Mon, 27 May 2024 11:29:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="JA5WzdPd" X-Original-To: devicetree@vger.kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B14941527B5; Mon, 27 May 2024 11:29:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716809394; cv=none; b=UYP3uCS9V8D+Oo6AeKKPfNjOuYX7mBmX+ww/BwSKzgZ03g0svEqoiH9hzfd4HoTdlr8RSdEvlZM+0BIW6/YFRsU6g4RzwEUPBEYumjfvkerkn7GWytqSrumr5X70GHb4WOG5FsxGMGeK+9GFTPIFszGzpLmFJIM8i1Z4bfQiWVQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716809394; c=relaxed/simple; bh=5q4sLsvl8DhHx82ft8skw0Am0GEFO/lk+YlRXiyiRfk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q4wUpV9qG4EJbOQilG4vg+9srkY3JFC7MrfsI+e0rqmFgevSLkmdFVr8AhX9Zgw7HLm7SuTk1nk7KTlH3P4LoGnQSJtRYIji4mV1vsNPep+MU88186zua5JNKCliK+5u7SWYokw084iQ9qFVyJotJ4yRMhIGDnCaImXEnIFDvAE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=JA5WzdPd; arc=none smtp.client-ip=212.227.15.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1716809381; x=1717414181; i=wahrenst@gmx.net; bh=WOE8pWcqchiygSIAwwph1Gl4Mt2my+SbletTL9W/sE8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=JA5WzdPdIZeEM190yuurwafkcb3L2FkL0QwTQO4iVLKsL6MjQhLSDOWZed84/m0I AfR1XPwJFjbj+BXH5xGlrvfA9kyyaDfhFXPR0jSOlcPLx9X/a5NJt+YgzBLdES3jk y6oIZDxjdJlmesAtTIQPNMXzHqoU+1i6FI0d6IphFgzQJgq5bQqMPI7YU6B8HGOzN xpS54qqPnbK+2wn21gtf6rZzSMgPVVItSzzVwZ+DMBFw3NFXsJqC4Xpv42eVCs2p9 notoV6An6Ywf+0s/X72OdvLnzQ/CKWgZRgzDHUsbCGW0j8Ji7aBn9EZVWHc6OlF72 45L7dbwge1JlDVP9mQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MKKUv-1rvneE0sYx-00LoKn; Mon, 27 May 2024 13:29:41 +0200 From: Stefan Wahren To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: andy.shevchenko@gmail.com, Philip Howard , Sean Young , Linus Walleij , Chris Morgan , linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, Nicola Di Lieto , Stefan Wahren , Krzysztof Kozlowski Subject: [PATCH V5 1/2] dt-bindings: pwm: Add pwm-gpio Date: Mon, 27 May 2024 13:28:56 +0200 Message-Id: <20240527112857.90554-2-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240527112857.90554-1-wahrenst@gmx.net> References: <20240527112857.90554-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscrib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jYq6NPep/LN4edbs82mPfOna5VLvWSBCU2S1Fn5dw1AskBDa/gF9/R8YQQfqzyHx9xoawgQ 6+k1C29xw0YcorFkj5QIFCJwSOnqERUFi4/oMLtX3umHw= From: Nicola Di Lieto Add bindings for PWM modulated by GPIO. Signed-off-by: Nicola Di Lieto Co-developed-by: Stefan Wahren Signed-off-by: Stefan Wahren Reviewed-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski --- .../devicetree/bindings/pwm/pwm-gpio.yaml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/pwm-gpio.yaml -- 2.34.1 diff --git a/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml b/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml new file mode 100644 index 000000000000..1a1281e0fbd7 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/pwm-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic software PWM for modulating GPIOs + +maintainers: + - Stefan Wahren + +allOf: + - $ref: pwm.yaml# + +properties: + compatible: + const: pwm-gpio + + "#pwm-cells": + const: 3 + + gpios: + description: + GPIO to be modulated + maxItems: 1 + +required: + - compatible + - "#pwm-cells" + - gpios + +additionalProperties: false + +examples: + - | + #include + + pwm { + #pwm-cells = <3>; + compatible = "pwm-gpio"; + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + };