From: Sebastian Reichel <hidden> Date: 2018-01-23 15:04:02
Hi,
This adds support for the internal switch found in GE Healthcare
B450v3, B650v3 and B850v3. All devices use a GPIO bitbanged MDIO
bus to communicate with the switch and a PCIe based network card
for exchanging network data. The cpu network data link requires,
that the switch's internal phy interface is enabled, so support
for that is added by the first patch in this series.
The patch series is based on v4.15-rc8.
Changes since PATCHv4:
* Introduce dsa_port_link_(un)register_of and mark the fixed
variant static.
* Update patch description to describe the phy<->phy connection
from i210 to the Marvell switch
Changes since PATCHv3:
* Enable the phy in dsa_port_setup() instead of abusing the
fixed link setup function
Changes since PATCHv2:
* Add phy nodes to switch in bx50.dtsi and reference them
from switch ports
* Enable cpu-port's phy based on 'phy-handle' instead of 'phy-mode'
Changes since PATCHv1:
* Use 'marvell,mv88e6085' instead of introducing compatible
string for mv88e6240.
* Fix indention of DT nodes
* Only enable 'cpu' phy, if explicitly set to "internal".
-- Sebastian
Sebastian Reichel (5):
net: dsa: Support internal phy on 'cpu' port
ARM: dts: imx6q-bx50v3: Add internal switch
ARM: dts: imx6q-b850v3: Add switch port configuration
ARM: dts: imx6q-b650v3: Add switch port configuration
ARM: dts: imx6q-b450v3: Add switch port configuration
arch/arm/boot/dts/imx6q-b450v3.dts | 52 ++++++++++++++++++
arch/arm/boot/dts/imx6q-b650v3.dts | 52 ++++++++++++++++++
arch/arm/boot/dts/imx6q-b850v3.dts | 75 ++++++++++++++++++++++++++
arch/arm/boot/dts/imx6q-bx50v3.dtsi | 62 ++++++++++++++++++++++
net/dsa/dsa2.c | 7 ++-
net/dsa/dsa_priv.h | 4 +-
net/dsa/legacy.c | 4 +-
net/dsa/port.c | 103 +++++++++++++++++++++++++++---------
8 files changed, 327 insertions(+), 32 deletions(-)
--
2.15.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Sebastian Reichel <hidden> Date: 2018-01-23 15:04:06
This adds support for enabling the internal PHY for a 'cpu' port.
It has been tested on GE B850v3, B650v3 and B450v3, which have a
built-in MV88E6240 switch hardwired to a PCIe based network card.
On these machines the internal PHY of the i210 network card and
the Marvell switch are connected to each other and must be enabled
for properly using the switch. While the i210 PHY will be enabled
when the network interface is enabled, the switch's port is not
exposed as network interface. Additionally the mv88e6xxx driver
resets the chip during probe, so the PHY is disabled without this
patch.
Signed-off-by: Sebastian Reichel <redacted>
---
net/dsa/dsa2.c | 7 ++--
net/dsa/dsa_priv.h | 4 +--
net/dsa/legacy.c | 4 +--
net/dsa/port.c | 103 ++++++++++++++++++++++++++++++++++++++++-------------
4 files changed, 86 insertions(+), 32 deletions(-)
@@ -271,13 +271,12 @@ static int dsa_port_setup(struct dsa_port *dp)break;caseDSA_PORT_TYPE_CPU:caseDSA_PORT_TYPE_DSA:-err=dsa_port_fixed_link_register_of(dp);+err=dsa_port_link_register_of(dp);if(err){-dev_err(ds->dev,"failed to register fixed link for port %d.%d\n",+dev_err(ds->dev,"failed to setup link for port %d.%d\n",ds->index,dp->index);returnerr;}-break;caseDSA_PORT_TYPE_USER:err=dsa_slave_create(dp);
@@ -282,38 +331,44 @@ int dsa_port_fixed_link_register_of(struct dsa_port *dp)intmode;interr;-if(of_phy_is_fixed_link(dn)){-err=of_phy_register_fixed_link(dn);-if(err){-dev_err(ds->dev,-"failed to register the fixed PHY of port %d\n",-port);-returnerr;-}+err=of_phy_register_fixed_link(dn);+if(err){+dev_err(ds->dev,+"failed to register the fixed PHY of port %d\n",+port);+returnerr;+}-phydev=of_phy_find_device(dn);+phydev=of_phy_find_device(dn);-mode=of_get_phy_mode(dn);-if(mode<0)-mode=PHY_INTERFACE_MODE_NA;-phydev->interface=mode;+mode=of_get_phy_mode(dn);+if(mode<0)+mode=PHY_INTERFACE_MODE_NA;+phydev->interface=mode;-genphy_config_init(phydev);-genphy_read_status(phydev);+genphy_config_init(phydev);+genphy_read_status(phydev);-if(ds->ops->adjust_link)-ds->ops->adjust_link(ds,port,phydev);+if(ds->ops->adjust_link)+ds->ops->adjust_link(ds,port,phydev);-put_device(&phydev->mdio.dev);-}+put_device(&phydev->mdio.dev);return0;}-voiddsa_port_fixed_link_unregister_of(structdsa_port*dp)+intdsa_port_link_register_of(structdsa_port*dp){-structdevice_node*dn=dp->dn;+if(of_phy_is_fixed_link(dp->dn))+returndsa_port_fixed_link_register_of(dp);+else+returndsa_port_setup_phy_of(dp,true);+}-if(of_phy_is_fixed_link(dn))-of_phy_deregister_fixed_link(dn);+voiddsa_port_link_unregister_of(structdsa_port*dp)+{+if(of_phy_is_fixed_link(dp->dn))+of_phy_deregister_fixed_link(dp->dn);+else+dsa_port_setup_phy_of(dp,false);}
From: Sebastian Reichel <hidden> Date: 2018-01-23 15:04:18
This adds support for the Marvell switch and names the network
ports according to the labels, that can be found next to the
connectors. The switch is connected to the host system using a
PCI based network card.
The PCI bus configuration has been written using the following
information:
root@b450v3# lspci -tv
-[0000:00]---00.0-[01]----00.0 Intel Corporation I210 Gigabit Network Connection
root@b450v3# lspci -nn
00:00.0 PCI bridge [0604]: Synopsys, Inc. Device [16c3:abcd] (rev 01)
01:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
Signed-off-by: Sebastian Reichel <redacted>
---
arch/arm/boot/dts/imx6q-b450v3.dts | 52 ++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
@@ -112,3 +112,55 @@line-name="PCA9539-P07";};};++&pci_root{+/* Intel Corporation I210 Gigabit Network Connection */+switch_nic:ethernet@3,0{+compatible="pci8086,1533";+reg=<0x000100000000>;+};+};++&switch_ports{+port@0{+reg=<0>;+label="enacq";+phy-handle=<&switchphy0>;+};++port@1{+reg=<1>;+label="eneport1";+phy-handle=<&switchphy1>;+};++port@2{+reg=<2>;+label="enix";+phy-handle=<&switchphy2>;+};++port@3{+reg=<3>;+label="enid";+phy-handle=<&switchphy3>;+};++port@4{+reg=<4>;+label="cpu";+ethernet=<&switch_nic>;+phy-handle=<&switchphy4>;+};++port@5{+reg=<5>;+label="enembc";++/* connected to Ethernet MAC of AT91RM9200 in MII mode */+fixed-link{+speed=<100>;+full-duplex;+};+};+};
From: Sebastian Reichel <hidden> Date: 2018-01-23 15:05:05
This adds support for the Marvell switch and names the network
ports according to the labels, that can be found next to the
connectors. The switch is connected to the host system using a
PCI based network card.
The PCI bus configuration has been written using the following
information:
root@b650v3# lspci -tv
-[0000:00]---00.0-[01]----00.0 Intel Corporation I210 Gigabit Network Connection
root@b650v3# lspci -nn
00:00.0 PCI bridge [0604]: Synopsys, Inc. Device [16c3:abcd] (rev 01)
01:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
Signed-off-by: Sebastian Reichel <redacted>
---
arch/arm/boot/dts/imx6q-b650v3.dts | 52 ++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
@@ -111,3 +111,55 @@fsl,tx-cal-45-dp-ohms=<55>;fsl,tx-d-cal=<100>;};++&pci_root{+/* Intel Corporation I210 Gigabit Network Connection */+switch_nic:ethernet@3,0{+compatible="pci8086,1533";+reg=<0x000100000000>;+};+};++&switch_ports{+port@0{+reg=<0>;+label="enacq";+phy-handle=<&switchphy0>;+};++port@1{+reg=<1>;+label="eneport1";+phy-handle=<&switchphy1>;+};++port@2{+reg=<2>;+label="enix";+phy-handle=<&switchphy2>;+};++port@3{+reg=<3>;+label="enid";+phy-handle=<&switchphy3>;+};++port@4{+reg=<4>;+label="cpu";+ethernet=<&switch_nic>;+phy-handle=<&switchphy4>;+};++port@5{+reg=<5>;+label="enembc";++/* connected to Ethernet MAC of AT91RM9200 in MII mode */+fixed-link{+speed=<100>;+full-duplex;+};+};+};
From: Sebastian Reichel <hidden> Date: 2018-01-23 15:05:54
B850v3, B650v3 and B450v3 all have a GPIO bit banged MDIO bus to
communicate with a Marvell switch. On all devices the switch is
connected to a PCI based network card, which needs to be referenced
by DT, so this also adds the common PCI root node.
Signed-off-by: Sebastian Reichel <redacted>
---
arch/arm/boot/dts/imx6q-bx50v3.dtsi | 62 +++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
This adds support for enabling the internal PHY for a 'cpu' port.
It has been tested on GE B850v3, B650v3 and B450v3, which have a
built-in MV88E6240 switch hardwired to a PCIe based network card.
On these machines the internal PHY of the i210 network card and
the Marvell switch are connected to each other and must be enabled
for properly using the switch. While the i210 PHY will be enabled
when the network interface is enabled, the switch's port is not
exposed as network interface. Additionally the mv88e6xxx driver
resets the chip during probe, so the PHY is disabled without this
patch.
This looks good now, thanks for your patience Sebastian!
Signed-off-by: Sebastian Reichel <sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
Reviewed-by: Florian Fainelli <redacted>
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
B850v3, B650v3 and B450v3 all have a GPIO bit banged MDIO bus to
communicate with a Marvell switch. On all devices the switch is
connected to a PCI based network card, which needs to be referenced
by DT, so this also adds the common PCI root node.
Signed-off-by: Sebastian Reichel <redacted>
This adds support for the Marvell switch and names the network
ports according to the labels, that can be found next to the
connectors. The switch is connected to the host system using a
PCI based network card.
The PCI bus configuration has been written using the following
information:
root@b650v3# lspci -tv
-[0000:00]---00.0-[01]----00.0 Intel Corporation I210 Gigabit Network Connection
root@b650v3# lspci -nn
00:00.0 PCI bridge [0604]: Synopsys, Inc. Device [16c3:abcd] (rev 01)
01:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
Signed-off-by: Sebastian Reichel <redacted>
This adds support for the Marvell switch and names the network
ports according to the labels, that can be found next to the
connectors. The switch is connected to the host system using a
PCI based network card.
The PCI bus configuration has been written using the following
information:
root@b450v3# lspci -tv
-[0000:00]---00.0-[01]----00.0 Intel Corporation I210 Gigabit Network Connection
root@b450v3# lspci -nn
00:00.0 PCI bridge [0604]: Synopsys, Inc. Device [16c3:abcd] (rev 01)
01:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
Signed-off-by: Sebastian Reichel <redacted>
This adds support for the Marvell switch and names the network
ports according to the labels, that can be found next to the
connectors ("ID", "IX", "ePort 1", "ePort 2"). The switch is
connected to the host system using a PCI based network card.
The PCI bus configuration has been written using the following
information:
root@b850v3# lspci -tv
-[0000:00]---00.0-[01]----00.0-[02-05]--+-01.0-[03]----00.0 Intel Corporation I210 Gigabit Network Connection
+-02.0-[04]----00.0 Intel Corporation I210 Gigabit Network Connection
\-03.0-[05]--
root@b850v3# lspci -nn
00:00.0 PCI bridge [0604]: Synopsys, Inc. Device [16c3:abcd] (rev 01)
01:00.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch [10b5:8605] (rev ab)
02:01.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch [10b5:8605] (rev ab)
02:02.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch [10b5:8605] (rev ab)
02:03.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch [10b5:8605] (rev ab)
03:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
04:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
Signed-off-by: Sebastian Reichel <redacted>
From: David Miller <davem@davemloft.net> Date: 2018-01-24 00:23:10
From: Sebastian Reichel <sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
Date: Tue, 23 Jan 2018 16:03:45 +0100
This adds support for the internal switch found in GE Healthcare
B450v3, B650v3 and B850v3. All devices use a GPIO bitbanged MDIO
bus to communicate with the switch and a PCIe based network card
for exchanging network data. The cpu network data link requires,
that the switch's internal phy interface is enabled, so support
for that is added by the first patch in this series.
The patch series is based on v4.15-rc8.
Series applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html