From patchwork Mon Feb 12 21:06:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 200034 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp168451dyb; Mon, 12 Feb 2024 13:07:42 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVWLLJJ/FA3YXU86aFzFOw+fLwNkSxqN4ZBb0HwM0hsOyygVK/0lMevKrBm5sR/IJXplljzfqDnMgy99DchScCK2j9R5A== X-Google-Smtp-Source: AGHT+IGRdb4Nj1loyG3C7M5+fTDzw5jmKzE2bUyXnvyw7W11k7OW+HDLYhmlGRStSh6ii+aoNign X-Received: by 2002:a05:6358:338c:b0:178:9b37:79f0 with SMTP id i12-20020a056358338c00b001789b3779f0mr9268151rwd.32.1707772061900; Mon, 12 Feb 2024 13:07:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707772061; cv=pass; d=google.com; s=arc-20160816; b=gftjnou5C8On0P0FaODVnaNrtDY6XWComrgH67PtdMqud6DdnRIEH97lVLyp+Mquw4 YmdMDC0Cpgv2OUeWGNi83fqe3BaLGuuwwsS/1xFj1k5NBE6oABIfNgW3ZnDLhZmHidJz LKZYx8PweqvNf/wDSs/D7FrZ/t9LZ7zgrRJHWwArZ5phFPYs3pPBKjKpOkyPUUcWynYj ezv8iCF66smLQ2ffTWj/H+Eg9DMP1gtVSFbCFegUsKTm1uoJIKTQL8/GEAVUhO8z2FLS tnMrER5hkFA7IEyupYOR1wvAAVeJovrrW/VpkCdNhYSnkBqx1WmVn7IlHPctUUmDQFC3 BRkA== 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=oLEEdusZUnicy0r4HCPhJKdjvegFudQBcbETVSPK5lc=; fh=WwgLz4/kt+Ut9JhUAlpUwOmjtgdZCOlzE6ta5UaGiQA=; b=POpTlZQuYFKG6yPdoFhJeuWV6+XM3ViKiNOwrddvgAw5vk/nmiqqis4ZwE+drWIbHD q1FRcWEYiH8ScZBU6Pb9c/YhmYnA+Ji9wgmcYHT4Y7URHOikbH3n15wHju2QvF15OrVV WuNBXVo8EDiNan92wUizK7NCqVofPAGwhCevl+gMt+P2kVmaRUvcjGdrYxmau/FyJSRf 7lywXq1tdgoW50V5CSavcuRmhlom5cMyzAg7qss6E6cEqOdEpoF9/kPyfqveoZaY7yN5 jTK28daHi7kVIfTVwSWsi0V4gpWRrXQbpwFPY9isE5IWgR4pUbUYhNVrVxme40JfH3TJ MwTw==; 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-62364-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62364-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com X-Forwarded-Encrypted: i=2; AJvYcCW+jXinVIcmBc+nDeOxWiPyBFSzUwFE1OqyUpcH0WPsLcUdmBOw11xvSWnorLaRF19Ty/GNDQtBJuFRNQ1gdyxnLvLjWQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h17-20020a633851000000b005dbd5035dcdsi760965pgn.192.2024.02.12.13.07.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 13:07:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62364-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; 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-62364-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62364-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A6346284C6F for ; Mon, 12 Feb 2024 21:07:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0556A4CE05; Mon, 12 Feb 2024 21:07:13 +0000 (UTC) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3D184C62B; Mon, 12 Feb 2024 21:07:08 +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=1707772031; cv=none; b=gPVKdB8DvCRXBCiUyTWtShRicKoDnl4R3DDus6rjGA7hWMr4sSrsHFHzPxlj6omE5yjGRw8FcAhOecHdRC+3kKvOQ+ALs2sNx+onqZ9/zvw7u+Xm8Cg3/IOXRfj/yBdK/e/Bx4GDlY3d8SUNVZKHhaQ646BAsprznMbzMyW/85Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707772031; c=relaxed/simple; bh=yyEs1wlMfuEt7mcyves4zwKtI0gjMdG+He7OSOYmTeY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=o0x9ixlHqxtwlPcKskZCCDIhr1gc1lr2tVQGI1fEeDq0jwWR1A8Gj0R2YL00QUsT7PA+R62SLgWkNJWu+WyPqskil8EOMQ2/UJ0Gh04yqbBgHQlaPCBuAscViBOrBjF1QpEHpFcSnXydqBdNUJGx511umk1s/zT9sFxQrzavJ0Y= 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.06,155,1705330800"; d="scan'208";a="197593487" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 13 Feb 2024 06:07:07 +0900 Received: from mulinux.home (unknown [10.226.93.37]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 51FDA4006DEF; Tue, 13 Feb 2024 06:07:03 +0900 (JST) From: Fabrizio Castro To: =?utf-8?q?Uwe_Kleine-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 v7 1/4] dt-bindings: pwm: Add RZ/V2M PWM binding Date: Mon, 12 Feb 2024 21:06:49 +0000 Message-Id: <20240212210652.368680-2-fabrizio.castro.jz@renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240212210652.368680-1-fabrizio.castro.jz@renesas.com> References: <20240212210652.368680-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790728797686326375 X-GMAIL-MSGID: 1790728797686326375 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 --- v6->v7: * No change 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>; + };