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 18DF6CCA47B for ; Thu, 30 Jun 2022 18:01:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236519AbiF3SBw (ORCPT ); Thu, 30 Jun 2022 14:01:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236347AbiF3SBj (ORCPT ); Thu, 30 Jun 2022 14:01:39 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4398396B9 for ; Thu, 30 Jun 2022 11:01:36 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id e40so27636184eda.2 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=fTPKsz5Wb6XPdDif3LBvVQ90WMSAiQiYxr0q8skzFAnbwz/Bs/SVxaanR/ZJ716DzW x9yVLwLiKWzi5Ae6/sXNMcv6i6vliZKsdgoMxU2vfEb53bZnp/svsFiUIrREZzrRxRG+ Uu8Hv0Erjl+lwpBBhhE7OjZdNl2vg4I1aav0qCLJJA1xbvTeEobsPFqBeAR3BI+t7MCz iRbigbPTP/8XXyqGmEX/e8/iYSq9aWX2axJatoaJfIZwEx0z2BzS2lxc8KYCxMxSd9Np MxuUfVcedQ8A13ZKDuGR29JslefOfHUmyKA3fn3Mfw+dtf6NMF7EBZDPcyl0ZArgko+H +gTA== X-Gm-Message-State: AJIora84Bg0byF6Rlxmbp/xTNpm08CGI4fLnXOAXPvZA3zGEU58lNBYs QCIgSA+hBUbgEW/iBakZqRzzZA== 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: linux-gpio@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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0C377C43334 for ; Thu, 30 Jun 2022 18:03:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zS/+Cdo+Lb7ecGEHwrVnHKE7Ghpd3pPui86splZI7bI=; b=UyYLrX3FsCOL1A NrZUXpz6jfwX4IPykCQYUAWN5aKrdJvd+BINJIGxPWqjsacB24sWv405IsDzhBUI1TFJpbRXr+Bxm 2LluiacbD13vthgS6zR2jMIZNVyiA0+TLoNRJeAXcJpp1IVScUZ6Cvmv2agYKWCXPtrBM2eLY1heE mVSAUWl6wQu9PFLIkeFkxLohBH8tdwE5Q+C5p50+EigevV7fcsAZIOeLq4+HJqqbhtaSbnzRxT5pS uUQxE1y5zPHqD3HpM0Asj/xgHaBgK0X7SXywj1oKpozWwAQQcFzlK4/QykUQ8x5gJ//Dmk/RCe2GR vwXeQFy0WU1cgseG56IQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6yTz-000xia-UB; Thu, 30 Jun 2022 18:01:40 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6yTx-000xi8-5B for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2022 18:01:38 +0000 Received: by mail-ed1-x52f.google.com with SMTP id r18so19748890edb.9 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=frenu0CevTWxtz+kdtvllhLAywdmIW52RymbAGFNGieR7ejDJZlQfK3tgDM5eEw8nJ djYoyzL0/5yHOuJ6NhJpggsx5mXfIfRsuvKKPB52x/vw6v4oS0KFcB6dDyHcwBtrRzXO A2wggT/l47oKyZ5OLDqMd/SsGnH72XST9f8IT7sQojyl21KSy0CvXJ+o5Co/gUma6keK lMogNYzs512tULnyPErTw07HYb5ib25wKy9le/B5ilCoDF6ai83vGt7J5lMkGTQjD6v6 aGaL7dQKWLJYYzYi8NKazTt9HLQr1ErjUzdBBroLqV0CBncG7gDsOHtqDpuAnKpFtit6 KC5g== X-Gm-Message-State: AJIora9RszBCpIfdZmERgUIWmtOrwm6kJu4Jzfie6sJEnuK8Qt/U0AAb myc/mDi/K2CzGNtNbAIwlmkmqw== 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220630_110137_257510_0E6F955B X-CRM114-Status: GOOD ( 26.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel