[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <w3go7zpdrab7ysvbpdnsmymcufh35ahgtpz4ahsxbcbhsvd6p2@eq5iglbkg5xj>
Date: Wed, 4 Feb 2026 11:22:23 +0100
From: Heinrich Toews <ht@...-software.de>
To: Tim Harvey <tharvey@...eworks.com>
Cc: netdev <netdev@...r.kernel.org>, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>, Vladimir Oltean <olteanv@...il.com>,
Rob Herring <robh+dt@...nel.org>
Subject: Re: [v1,3/3] net: dsa: microchip: add single-led-mode support for
KSZ9477
Hi Tim,
On Tue, Feb 03, 2026 at 04:56:30PM -0800, Tim Harvey wrote:
> On Tue, Feb 3, 2026 at 8:58 AM Heinrich Toews <ht@...-software.de> wrote:
> >
> > Hi Rob,
Oh Sorry, I see that I was accidentally using the wrong name in my last message.
[...]
> > I added debug output and tested my setup on all 4 external ports and it
> > works:
> >
> > ksz-switch spi1.0: ksz_pwrite16: port: 1, offset: 0x011a, data: 0x0002
> > ksz-switch spi1.0: ksz_write16: reg: 0x0000211a, value: 0x0002
> > ^^^^
> > The port index
> > is set
> > correctly.
> >
> > [...]
> >
> > ksz-switch spi1.0: ksz_pwrite16: port: 2, offset: 0x011a, data: 0x0002
> > ksz-switch spi1.0: ksz_write16: reg: 0x0000311a, value: 0x0002
> > ^^^^
> > The same here
> > on port 2.
> >
> > Is see activity on the leds connected to LEDx_0.
> >
>
> Hi Heinrich,
>
> My apologies - you are correct. I accidentally missed the hunk where
> you set your registers in ksz9477_regs causing it to not work for me.
Ahh okay. Now I understand.
> > ksz9477_get_port_addr() is adding the port index by PORT_CTRL_ADDR(port, offset).
> >
> > But since I'm accessing PHY registers here, I'll switch to ksz_phy_write16() in v2.
>
> Yes, that would be best as you would no longer need to add custom registers.
Right, this is also a goog reason to switch.
> I have:
>
> ksz_phy_write16(dev->ds, port, MII_MMD_CTRL, 0x0002);
> ksz_phy_write16(dev->ds, port, MII_MMD_DATA, 0x0000);
> ksz_phy_write16(dev->ds, port, MII_MMD_CTRL,
> MII_MMD_CTRL_NOINCR | 0x02);
> ksz_phy_write16(dev->ds, port, MII_MMD_DATA, 0x0010); /* set bit 4 */
> /* LED_ERRATA requires writing 0xfa00 to Debug Register 3 (PHY
> register 0x1e) */
> if (phydev->dev_flags & MICREL_KSZ9_LED_ERRATA)
> ksz_phy_write16(dev->ds, port, 0x1e, 0xfa00);
Thanks. But I'm thinking to add a local '#define MII_PHY_DIGITAL_DEBUG_3 0x1e' here.
> I look forward to seeing your next submission.
I hopefully will get it ready this week.
Regards,
Heinrich.
Powered by blists - more mailing lists