Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1271164iol; Fri, 10 Jun 2022 04:10:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy91N7W85NGGvTjyEvgLnSTNLCB1Z0MDmhUWLHemUYzsl+uX/buXVUZF8s+TsrmiXL1A8Cx X-Received: by 2002:a17:906:4fc3:b0:6e0:66a5:d59c with SMTP id i3-20020a1709064fc300b006e066a5d59cmr39654192ejw.131.1654859434871; Fri, 10 Jun 2022 04:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654859434; cv=none; d=google.com; s=arc-20160816; b=ylz1zKm1Arc+NOWPqmWBxylHLYtIZn+aNO2U8/iis61LzTliV7VX0kVOOKhrfi9zuR XBYW1gYGgPadoIVqfs6StaeOzd/Y+3jl5WJab5bDnk26OaYOd/l8g5sEUe1nmysc0u54 RBDLIQZ6ZkkCj+ptg1ZbFI2TvKLZcguhkIL+WLcgGvY8n4ea1As323sln9mE50sFM1FH kbxvayuxKjCcXg6gdOrwzMwBPwAKDQx1STzrb4xFA/H+OM/h1rRfipkUMitO+MbB7+yW c9IeCOEP/UkETnFF1oYQIMLI47E+BnNgx72YpXEGql1yNnCA0ES10fRzJ+Fe8C04DtYC UQPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CPqa3snjp+V3swy+paQVl3SWlOSGmf0pkLwY6FTDI9U=; b=LIwJERSuQOKlK2dGROjaaLHD644H0d+2r2AuDNWOVtgTlfjUYNFcANOn4ayaX6GN+y HOu4Mki0jZZHWgrkYJTTinLe+ae83BGUnomSGRppkKrN+agethPOFfkS5YrkbFlFhy7H Sy1x/BVAVS50T4rWnv+WvmZG+wgh6dSNS0Xjq5srUXCysXBF+e1Oo652++WdbmPxWjb+ JLD1anwtAEwf7Y4PyURRNrWWKK85JXVkyM6TOQIqZljlwrscqRy7xYl8mavF/yysZ+sW fcUz0eIasLKTpnLLNtPAQ25BOKVRnbllvwCCWnQwKNwrFEcpogXgzg8NyYjgPvtufXYF 9P1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="boAs/cHx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m7-20020aa7c487000000b0042e0cfdab0fsi11446849edq.6.2022.06.10.04.10.08; Fri, 10 Jun 2022 04:10:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="boAs/cHx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345249AbiFJKpw (ORCPT + 99 others); Fri, 10 Jun 2022 06:45:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346972AbiFJKns (ORCPT ); Fri, 10 Jun 2022 06:43:48 -0400 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BA162533CF; Fri, 10 Jun 2022 03:40:23 -0700 (PDT) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 80A23100003; Fri, 10 Jun 2022 10:40:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1654857622; 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=CPqa3snjp+V3swy+paQVl3SWlOSGmf0pkLwY6FTDI9U=; b=boAs/cHxD1v49A/IVeVtIuEz8fBNz17KEqTSD8TF0pb3tuwqKcx8ieyXiAvkchawghAV6Z PAZwqCV0PZ49VSLYs9l/wEVXJZQbf/mZhMpMTRM/w0eZnFZr0GbP1cCJvU5zhJebNZDtIl kx90AMeV+gMRuniOD3vAbNsbhrjHAf/rHRuYiHs+VQAQSOtjE/Q9DASLesAreXrLPNIXS6 rop2qSp/Nok87u1iW2IvGGldHlL9pQzrqPcK8lSQDinIvuQOmGjXzZdUW0MePrVKLB6hPy pGiDY36c8H4pB8JHRoGFI8lNpN6NZ0+wMLtQElyftguowNu+A67z91TE8dBikQ== Date: Fri, 10 Jun 2022 12:40:16 +0200 From: Alexandre Belloni To: Peter Korsgaard Cc: "Neeli, Srinivas" , Srinivas Neeli , "a.zummo@towertech.it" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "michal.simek@xilinx.com" , "sgoud@xilinx.com" , "shubhraj@xilinx.com" , "neelisrinivas18@gmail.com" , "devicetree@vger.kernel.org" , "linux-rtc@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "git@xilinx.com" Subject: Re: [PATCH V6 2/2] rtc: zynqmp: Add calibration set and get support Message-ID: References: <20220609140833.1784738-1-srinivas.neeli@xilinx.com> <20220609140833.1784738-2-srinivas.neeli@xilinx.com> <87r13x28o4.fsf@dell.be.48ers.dk> <87mtel287y.fsf@dell.be.48ers.dk> <87pmjgyghw.fsf@dell.be.48ers.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pmjgyghw.fsf@dell.be.48ers.dk> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/06/2022 12:12:11+0200, Peter Korsgaard wrote: > >>>>> "Neeli," == Neeli, Srinivas writes: > > Hi, > > >> >> Where do you see that? ug1085 rev2.2 still lists: > >> >> > >> >> Programming Sequences > >> >> init rtc > >> >> 1. Write the value 0019_8231h into the calibration register, CALIB_WRITE. > >> >> > >> > >> > This is a very weird value. Last time I had a look, I couldn't find an > > >> explanation for it. > >> > >> Agreed. I am not arguing that it is sensible, I just wondered where this new > >> value comes from? > >> > > This information is missing in our TRM, as per the internal RTC IP > > design specification document, the calibration value should be crystal > > clock frequency minus one. > > For a crystal oscillator of 32.768KHz(0x8000) frequency, the calibration value will be 0x7FFF. > > > Will update TRM with the required information. > > Ok, great! > > Please put this change in a separate commit from the get/set logic. I'm not sure it is worth it as it is probably being set (to the wrong value) from your device tree anyway and the driver won't forcefully change it in that case. The worse that can happen is that your new boards will have the correct value. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com