Other Parts Discussed in Thread: DP83867E
Dear All,
I'm working on Linux driver for DP83867 PHY IC. I'm using 4.9 vanilla kernel.
My board requires one adjustment:
- By initial bootstrap setup the "port mirroring" feature is enabled:
Reg: 0x31 (CFG4) - PORT_MIRROR_EN bit (0) is set to 1
To disable it I change this register value from 0x10b1 to 0x10b0.
Problem starts with Linux driver:
There is dp83867_phy_reset() function at ./drivers/net/phy/dp83867.c
which performs the SW_RESET (bit 15) at Control Register (CTRL - 0x001F). Such reset does full reset including registers.
And here the problem starts:
The default init code at dp83867_config_init() function leaves the PHYCR register (0x10) with value: 0x5848 (default after reset).
With such setting I see that link is up but, PHY is not working (no data transmission - checked with Wireshark).
To make it working I do write 0x4040 value to PHYCR (0x10) register.
Why do I need to do that?
What is the meaning of:
- BIT 3 - which I must clear
- BIT 11,12 - which I must clear
According to the IC datascheet (SNLS484D –FEBRUARY 2015–REVISED JULY 2016) those fields are RESERVED, RO and write to it is ignored.
DP83867 register dump:
phy_print_status
REG 0x0: 0x1140
REG 0x1: 0x796d
REG 0x2: 0x2000
REG 0x3: 0xa231
REG 0x4: 0x1e1
REG 0x5: 0xc1e1
REG 0x6: 0x6f
REG 0x7: 0x2001
REG 0x8: 0x6801
REG 0x9: 0x300
REG 0xa: 0x3800
REG 0xb: 0x0
REG 0xc: 0x0
REG 0xd: 0x401f
REG 0xe: 0x10b0
REG 0xf: 0x3000
REG 0x10: 0x4040
REG 0x11: 0xbc02
REG 0x12: 0x0
REG 0x13: 0x1c40
REG 0x14: 0x29c7
REG 0x15: 0x0
REG 0x16: 0x0
REG 0x17: 0x40
REG 0x18: 0x6150
REG 0x19: 0x4040
REG 0x1a: 0x2
REG 0x1b: 0x0
REG 0x1c: 0x0
REG 0x1d: 0x0
REG 0x1e: 0x2
REG 0x1f: 0x0
phy_regs_dump: Extended registers
EXT REG 0x31: 0x10b0
EXT REG 0x32: 0xd3
EXT REG 0x33: 0x0
EXT REG 0x6e: 0x8800
EXT REG 0x6f: 0x30
EXT REG 0x86: 0x37
The difference between before reset and after is only with
0x10 being 0x4040 before reset (setup from u-boot)
and 0x5848 after (when register's reset is performed)
Could somebody explain why clearing of RESERVED bits is needed?
Best regards and thanks in advance,
Łukasz