Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp4947lql; Fri, 12 Apr 2024 01:32:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJsQ/ipAxY4ssR3/EV8CFIEt4nIeLfHddUC76fPlJFbpYvocIQ/Q95nKxXHvbBw8V7A41bJbXlN4oVsaWqqDAQzRN5x35iaFcuSY7nqg== X-Google-Smtp-Source: AGHT+IGS6JMIyTyweVW/YAfc3qYsCLZQeu/g1Cnj00m9GwB2rB0GspGUCce+7r6Pqtnz9/+vAk+0 X-Received: by 2002:a05:6358:420b:b0:186:98:31c7 with SMTP id t11-20020a056358420b00b00186009831c7mr2561923rwc.2.1712910741060; Fri, 12 Apr 2024 01:32:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712910741; cv=pass; d=google.com; s=arc-20160816; b=h2W0vcdiIpO/489fTDLHibRcuWXTZcQpDGUgXd1g6+CmEqUshGwxYt52JgUqPmQtDn DeJAAeqzzwMfeofDoDmoxbghqCqfBp4SRkIlGS++0CaZMHHtafF+m3S62kYHeduZzU0o QqdZUtqC3brvapfVR51wpz+WbefJRl4ejcrsqeJJdO4hMqug8pQvC7aJLvMZ88/gjRIT kX7zZEyTj8ZcdACGCpOc+XlWhOkzsqIDjrWvocarpQCEBUP7Bgme+AF99dutsZhr4StU YaWCiaX7vVj73HR9auRyqJYjYKLQaJMsFLqms8kDlnBPiGPVAp6+HbKAHTzIMt9KIPYa jVZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bJUCIMn/rajlyaxnzTNwaSCWbhEzp97H4xnhV905vNo=; fh=6Vyg0NmrEpGUWKSCyk3g612V5MqUc31NwIs2scncn3I=; b=OTM0hs98CiKi3ZtjpRwPLAxUC8WRIgzrBDVt/gZViVL/yWNLw/hnWaTL8ynFHt6Qq8 RIqh6WEU2/vMucImuaTgHKaxwcAnpDjek8nrGGSSD/6tIC5/8oz9COa4zXZWb4i3YR6z 5utxdVCUDKaX4og+59IbMbJjOLd0rL3jbOVIccLE2EM7WUJB5xuXNGaOYNySX1+zleNa eoFflKuVDXlotX2dFdCBqkS2iWf8Tj1LsQQKylrv7LXYEbrglgBtndH26PXi1j3M2YQa SUKWdkfh4XACTktT7oINd8PLwi6DvLcEBgnmHIPyT+UoajofwZoEFn5zMRqvNBZEmCV9 lr2g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=LJortwtJ; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-142225-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142225-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b129-20020a62cf87000000b006ecf2e21155si2846409pfg.249.2024.04.12.01.32.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 01:32:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142225-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=LJortwtJ; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-142225-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142225-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 59C20B2756B for ; Fri, 12 Apr 2024 08:20:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2807F446B6; Fri, 12 Apr 2024 08:20:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="LJortwtJ" Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 151BF1B81F; Fri, 12 Apr 2024 08:20:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712910006; cv=none; b=sdHXO0dStF5f5fhQe5VSy2V8C7OFZQsL40DOeIUc0WCyDt6E7hpPs13Pp6ecLdwyV0WwXXvNUz35kS8kgJqvGo+voyoOLZzdYAPT/7AikFuYHjT5hxSRxM/0sJbyPQKPHFwklGvJeKWvx90uJ/Uw2r52hXhMB/a4axJdwJ5G8rA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712910006; c=relaxed/simple; bh=rRzEB6dvQPHneXOyv9fiIxg3zpPLShbTpZi8aZw6UhU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cd+PkbwuQHZ5494peibpwYMygp0yMygG9g7MPFO99qTBWAuNZpvn30hfKISAvXRjOecEJHPPshe7qFjFral/gpw8TWNJdoC0ddPuAXTbGmTTA6TqL941O/Z4T+Tf3CtAbdKehXROp4CWHuZYsh/L62YSXLUCKfU1Jd32RTRFhls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=LJortwtJ; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id C23821C0006; Fri, 12 Apr 2024 08:20:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1712910002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bJUCIMn/rajlyaxnzTNwaSCWbhEzp97H4xnhV905vNo=; b=LJortwtJQGNY1eJbDqWKF0mbUu0wPY02T1X/U3Q6Sl9WboKySSj6lhd/4CFBa6jpmnUFoO zWfp8i0vng69W5sOjVS2xplF+bkHDIvCHxWpozMmDZ+HFy3D762e9WMqlxsv41MiZdS5N1 7y0mmaZsQB0Zt8wkDnKPWQULtzNE9TValSAPnaJDn/2HoVCiBdGWyauOfGOsRVBDbWdbZy crwunf0rBpXtQUtVD6wKbSCw/4FzQsGrcfR9KZYT99cA6PW0+Vtc4TC99Qmmp0QzxsnsbG 3uazTukszLfnq5yMb++rNTm4zXM8EWRg3LMXV5indkSuYoRtjzvQ2KaEBh+4XA== Date: Fri, 12 Apr 2024 10:20:00 +0200 From: Alexandre Belloni To: wefu@redhat.com Cc: jszhang@kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, guoren@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org Subject: Re: [PATCH 2/5] dt-bindings: rtc: Add optional property "prescaler" in APM X-Gene RTC Document Message-ID: <20240412082000279430d0@mail.local> References: <20240412080238.134191-1-wefu@redhat.com> <20240412080238.134191-3-wefu@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240412080238.134191-3-wefu@redhat.com> X-GND-Sasl: alexandre.belloni@bootlin.com On 12/04/2024 16:01:44+0800, wefu@redhat.com wrote: > From: Wei Fu > > Add optional property "prescaler" for APM X-Gene RTC. > The clock source on some platform to RTC is NOT 1HZ, > so we need to prescale the clock to make the input clock become 1HZ, > like (32K/prescaler) = 1HZ on the XuanTie TH1520 AP sub-system RTC. > > Signed-off-by: Wei Fu > --- > .../devicetree/bindings/rtc/xgene-rtc.txt | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/Documentation/devicetree/bindings/rtc/xgene-rtc.txt b/Documentation/devicetree/bindings/rtc/xgene-rtc.txt > index fd195c358446..25ba8cf0cc31 100644 > --- a/Documentation/devicetree/bindings/rtc/xgene-rtc.txt > +++ b/Documentation/devicetree/bindings/rtc/xgene-rtc.txt > @@ -10,6 +10,9 @@ Required properties: > - #clock-cells: Should be 1. > - clocks: Reference to the clock entry. > > +Optional properties: > +- prescaler: Reference to the Value of Counter Prescaler. What about getting the input clock rate and calculate the needed prescaler instead of having it in the device tree? -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com