mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Chester Lin <clin@suse.com>
Cc: "Andreas Färber" <afaerber@suse.de>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Jan Petrous" <jan.petrous@nxp.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Giuseppe Cavallaro" <peppe.cavallaro@st.com>,
	"Jose Abreu" <joabreu@synopsys.com>,
	netdev@vger.kernel.org, s32@nxp.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	"Matthias Brugger" <mbrugger@suse.com>,
	ghennadi.procopciuc@oss.nxp.com
Subject: Re: [PATCH v2 2/5] dt-bindings: net: add schema for NXP S32CC dwmac glue driver
Date: Mon, 5 Dec 2022 09:55:40 +0100	[thread overview]
Message-ID: <3908e923-a063-0377-1854-ccbb3ecc704d@linaro.org> (raw)
In-Reply-To: <Y42jqDiiq+rOurV+@linux-8mug>

On 05/12/2022 08:54, Chester Lin wrote:
>>>>> +examples:
>>>>> +  - |
>>>>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
>>>>> +    #include <dt-bindings/interrupt-controller/irq.h>
>>>>> +
>>>>> +    #define S32GEN1_SCMI_CLK_GMAC0_AXI
>>>>> +    #define S32GEN1_SCMI_CLK_GMAC0_TX_PCS
>>>>> +    #define S32GEN1_SCMI_CLK_GMAC0_TX_RGMII
>>>>> +    #define S32GEN1_SCMI_CLK_GMAC0_TX_RMII
>>>>> +    #define S32GEN1_SCMI_CLK_GMAC0_TX_MII
>>>>> +    #define S32GEN1_SCMI_CLK_GMAC0_RX_PCS
>>>>> +    #define S32GEN1_SCMI_CLK_GMAC0_RX_RGMII
>>>>> +    #define S32GEN1_SCMI_CLK_GMAC0_RX_RMII
>>>>> +    #define S32GEN1_SCMI_CLK_GMAC0_RX_MII
>>>>> +    #define S32GEN1_SCMI_CLK_GMAC0_TS
>>>>
>>>> Why defines? Your clock controller is not ready? If so, just use raw
>>>> numbers.
>>>
>>> Please compare v1: There is no Linux-driven clock controller here but 
>>> rather a fluid SCMI firmware interface. Work towards getting clocks into 
>>> a kernel-hosted .dtsi was halted in favor of (downstream) TF-A, which 
>>> also explains the ugly examples here and for pinctrl.
>>
>> This does not explain to me why you added defines in the example. Are
>> you saying these can change any moment?
>>
> 
> Actually these GMAC-related SCMI clock IDs changed once in NXP's downstream TF-A,
> some redundant TS clock IDs were removed and the rest of clock IDs were all moved
> forward. 

This is not accepted. Your downstream TF-A cannot change bindings. As an
upstream contributor you should push this back and definitely not try to
upstream such approach.

> Apart from GMAC-related IDs, some other clock IDs were also appended
> in both base-clock IDs and platform-specific clock IDs [The first plat ID =
> The last base ID + 1]. Due to the current design of the clk-scmi driver and the
> SCMI clock protocol, IIUC, it's better to keep all clock IDs in sequence without
> a blank in order to avoid query miss, which could affect the probe speed.

You miss here broken ABI! Any change in IDs causes all DTBs to be
broken. Downstream, upstream, other projects, everywhere.

Therefore thank you for clarifying that we need to be more careful about
stuff coming from (or for) NXP. Here you need to drop all defines and
all your patches must assume the ID is fixed. Once there, it's
unchangeable without breaking the ABI.

Best regards,
Krzysztof


  reply	other threads:[~2022-12-05  8:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28  5:49 [PATCH v2 0/5] Add GMAC support for S32 SoC family Chester Lin
2022-11-28  5:49 ` [PATCH v2 1/5] dt-bindings: net: snps, dwmac: add NXP S32CC support Chester Lin
2022-11-29 14:10   ` Andreas Färber
2022-11-28  5:49 ` [PATCH v2 2/5] dt-bindings: net: add schema for NXP S32CC dwmac glue driver Chester Lin
2022-11-30 15:51   ` Krzysztof Kozlowski
2022-11-30 17:33     ` Andreas Färber
2022-11-30 18:14       ` Andrew Lunn
2022-12-01 10:18       ` Krzysztof Kozlowski
2022-12-05  7:54         ` Chester Lin
2022-12-05  8:55           ` Krzysztof Kozlowski [this message]
2022-12-13  2:46             ` Chester Lin
2022-12-13  7:50               ` Krzysztof Kozlowski
2022-11-28  5:49 ` [PATCH v2 3/5] net: stmmac: Add CSR clock 500Mhz/800Mhz support Chester Lin
2022-11-28  5:49 ` [PATCH v2 4/5] net: stmmac: Add AXI4 ACE control support Chester Lin
2022-11-28  5:49 ` [PATCH v2 5/5] net: stmmac: Add NXP S32 SoC family support Chester Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3908e923-a063-0377-1854-ccbb3ecc704d@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=afaerber@suse.de \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew@lunn.ch \
    --cc=clin@suse.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=ghennadi.procopciuc@oss.nxp.com \
    --cc=jan.petrous@nxp.com \
    --cc=joabreu@synopsys.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbrugger@suse.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peppe.cavallaro@st.com \
    --cc=robh+dt@kernel.org \
    --cc=s32@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®