Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp601367rdb; Thu, 8 Feb 2024 15:39:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUTvqA+FXPbPnAN54kJS8kbeC7DFSltaSBT3f0mEMcEdjq777HCfuoNaBn78LkMpfizDcpZSFvg+zJ4Mtm48Vw2FoWvpvwTSZVN6cj9/w== X-Google-Smtp-Source: AGHT+IHFCIi6bJQ6rm5UAaf1D1OgG8i9QntBL3jG1ZZVjJ0DhjyS2ok+3GO3alJjWQPFv0pRp5GT X-Received: by 2002:a2e:9794:0:b0:2d0:cd4a:8bc9 with SMTP id y20-20020a2e9794000000b002d0cd4a8bc9mr76041lji.10.1707435579292; Thu, 08 Feb 2024 15:39:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707435579; cv=pass; d=google.com; s=arc-20160816; b=lQ1N0IAPT+nSd6p8DldJoQsLWJWCaIi/QmAQudfIwAYoKqRzOi2ENcm0BX/ZiqK1vA R70nA+peUM5W8ksy5znGY3GCBv4wr/BaNkhE4XJEWHxBfMl+JT/FF8P1iM9W4HRMHsU7 qeslR8UwtofLBBVfK47bIVsowEcPBlt/yGMVlnUp2BsgvpQvwven6rHdjQ24WXYybfik 7wHUloB0PH9ekM+ADfcve6kRl4MjxSp5nyrr6s8OoObc/W0pwDlw+sfNi/H5MaRmbhSu 2U6h+mY47YZQBAhM4FbomMqgbRza0L6/Z/+YbBvYuxJXMkzHuAWhdVJxoyTf1cBJTCPJ vCGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Zc2O4R3NreHlCFqE2KxmbNjhr7n4s9YJIJqv7elcQ1g=; fh=DFN1I2mkvfYBSKdcpTNF/Lsbsk64tcS1oLMYccMpZ1Q=; b=U9tuuN07qSbUlh8Vv+QonRJUhAVdIJXoomQlHRfXIO0eQ1hKYWtEi9zk3su4loc4Tn ZS771kyXdbmA2vqP5nRQLeKrMwRepeP5ENHNhZV/jlgII0dKKBJCjYhYJN7yQJeRMDYF jr23kiTJDXD+aSMYltaXM3CICqCv/9rpCMNMiRLv9LTf6VYpfgld3IgYH4DNfcHhVQ2e /PtveZwLENkjJJsyjPtyWFx15IybZ8x3H0ra0zBsJyjCftmARzOWU/Zl7QBMijscosCv f6dulGjedEw2sC+F//ryj5cqyC9T6OLXKpeA2NF42H1HFcNHMR5ayjduPmwTagFs+77d XnBw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=renesas.com dmarc=pass fromdomain=renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-58867-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58867-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com X-Forwarded-Encrypted: i=2; AJvYcCVq5rYHgC0VZfUDrRojdmd9TZb2JWQaJgLVD+ewS8J4XEioyHGL28MiRnYXxTQvbYvPyTRogCjMjEgo1t7/QGH1fbrgpgLimXFS49krTA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id x8-20020aa7d388000000b0055a942e5806si209091edq.320.2024.02.08.15.39.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 15:39:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58867-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=renesas.com dmarc=pass fromdomain=renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-58867-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58867-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 09A291F24399 for ; Thu, 8 Feb 2024 23:39:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E08855C01; Thu, 8 Feb 2024 23:24:55 +0000 (UTC) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A8C655798; Thu, 8 Feb 2024 23:24:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707434695; cv=none; b=pXBq/SYe5hCEAlKqnKxH0hjseld4/svR0NA3DyjZYQhX2QQP/1q2f0xLSOlKn5l+fEhEnCMkxwrpiO9E9CmEx4OCihcGwZVeuR9/XsIgWp1s89Ollm6txL6kriyeWyYzhuUyd4bRUi0266e/MH4tkf8GDh/wFcE3M1szhUEoXxs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707434695; c=relaxed/simple; bh=svvyA2OoPQBEnjShQYCWi04NK7mkxjERO0s6YZk0HkM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nLKaXQ3Wp785pkKfZ2CFj2siQ9Cfs0HmBsOxGn1/9LKJvoiGgpIkKw1PI/ks+T2AoMm1uD3cuMvYsMWCiJLCCZObRT6IyZjcoNWi27SXbGLPy1+MFX6b8/ETpTlx/oCXVAstzVAZ5TEQzrlvf+M9sW/dGZtnBeEYs2I28Y587Fg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com X-IronPort-AV: E=Sophos;i="6.05,255,1701097200"; d="scan'208";a="197291926" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 09 Feb 2024 08:24:52 +0900 Received: from mulinux.home (unknown [10.226.92.227]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 1E00E4009BDC; Fri, 9 Feb 2024 08:24:47 +0900 (JST) From: Fabrizio Castro To: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven Cc: Biju Das , Magnus Damm , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Fabrizio Castro , Krzysztof Kozlowski Subject: [PATCH v6 1/4] dt-bindings: pwm: Add RZ/V2M PWM binding Date: Thu, 8 Feb 2024 23:24:08 +0000 Message-Id: <20240208232411.316936-2-fabrizio.castro.jz@renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240208232411.316936-1-fabrizio.castro.jz@renesas.com> References: <20240208232411.316936-1-fabrizio.castro.jz@renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Biju Das Add device tree bindings for the RZ/V2{M, MA} PWM Timer (PWM). Signed-off-by: Biju Das Reviewed-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven --- v5->v6: * No change v4->v5: * No change v3->v4: * No change v2->v3: * Added Rb tag from Geert. v1->v2: * Added Rb tag from Krzysztof and the keep the Rb tag as the below * changes are trivial * Updated the description for APB clock * Added resets required property * Updated the example with resets property .../bindings/pwm/renesas,rzv2m-pwm.yaml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/renesas,rzv2m-pwm.yaml diff --git a/Documentation/devicetree/bindings/pwm/renesas,rzv2m-pwm.yaml b/Documentation/devicetree/bindings/pwm/renesas,rzv2m-pwm.yaml new file mode 100644 index 000000000000..ddeed7550923 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/renesas,rzv2m-pwm.yaml @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/renesas,rzv2m-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas RZ/V2{M, MA} PWM Timer (PWM) + +maintainers: + - Biju Das + +description: | + The RZ/V2{M, MA} PWM Timer (PWM) composed of 16 channels. It supports the + following functions + * The PWM has 24-bit counters which operate at PWM_CLK (48 MHz). + * The frequency division ratio for internal counter operation is selectable + as PWM_CLK divided by 1, 16, 256, or 2048. + * The period as well as the duty cycle is adjustable. + * The low-level and high-level order of the PWM signals can be inverted. + * The duty cycle of the PWM signal is selectable in the range from 0 to 100%. + * The minimum resolution is 20.83 ns. + * Three interrupt sources: Rising and falling edges of the PWM signal and + clearing of the counter + * Counter operation and the bus interface are asynchronous and both can + operate independently of the magnitude relationship of the respective + clock periods. + +properties: + compatible: + items: + - enum: + - renesas,r9a09g011-pwm # RZ/V2M + - renesas,r9a09g055-pwm # RZ/V2MA + - const: renesas,rzv2m-pwm + + reg: + maxItems: 1 + + '#pwm-cells': + const: 2 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: APB clock + - description: PWM clock + + clock-names: + items: + - const: apb + - const: pwm + + power-domains: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - power-domains + - resets + +allOf: + - $ref: pwm.yaml# + +additionalProperties: false + +examples: + - | + #include + #include + + pwm8: pwm@a4010400 { + compatible = "renesas,r9a09g011-pwm", "renesas,rzv2m-pwm"; + reg = <0xa4010400 0x80>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A09G011_CPERI_GRPF_PCLK>, + <&cpg CPG_MOD R9A09G011_PWM8_CLK>; + clock-names = "apb", "pwm"; + power-domains = <&cpg>; + resets = <&cpg R9A09G011_PWM_GPF_PRESETN>; + #pwm-cells = <2>; + }; -- 2.34.1