Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp804741pxp; Fri, 11 Mar 2022 15:36:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIl5wFTFUBxYuAs+BdWmFMyyUVNjTQlb2PL43kkEWtubv8/t5J5gbdmazZ0BXEEdbY+MaK X-Received: by 2002:a17:90b:3b42:b0:1bf:b72:30e9 with SMTP id ot2-20020a17090b3b4200b001bf0b7230e9mr24170417pjb.135.1647041800377; Fri, 11 Mar 2022 15:36:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647041800; cv=none; d=google.com; s=arc-20160816; b=PoMEUI9mtNYc7eu7xt4fWAhCoRtOsC3l+7Te40fcxIvK/6T63xLGuBVGFn1Q5XdSk0 cbtGk8ilZrgXHWyzKs9os62j1t14H0bkx4BsOgkZUYhcia8UZfyWif+F6C8jNliau/dF 3th6V46BFuymGUAvHmyzmJ3xMcPURK/CyHeMk8iOALl8e+TGpF53a4veICfxF05s1zEw 61hEIAObWl3gMh8fjdUKuklp4Q0Gw+RSGcXp4YIn6TkbgoQTpGFsN2xGGcGF+0MO+Kj4 /ZIEnsfYqQZAc5lANwhGcO18DYVIfNS2aEcR6cINvHg/j1sXt1PN9i1xKLpFxgiEIFaf xdZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-signature; bh=lzd1niboCZu5+gCfDZi5ZM7+Sxh8XsASaJWMgeb/axg=; b=MqY0nnM2n2LCHfksL8XF6m+AIwNXp/CspiYfDOI4PUemSJ3UUNABTa2f42pK0+yQFA 4N9MkDUACecvBKftTJIvWog68iaQgpy2AnbZRG0yLLnmPt5YdZxDtNNYDRFIDf8HFIJs +SEdmmHIv7vgnC4Sx7L6y8kkXnww1+s9oixKWU6oC4QWHIELH3PE+r/sac6igXcayJVs bF8aPIGjzlb5Qmrsl4a/vOX4kPioP2EdPLtY9qIEB2g7ggvMrrcCj5LrEJxcRhTmkvVe wATYfPZeJVHB4WWiI1L068LZcWzZgvNZPPe67VudRERvz83DFw3lgThO73j9NzyQ8scA NSlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mleia.com header.s=mail header.b=Xi29xZzN; dkim=pass header.i=@mleia.com header.s=mail header.b=Xi29xZzN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x1-20020a628601000000b004f6cbb2807dsi8540437pfd.69.2022.03.11.15.36.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 15:36:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@mleia.com header.s=mail header.b=Xi29xZzN; dkim=pass header.i=@mleia.com header.s=mail header.b=Xi29xZzN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BDB132CB3AB; Fri, 11 Mar 2022 14:47:54 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229665AbiCKWsv (ORCPT + 99 others); Fri, 11 Mar 2022 17:48:51 -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 ) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE 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 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