Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8000120rwb; Tue, 13 Dec 2022 00:16:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf7rb5sZoOzQMNZZSpuaq4KDajvYWkFeTHi+CKEdpfQMY/9xa59Ba8baWsf3u3a5/UVSLEz7 X-Received: by 2002:a17:907:1256:b0:7c1:1adc:46fd with SMTP id wc22-20020a170907125600b007c11adc46fdmr13021231ejb.34.1670919417397; Tue, 13 Dec 2022 00:16:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670919417; cv=none; d=google.com; s=arc-20160816; b=PxttRnu6nQbkAgKGOTTDAdyukhEHSOEcJDySUoABO4vtcQ0iLJwQGDexDvPrTsdYQD msHn368Jri8MBEfNdNBCwshrsRuYjXHKm6fLavg+XEH8zChlxl1rtoy3IMVhtEVhqfV+ UQxZDP6cGT6Z9JEonXijnml5Rj5nbnYX1E9qYCoBvhiHf0TritlXRA3y8rWyLxpPRspR jESdf13J9n0QKyVkkAPevRhKCihehv3Af3PKHqvdUqoHXMDnSVdLVQGO+Hn4j192wea/ oEH2IXPdI3FXpA9eVVOmu9NHSyO2nmOlqB1yy8y9xttCPf1Lhd7lhUPC/nKdiMfg6Yh1 Fccw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7iZB0Z1Q5CE+H3OL4aZrZbM8R0KsjYsEMH0TW8UzXLo=; b=ufUpOT0KmI2LfVqUxvfL43ZGWxtA5wPKdgJJXeMclCRp/onVCMhvPtnsodCL8ZEyaD AYJ4gZNtUT9vhTdMotj1RCvyNPFO9gRjr+PO3XfYbYFt8/UKI0XnHcm6HpI3HCnXDaUs uoz1YUdDR0ZA7whLsottURywwq1VkSLKg6D6msADMCAfyU8Xf2C56+8hj/M6JrHa1WLH uemXAwAf0xI20dL/897bmJTVQQUlGKPlDrm5SNY/nmWhCP+aUc/M7N+k9ayp6W7w9piQ d6BGpqgQIZLe7DEASEfdTkF4T/2+rp+CtlI/p0lTpmmSC8onSehS9h6O8/nRb+IC6QiG Xqyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VPae7pDs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga26-20020a1709070c1a00b007c151fd4953si8258116ejc.213.2022.12.13.00.16.39; Tue, 13 Dec 2022 00:16:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VPae7pDs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234708AbiLMHuY (ORCPT + 74 others); Tue, 13 Dec 2022 02:50:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234689AbiLMHuW (ORCPT ); Tue, 13 Dec 2022 02:50:22 -0500 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D088713F7F for ; Mon, 12 Dec 2022 23:50:19 -0800 (PST) Received: by mail-lj1-x231.google.com with SMTP id x11so2461359ljh.7 for ; Mon, 12 Dec 2022 23:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7iZB0Z1Q5CE+H3OL4aZrZbM8R0KsjYsEMH0TW8UzXLo=; b=VPae7pDsz+OQHASONsyLL23oKLeCq2/hkZrhrJKVwBS2UrCgfjoPYWO7OR77Ps4zSI RJMwGYp//01hUOVf74fsPbAabFJd4jy2gnmTjf0IYMRl88HUUjxHwDeif5XZijisqL09 TLPcDXJkJOdLSr3Eg0z2sjQgbRJxzwdyDhDKbhdE/2H33XA0+hYIOozldeP5SAFDgTSR sPUYXDzigHShg8WF7ieOiUc3ZXcQaxlvI5NroJrQ8HVg9vHS0ZApd7W5gqRUR7V3rn/f z2oAzHkU7KQwUg+ofy1tlhOwX8u3X2HZ3GC/A5S+HSpMQLUG2VmsEz8PQmiFFWn6J927 LZ0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7iZB0Z1Q5CE+H3OL4aZrZbM8R0KsjYsEMH0TW8UzXLo=; b=rpGgi0HQMlF+DFfp6V6IVlGf9d6HLXcCxBHMpbQmUEuIenq1ISIkROArd0Roejl3Jr unhC0dqemljRrC8wJOyNMzKza1iup7yolJTCCZFFps1fhE+hmWwG7GzDhLNVNzWPHrAX ZbkKPqxAS1YDzWIh9Zn54bJg5CtcPnXYiofBV3CYF9D+fZgCWippGvGqfXz0FnZGpIIN k/HJh5DM9TKKrlTDOiBSpiq2FXC190DMABC+0e1nZeXdLVfixlLDtEqXKnQjVmz3G/uA jR5Igtz7CmvyuRgC3T3zjrCGN41JGqzNyCjqBKztrz6KJxqXzV7vAsYIJwbdASFjiaZC bI6A== X-Gm-Message-State: ANoB5pl7klf3rfdIqtczn8IVfEWz+n16zHB3fXb6N7ZV3uLUeO3vYlUW Z139HHJq6ezTE2KZN2Se5ullLQ== X-Received: by 2002:a2e:b634:0:b0:27a:131:2649 with SMTP id s20-20020a2eb634000000b0027a01312649mr4812473ljn.35.1670917818055; Mon, 12 Dec 2022 23:50:18 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id s1-20020a05651c048100b0027710117ebdsm167406ljc.121.2022.12.12.23.50.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Dec 2022 23:50:17 -0800 (PST) Message-ID: <49834ea3-7fc2-d2cf-36a7-b509d36f260f@linaro.org> Date: Tue, 13 Dec 2022 08:50:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v2 2/5] dt-bindings: net: add schema for NXP S32CC dwmac glue driver To: Chester Lin Cc: =?UTF-8?Q?Andreas_F=c3=a4rber?= , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Jan Petrous , Andrew Lunn , Alexandre Torgue , Giuseppe Cavallaro , Jose Abreu , netdev@vger.kernel.org, s32@nxp.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger , ghennadi.procopciuc@oss.nxp.com References: <20221128054920.2113-1-clin@suse.com> <20221128054920.2113-3-clin@suse.com> <4a7a9bf7-f831-e1c1-0a31-8afcf92ae84c@linaro.org> <560c38a5-318a-7a72-dc5f-8b79afb664ca@suse.de> <9778695f-f8a9-e361-e28f-f99525c96689@linaro.org> <3908e923-a063-0377-1854-ccbb3ecc704d@linaro.org> Content-Language: en-US From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 13/12/2022 03:46, Chester Lin wrote: > Hi Krzysztof, > > Sorry for the late reply. > > On Mon, Dec 05, 2022 at 09:55:40AM +0100, Krzysztof Kozlowski wrote: >> On 05/12/2022 08:54, Chester Lin wrote: >>>>>>> +examples: >>>>>>> + - | >>>>>>> + #include >>>>>>> + #include >>>>>>> + >>>>>>> + #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. >> > > Please accept my apologies for submitting these bad patches. We were just > confused since we thought that this approach might be acceptable because > there were some similar examples got merged in the kernel tree: How are these related to the talk of ABI break? > > https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml#L57 > https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/usb/intel,keembay-dwc3.yaml#L55 > https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/sound/intel,keembay-i2s.yaml#L73 > https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/pwm/intel,keembay-pwm.yaml#L39 > https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/watchdog/intel,keembay-wdt.yaml#L46 > https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/pci/intel,keembay-pcie.yaml#L75 > https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/mmc/arasan,sdhci.yaml#L282 How are these even relevant here? The support for this platform is incomplete, right? These are just few scattered pieces - only bindings - without drivers and DTS. It proves nothing. You cannot take some incomplete platform and build on top of it theory that you can keep changing ABI! And anyway it is entirely independent problem. You just said you want to change defines which is not allowed. ABI break. No one changes the Keembay defines, whatever they are (you even do not know what they are...). > > The defines in these yaml files are not actually referred by kernel DTs or > drivers so I assume that they should be provided by firmware as pure integer > numbers and the clk-scmi driver should just take them to ask firmware for doing > clk stuff. Best regards, Krzysztof