diff mbox series

[U-Boot,v2,6/6] net: macb: Add compatible string for MACB on SiFive Unleashed

Message ID 20190619040027.5011-7-anup.patel@wdc.com
State Superseded
Headers show
Series Update SiFive Unleashed Drivers | expand

Commit Message

Anup Patel June 19, 2019, 4:01 a.m. UTC
We have a separate compatible string for MACB ethernet on SiFive
Unleashed so this patch adds the SiFive MACB compatible string to
the MACB ethernet driver.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
---
 drivers/net/macb.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Bin Meng June 19, 2019, 5:58 a.m. UTC | #1
Hi Anup,

On Wed, Jun 19, 2019 at 12:01 PM Anup Patel <Anup.Patel@wdc.com> wrote:
>
> We have a separate compatible string for MACB ethernet on SiFive
> Unleashed so this patch adds the SiFive MACB compatible string to
> the MACB ethernet driver.
>
> Signed-off-by: Anup Patel <anup.patel@wdc.com>
> ---
>  drivers/net/macb.c | 1 +
>  1 file changed, 1 insertion(+)
>

You need add the codes to handle the 10/100/1000Mbps link speed
changes since you dropped the gemgxl clock driver.

Regards,
Bin
Anup Patel June 19, 2019, 6:52 a.m. UTC | #2
On Wed, Jun 19, 2019 at 11:28 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Anup,
>
> On Wed, Jun 19, 2019 at 12:01 PM Anup Patel <Anup.Patel@wdc.com> wrote:
> >
> > We have a separate compatible string for MACB ethernet on SiFive
> > Unleashed so this patch adds the SiFive MACB compatible string to
> > the MACB ethernet driver.
> >
> > Signed-off-by: Anup Patel <anup.patel@wdc.com>
> > ---
> >  drivers/net/macb.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
>
> You need add the codes to handle the 10/100/1000Mbps link speed
> changes since you dropped the gemgxl clock driver.

This patch only gets U-Boot MACB driver working in 1000Mbps speed
with updated DT bindings. If we don't add the compatible string then
U-Boot MACB driver does not probed.

I totally agree with you that we need to update the U-Boot MACB
driver to support switching between 10/100/1000Mbps speeds but
I don't have bandwidth to do that right now.

I have another solution. I will drop this patch and keep both old and
new compatible string in DTB passed by OpenSBI to U-Boot. This way
current U-Boot MACB driver will be probed  and even Linux MACB
driver will work fine.

Regards,
Anup
diff mbox series

Patch

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index c5560a7111..383c37d8e6 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -1225,6 +1225,7 @@  static const struct udevice_id macb_eth_ids[] = {
 	{ .compatible = "atmel,sama5d3-gem" },
 	{ .compatible = "atmel,sama5d4-gem" },
 	{ .compatible = "cdns,zynq-gem" },
+	{ .compatible = "sifive,fu540-macb" },
 	{ }
 };