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 76094C433FE for ; Sat, 12 Mar 2022 10:23:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231609AbiCLKYv (ORCPT ); Sat, 12 Mar 2022 05:24:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231233AbiCLKYs (ORCPT ); Sat, 12 Mar 2022 05:24:48 -0500 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA0D663531 for ; Sat, 12 Mar 2022 02:23:22 -0800 (PST) Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id BACDE3F60E for ; Sat, 12 Mar 2022 10:23:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1647080600; bh=xDCJmkuolk+37CRthskXGD5BwRwajHEJ6ASCw/gpw94=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=mEWZmVT6h+ici+6Gy60hl2LX9D/dfEf/amdLJBLfwyExj/vIYR7erTk5gW0bhaiN/ qDcBOZjq0GPl6W2RewK6fE1TPGr0Buw6z2081gF97oJ/LH2mB6UhthLtIjpuzryt3E PifLQEivOncia3yiET25uWcfWHntadbL1JZyLGCpglCn2nDNiNkzELYxgm9gsA0xD5 CwNG9iHkxLeOYZphlUvSn7l8Xr2Ty5qxCGHbKB8s1djbn7pu5MDH6WuQVFVZZuRBuy +s6hYMNWPqQK7HbYY8A1az4gw/i8hG2Hi19vDKuu/J8m5B0eSgs1kfucep5jRg2Xw6 GAJVtVu5p1b9w== Received: by mail-wm1-f69.google.com with SMTP id n62-20020a1ca441000000b0038124c99ebcso3478326wme.9 for ; Sat, 12 Mar 2022 02:23:20 -0800 (PST) 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=xDCJmkuolk+37CRthskXGD5BwRwajHEJ6ASCw/gpw94=; b=DUafG/9sLTJ6quDELjEwH7K/H/1glLjYzaTi7B9YYIFAz2oyaNNS0IWQEfRrSs2F1o maT3oPFZv1NUbioUqrxqNJD0fwnoUAVcOJePlTyBiOJH4TRoXrzWTPUKEY+Wwoi71VhN 4Sjf5k6IVmo529PZybz2f15sTaPspd5taaZLsPejObAPZ/gorQCsTwTQibzWe1H1naR+ M/5XuoDHFH3dpeZJTcopQbJU5Iu/bn08osA4eFVOYzAdJ3vkjLnGZXsg2cISrLxB3ap5 ZeFzOpcP+dtCrxlXN3mmiTLNjHhITaPbDgPxVPagVcJ2QpxiLfF5VfiPHiKM8g7jEgkl RGXw== X-Gm-Message-State: AOAM530D0iGP9kT8/+uw1QS6cAoDtOHsHWPC8NNQGQfDMECbgzkOhlN2 zLWzY3e99IEsCaBzOMn9o8H4wVgb4sP8lIBdFzqAhpIpBxX2nArSfI3/YU2EbE4m0KxJ535xbln sklzELdLFpuTBye3oYlhwbHMqz+Jk4f35SoTe5sJYJA== X-Received: by 2002:a5d:55c5:0:b0:1f0:7672:637d with SMTP id i5-20020a5d55c5000000b001f07672637dmr10456071wrw.170.1647080600303; Sat, 12 Mar 2022 02:23:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFIGW8or/HGHeWCNJyi2pEy+yZaNExUDX0cSktJR/WW3PJOCLqu9GeD9VB0AwoAH5nNBQyPA== X-Received: by 2002:a5d:55c5:0:b0:1f0:7672:637d with SMTP id i5-20020a5d55c5000000b001f07672637dmr10456048wrw.170.1647080600043; Sat, 12 Mar 2022 02:23:20 -0800 (PST) Received: from [192.168.0.148] (xdsl-188-155-174-239.adslplus.ch. [188.155.174.239]) by smtp.gmail.com with ESMTPSA id r5-20020a5d4945000000b001f06372fa9fsm13157691wrs.54.2022.03.12.02.23.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 12 Mar 2022 02:23:19 -0800 (PST) Message-ID: Date: Sat, 12 Mar 2022 11:23:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v2 3/3] ARM: dts: lpc32xx: Update spi clock properties Content-Language: en-US To: Vladimir Zapolskiy , 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> <9f4e3cdc-f5e2-7102-949e-7b3032118e63@mleia.com> From: Krzysztof Kozlowski In-Reply-To: <9f4e3cdc-f5e2-7102-949e-7b3032118e63@mleia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/03/2022 22:26, Vladimir Zapolskiy wrote: > 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? You meant fixing the DTS? We do not consider here "fixing bindings" because they look correct. About DTS, using the same clock twice should not cause negative effect. 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 A8E21C433EF for ; Sat, 12 Mar 2022 10:25:09 +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=K8wX7vQ4ApMdrwe3XS6O9URmujIxjMNDAH9lf3juLSc=; b=SjG/Zn7ylYiPjt zl/EO2mj+dwYoYsKW3IVSG/wgq8gFmJIvld1u+oe4rrrW4mywtZi3OdQo411iVmGWUNLhJBsQIG8q 9OLQ/N4kf28V0DdJTtc26QyFN8VxaAypDp4w+cKrI8RZkwGj/eIyC6LWNb2pfybEhIah78SNnRvhf N7oiGKVjUbl7lYgPw0QYsAKvRt7JtBaC9BoOUnvUjknoxm6qoBtJ+6Wr6R4eDe0gQR5UiI9qMpQOx 97jaV8bAdANOvdan/QAk1vExhm5hplTzAedOnU1FFSgbN8YgLVxG6W0clHA7L28vznoktrcGxZnU6 05q1iKipLo0ONl69Uj7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nSyuL-0013rb-1N; Sat, 12 Mar 2022 10:23:33 +0000 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nSyuH-0013qv-6j for linux-arm-kernel@lists.infradead.org; Sat, 12 Mar 2022 10:23:30 +0000 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 13A823F799 for ; Sat, 12 Mar 2022 10:23:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1647080601; bh=xDCJmkuolk+37CRthskXGD5BwRwajHEJ6ASCw/gpw94=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DAbxo6HoIWQrp/cNFmPCbUEbdnl8oOCNBPmyCyrBSfXECbrFu56PvG0sI7/HYGFRg hXf1b9Lo8hANCmubEamo+3RLc5/2KUTrIa9ogEj3nI9gUSxLHSoyO70Z6No4ZqrXD6 uxXvDpNT9P1/NwHaH23qHcAy4RwTs4gXq7Duor2XiZsQC439sGVwZ8EJhalniong5M Te2FQpE14fd+k+USsc7dHCcoPtNGn7c6o0JAxzIF5t+Rpy5ohJYiLxkYMtjU48CGEu ZwjHirVWiwX/cBS3ud/rZRPpz8Xr8LfvjCvjpTlA1+6D34iomDzK9Lmeecoo2pYuBt H1vLiHkME9Xaw== Received: by mail-wm1-f72.google.com with SMTP id m34-20020a05600c3b2200b0038115c73361so3484976wms.5 for ; Sat, 12 Mar 2022 02:23:21 -0800 (PST) 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=xDCJmkuolk+37CRthskXGD5BwRwajHEJ6ASCw/gpw94=; b=JW8mnntZxvxQtcmiXv8lyF9IoFhsmfZxal298o8VAPgxNl1R8C9vY+qLlT6ZtC3bJI dJ7COIeerun/MfHF5ZygncyLOXu/ikUw9zvU6zm/N+e3QtPfaKjLlqKs2ItJTI5kc+w3 LI1LUr6boO4IpYRHWNb7B20ZtQA1VVQn7A4HAUn9HjnMqFPpM1IJME1gsjzfxURT5Iww DfUf5vXmjeLWQlT18vOcyO95lnr21CBpX5H07MiYWic0wToxyT65lHGVCL5g4vCpRf2O OoRrRW3JAbBCShyXYuS/3jBpgUigYyvfNFZ4dI2hnfothhvw7SxjVrfKYCIWBknqHeZR J1nw== X-Gm-Message-State: AOAM532CMedKLf4XXRsgtpkOkUOwkmk33QakFz3xHGhvA+eeEClcO4la ELNumMa6L3Aeg8Dbs9xKYz4w7VRx6KKvNHDs7cWByPlQmNNHa3dfNDOnZfl7PVMYfmDRhr02Cnd 7e6YJCdrrycsatziPzAYC4InCBiP3rkVg66gw0o3V3lCZvdPlV5fd X-Received: by 2002:a5d:55c5:0:b0:1f0:7672:637d with SMTP id i5-20020a5d55c5000000b001f07672637dmr10456067wrw.170.1647080600303; Sat, 12 Mar 2022 02:23:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFIGW8or/HGHeWCNJyi2pEy+yZaNExUDX0cSktJR/WW3PJOCLqu9GeD9VB0AwoAH5nNBQyPA== X-Received: by 2002:a5d:55c5:0:b0:1f0:7672:637d with SMTP id i5-20020a5d55c5000000b001f07672637dmr10456048wrw.170.1647080600043; Sat, 12 Mar 2022 02:23:20 -0800 (PST) Received: from [192.168.0.148] (xdsl-188-155-174-239.adslplus.ch. [188.155.174.239]) by smtp.gmail.com with ESMTPSA id r5-20020a5d4945000000b001f06372fa9fsm13157691wrs.54.2022.03.12.02.23.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 12 Mar 2022 02:23:19 -0800 (PST) Message-ID: Date: Sat, 12 Mar 2022 11:23:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v2 3/3] ARM: dts: lpc32xx: Update spi clock properties Content-Language: en-US To: Vladimir Zapolskiy , 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> <9f4e3cdc-f5e2-7102-949e-7b3032118e63@mleia.com> From: Krzysztof Kozlowski In-Reply-To: <9f4e3cdc-f5e2-7102-949e-7b3032118e63@mleia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220312_022329_511622_01023CED X-CRM114-Status: GOOD ( 22.92 ) 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 11/03/2022 22:26, Vladimir Zapolskiy wrote: > 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? You meant fixing the DTS? We do not consider here "fixing bindings" because they look correct. About DTS, using the same clock twice should not cause negative effect. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel