<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/phy/realtek.c, branch v6.6.131</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-08-11T10:47:19+00:00</updated>
<entry>
<title>net: phy: realtek: add support for RTL8366S Gigabit PHY</title>
<updated>2024-08-11T10:47:19+00:00</updated>
<author>
<name>Mark Mentovai</name>
<email>mark@mentovai.com</email>
</author>
<published>2024-07-25T20:41:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b45cbfa204b2a0985eb85dcb33d51714ee089bb9'/>
<id>urn:sha1:b45cbfa204b2a0985eb85dcb33d51714ee089bb9</id>
<content type='text'>
[ Upstream commit 225990c487c1023e7b3aa89beb6a68011fbc0461 ]

The PHY built in to the Realtek RTL8366S switch controller was
previously supported by genphy_driver. This PHY does not implement MMD
operations. Since commit 9b01c885be36 ("net: phy: c22: migrate to
genphy_c45_write_eee_adv()"), MMD register reads have been made during
phy_probe to determine EEE support. For genphy_driver, these reads are
transformed into 802.3 annex 22D clause 45-over-clause 22
mmd_phy_indirect operations that perform MII register writes to
MII_MMD_CTRL and MII_MMD_DATA. This overwrites those two MII registers,
which on this PHY are reserved and have another function, rendering the
PHY unusable while so configured.

Proper support for this PHY is restored by providing a phy_driver that
declares MMD operations as unsupported by using the helper functions
provided for that purpose, while remaining otherwise identical to
genphy_driver.

Fixes: 9b01c885be36 ("net: phy: c22: migrate to genphy_c45_write_eee_adv()")
Reported-by: Russell Senior &lt;russell@personaltelco.net&gt;
Closes: https://github.com/openwrt/openwrt/issues/15981
Link: https://github.com/openwrt/openwrt/issues/15739
Signed-off-by: Mark Mentovai &lt;mark@mentovai.com&gt;
Reviewed-by: Maxime Chevallier &lt;maxime.chevallier@bootlin.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: realtek: Fix rtl8211f_config_init() for RTL8211F(D)(I)-VD-CG PHY</title>
<updated>2024-03-01T12:35:10+00:00</updated>
<author>
<name>Siddharth Vadapalli</name>
<email>s-vadapalli@ti.com</email>
</author>
<published>2024-02-20T07:00:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c7818378953d1522d68e9b9e84c8ad6761f5686f'/>
<id>urn:sha1:c7818378953d1522d68e9b9e84c8ad6761f5686f</id>
<content type='text'>
[ Upstream commit 3489182b11d35f1944c1245fc9c4867cf622c50f ]

Commit bb726b753f75 ("net: phy: realtek: add support for
RTL8211F(D)(I)-VD-CG") extended support of the driver from the existing
support for RTL8211F(D)(I)-CG PHY to the newer RTL8211F(D)(I)-VD-CG PHY.

While that commit indicated that the RTL8211F_PHYCR2 register is not
supported by the "VD-CG" PHY model and therefore updated the corresponding
section in rtl8211f_config_init() to be invoked conditionally, the call to
"genphy_soft_reset()" was left as-is, when it should have also been invoked
conditionally. This is because the call to "genphy_soft_reset()" was first
introduced by the commit 0a4355c2b7f8 ("net: phy: realtek: add dt property
to disable CLKOUT clock") since the RTL8211F guide indicates that a PHY
reset should be issued after setting bits in the PHYCR2 register.

As the PHYCR2 register is not applicable to the "VD-CG" PHY model, fix the
rtl8211f_config_init() function by invoking "genphy_soft_reset()"
conditionally based on the presence of the "PHYCR2" register.

Fixes: bb726b753f75 ("net: phy: realtek: add support for RTL8211F(D)(I)-VD-CG")
Signed-off-by: Siddharth Vadapalli &lt;s-vadapalli@ti.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://lore.kernel.org/r/20240220070007.968762-1-s-vadapalli@ti.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: phy: realtek: Disable clock on suspend</title>
<updated>2023-06-07T08:52:24+00:00</updated>
<author>
<name>Detlev Casanova</name>
<email>detlev.casanova@collabora.com</email>
</author>
<published>2023-06-05T15:40:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=59e227e2894b28c4409e89d04a33868c176587b2'/>
<id>urn:sha1:59e227e2894b28c4409e89d04a33868c176587b2</id>
<content type='text'>
For PHYs that call rtl821x_probe() where an external clock can be
configured, make sure that the clock is disabled
when -&gt;suspend() is called and enabled on resume.

The PHY_ALWAYS_CALL_SUSPEND is added to ensure that the suspend function
is actually always called.

Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Signed-off-by: Detlev Casanova &lt;detlev.casanova@collabora.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: realtek: Add optional external PHY clock</title>
<updated>2023-06-07T08:52:24+00:00</updated>
<author>
<name>Detlev Casanova</name>
<email>detlev.casanova@collabora.com</email>
</author>
<published>2023-06-05T15:40:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7300c9b574cc2b259ef112d34affa0671ae4810a'/>
<id>urn:sha1:7300c9b574cc2b259ef112d34affa0671ae4810a</id>
<content type='text'>
In some cases, the PHY can use an external clock source instead of a
crystal.

Add an optional clock in the phy node to make sure that the clock source
is enabled, if specified, before probing.

Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Detlev Casanova &lt;detlev.casanova@collabora.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: realtek: add support for RTL8211F(D)(I)-VD-CG</title>
<updated>2022-08-22T11:47:18+00:00</updated>
<author>
<name>Clark Wang</name>
<email>xiaoning.wang@nxp.com</email>
</author>
<published>2022-08-17T01:36:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb726b753f75a4eeda291438f89dfd9b94783569'/>
<id>urn:sha1:bb726b753f75a4eeda291438f89dfd9b94783569</id>
<content type='text'>
RTL8211F(D)(I)-VD-CG is the pin-to-pin upgrade chip from
RTL8211F(D)(I)-CG.

Add new PHY ID for this chip.
It does not support RTL8211F_PHYCR2 anymore, so remove the w/r operation
of this register.

Signed-off-by: Clark Wang &lt;xiaoning.wang@nxp.com&gt;
Signed-off-by: Wei Fang &lt;wei.fang@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: realtek: add support for RTL8365MB-VC internal PHYs</title>
<updated>2021-10-18T13:02:56+00:00</updated>
<author>
<name>Alvin Šipraga</name>
<email>alsi@bang-olufsen.dk</email>
</author>
<published>2021-10-18T09:38:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2ca2969aae1e110fe243a50d6d5809f6f4895092'/>
<id>urn:sha1:2ca2969aae1e110fe243a50d6d5809f6f4895092</id>
<content type='text'>
The RTL8365MB-VC ethernet switch controller has 4 internal PHYs for its
user-facing ports. All that is needed is to let the PHY driver core
pick up the IRQ made available by the switch driver.

Signed-off-by: Alvin Šipraga &lt;alsi@bang-olufsen.dk&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: realtek: net: Fix less than zero comparison of a u16</title>
<updated>2021-06-09T22:32:08+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2021-06-09T17:17:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f25247d88708ff0666573541923a7339845403de'/>
<id>urn:sha1:f25247d88708ff0666573541923a7339845403de</id>
<content type='text'>
The comparisons of the u16 values priv-&gt;phycr1 and priv-&gt;phycr2 to less
than zero always false because they are unsigned. Fix this by using an
int for the assignment and less than zero check.

Addresses-Coverity: ("Unsigned compared against 0")
Fixes: 0a4355c2b7f8 ("net: phy: realtek: add dt property to disable CLKOUT clock")
Fixes: d90db36a9e74 ("net: phy: realtek: add dt property to enable ALDPS mode")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: realtek: add delay to fix RXC generation issue</title>
<updated>2021-06-08T18:41:24+00:00</updated>
<author>
<name>Joakim Zhang</name>
<email>qiangqing.zhang@nxp.com</email>
</author>
<published>2021-06-08T03:15:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6813cc8cfdaf401476e1a007cec8ae338cefa573'/>
<id>urn:sha1:6813cc8cfdaf401476e1a007cec8ae338cefa573</id>
<content type='text'>
PHY will delay about 11.5ms to generate RXC clock when switching from
power down to normal operation. Read/write registers would also cause RXC
become unstable and stop for a while during this process. Realtek engineer
suggests 15ms or more delay can workaround this issue.

Signed-off-by: Joakim Zhang &lt;qiangqing.zhang@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: realtek: add dt property to enable ALDPS mode</title>
<updated>2021-06-08T18:41:24+00:00</updated>
<author>
<name>Joakim Zhang</name>
<email>qiangqing.zhang@nxp.com</email>
</author>
<published>2021-06-08T03:15:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d90db36a9e748c9d886df15f5e17b341f0e5bcd5'/>
<id>urn:sha1:d90db36a9e748c9d886df15f5e17b341f0e5bcd5</id>
<content type='text'>
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 &lt;Jisheng.Zhang@synaptics.com&gt;
Signed-off-by: Joakim Zhang &lt;qiangqing.zhang@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: realtek: add dt property to disable CLKOUT clock</title>
<updated>2021-06-08T18:41:23+00:00</updated>
<author>
<name>Joakim Zhang</name>
<email>qiangqing.zhang@nxp.com</email>
</author>
<published>2021-06-08T03:15:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0a4355c2b7f8ecd5e61cc262ecdbd4a2cce1ea7e'/>
<id>urn:sha1:0a4355c2b7f8ecd5e61cc262ecdbd4a2cce1ea7e</id>
<content type='text'>
CLKOUT is enabled by default after PHY hardware reset, this patch adds
"realtek,clkout-disable" property for user to disable CLKOUT clock
to save PHY power.

Per RTL8211F guide, a PHY reset should be issued after setting these
bits in PHYCR2 register. After this patch, CLKOUT clock output to be
disabled.

Signed-off-by: Joakim Zhang &lt;qiangqing.zhang@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
