From mboxrd@z Thu Jan 1 00:00:00 1970 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 6BD6BCA0ED3 for ; Mon, 2 Sep 2024 15:04:21 +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: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0Naf0XscJRnO2TJWmGa7OVEJLkB3kuTYZUkolR4Kul4=; b=bFsytkMH5vEHrLCOOUzgpoFulK QoUJdM90MHSuK6DuQO/maxSn00sEQXMk6Hzsyqu+92Q4mL7iZiVgNqCrqpmzVf4qPWa5q9vVe6wkl xAQVPurSKMgLxdAMpmavCah6LVfKkZ1ByaE3PPKp0NGjFgsCyoP+2gfcebfEGw5kfyL2Y/AOwhfmR pLsS/m9ys6EYCbOc1mG2kh+uDJkzHOixTWRnmP+/OtSd7jYNsjkKeLs+GE5tiINJdGykM9he5o9R+ 5PpC6g3z5OQ7DqRir8HUs2bXJiXCbQ9UAwTXw3vsmUfT1pBUHdSyf3PPsBIkwTZrvtSl1wCcCLkSf DotgXe+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sl8bC-0000000EmS1-45aI; Mon, 02 Sep 2024 15:04:10 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sl8Sg-0000000EkFb-2fan for linux-arm-kernel@lists.infradead.org; Mon, 02 Sep 2024 14:55:24 +0000 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a8695cc91c8so432557466b.3 for ; Mon, 02 Sep 2024 07:55:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1725288921; x=1725893721; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=0Naf0XscJRnO2TJWmGa7OVEJLkB3kuTYZUkolR4Kul4=; b=N7/H5kO4T2UByHZHQkDcdEE7ip4YjUlr3nos1AWc9r61ngZyxUSieWyc0azGIf0tWn DYfhCqkah9UaVj7DAh13xbyy3u0bdDRyYXbknq4JOenK+NXbrkBk4G/aF6tPZhvKfuOB vn0nrsc70nS4u+u2DtqSqObAkM+I9eMOYo10G8xKIO+WSr471EUFvmeHgepk/PesyhFi twk1K+PWV4Alw6u0Jx9D3PavPx/uVqiMLqzztY93gnjiiCBIM62lIr7uC4GZV7OQYkeh qc/XBEatvm1yrQLGtruD2VdVyaVrPxAvFYg+dMXlKVlHMV6NtKvZ0C+KucMjFnsKT8BA Mvyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725288921; x=1725893721; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0Naf0XscJRnO2TJWmGa7OVEJLkB3kuTYZUkolR4Kul4=; b=M+lCe3qqDjRXxXWKDT98evp7K4caLqUHtyZshM5hHEXOUZvCv256FoEgSf5JG6lg47 2tgAxC0yAbH6Pg8/+vSiuEjQQLmAKz1PmAMH6lDy73WgUu50tnm8h6uwLDf5a3Pg+O97 Kf1MWXRDkUYSDf+uaFBQ6J0sXXXHibXguuiyVr8eFtvEwoPaCnwKj65kqC5FUWuFv+37 JpD8yFD8kAnn1sn8Dj4AhtSWUH9niELMjF3fmklOBDNryiETSiftVeOTAJ81eL1IP4m+ AS0/XpDcXs90XzdyDYCE9xbfPbyQq2ZjujIVHNvYpsw3Df+MQX/rUV9yxzADosoyYM9g DCIg== X-Forwarded-Encrypted: i=1; AJvYcCUWoA2vKLWNHSCzVBV8Z5yFnN/GUKedNMvv4Cuhh3yH0Bi1vTEzuW3f6GDqqREozWh8T2Ylmr/rT2uZRh26JQho@lists.infradead.org X-Gm-Message-State: AOJu0YzWQ2AqPEP2hNltE1RTRuiCljNO3pSlfvA8bsqwaejcyeq8TYXM oHOlUw5/u/NpmwGrSHOjUVDzBve+PIcMNptz4WAO0zsoP2iqHT5ur95pcY6U2jk= X-Google-Smtp-Source: AGHT+IH88P2UchQfuyJn4Ig/8aL8sFGLYB2Le79fmkAMZIjuFdt4o/On+vh4v2Bfc56FcpWJDt9N3A== X-Received: by 2002:a17:906:6a09:b0:a7d:9f92:9107 with SMTP id a640c23a62f3a-a897fad4ec9mr1154579666b.58.1725288920667; Mon, 02 Sep 2024 07:55:20 -0700 (PDT) Received: from [192.168.50.4] ([82.78.167.144]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8989196980sm566454166b.126.2024.09.02.07.55.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Sep 2024 07:55:20 -0700 (PDT) Message-ID: Date: Mon, 2 Sep 2024 17:55:18 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 01/12] dt-bindings: clock: renesas,r9a08g045-vbattb: Document VBATTB Content-Language: en-US To: Alexandre Belloni , Rob Herring Cc: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, magnus.damm@gmail.com, p.zabel@pengutronix.de, 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 References: <20240830130218.3377060-1-claudiu.beznea.uj@bp.renesas.com> <20240830130218.3377060-2-claudiu.beznea.uj@bp.renesas.com> <20240830174633.GA559043-robh@kernel.org> <20240830220644b8b36293@mail.local> From: claudiu beznea In-Reply-To: <20240830220644b8b36293@mail.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240902_075522_717761_5594312E X-CRM114-Status: GOOD ( 20.22 ) 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 On 31.08.2024 01:06, Alexandre Belloni wrote: > On 30/08/2024 12:46:33-0500, Rob Herring wrote: >> On Fri, Aug 30, 2024 at 04:02:07PM +0300, Claudiu wrote: >>> 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: >> >> Use defined units, don't add your own. So -picofarads should work for >> you. > > We have a generic quartz-load-femtofarads property for RTCs which is > what you define because the driver has VBATTB_XOSCCR_XSEL_4_PF which I > guess is 4 pF which is 0.004 nF and 4000 fF. I'll use this one in the next version. Thank you for your review, Claudiu Beznea > >> >>> + 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 { >> >> clock-controller@... >> >>> + 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>; >>> + }; >>> -- >>> 2.39.2 >>> >