Re: [PATCH 2/3] net: microchip_t1s: add support for LAN867x Rev.C1
From: Ramón Nordin Rodriguez <hidden>
Date: 2023-11-27 14:24:54
Also in:
lkml
On Mon, Nov 27, 2023 at 02:37:41PM +0100, Andrew Lunn wrote:
quoted
#define PHY_ID_LAN867X_REVB1 0x0007C162 +#define PHY_ID_LAN867X_REVC1 0x0007C164So there is a gap in the revisions. Maybe a B2 exists?
The datasheet lists A0, B1 and C1, seems like Microchip removes the application notes for old revisions, so no way that I can see to add the init-fixup for A0. I'm guessing there is a rev.c0 that was never released to the public.
quoted
+ const u16 magic_or = 0xE0; + const u16 magic_reg_mask = 0x1F; + const u16 magic_check_mask = 0x10;Reverse christmass tree please. Longest first, shorted last.
My bad, I was just thinking 'christmas tree' forgot about the reverse. I'll fix that.
quoted
+ int err; + int regval; + u16 override0; + u16 override1; + const u16 override_addr0 = 0x4; + const u16 override_addr1 = 0x8; + const u8 index_to_override0 = 2; + const u8 index_to_override1 = 3;Same here.
I'll fix this.
quoted
+ + err = lan867x_wait_for_reset_complete(phydev); + if (err) + return err; + + /* The application note specifies a super convenient process + * where 2 of the fixup regs needs a write with a value that is + * a modified result of another reg read. + * Enjoy the magic show. + */I really do hope that by revision D1 they get the firmware sorted out so none of this undocumented magic is needed. Andrew
Really do hope so..