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 BD52BC00140 for ; Thu, 18 Aug 2022 09:46:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243663AbiHRJqm (ORCPT ); Thu, 18 Aug 2022 05:46:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243538AbiHRJqj (ORCPT ); Thu, 18 Aug 2022 05:46:39 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9879BB0B25 for ; Thu, 18 Aug 2022 02:46:37 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id z6so1421186lfu.9 for ; Thu, 18 Aug 2022 02:46:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=MFmEDhXxgZF7KULdzona+7TtwCBEXCBX6WNuKW7to/k=; b=o/H8DL4GCtp0fpBXwBnHt5oN/hZyiyzj799GcdO01ig5EyiRWN0swEVeq6HE/3v0nH xzXSB9nR2VfYvc6KaZYdR6389lhlOoS/gh6+l68vRvVpDQJWKQM/tk7vFHaxIRG7dsTU lEp85ri6wwQeqsB0pZFS2IHrFOyQxHC2C5iNQ82EsU+V2luHYnOBve933fbYDmfZew3r 96seiWYyn285tf6agIdAA4MUXu5DoL4JXguuYJ89sf7JNCYSfzM4GkW90nJZIplLoU9Q u+UmSgJnmbxyYBCgdKWHlJwcWvMsMNzqRMnVwFJAawBrjGV9vS0BJ0VLJLjfjeV4XtiV E7pQ== 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:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=MFmEDhXxgZF7KULdzona+7TtwCBEXCBX6WNuKW7to/k=; b=O+Ru/CzjInMVvCMnejXdIRNu+w6B10BSHQnyE+T9L8MHeX7cqEtPr4s+CHxs+VF8wr YleF0jdDLTK1uBrMhmitP+andiFtoW1mPm/nsEHU7KEI2WLNV+n0K6z/F9x670C5Dkni CzePSZ75HGbiwoVFyTYCYS2MnVF2A92e8F1b0D0pAlFOFsXgpUBdRICfIxJiGQaKyhTL q2jGWKDG8F2XJNKuYf1zovzW6yAVlmEReSIr1UEJnaIebrBM17L9NFCCbu8wQhgEACl3 SjHs5wuW8ilz7NlIgVRU+4IQFuyp/NmqjOJwoakZ2QUSUaWJygr5aVfh9/VMfYQw4CMO YsDA== X-Gm-Message-State: ACgBeo0GVoiEuACb4bKE3yVEgKy7IrLql87MbghzdugSrVYa+IcpXDll O+g8HNKBSDru4QYWu7YJrBU09w== X-Google-Smtp-Source: AA6agR4zbj03HwNiKvNCAMqjbPAZBOEZ5IFS9rP9aP7B53I/HuQKSj52sakcI3/ZRNQcW0rIS0Ap1w== X-Received: by 2002:a05:6512:39ce:b0:48c:f4d8:d418 with SMTP id k14-20020a05651239ce00b0048cf4d8d418mr724314lfu.635.1660815995938; Thu, 18 Aug 2022 02:46:35 -0700 (PDT) Received: from ?IPV6:2001:14bb:ae:539c:53ab:2635:d4f2:d6d5? (d15l54z9nf469l8226z-4.rev.dnainternet.fi. [2001:14bb:ae:539c:53ab:2635:d4f2:d6d5]) by smtp.gmail.com with ESMTPSA id p4-20020a056512234400b00492adcfefc1sm155757lfu.198.2022.08.18.02.46.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Aug 2022 02:46:35 -0700 (PDT) Message-ID: Date: Thu, 18 Aug 2022 12:46:33 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 1/3] dt-bings: net: fsl,fec: update compatible item Content-Language: en-US To: Shawn Guo Cc: Wei Fang , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, s.hauer@pengutronix.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, peng.fan@nxp.com, ping.bai@nxp.com, sudeep.holla@arm.com, linux-arm-kernel@lists.infradead.org, aisheng.dong@nxp.com References: <20220704101056.24821-1-wei.fang@nxp.com> <20220704101056.24821-2-wei.fang@nxp.com> <20220818013344.GE149610@dragon> <20220818092257.GF149610@dragon> From: Krzysztof Kozlowski In-Reply-To: <20220818092257.GF149610@dragon> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/08/2022 12:22, Shawn Guo wrote: > On Thu, Aug 18, 2022 at 10:51:02AM +0300, Krzysztof Kozlowski wrote: >> On 18/08/2022 04:33, Shawn Guo wrote: >>> On Mon, Jul 04, 2022 at 11:12:09AM +0200, Krzysztof Kozlowski wrote: >>>>> diff --git a/Documentation/devicetree/bindings/net/fsl,fec.yaml b/Documentation/devicetree/bindings/net/fsl,fec.yaml >>>>> index daa2f79a294f..6642c246951b 100644 >>>>> --- a/Documentation/devicetree/bindings/net/fsl,fec.yaml >>>>> +++ b/Documentation/devicetree/bindings/net/fsl,fec.yaml >>>>> @@ -40,6 +40,10 @@ properties: >>>>> - enum: >>>>> - fsl,imx7d-fec >>>>> - const: fsl,imx6sx-fec >>>>> + - items: >>>>> + - enum: >>>>> + - fsl,imx8ulp-fec >>>>> + - const: fsl,imx6ul-fec >>>> >>>> This is wrong. fsl,imx6ul-fec has to be followed by fsl,imx6q-fec. I >>>> think someone made similar mistakes earlier so this is a mess. >>> >>> Hmm, not sure I follow this. Supposing we want to have the following >>> compatible for i.MX8ULP FEC, why do we have to have "fsl,imx6q-fec" >>> here? >>> >>> fec: ethernet@29950000 { >>> compatible = "fsl,imx8ulp-fec", "fsl,imx6ul-fec"; >>> ... >>> }; >> >> Because a bit earlier this bindings is saying that fsl,imx6ul-fec must >> be followed by fsl,imx6q-fec. > > The FEC driver OF match table suggests that fsl,imx6ul-fec and fsl,imx6q-fec > are not really compatible. > > static const struct of_device_id fec_dt_ids[] = { > { .compatible = "fsl,imx25-fec", .data = &fec_devtype[IMX25_FEC], }, > { .compatible = "fsl,imx27-fec", .data = &fec_devtype[IMX27_FEC], }, > { .compatible = "fsl,imx28-fec", .data = &fec_devtype[IMX28_FEC], }, > { .compatible = "fsl,imx6q-fec", .data = &fec_devtype[IMX6Q_FEC], }, > { .compatible = "fsl,mvf600-fec", .data = &fec_devtype[MVF600_FEC], }, > { .compatible = "fsl,imx6sx-fec", .data = &fec_devtype[IMX6SX_FEC], }, > { .compatible = "fsl,imx6ul-fec", .data = &fec_devtype[IMX6UL_FEC], }, I don't see here any incompatibility. Binding driver with different driver data is not a proof of incompatible devices. Additionally, the binding describes the hardware, not the driver. > { .compatible = "fsl,imx8mq-fec", .data = &fec_devtype[IMX8MQ_FEC], }, > { .compatible = "fsl,imx8qm-fec", .data = &fec_devtype[IMX8QM_FEC], }, > { /* sentinel */ } > }; > MODULE_DEVICE_TABLE(of, fec_dt_ids); > > Should we fix the binding doc? Maybe, I don't know. The binding describes the hardware, so based on it the devices are compatible. Changing this, except ABI impact, would be possible with proper reason, but not based on Linux driver code. Best regards, Krzysztof