Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5425072rwd; Mon, 5 Jun 2023 03:33:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ408HiTL5V1evEKVdeqj96mxP/4PmdM+7r72old2t3ZkLPhEePVmntisig5CiWC92OyBc25 X-Received: by 2002:a05:6a00:2e81:b0:653:91c1:161c with SMTP id fd1-20020a056a002e8100b0065391c1161cmr5306105pfb.16.1685961221293; Mon, 05 Jun 2023 03:33:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685961221; cv=none; d=google.com; s=arc-20160816; b=ROmCxTsAFk2jjh7feBt5nQOJOpttbXN8GbR1esQAItSRYZ5V4q2SEM/6ppql4+fXap Vu2NBISg8AC+MCqzuQunvC73Sdl/IdLp/Sdf3v9dw4QG3ZGEMPSFZqUL0xzBHAiUjfPX m+nLCyN/XbkGmJnXWDoyCujBr7PD0Nhi3sgc7l2C1bAxsyEDp/Hjs+HhDRog9vS+QaaO YaflNM9TFq9diGdytiT8xWMvU+fmAvb7XhB3LaDIddarCR6jYj6TPUh6yKd6CEzMiUOZ EA86TD8UgWW1aXHPQ/F3S4A2Cmb5gPWG99F0428iBknmJ41qIYTAmNO6kdTqlShXpRzP J3hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=EXo5Rv6lxYxO/Ac834u9DO3pHx7uLB62jagw1wFnYEA=; b=t4kTdT7/0XkkiUGM8JOiQITwzJiKLQseyD5cOwwG0LWDHK2tBHBtfQz78dpk+uH8Ae PduL5Pphgc4arg+x5THBkAvkMipualzRozh1ts1eseBNymUYNINP93sDF9RjCbB7t4hW /a3qw+g0mNFWmEC4MXOe5yn2VylYH6skWZoH+dSCY3X4w9ocILCUDvxdjdIhRZa/zOYb oGhBNpECpRattPrr+ikBuS+CYBCtIG5vbQNDv2S44YSwwi9vpA5g4O0y2+wvhcInsrmb gwVtNXBehBvruJZhnYhOeYYX3nuEbULsS41gFgIBwdL9eMoVpQILtU1+51UWHKyap2DT UR3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EQcAEoLO; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z1-20020aa79581000000b0064d6c74a8bbsi3373521pfj.98.2023.06.05.03.33.28; Mon, 05 Jun 2023 03:33:41 -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=@linaro.org header.s=google header.b=EQcAEoLO; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230237AbjFEKNM (ORCPT + 99 others); Mon, 5 Jun 2023 06:13:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229639AbjFEKNK (ORCPT ); Mon, 5 Jun 2023 06:13:10 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BACCEC for ; Mon, 5 Jun 2023 03:13:09 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-977e83d536fso62714666b.3 for ; Mon, 05 Jun 2023 03:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685959988; x=1688551988; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=EXo5Rv6lxYxO/Ac834u9DO3pHx7uLB62jagw1wFnYEA=; b=EQcAEoLOLVzga2GNKs65ncJFfLPyTrKY1MONFcKM+LvWQO9OAn7cgqrBE3JcWjxNkv vuahHS1hTxo39NBQIFlTdnFXWcloUBAPS/sbAutBDU74sMjry1UoeQujc177bIyHjUlE kDD6icuGeA3uaGuP/mnu6vzJGrKvi/En4EwX3NHgwViEMxTmQD8I5cUQKJ4Ox2srl2u5 wSteN7hPcqu9espor8mvn2cQhxp8Gm5HGv1QWzkNHMZVqC5is15T+L/KQODrhwaQtSfR V/f5f5FeV7BnRNMi08k/4PYUQvm0h9WpTNwNsJjto1O0OKrGzQac2NCefQKJzepwhhfd K62g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685959988; x=1688551988; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EXo5Rv6lxYxO/Ac834u9DO3pHx7uLB62jagw1wFnYEA=; b=PckH+92lPbSc/8G5KLdTbOFaUD9PRJUB8ew9pHNU8tJSZTdaBOf7hTLxLaF5qIz1gr Z+zmds1njm/EPHKkDoip+edaOTBAFmRn83ycCa1OMkwdhfpHWP6LXT31GxvmNO9w+r1j uquqjaifQiuuV8ozrGDV/E8RqBYOA8zMUOLSDjTN6eZ2CAqk+C0TAwDgctWmTfEXcHdh kEwkWeEa4vD3rMdXjczOdhQDXgXjrRaySdgL7AY7DM5AieQaUPkCuHalVKV0vfnGtqUE 7yslzHXBYOmGzvdPApWYQ8HoGFe+g8T0hh7fHj8mN/pZLfV9vDrjSrmThgWFE2ZaYSKz 2Rhw== X-Gm-Message-State: AC+VfDzsDL2SoELix8Ew2UeuFAIrq1ihRNKPn0Q68QLQgzZzwHX2AEq5 dsjXEMkDr4gJ4qopndOWrY+46Q== X-Received: by 2002:a17:907:2d2c:b0:966:eb8:2f12 with SMTP id gs44-20020a1709072d2c00b009660eb82f12mr5576990ejc.11.1685959987832; Mon, 05 Jun 2023 03:13:07 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id d10-20020a1709067f0a00b0096f5781205fsm4054001ejr.165.2023.06.05.03.13.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Jun 2023 03:13:07 -0700 (PDT) Message-ID: <578088ff-9feb-3d03-f12e-577f105144f5@linaro.org> Date: Mon, 5 Jun 2023 12:13:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v2 1/2] dt-bindings: clock: Add nvmem-clock To: Mike Looijmans , devicetree@vger.kernel.org, linux-clk@vger.kernel.org Cc: Conor Dooley , Krzysztof Kozlowski , Michael Turquette , Rob Herring , Stephen Boyd , linux-kernel@vger.kernel.org References: <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.2167d5ad-7e99-4eb9-a313-030fc7a7d546@emailsignatures365.codetwo.com> <20230526143807.10164-1-mike.looijmans@topic.nl> Content-Language: en-US From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 05/06/2023 12:01, Mike Looijmans wrote: > On 31-05-2023 21:27, Krzysztof Kozlowski wrote: >> On 26/05/2023 16:38, Mike Looijmans wrote: >>> Add bindings for a fixed-rate clock that retrieves its rate from an >>> NVMEM provider. This allows to store clock settings in EEPROM or EFUSE >>> or similar device. >>> >>> Component shortages lead to boards being shipped with different clock >>> crystals, based on what was available at the time. The clock frequency >>> was written to EEPROM at production time. Systems can adapt to a wide >>> range of input frequencies using the clock framework, but this required >>> us to patch the devicetree at runtime or use some custom driver. This >>> provides a more generic solution. >> This does not look like real hardware. I mean, the clock does not fetch >> its rate from nvmem, right? It's the Linux which does it, so basically >> you described here driver, not hardware. > Right, this just reads a setting from an NVMEM provider. >> Extend existing fixed-clock bindings to allow reading frequency via >> nvmem cells. > > I just tried and implemented this, but it does not work. The reason is > that the fixed-clock implementation returns "void" in its > of_fixed_clk_setup() init function. The nvmem provider returns > EPROBE_DEFER because it isn't ready at this early stage, and this error > will not be propagated up because of the "void" signature. Thus, it's > never retried and the clock just disappears. Linux driver problems are not a reason to add bindings for virtual hardware... Best regards, Krzysztof