From patchwork Fri Aug 30 13:02:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13785108 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C98ECA0FEF for ; Fri, 30 Aug 2024 13:10:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ep9Dz4hxWmuGPSojH0Mu0PlK53uNxCmsjb/hiZi2IOk=; b=E15bQuFZOkv1u02vuvlNueBV3G c7AR34xiYU5ymdIYKotebZH7YLEH3+LVAJYScgAEntdfIpXCQlAlUBqH4Kya2QXISpZsb9gihRXXk pV+xB/RR97mOXUi3orGoGWJe6TsMCRpEeCzJjUp1sMM5qaiN2TFRkOkNQk/SV1Gv2USgQkh3q6Jnj dutMoGySqUU2p0EhrykOjAVcWQqNh8Mk15H+BLet8kYH0Pumv37pWl3b6aNKdcMNZp8P2zz9lW7cM ZDL3u2dAKviU01RJvi4hygL7kfgpLpRsr6Fv+6QfscQ+GK4U0nS00jbL0ayRJGxnq1i91Kp6c8yNP QMhMxeuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sk1Or-00000006MSU-14j0; Fri, 30 Aug 2024 13:10:49 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sk1Gt-00000006JiW-07PN for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2024 13:02:36 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-5334a8a1af7so1857754e87.2 for ; Fri, 30 Aug 2024 06:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1725022953; x=1725627753; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ep9Dz4hxWmuGPSojH0Mu0PlK53uNxCmsjb/hiZi2IOk=; b=WbaSSyp5NiQ2PQk190CqVU1xoi/oty545/QnMhz+lzg/5BGUiCCOFGoc6qnmMaXx3F iDIRA4WOO26GrRSvQia0WRF89fGXGG1/+WK0nwCoR6iNWVujBuRzRhLSSdlZj/KhN9rl Q1/m+a53mBS+EuaoUKN3Je7CGY8QLnv4HPd5UB+YZCFQzWcO7PGTIVAqxZY1NHw0JGyF iCgmnHpiv92Y+T+g1BlVA/899sxC/IgLMvzYTcyjlUpBDqizkzuI6fk7/KBzfEE/R4+c 7fUbQZE4LbLWTjRc6jzYFSJjL1JX1UL/CchmD77tClpKOAzNj04ath54HikTP02i6XRo ofEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725022953; x=1725627753; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ep9Dz4hxWmuGPSojH0Mu0PlK53uNxCmsjb/hiZi2IOk=; b=LSk7zk0iWE0GfEN9z4oyHOgppbMkOn+rcK0FBa6iKF5VwihRiULxhx+XvUVaSXrRqj VKzOZPuLI+X/TVTECweDOfQjtsHIhMufuTpq0Me9ZDe5z3B/J5ZxUsqfkvL/aCCjpx+a n6en7I5Zlya+IG0kQtd/6ezeLMVy9W4DBszrIzCVRHD9lE/UZEJ6aohrqRHPs7sEY7gm oVOKjrTMPfTFYfIsvY8wLjvihqz6kRvJo5YE8XVe0qUNo8Ln/uOYaAemYtHOI4GL9Z0U zlwLWU3wsehJ5Br7bzYdkl1RaDVoV5ZxgXmtT4zqswEf9nZXbpH4NF9TV7qKAp1uhfxe 4bGA== X-Forwarded-Encrypted: i=1; AJvYcCXwFO9Xj8hjNCLi2TfI4hEB+zXqTzVY00PrZZrwnNtkOljGNkej8yvGv3h0EK2JKI3WTxclWJkqOkNIdR/k4A6R@lists.infradead.org X-Gm-Message-State: AOJu0YzoBf2bQMVnGpXAjTr2H9kLcDcdNl9Z1FWxn+8JXX4siRg+x8OR QGaQnxYhx4+no59opNuuR3YsVyGK1tsQBlXlidqJTWuE8bsyom1HtTbG8kwSVpQ= X-Google-Smtp-Source: AGHT+IHBcNXxqEL3t5TynH4nHYOZ1aADY34nRnO+nmPICBpQZpIG/tXzXQNsjqjeWNwuk/xO+kAwTw== X-Received: by 2002:a05:6512:1393:b0:52d:b150:b9b3 with SMTP id 2adb3069b0e04-53546b34943mr1359865e87.32.1725022952198; Fri, 30 Aug 2024 06:02:32 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ba642594dsm80361785e9.47.2024.08.30.06.02.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 06:02:31 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, alexandre.belloni@bootlin.com, magnus.damm@gmail.com, p.zabel@pengutronix.de Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea Subject: [PATCH v3 01/12] dt-bindings: clock: renesas,r9a08g045-vbattb: Document VBATTB Date: Fri, 30 Aug 2024 16:02:07 +0300 Message-Id: <20240830130218.3377060-2-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240830130218.3377060-1-claudiu.beznea.uj@bp.renesas.com> References: <20240830130218.3377060-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240830_060235_095507_51895E54 X-CRM114-Status: GOOD ( 16.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Claudiu Beznea The VBATTB IP of the Renesas RZ/G3S SoC controls the clock for RTC, the tamper detector and a small general usage memory of 128B. Add documentation for it. Signed-off-by: Claudiu Beznea --- Changes in v3: - moved the file to clock dt bindings directory as it is the only functionality supported at the moment; the other functionalities (tamper detector, SRAM) are offered though register spreaded though the address space of the VBATTB IP and not actually individual devices; the other functionalities are not planned to be supported soon and if they will be I think they fit better on auxiliary bus than MFD - dropped interrupt names as requested in the review process - dropped the inner node for clock controller - added #clock-cells - added rtx clock - updated description for renesas,vbattb-load-nanofarads - included dt-bindings/interrupt-controller/irq.h in examples section Changes in v2: - changed file name and compatible - updated title, description sections - added clock controller part documentation and drop dedicated file for it included in v1 - used items to describe interrupts, interrupt-names, clocks, clock-names, resets - dropped node labels and status - updated clock-names for clock controller to cope with the new logic on detecting the necessity to setup bypass .../clock/renesas,r9a08g045-vbattb.yaml | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/renesas,r9a08g045-vbattb.yaml diff --git a/Documentation/devicetree/bindings/clock/renesas,r9a08g045-vbattb.yaml b/Documentation/devicetree/bindings/clock/renesas,r9a08g045-vbattb.yaml new file mode 100644 index 000000000000..29df0e01fae5 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/renesas,r9a08g045-vbattb.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/renesas,r9a08g045-vbattb.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas Battery Backup Function (VBATTB) + +description: + Renesas VBATTB is an always on powered module (backed by battery) which + controls the RTC clock (VBATTCLK), tamper detection logic and a small + general usage memory (128B). + +maintainers: + - Claudiu Beznea + +properties: + compatible: + const: renesas,r9a08g045-vbattb + + reg: + maxItems: 1 + + interrupts: + items: + - description: tamper detector interrupt + + clocks: + items: + - description: VBATTB module clock + - description: RTC input clock (crystal oscillator or external clock device) + + clock-names: + items: + - const: bclk + - const: rtx + + '#clock-cells': + const: 1 + + power-domains: + maxItems: 1 + + resets: + items: + - description: VBATTB module reset + + renesas,vbattb-load-nanofarads: + description: load capacitance of the on board crystal oscillator + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 4000, 7000, 9000, 12500 ] + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - '#clock-cells' + - power-domains + - resets + +additionalProperties: false + +examples: + - | + #include + #include + #include + + vbattb@1005c000 { + compatible = "renesas,r9a08g045-vbattb"; + reg = <0x1005c000 0x1000>; + interrupts = ; + clocks = <&cpg CPG_MOD R9A08G045_VBAT_BCLK>, <&vbattb_xtal>; + clock-names = "bclk", "rtx"; + #clock-cells = <1>; + power-domains = <&cpg>; + resets = <&cpg R9A08G045_VBAT_BRESETN>; + renesas,vbattb-load-nanofarads = <12500>; + };