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 0C450C27C4F for ; Tue, 18 Jun 2024 08:12:01 +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=5Db/Ttkm8Wt1DAojtG+l5i3VYAIO56vuiF9BvfZCWUE=; b=SF4VRX9ezF3hE3Bg4c9HB6Jl54 khNookYnXC/0tXd0//4kVDkcxZh45edCJFzBLXdx8dkigJ7EhWLTYbgeJ7MeXEpSpA4Wbait+4E8Q ziSzbf+rFtO8vOyH83+FoeYCkCA1yijwszPMTZdXQ6ev8KOskNFFPiSCM4g4rjk71Y8Wzg9LBNUOM vwM0I9MM0/+fMfobjlIQmK9n3KSPtcOTJZLFnu4p1UsP1cPtqtPHgiXoZP8Q2+9shgs/pq0IcYGRx 4T613J3q1Zdgpl54w1P5PhyXeYcXPElMWD/NyJIuLaBdexynB1T9HG5/KZ7hH1n/hjjYfN9aF6vIZ HvUBptgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJTwK-0000000E3Ea-0Keo; Tue, 18 Jun 2024 08:11:40 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJTwH-0000000E3Dd-1MCb for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2024 08:11:38 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4217d451f69so42429155e9.0 for ; Tue, 18 Jun 2024 01:11:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1718698293; x=1719303093; 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=5Db/Ttkm8Wt1DAojtG+l5i3VYAIO56vuiF9BvfZCWUE=; b=liH1E49u2wAWQYmSHSFMe1f37Km+ATC6Z/mnRZIDWvFoX5bzzCGaWvvN8o8O6eq345 5a3lt0zGtD0XjyPIjhCEbYbskPP9Y7feyZ/9DHoo+Jk1D0DqEPxTpxiKRl3kYpbzKqvQ KVPruu+tL7z72aSnY9/456eqbbuGnEtErh8UMpYD7YhnVMsug0HVA8a1kD1rHEyF8063 FoxU1dI5BM5JWjuKCZfvgEC0f3QoiJdkKfv3jnzlqhOT9ph44WED7fO5vfO0iJx+CYwo EiY33132g0ThwDnlz/ObH46XdMa7wAtHZGA9TZaP6IdUoeTDWkEkltYFREyM7DXfX+mJ JnwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718698293; x=1719303093; 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=5Db/Ttkm8Wt1DAojtG+l5i3VYAIO56vuiF9BvfZCWUE=; b=hWtQ2C0J3pqacsJ9b600MK8Z0Qjt4DJvBPuiwRYsRVKAHAuFXQl/M3W+Oc7aUgfQCj CUUzw2R0qxo7g/EyVzjXdSON3MCsgV3CsFtPCXPkWOEbFY43hAAbCYz68wGOMgA+rK06 TdSpTNSprSX7R8am/T+Bf+sRoIfTe3M3JvYyktJjIXzMgWuoYZDg4jeno6laWBasXMMk 0XNpyfpE7keDHFVdHX41VwYSue4OHxUtKxKSLz/M90Wnu+JT3ub1fEBgpRmpEyJUKxOy 10oVIu0n4gIlECYuIuS3Wb6FJa2BAFMfWcGC00zDbh3DgzOP6yBJmRA6Wn5gV+PdgxW3 o2zw== X-Forwarded-Encrypted: i=1; AJvYcCXY9zyKjOjCK8PmG3QmQ+u4l5Q7iwHdDYwN8HOv0TE+z4sj8nOYWh7e/Vh7ueyGjebK5KnvFOTiiI/sck+evPdK6QFuZEh3jLe3o9KTkM9xrYILNME= X-Gm-Message-State: AOJu0YznEayz8fJNpIqxTqamymyGp79UOhHVjysLViPZiJ7eISf/WipS 0+VedfMSkaFkIZ1UPs3Q42a6hQRbt6nPFFFy5+W4zca03jSFZZznuFbTRZ/VXwg= X-Google-Smtp-Source: AGHT+IEZ4zfien/Ap0pCf2tDyhM1mJ0USifoiBZp4jjoL6ZEetj9nRXUeKMXuBuNxOiTYrJSsTYSkA== X-Received: by 2002:a05:600c:4fcc:b0:423:4c2:7a80 with SMTP id 5b1f17b1804b1-42304c27cabmr78141565e9.5.1718698292647; Tue, 18 Jun 2024 01:11:32 -0700 (PDT) Received: from [192.168.50.4] ([82.78.167.189]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422f2f30925sm183177995e9.0.2024.06.18.01.11.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jun 2024 01:11:32 -0700 (PDT) Message-ID: Date: Tue, 18 Jun 2024 11:11:30 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 02/12] dt-bindings: clock: renesas,rzg3s-vbattb-clk: Document the VBATTB clock driver Content-Language: en-US To: Geert Uytterhoeven Cc: Conor Dooley , mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, lee@kernel.org, alexandre.belloni@bootlin.com, magnus.damm@gmail.com, 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: <20240614071932.1014067-1-claudiu.beznea.uj@bp.renesas.com> <20240614071932.1014067-3-claudiu.beznea.uj@bp.renesas.com> <20240615-angler-occupier-6188a3187655@spud> <3d9ed0ec-ca9a-45b4-a633-8f7051d13cff@tuxon.dev> <20240617-subsoil-creed-04bf5f13d081@spud> <0a4ba0e5-3fb1-4ffc-b2d8-a4eb418707eb@tuxon.dev> From: claudiu beznea In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240618_011137_397449_9854E679 X-CRM114-Status: GOOD ( 24.61 ) 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 Hi, Geert, On 18.06.2024 10:56, Geert Uytterhoeven wrote: > Hi Claudiu, > > On Tue, Jun 18, 2024 at 9:34 AM claudiu beznea wrote: >> On 17.06.2024 18:19, Conor Dooley wrote: >>> On Mon, Jun 17, 2024 at 10:02:47AM +0300, claudiu beznea wrote: >>>> On 15.06.2024 15:17, Conor Dooley wrote: >>>>> On Fri, Jun 14, 2024 at 10:19:22AM +0300, Claudiu wrote: >>>>>> From: Claudiu Beznea >>>>>> >>>>>> The VBATTB IP of the Renesas RZ/G3S SoC controls the clock that feeds >>>>>> the RTC and the tamper detector. Add documentation for the VBATTB clock >>>>>> driver. >>>>>> >>>>>> Signed-off-by: Claudiu Beznea >>>>>> --- >>>>>> .../clock/renesas,rzg3s-vbattb-clk.yaml | 90 +++++++++++++++++++ >>>>>> 1 file changed, 90 insertions(+) >>>>>> create mode 100644 Documentation/devicetree/bindings/clock/renesas,rzg3s-vbattb-clk.yaml >>>>>> >>>>>> diff --git a/Documentation/devicetree/bindings/clock/renesas,rzg3s-vbattb-clk.yaml b/Documentation/devicetree/bindings/clock/renesas,rzg3s-vbattb-clk.yaml >>>>>> new file mode 100644 >>>>>> index 000000000000..ef52a0c0f874 >>>>>> --- /dev/null >>>>>> +++ b/Documentation/devicetree/bindings/clock/renesas,rzg3s-vbattb-clk.yaml >>>>>> + renesas,vbattb-osc-bypass: >>>>>> + description: set when external clock is connected to RTXOUT pin > > FTR, this contradicts the explanation below, which states the external > clock oscillator is connected to RTXIN. I agree. > >>>>>> + type: boolean >>>>> >>>>> When you say "external clock", is that an input or an output? >>>> >>>> I took that statement from the HW manual. As of the HW manual [1], table >>>> 42.2, that would be an input. >>> >>> Forgive me for not wanting to open the zip etc and find the information >>> in the document, but why do you need an extra property? Is it not >>> something you can determine from the clocks/clock-names properties? >> >> It can't be determined from clocks/clock-names as of my understanding. It >> depends on the type of the input clock (crystal oscillator or external >> hardware device generating the clock). >> >>> It sounds like an additional clock from your description, is it actually >>> different way to provide the second clock you mention above? >> >> This is the block diagram (see [1], only picture this time) of the module >> controlling the clock. Please open it, it helps in understanding what I'll >> explain above. >> >> The VBATTB blocks controlling the VBATTBCLK are: >> - 32KHz-clock oscillator >> - the mux controlled by BKSCCR.SOSEL >> - the gate who's input is the mux output and XOSCCR.OUTEN >> >> To the 32 KHz-clock oscillator block could be connected: >> 1/ either a crystal oscillator in which case it will be connected to both >> RTXIN and RTXOUT pins (the direction of RTXOUT is wrong in this picture for >> this case) >> 2/ or a device (like [2]) generating a clock which has a single output and, >> from my understanding and experience with devices like this, only RTXIN is >> needed, RTXOUT is connected to the ground; for this case the 32KHz-clock >> oscillator block from [1] need to be bypassed in which case the newly >> introduced property will be used; this will select the XBYP on the mux. > > Sounds similar to the RAA215300 PMIC, which includes an ISL1208-derived > RTC, where this was handled using two different clock names: > https://elixir.bootlin.com/linux/v6.10-rc1/source/Documentation/devicetree/bindings/regulator/renesas,raa215300.yaml#L49 > https://elixir.bootlin.com/linux/v6.10-rc1/source/drivers/rtc/rtc-isl1208.c#L869 Yes, seem similar. I wasn't aware of this approach. I'll switch to it. Thank you, Claudiu Beznea > > Gr{oetje,eeting}s, > > Geert >