Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3122082rwb; Fri, 20 Jan 2023 11:29:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXs5GRYehQ0I0YYoAxGFFlpht4RWbpBnXl5fCJ8mSkHUPbs3EQCoQgxg8tPP+OYjSYD0fZJx X-Received: by 2002:a05:6402:18c:b0:48b:c8de:9d1a with SMTP id r12-20020a056402018c00b0048bc8de9d1amr15725034edv.37.1674242940940; Fri, 20 Jan 2023 11:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674242940; cv=none; d=google.com; s=arc-20160816; b=nKcpB0tJoT4QxXRGEzB/Rt1pYaBEM8/vkcoF0Jqr0uF/JtH6eJQhjkIZUQb15vrfNy nJ4Ej7uPGcCk4qfh6kkQ2KfixEcwM30plCBHnwFndaWz7C6o20Oc4Yoj4+lzy3ZNNcGR pJVmaSBtPtR/LN7GOP/fIeL7gJHKDcSIAovEPuFvRn/M+RGmdRJWUVUrm+p3V2xnrUs0 4v9ipb6Tf+OyAfj7BNjH7JZ1vESUy2Ik7jNmww4WTRN2vwiu0oYmgfpVNCnds+C5uEYF CW7+s3SsDhGaCFRuvO395ZvGe5nlmKjDAxqBVu64xSRvBrfJpOThl6Q9PkUUydMWNOi2 I+zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=bSA3wh9gMj+Mvd34uj2dtbNIbWdD9BJi2jkGKY8O+Nw=; b=RLkJQITET126/55lbmZq6FTSBwX4BNz0qD9M/HrM9DjpKpNNl7BOxtgptHRoiPPJRx IBVEP7rJpssjq8I8aEVufivLWoEitfe5h2FW3wwZHg75PpzdA3yzNwb2Z5GRRf0tljJn dsMUgxgT5Sa05xQzH8WUmbm00CY01LhGlAFisV7r0d73e8nFrdCtIVytQasgmjSh4tdM mcUITSQSTil4YDsJkaFkmdp2FWSoHQgIA7wWFmUvzh2WZUXSbgx53ZLoZThEXSZyV5kn VcbaclmOtgiv4BwmAq7sE1hdPbDmNCSJeARvpgz1WqP3dgxwQN/yBVKuN3LRbz/E1P2g pHgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@sparkcharge.io header.s=google header.b=cQAixSrg; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d20-20020aa7d5d4000000b0047ed1256ff6si17663531eds.443.2023.01.20.11.28.47; Fri, 20 Jan 2023 11:29:00 -0800 (PST) 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=temperror (no key for signature) header.i=@sparkcharge.io header.s=google header.b=cQAixSrg; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230211AbjATTM1 (ORCPT + 50 others); Fri, 20 Jan 2023 14:12:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbjATTMZ (ORCPT ); Fri, 20 Jan 2023 14:12:25 -0500 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C834F74961 for ; Fri, 20 Jan 2023 11:12:22 -0800 (PST) Received: by mail-lf1-x12b.google.com with SMTP id h24so5247879lfv.6 for ; Fri, 20 Jan 2023 11:12:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sparkcharge.io; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=bSA3wh9gMj+Mvd34uj2dtbNIbWdD9BJi2jkGKY8O+Nw=; b=cQAixSrgYRlylZTk1zBwdTwmpPb8cWCe1rkPu3F6V6FnCJifFUhoUsEdyDkQwata26 Zpdo9+yWgpMs6vSDFHLsHp6w71sBnx0VSr5YHOcsafHER85JeFnMrYXS3fW3iSEGlJwc 7IxIIm3IvK4tWlEzY4LDcZq+44Yq+y4aPHDf9kXs4HW2AmX9LdZrPh2iRHe4syc4SH0S N9ZP/dml6mjg+eat2j+wIfXNkgW0BWFNDrHBrMW4YJEtjapJfaW7DgnQmeyE1NEkoOb8 4gqdfBS6Axrj/Z/uikspm49smMOUW0X2Zzgqs4EIF4KTUSIsQ84eZAfFzOgTD0OQDa1S BTmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bSA3wh9gMj+Mvd34uj2dtbNIbWdD9BJi2jkGKY8O+Nw=; b=MmmiELbPWGKO4lHPFgYCl04mtF4fnSSUHotap0UAAM5EXY9bUfQwt/jkXNsGkdmCcT cezc+Iv8KCFQSbiK14ZbLBqNi5g8zJ1fmb5SvMElGnGcePnYAilxUy9NBzfim96b6x02 84Y+QfNAEv00iHhVp/CxQGELLgCu48l2k2+lMoV3eP1TUOK98nUTF5i8j8MSmoH51ImL Du3BzK9VRHhwsCievzkdD1PLVxnr8Yskzn1oSUo9fTXzAV8iCFVC/7UXIxNXiqX8aQJN dgEAqsL6Z4UQxP9N9ntCIq0ldq1AsOCJPhc0+VEqVOZbJTYC2IeXsvwisuRiC/lh9c3A 1ZMA== X-Gm-Message-State: AFqh2kole6tQ78vLJiZR80ShkxB5pOXe8jWCCJv6QKgftVxqemq0Snv5 6a8qvoYpF5mXRoSCnDWl+2RH9R6b+CTUaqAXXVmflQ== X-Received: by 2002:a05:6512:39c5:b0:4d5:8faa:bfe8 with SMTP id k5-20020a05651239c500b004d58faabfe8mr952594lfu.277.1674241940987; Fri, 20 Jan 2023 11:12:20 -0800 (PST) MIME-Version: 1.0 References: <20230119213903.899756-1-dennis@sparkcharge.io> In-Reply-To: From: Dennis Lambe Date: Fri, 20 Jan 2023 14:12:09 -0500 Message-ID: Subject: Re: [PATCH v3 0/3] rtc: Set M41T82 & M41T83 xtal load capacitance from DT To: Alexandre Belloni Cc: Alessandro Zummo , Atsushi Nemoto , Gary Bisson , Javier Martinez Canillas , Troy Kisky , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=no 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 Thu, Jan 19, 2023 at 6:52 PM Alexandre Belloni wrote: > On 19/01/2023 18:27:44-0500, Dennis Lambe wrote: > > 2. Analog calibration -- that's what the datasheet calls it, but the > > range on it is very big -- 3.5 pF all the way up to 17.4 pF -- and > > their reference design uses it as the only xtal load capacitance in > > the circuit. Most of the values you could set for this would be wildly > > inappropriate for any given design's choice of xtal oscillator. I think I should start with an apology, almost everything I wrote yesterday was in error one way or another. I was conflating this RTC with I'm also working with. I see now that the datasheet for this one clearly states that it's only to be used with 12.5 pF crystals, and that the analog adjustments are meant exclusively for calibration. I get what you mean about wanting it to be a new runtime interface and it not making sense to put in the DeviceTree. I also see what you mean about the datasheet not providing a good capacitance vs. ppm table. The graph is approximate at best, and ST's appnote recommends an iterative tuning procedure rather than just assuming a certain value gives exactly a certain ppm adjustment. I see why you would want to avoid using 'offset' for this. I'll hold off on submitting any more patches for this until you've had a chance to think about how you would want a new interface to work. Would it be useful to you if I start working up a patchset that makes a new rtc sysfs attribute and wires the m41t80 driver into it so that I'm ready to adapt it to whatever naming, scaling, semantics, interpretation, etc. you decide is right for it? > I advocate against merging as is without more thought because changing > anything later will mean breaking the DT ABI and this is not allowed. Me too, thanks for taking the time to get through to me about it. -- Dennis Lambe (He/Him) Lead Firmware Engineer sparkcharge.io