<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/phy.h, branch v2021.04</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>net: phy: introduce fixed_phy_create for DSA CPU ports</title>
<updated>2021-02-16T16:48:20+00:00</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2021-01-25T12:23:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d0781c95bc448a211546404c779e78b29ada1214'/>
<id>d0781c95bc448a211546404c779e78b29ada1214</id>
<content type='text'>
The DSA (Distributed Switch Architecture) implementation has made a
design decision when it got introduced to the Linux kernel in 2008.
That was to hide away from the user the CPU-facing Ethernet MAC, since
it does not make sense to register it as a struct net_device (UCLASS_ETH
udevice for U-Boot), because that would never be beneficial for a user:
they would not be able to use it for traffic, since conceptually, a
packet delivered to the CPU port should loop back into the system.

Nonetheless, DSA has had numerous growing pains due to the lack of a
struct net_device for the CPU port, but so far it has overcome them.
It is unlikely at this stage of maturity that this aspect of it will
change.

We would like U-Boot to present the same information as Linux, to be at
parity in terms of number of interfaces, so that ethNaddr environment
variables could directly be associated between U-Boot and Linux.
Therefore, we would implicitly like U-Boot to hide the CPU port from the
user as well.

But the paradox is that DSA still needs a struct phy_device to inform
the driver of the parameters of the link that it should configure the
CPU port to. The problem is that the phy_device is typically returned
via a call to phy_connect, which needs an udevice to attach the PHY to,
and to search its ofnode for the 'fixed-link' property. But we don't
have an udevice to present for the CPU port.

Since 99% of DSA setups are MAC-to-MAC connections between the switch
and the host Ethernet controller, the struct phy_device is going to be a
fixed PHY. This simplifies things quite a bit. In U-Boot, a fixed PHY
does not need an MDIO bus, and does not need an attached dev either.
Basically, the phy_connect call doesn't do any connection, it just
creates the fixed PHY.

The proposal of this patch is to introduce a new fixed_phy_create
function which will take a single argument: the ofnode that holds this:

	port@4 {
		reg = &lt;4&gt;;
		phy-mode = "internal";

		fixed-link {
			speed = &lt;2500&gt;;
			full-duplex;
		};
	};

and probe a fixed PHY driver using the information from this ofnode.
DSA will probably be the only user of this function.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Claudiu Manoil &lt;claudiu.manoil@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The DSA (Distributed Switch Architecture) implementation has made a
design decision when it got introduced to the Linux kernel in 2008.
That was to hide away from the user the CPU-facing Ethernet MAC, since
it does not make sense to register it as a struct net_device (UCLASS_ETH
udevice for U-Boot), because that would never be beneficial for a user:
they would not be able to use it for traffic, since conceptually, a
packet delivered to the CPU port should loop back into the system.

Nonetheless, DSA has had numerous growing pains due to the lack of a
struct net_device for the CPU port, but so far it has overcome them.
It is unlikely at this stage of maturity that this aspect of it will
change.

We would like U-Boot to present the same information as Linux, to be at
parity in terms of number of interfaces, so that ethNaddr environment
variables could directly be associated between U-Boot and Linux.
Therefore, we would implicitly like U-Boot to hide the CPU port from the
user as well.

But the paradox is that DSA still needs a struct phy_device to inform
the driver of the parameters of the link that it should configure the
CPU port to. The problem is that the phy_device is typically returned
via a call to phy_connect, which needs an udevice to attach the PHY to,
and to search its ofnode for the 'fixed-link' property. But we don't
have an udevice to present for the CPU port.

Since 99% of DSA setups are MAC-to-MAC connections between the switch
and the host Ethernet controller, the struct phy_device is going to be a
fixed PHY. This simplifies things quite a bit. In U-Boot, a fixed PHY
does not need an MDIO bus, and does not need an attached dev either.
Basically, the phy_connect call doesn't do any connection, it just
creates the fixed PHY.

The proposal of this patch is to introduce a new fixed_phy_create
function which will take a single argument: the ofnode that holds this:

	port@4 {
		reg = &lt;4&gt;;
		phy-mode = "internal";

		fixed-link {
			speed = &lt;2500&gt;;
			full-duplex;
		};
	};

and probe a fixed PHY driver using the information from this ofnode.
DSA will probably be the only user of this function.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Claudiu Manoil &lt;claudiu.manoil@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: phy: ca_phy: Add driver for CAxxxx SoCs</title>
<updated>2021-01-27T15:47:47+00:00</updated>
<author>
<name>Abbie Chang</name>
<email>abbie.chang@cortina-access.com</email>
</author>
<published>2021-01-14T21:34:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a70d7b0192333133f8525305cce40f3d30e4281d'/>
<id>a70d7b0192333133f8525305cce40f3d30e4281d</id>
<content type='text'>
Add phy driver support for MACs embedded inside Cortina Access SoCs

Signed-off-by: Abbie Chang &lt;abbie.chang@cortina-access.com&gt;
Signed-off-by: Alex Nemirovsky &lt;alex.nemirovsky@cortina-access.com&gt;

CC: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
CC: Tom Rini &lt;trini@konsulko.com&gt;
CC: Aaron Tseng &lt;aaron.tseng@cortina-access.com&gt;

Moved out PHY specific code out of Cortina NI Ethernet driver
and into a Cortina Access PHY interface driver
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add phy driver support for MACs embedded inside Cortina Access SoCs

Signed-off-by: Abbie Chang &lt;abbie.chang@cortina-access.com&gt;
Signed-off-by: Alex Nemirovsky &lt;alex.nemirovsky@cortina-access.com&gt;

CC: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
CC: Tom Rini &lt;trini@konsulko.com&gt;
CC: Aaron Tseng &lt;aaron.tseng@cortina-access.com&gt;

Moved out PHY specific code out of Cortina NI Ethernet driver
and into a Cortina Access PHY interface driver
</pre>
</div>
</content>
</entry>
<entry>
<title>include: phy: fix NULL pointer check in phy_write()</title>
<updated>2020-09-16T20:54:00+00:00</updated>
<author>
<name>Thirupathaiah Annapureddy</name>
<email>thiruan@linux.microsoft.com</email>
</author>
<published>2020-08-18T00:31:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7def4e621b7c65b4a3740a554dcbc807e23b1c19'/>
<id>7def4e621b7c65b4a3740a554dcbc807e23b1c19</id>
<content type='text'>
phy_write() uses bus-&gt;write() instead of bus-&gt;read(). This means NULL
pointer pre-check needs to happen on bus-&gt;write instead of bus-&gt;read.

Signed-off-by: Thirupathaiah Annapureddy &lt;thiruan@linux.microsoft.com&gt;
Reviewed-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
phy_write() uses bus-&gt;write() instead of bus-&gt;read(). This means NULL
pointer pre-check needs to happen on bus-&gt;write instead of bus-&gt;read.

Signed-off-by: Thirupathaiah Annapureddy &lt;thiruan@linux.microsoft.com&gt;
Reviewed-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Drop dm.h header file from phy.h</title>
<updated>2020-08-04T02:19:54+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-07-19T16:15:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2a64ada78cba32196a4f49bd000a501fa2c96647'/>
<id>2a64ada78cba32196a4f49bd000a501fa2c96647</id>
<content type='text'>
This header file should not be included in other header files. Remove it
and use other headers and C inclusions instead.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This header file should not be included in other header files. Remove it
and use other headers and C inclusions instead.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: phy: Add helper routines to set and clear bits</title>
<updated>2020-06-12T17:17:23+00:00</updated>
<author>
<name>Dan Murphy</name>
<email>dmurphy@ti.com</email>
</author>
<published>2020-05-04T21:14:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=535247a9e455a165943efcdbb7e144e816d6e904'/>
<id>535247a9e455a165943efcdbb7e144e816d6e904</id>
<content type='text'>
Add phy_set/clear_bit helper routines so that ported drivers from the
kernel can use these functions.

Acked-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add phy_set/clear_bit helper routines so that ported drivers from the
kernel can use these functions.

Acked-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: phy: Fix kernel doc issues in phy.h</title>
<updated>2020-06-12T17:17:23+00:00</updated>
<author>
<name>Dan Murphy</name>
<email>dmurphy@ti.com</email>
</author>
<published>2020-05-04T21:14:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ea756fb8b71f5399c10f4a8f7e4325ced90d7c9f'/>
<id>ea756fb8b71f5399c10f4a8f7e4325ced90d7c9f</id>
<content type='text'>
Fix kernel doc warnings in phy.h.  Mostly the warnings were due to the
return missing the semi-colon.

Acked-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix kernel doc warnings in phy.h.  Mostly the warnings were due to the
return missing the semi-colon.

Acked-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: phy: Add missing kernel doc to phy functions</title>
<updated>2020-06-12T17:17:23+00:00</updated>
<author>
<name>Dan Murphy</name>
<email>dmurphy@ti.com</email>
</author>
<published>2020-05-04T21:14:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6325c8bc484e3c123c95854bbe52543eecc7127d'/>
<id>6325c8bc484e3c123c95854bbe52543eecc7127d</id>
<content type='text'>
Add kernel doc to the phy_read/write utility functions in phy.h

Acked-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add kernel doc to the phy_read/write utility functions in phy.h

Acked-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: phy: add XFI, USXGMII types to is_10g_interface() helper</title>
<updated>2020-03-09T23:11:25+00:00</updated>
<author>
<name>Alex Marginean</name>
<email>alexandru.marginean@nxp.com</email>
</author>
<published>2020-01-09T08:50:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9810489ca80f22b548590b7926c211fed46ce457'/>
<id>9810489ca80f22b548590b7926c211fed46ce457</id>
<content type='text'>
The helper is used to reset PHYs on connect and it determines the clause
to use (C22/C45) based on interface type.  This fixes 'PHY reset timed out'
warnings in console for USXGMII/XFI PHYs.

Signed-off-by: Alex Marginean &lt;alexandru.marginean@nxp.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The helper is used to reset PHYs on connect and it determines the clause
to use (C22/C45) based on interface type.  This fixes 'PHY reset timed out'
warnings in console for USXGMII/XFI PHYs.

Signed-off-by: Alex Marginean &lt;alexandru.marginean@nxp.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>phy: Include NC-SI in phy setup</title>
<updated>2020-03-09T23:11:23+00:00</updated>
<author>
<name>Samuel Mendoza-Jonas</name>
<email>sam@mendozajonas.com</email>
</author>
<published>2019-06-18T01:37:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e2ffeaa16250ec6372412c0f268449803c321db6'/>
<id>e2ffeaa16250ec6372412c0f268449803c321db6</id>
<content type='text'>
Add NC-SI to the usual phy handling. This makes two notable changes:
- Somewhat similar to a fixed phy, phy_connect() will create an NC-SI
phy if CONFIG_PHY_NCSI is defined.
- An early return is added to phy_read() and phy_write() to handle a
case like the NC-SI phy which does not define a bus.

Signed-off-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Reviewed-by: Joel Stanley &lt;joel@jms.id.au&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add NC-SI to the usual phy handling. This makes two notable changes:
- Somewhat similar to a fixed phy, phy_connect() will create an NC-SI
phy if CONFIG_PHY_NCSI is defined.
- An early return is added to phy_read() and phy_write() to handle a
case like the NC-SI phy which does not define a bus.

Signed-off-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Reviewed-by: Joel Stanley &lt;joel@jms.id.au&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>phy: Add support for the NC-SI protocol</title>
<updated>2020-03-09T23:11:23+00:00</updated>
<author>
<name>Samuel Mendoza-Jonas</name>
<email>sam@mendozajonas.com</email>
</author>
<published>2019-06-18T01:37:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f641a8ac93e0c0179fe6f73429812af228109ff2'/>
<id>f641a8ac93e0c0179fe6f73429812af228109ff2</id>
<content type='text'>
This introduces support for the NC-SI protocol, modelled as a phy driver
for other ethernet drivers to consume.

NC-SI (Network Controller Sideband Interface) is a protocol to manage a
sideband connection to a proper network interface, for example a BMC
(Baseboard Management Controller) sharing the NIC of the host system.
Probing and configuration occurs by communicating with the "remote" NIC
via NC-SI control frames (Ethernet header 0x88f8).

This implementation is roughly based on the upstream Linux
implementation[0], with a reduced feature set and an emphasis on getting
a link up as fast as possible rather than probing the full possible
topology of the bus.
The current phy model relies on the network being "up", sending NC-SI
command frames via net_send_packet() and receiving them from the
net_loop() loop (added in a following patch).

The ncsi-pkt.h header[1] is copied from the Linux kernel for consistent
field definitions.

[0]: https://github.com/torvalds/linux/tree/master/net/ncsi
[1]: https://github.com/torvalds/linux/blob/master/net/ncsi/ncsi-pkt.h

Signed-off-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Reviewed-by: Joel Stanley &lt;joel@jms.id.au&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This introduces support for the NC-SI protocol, modelled as a phy driver
for other ethernet drivers to consume.

NC-SI (Network Controller Sideband Interface) is a protocol to manage a
sideband connection to a proper network interface, for example a BMC
(Baseboard Management Controller) sharing the NIC of the host system.
Probing and configuration occurs by communicating with the "remote" NIC
via NC-SI control frames (Ethernet header 0x88f8).

This implementation is roughly based on the upstream Linux
implementation[0], with a reduced feature set and an emphasis on getting
a link up as fast as possible rather than probing the full possible
topology of the bus.
The current phy model relies on the network being "up", sending NC-SI
command frames via net_send_packet() and receiving them from the
net_loop() loop (added in a following patch).

The ncsi-pkt.h header[1] is copied from the Linux kernel for consistent
field definitions.

[0]: https://github.com/torvalds/linux/tree/master/net/ncsi
[1]: https://github.com/torvalds/linux/blob/master/net/ncsi/ncsi-pkt.h

Signed-off-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Reviewed-by: Joel Stanley &lt;joel@jms.id.au&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
