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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12FF3C43334 for ; Thu, 30 Jun 2022 18:01:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236494AbiF3SBv (ORCPT ); Thu, 30 Jun 2022 14:01:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236530AbiF3SBi (ORCPT ); Thu, 30 Jun 2022 14:01:38 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A84C393DD for ; Thu, 30 Jun 2022 11:01:36 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id o9so27577198edt.12 for ; Thu, 30 Jun 2022 11:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=oP65LAT/fd0C6OnRp3Ub9OQHA8VbKhPvXbniEJ3nVeM=; b=okhkRQ59JELGFs++y1bGscG5q+VXfKQlxDjG9RGRLYXwjDJN/mCw0UvDSDhJahe+lg kpEd0AdWlbeQcdPmXaBpHZztPo5tSKlkHwcZ9Om/U7Iv0l2AKOHwf7gBjJfy8Jm3CDOg 8rdLIRAWUmria9z0tixF4TJb2UB/WJ0sL7nkFpkzp70XkHp0vtgpLLGmbUXSEbbQNsEl Q5wxyUrRxovbmuzBYy895n3/qV3cjBv6E7TfaV47hI1ctNj4KUoHX0+ZgIi5gGadU72h tVJ+P7eIPxKgVjTGnmuRJVRdvpAlvX4cLZhPcPpdaTE/srih/ygqYivQkaEXd87YGLnf E17w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=oP65LAT/fd0C6OnRp3Ub9OQHA8VbKhPvXbniEJ3nVeM=; b=69Mub1XwGYhFPaLh/Rlz6XRhtYfgSBlTFWXrPW9+xpDgdtW7xQCbTzs2ZuQ8ZR+0Mt AMUq/leqIWkkNpqpvXfG+PRXp2sE0SN3LeMHdaLA3RF0UlKGQ/ahslzn7B1P9hTzvufS 9Q/UJPNBM9Mcn3seh+NOxingR3iV1gLFAMD/zNxRGWUs9AZg5tTCfQPqj/v+afoOfGkN hxGnxTG/BZ1p3zgKfh9Ji253sJ5YlKjmMlYJ2dBuuEDP50cH245TaREe0ToiqpgAZNFr BCVXAtr9E8A7Lhk8ANyc+43BG7qk8D7FsDG6eakRzrZNy2RrZ96IzcrtVtzavl/krGlw fUbA== X-Gm-Message-State: AJIora/tLHAOO71ahAilKYaZdq+5y1zCAD+CI3sRRbE4MHANbDe5Vzdj RmtiHCochqlfpCh5YTpMba0jvQ== X-Google-Smtp-Source: AGRyM1scmyht18TKC54qdhLFMpF/tV95/vYdn9nuKK0yCFXvLEMAhyAbNUUh6YAaGoMZvqq3eZSgKg== X-Received: by 2002:a05:6402:2c4:b0:435:8ce0:aef8 with SMTP id b4-20020a05640202c400b004358ce0aef8mr13310561edx.140.1656612095033; Thu, 30 Jun 2022 11:01:35 -0700 (PDT) Received: from [192.168.0.190] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id kt26-20020a170906aada00b00726dbb18b59sm3626737ejb.130.2022.06.30.11.01.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jun 2022 11:01:34 -0700 (PDT) Message-ID: <5d8b2044-5ca6-c90c-57b4-afbb2ae20dde@linaro.org> Date: Thu, 30 Jun 2022 20:01:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v6 10/14] arm64: dts: freescale: imx8qxp: Remove unnecessary clock related entries Content-Language: en-US To: Viorel Suman Cc: "Viorel Suman (OSS)" , Rob Herring , Krzysztof Kozlowski , Michael Turquette , Stephen Boyd , Dmitry Torokhov , Srinivas Kandagatla , Dong Aisheng , Fabio Estevam , Shawn Guo , Stefan Agner , Pengutronix Kernel Team , Linus Walleij , Alessandro Zummo , Alexandre Belloni , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Wim Van Sebroeck , Guenter Roeck , Sascha Hauer , NXP Linux Team , Abel Vesa , Oliver Graute , Liu Ying , Mirela Rabulea , Peng Fan , Ming Qian , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-input@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org, linux-pm@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20220629164414.301813-1-viorel.suman@oss.nxp.com> <20220629164414.301813-11-viorel.suman@oss.nxp.com> <483d5115-4027-e811-8bce-15da6c7c660f@linaro.org> <20220630083636.2c7mclmbq3tjma2j@fsr-ub1664-116> From: Krzysztof Kozlowski In-Reply-To: <20220630083636.2c7mclmbq3tjma2j@fsr-ub1664-116> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 30/06/2022 10:36, Viorel Suman wrote: > On 22-06-29 20:04:43, Krzysztof Kozlowski wrote: >> On 29/06/2022 18:44, Viorel Suman (OSS) wrote: >>> From: Viorel Suman >>> >>> "clocks" and "clock-names" are not used the driver, so >>> remove them in order to match the yaml definition. >> >> So this explains the unexpected change in the bindings... but actually >> it does not explain whether it is correct or not. Just because driver >> does not use it, is not a proof that clocks are not there. In different >> OS/implementation this DTS might break stuff, so basically it is ABI >> break. DTS should describe the hardware fully, so if the clocks are >> there, should be in DTS regardless of the driver. > > Hi Krzysztof, > > Both XTAL clocks - 24MHz and 32kHz - are still defined in DTSI files, see for instance in > arch/arm64/boot/dts/freescale/imx8qxp.dtsi : > --------------- > xtal32k: clock-xtal32k { > compatible = "fixed-clock"; > #clock-cells = <0>; > clock-frequency = <32768>; > clock-output-names = "xtal_32KHz"; > }; > > xtal24m: clock-xtal24m { > compatible = "fixed-clock"; > #clock-cells = <0>; > clock-frequency = <24000000>; > clock-output-names = "xtal_24MHz"; > }; > --------------- > Both can be seen in /sys/kernel/debug/clk/clk_summary once boot is complete, both can be referenced > in any DTS node, so there is no ABI break. ABI break is not relevant to the fixed clocks being or not being defined in the DTS. You have a device which was taking the clock inputs, so the clocks stayed enabled. Now, you don't take these inputs, so for example the clocks are getting disabled as not used. > > "DTS should describe the hardware fully" - this is true in case the OS is supposed to controll the > hardware fully. i.MX8 System Controller Unit concept implies resources being allocated and managed > by SCU, there is no direct OS access to some hardware. SCU actually defines the hardware environment > the OS is being able to see and run within. SCU is able to define several such isolated hardware > environments, each having its own OS running. So, in this particular case - i.MX8 SCU concept - > DTS should describe the hardware from the perspective of the hardware environment exposed by SCU to > OS. OK, that sounds good, but the question about these clocks remain - are they inputs to the SCU or not. Regardless whether they are actual input or not, you used not appropriate argument here - that Linux OS implementation does not use them. The proper argument is - whether the hardware environment has them connected or not. Best regards, Krzysztof