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 22FD8C433FE for ; Fri, 11 Mar 2022 22:47:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229801AbiCKWsw (ORCPT ); Fri, 11 Mar 2022 17:48:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229711AbiCKWsm (ORCPT ); Fri, 11 Mar 2022 17:48:42 -0500 Received: from mail.mleia.com (mleia.com [178.79.152.223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02C3325ECB4; Fri, 11 Mar 2022 14:23:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mleia.com; s=mail; t=1647034001; bh=7WkCBki01o3cgWpYVtHrHq4muPjNKx9mmNTlevvNUDM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Xi29xZzNV8VdAfnPq3bwoIDchffnvxI7Czcpvx1uMa9qcPtCItKCDtsGHx3aq4z2v NjyewKqy/TT9vzHd1E/bpvL1vkOHnzUqLImJLNKi/u4FepwOyHd2rcQIiAokmb9mwN AE7ayxffj0ZOieR0TVmuPLnjZqgR3YxJTy56HLlknEv2/dA+qUO9JtmBVegc/89y9O FTVOYDQdy20xjiXNo+m/aZsJI40OZD5fDyKMeomqh/gxU2UUGjybB54TnhqxKPz1Po SQ/4OfXnHNrB0mqydQcS0Z48Amg7kSqN4ExVAseV8RCYFK6nF3D7ixUaz7V62Qwe+A 1B/WNWgTNx+Zg== Received: from mail.mleia.com (localhost [127.0.0.1]) by mail.mleia.com (Postfix) with ESMTP id 5B80E39EB7A; Fri, 11 Mar 2022 21:26:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mleia.com; s=mail; t=1647034001; bh=7WkCBki01o3cgWpYVtHrHq4muPjNKx9mmNTlevvNUDM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Xi29xZzNV8VdAfnPq3bwoIDchffnvxI7Czcpvx1uMa9qcPtCItKCDtsGHx3aq4z2v NjyewKqy/TT9vzHd1E/bpvL1vkOHnzUqLImJLNKi/u4FepwOyHd2rcQIiAokmb9mwN AE7ayxffj0ZOieR0TVmuPLnjZqgR3YxJTy56HLlknEv2/dA+qUO9JtmBVegc/89y9O FTVOYDQdy20xjiXNo+m/aZsJI40OZD5fDyKMeomqh/gxU2UUGjybB54TnhqxKPz1Po SQ/4OfXnHNrB0mqydQcS0Z48Amg7kSqN4ExVAseV8RCYFK6nF3D7ixUaz7V62Qwe+A 1B/WNWgTNx+Zg== Received: from [192.168.1.102] (88-113-46-102.elisa-laajakaista.fi [88.113.46.102]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.mleia.com (Postfix) with ESMTPSA id E338D39EB79; Fri, 11 Mar 2022 21:26:40 +0000 (UTC) Subject: Re: [PATCH v2 3/3] ARM: dts: lpc32xx: Update spi clock properties To: Krzysztof Kozlowski , Arnd Bergmann Cc: Kuldeep Singh , Olof Johansson , SoC Team , Rob Herring , DTML , Linux ARM , Linux Kernel Mailing List References: <20220311093800.18778-1-singh.kuldeep87k@gmail.com> <20220311093800.18778-4-singh.kuldeep87k@gmail.com> <4aae560d-d266-d0d0-136f-32891b15bc01@mleia.com> <4f39f086-1932-1729-8761-d5c533356812@mleia.com> <2f53f17a-427c-62d6-a0c6-4a3962ab01f0@canonical.com> From: Vladimir Zapolskiy Message-ID: <9f4e3cdc-f5e2-7102-949e-7b3032118e63@mleia.com> Date: Fri, 11 Mar 2022 23:26:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <2f53f17a-427c-62d6-a0c6-4a3962ab01f0@canonical.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-49551924 X-CRM114-CacheID: sfid-20220311_212641_399648_0507643B X-CRM114-Status: GOOD ( 20.91 ) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/11/22 4:33 PM, Krzysztof Kozlowski wrote: > On 11/03/2022 15:07, Vladimir Zapolskiy wrote: >> On 3/11/22 3:38 PM, Arnd Bergmann wrote: >>> On Fri, Mar 11, 2022 at 2:20 PM Vladimir Zapolskiy wrote: >>>> >>>> On 3/11/22 11:38 AM, Kuldeep Singh wrote: >>>>> PL022 binding require two clocks to be defined but lpc platform doesn't >>>>> comply with bindings and define only one clock i.e apb_pclk. >>>>> >>>>> Update spi clocks and clocks-names property by adding appropriate clock >>>>> reference to make it compliant with bindings. >>>>> >>>>> CC: Vladimir Zapolskiy >>>>> Signed-off-by: Kuldeep Singh >>>>> --- >>>>> v2: >>>>> - New patch with similar changeset >>>>> - Send to soc ML >>>>> >>>>> arch/arm/boot/dts/lpc32xx.dtsi | 8 ++++---- >>>>> 1 file changed, 4 insertions(+), 4 deletions(-) >>>>> >>>>> diff --git a/arch/arm/boot/dts/lpc32xx.dtsi b/arch/arm/boot/dts/lpc32xx.dtsi >>>>> index c87066d6c995..30958e02d5e2 100644 >>>>> --- a/arch/arm/boot/dts/lpc32xx.dtsi >>>>> +++ b/arch/arm/boot/dts/lpc32xx.dtsi >>>>> @@ -178,8 +178,8 @@ ssp0: spi@20084000 { >>>>> compatible = "arm,pl022", "arm,primecell"; >>>>> reg = <0x20084000 0x1000>; >>>>> interrupts = <20 IRQ_TYPE_LEVEL_HIGH>; >>>>> - clocks = <&clk LPC32XX_CLK_SSP0>; >>>>> - clock-names = "apb_pclk"; >>>>> + clocks = <&clk LPC32XX_CLK_SSP0>, <&clk LPC32XX_CLK_SSP0>; >>>>> + clock-names = "sspclk", "apb_pclk"; >>>> >>>> In fact I'm uncertain if it is the right change, could it happen that the commit >>>> cc0f6e96c4fd ("spi: dt-bindings: Convert Arm pl022 to json-schema") sets a wrong >>>> schema pattern? >>> >>> Good pointm this doesn't quite seem right: it is unlikely that the same clock >>> is used for both the SPI bus and the APB bus. >>> >>>> Apparently just one clock is wanted on all observed platforms and cases, this >>>> is implicitly confirmed by clock handling in the drivers/spi/spi-pl022.c : >>>> >>>> pl022->clk = devm_clk_get(&adev->dev, NULL); >>>> >>>> So, I would vote to fix the device tree bindings schema. > > Drivers do not describe the hardware. Bindings should not be modeled on > drivers, but on actual hardware, so the example is not convincing. My concern is that fixing the bindings can break the driver and all its users, is it clear enough how it can happen in assumption that the driver uses just one clock at the moment? -- Best wishes, Vladimir