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 D4DB3C4332F for ; Tue, 13 Dec 2022 07:51:48 +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=qDsbgJ8rsxC9zX/wccrC1+X+TMIe3lAscVBO2XK3wK4=; b=xsEzexyy9+pU/q jhayBdluHWkkteSV09rRM36irLwWBLtGG3OXccctffGmi0Qlo0yYhLKyGYGICmIm3JBpxvhyPCt56 lfyqBlkNQwyO9g9DqUvX98qspmCXuJQhxr5shl71XO5N9NDuVUTgWR9sAqcCdKeqY3Vu+fmiJvU8i T+XqnFC84cuHdtLNMf6IK1cBstWYVpbKV9qw+wD+N6GujYjXOlPFjdbj1Zjnx8R4750STX44M0dhp E09PeEloViyPqMBkyMtEEAVcdaVL+wKZikR0jC0CH8xbKd9pscmPC2YvFGdshSwpegDTAnU8w6lN9 cBFyN8wGk49MIqw2539A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p503Y-00DcLl-DW; Tue, 13 Dec 2022 07:50:28 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p503V-00Dc3F-An for linux-arm-kernel@lists.infradead.org; Tue, 13 Dec 2022 07:50:27 +0000 Received: by mail-lj1-x22a.google.com with SMTP id f20so2475550lja.4 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=kLv/CCO5gAwV16a/raf0jO9CpkDm2xfVXcJAXIYf5Uo4DOc3y+LK1AH1DhnMi1zO0w JgRLPq0gi+egdj7PAA38753ixk5gv52b0JxwukNO/M8xetlaoXMh29H6MfytRm6gE0V4 kVmzNB5Ks9malJd525a/cZCgAF5cKOnPf4FedrQAWtad3rjwv1Pb3G3b7kkIlpKaLSFD tY6aDWrs7h74BVxNXG3xvQJHl5snpyzub7i/CSLW/qshO+sNLMVtFbwglhsZAVKFG3y8 04oCNh9IPuHpWIiE69KQ4miiv8DGgOb8cazsXYqhLBzJHW+HM2kKomMqm1aOKKZwnfYy O+Cg== X-Gm-Message-State: ANoB5pkUVQh3idUTwptGI/Qml7JVU+J1oH/p/sphXdiPlljwHQWbtO5J /35BqbVXgNL9iZCUVxsi2q4qlw== X-Google-Smtp-Source: AA0mqf5nxUYPiaQbarDHk5mufFAu/s0JMQQ1bzvU3duUeUWzup6xGLcqzdZt01PaJVdzC5yyUd/YPA== 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221212_235025_407384_38AA9502 X-CRM114-Status: GOOD ( 26.97 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel