All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shawn Guo <shawnguo@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Wei Fang <wei.fang@nxp.com>,
	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
Subject: Re: [PATCH 1/3] dt-bings: net: fsl,fec: update compatible item
Date: Thu, 18 Aug 2022 17:22:57 +0800	[thread overview]
Message-ID: <20220818092257.GF149610@dragon> (raw)
In-Reply-To: <fd41a409-d0e0-0026-4644-9058d1177c45@linaro.org>

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], },
        { .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?

Shawn

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawnguo@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Wei Fang <wei.fang@nxp.com>,
	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
Subject: Re: [PATCH 1/3] dt-bings: net: fsl,fec: update compatible item
Date: Thu, 18 Aug 2022 17:22:57 +0800	[thread overview]
Message-ID: <20220818092257.GF149610@dragon> (raw)
In-Reply-To: <fd41a409-d0e0-0026-4644-9058d1177c45@linaro.org>

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], },
        { .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?

Shawn

  reply	other threads:[~2022-08-18  9:24 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04 10:10 [PATCH 0/3] Add the fec node on i.MX8ULP platform Wei Fang
2022-07-04 10:10 ` Wei Fang
2022-07-04 10:10 ` [PATCH 1/3] dt-bings: net: fsl,fec: update compatible item Wei Fang
2022-07-04 10:10   ` Wei Fang
2022-07-04  9:12   ` Krzysztof Kozlowski
2022-07-04  9:12     ` Krzysztof Kozlowski
2022-07-05  2:47     ` [EXT] " Wei Fang
2022-07-05  2:47       ` Wei Fang
2022-07-05  7:27       ` Krzysztof Kozlowski
2022-07-05  7:27         ` Krzysztof Kozlowski
2022-07-05  7:32         ` Wei Fang
2022-07-05  7:32           ` Wei Fang
2022-08-18  1:33     ` Shawn Guo
2022-08-18  1:33       ` Shawn Guo
2022-08-18  7:51       ` Krzysztof Kozlowski
2022-08-18  7:51         ` Krzysztof Kozlowski
2022-08-18  9:22         ` Shawn Guo [this message]
2022-08-18  9:22           ` Shawn Guo
2022-08-18  9:46           ` Krzysztof Kozlowski
2022-08-18  9:46             ` Krzysztof Kozlowski
2022-08-18 13:57             ` Shawn Guo
2022-08-18 13:57               ` Shawn Guo
2022-08-18 14:04               ` Krzysztof Kozlowski
2022-08-18 14:04                 ` Krzysztof Kozlowski
2022-08-19  1:50                 ` Wei Fang
2022-08-19  1:50                   ` Wei Fang
2022-08-19  3:13                   ` Peng Fan
2022-08-19  3:13                     ` Peng Fan
2022-08-19  6:31                     ` Krzysztof Kozlowski
2022-08-19  6:31                       ` Krzysztof Kozlowski
2022-08-19  7:02                       ` Wei Fang
2022-08-19  7:02                         ` Wei Fang
2022-07-04 10:10 ` [PATCH 2/3] arm64: dts: imx8ulp: Add the fec support Wei Fang
2022-07-04 10:10   ` Wei Fang
2022-07-04  7:07   ` Ahmad Fatoum
2022-07-04  7:07     ` Ahmad Fatoum
2022-07-04  8:12     ` Andrew Lunn
2022-07-04  8:12       ` Andrew Lunn
2022-07-05  2:45     ` [EXT] " Wei Fang
2022-07-05  2:45       ` Wei Fang
2022-07-04 10:10 ` [PATCH 3/3] arm64: dts: imx8ulp-evk: " Wei Fang
2022-07-04 10:10   ` Wei Fang

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=20220818092257.GF149610@dragon \
    --to=shawnguo@kernel.org \
    --cc=aisheng.dong@nxp.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peng.fan@nxp.com \
    --cc=ping.bai@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sudeep.holla@arm.com \
    --cc=wei.fang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.