net: phy: realtek: add dt property to enable ALDPS mode
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Tue, 8 Jun 2021 03:15:34 +0000 (11:15 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jun 2021 18:41:24 +0000 (11:41 -0700)
commitd90db36a9e748c9d886df15f5e17b341f0e5bcd5
tree5c86b35723d0734c1ad54aac62b5b5be0c598971
parent0a4355c2b7f8ecd5e61cc262ecdbd4a2cce1ea7e
net: phy: realtek: add dt property to enable ALDPS mode

If enable Advance Link Down Power Saving (ALDPS) mode, it will change
crystal/clock behavior, which cause RXC clock stop for dozens to hundreds
of miliseconds. This is comfirmed by Realtek engineer. For some MACs, it
needs RXC clock to support RX logic, after this patch, PHY can generate
continuous RXC clock during auto-negotiation.

ALDPS default is disabled after hardware reset, it's more reasonable to
add a property to enable this feature, since ALDPS would introduce side effect.
This patch adds dt property "realtek,aldps-enable" to enable ALDPS mode
per users' requirement.

Jisheng Zhang enables this feature, changes the default behavior. Since
mine patch breaks the rule that new implementation should not break
existing design, so Cc'ed let him know to see if it can be accepted.

Cc: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/realtek.c