net: ethernet: ti: cpsw: replace cpsw-phy-sel with phy driver
Subsystems (5)
cover net: ethernet: ti: cpsw: replace cpsw-phy-sel with phy driver
TI am335x/am437x/dra7(am5)/dm814x CPSW3G Ethernet Subsystem supports two 10/100/1000 Ethernet ports with selectable G/MII, RMII, and RGMII interfaces. The interface mode is selected by configuring the MII mode selection register(s) (GMII_SEL) in the System Control Module chapter (SCM).
+--------------+
+-------------------------------+ |SCM |
| CPSW | | +---------+ |
| +--------------------------------+gmii_sel | |
| | | | +---------+ |
| +----v---+ +--------+ | +--------------+
| |Port 1..<--+-->GMII/MII<------->
| | | | | | |
| +--------+ | +--------+ |
| | |
| | +--------+ |
| | | RMII <------->
| +--> | |
| | +--------+ |
| | |
| | +--------+ |
| | | RGMII <------->
| +--> | |
| +--------+ |
+-------------------------------+GMII_SEL register(s) and bit fields placement in SCM are different between SoCs while fields meaning is the same. GMII_SEL(s) allows to select - Port GMII/MII/RMII/RGMII Mode; RGMII Internal Delay Mode (SoC dependant) and RMII Reference Clock Output mode (SoC dependant).
Historically CPSW external Port's interface mode selection configuartion was introduced using custom driver and API cpsw-phy-sel.c.
This leads to unnecessary driver, DT binding and custom API support effort. Moreover, even definition of cpsw-phy-sel node in DTs is logically incorrect [1]
mac: ethernet at 4a100000 {
compatible = "ti,am4372-cpsw","ti,cpsw";
...
phy_sel: cpsw-phy-sel at 44e10650 {
compatible = "ti,am43xx-cpsw-phy-sel";
reg= <0x44e10650 0x4>;
reg-names = "gmii-sel";
};
};This series replaces custom CPSW Port interface selection implementation (cpsw-phy-sel.c) with well defined Linux PHY framework interface instead. It introduces CPSW Port's PHY Interface Mode selection Driver (phy-gmii-sel) which implements standard Linux PHY interface. The phy-gmii-sel PHY device should defined as child device of SCM node (scm_conf) and can be attached to each CPSW port node using standard PHY bindings (cell 1 - port number, cell 2 - RMII refclk mode).
scm_conf: scm_conf at 0 {
compatible = "syscon", "simple-bus";
gmii_sel_phy: cpsw-sel-netif {
compatible = "ti,am43xx-gmii-sel-phy";
syscon-scm = <&scm_conf>;
#phy-cells = <2>;
};
};mac: ethernet at 4a100000 {
compatible = "ti,am4372-cpsw","ti,cpsw";
cpsw_emac0: slave at 4a100200 {
phy-mode = "rgmii";
phys = <&gmii_sel_phy 1 0>;
};
};The CPSW driver requests phy-gmii-sel PHY for each external port and uses recently introduced PHY API phy_set_mode_ext() [1] for port interface mode selection when netdev is opened.
slave->data->gmii_sel_phy = devm_of_phy_get(&pdev->dev, port_node, NULL); slave->data->phy_if = of_get_phy_mode(port_node);
cpsw_ndo_open()
phy_set_mode_ext(slave->data->gmii_sel_phy, PHY_MODE_ETHERNET, slave->data->phy_if);
Note. CPSW Port interface has to be reconfigured every time netdev is opened for proper System Suspend support where CPSW can lose context.
[1] https://patchwork.kernel.org/cover/10689739/
Grygorii Strashko (10):
dt-bindings: phy: add cpsw port interface mode selection phy bindings
phy: ti: introduce phy-gmii-sel driver
dt-bindings: net: ti: cpsw: switch to use phy-gmii-sel phy
net: ethernet: ti: cpsw: add support for port interface mode selection
phy
ARM: dts: dra7: switch to use phy-gmii-sel
ARM: dts: dm814x: switch to use phy-gmii-sel
ARM: dts: am4372: switch to use phy-gmii-sel
ARM: dts: am335x: switch to use phy-gmii-sel
dt-bindings: net: ti: deprecate cpsw-phy-sel bindings
net: ethernet: ti: cpsw: deprecate cpsw-phy-sel driver
.../devicetree/bindings/net/cpsw-phy-sel.txt | 2 +- Documentation/devicetree/bindings/net/cpsw.txt | 8 +- .../devicetree/bindings/phy/ti-phy-gmii-sel.txt | 68 ++++ arch/arm/boot/dts/am335x-baltos-ir2110.dts | 4 - arch/arm/boot/dts/am335x-baltos-ir3220.dts | 4 - arch/arm/boot/dts/am335x-baltos-ir5221.dts | 4 - arch/arm/boot/dts/am335x-chiliboard.dts | 4 - arch/arm/boot/dts/am335x-icev2.dts | 4 - arch/arm/boot/dts/am335x-igep0033.dtsi | 4 - arch/arm/boot/dts/am335x-lxm.dts | 4 - arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi | 5 - arch/arm/boot/dts/am335x-moxa-uc-8100-me-t.dts | 5 - arch/arm/boot/dts/am335x-phycore-som.dtsi | 4 - arch/arm/boot/dts/am33xx-l4.dtsi | 15 +- arch/arm/boot/dts/am437x-l4.dtsi | 17 +- arch/arm/boot/dts/am43x-epos-evm.dts | 5 +- arch/arm/boot/dts/dm814x.dtsi | 15 +- arch/arm/boot/dts/dra7-l4.dtsi | 15 +- drivers/net/ethernet/ti/Kconfig | 6 +- drivers/net/ethernet/ti/cpsw.c | 19 +- drivers/net/ethernet/ti/cpsw.h | 6 + drivers/phy/ti/Kconfig | 10 + drivers/phy/ti/Makefile | 1 + drivers/phy/ti/phy-gmii-sel.c | 349 +++++++++++++++++++++ 24 files changed, 498 insertions(+), 80 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/ti-phy-gmii-sel.txt create mode 100644 drivers/phy/ti/phy-gmii-sel.c
Signature · 1 line
2.10.5
PATCH 1/10 dt-bindings: phy: add cpsw port interface mode selection phy bindings
Add CPSW Port's Interface Mode Selection PHY (phy-gmii-sel) DT Bindings
--- .../devicetree/bindings/phy/ti-phy-gmii-sel.txt | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/ti-phy-gmii-sel.txt
Documentation/devicetree/bindings/phy/ti-phy-gmii-sel.txt new file +68 -0
@@ -0,0 +1,68 @@ +CPSW Port's Interface Mode Selection PHY Tree Bindings +----------------------------------------------- + +TI am335x/am437x/dra7(am5)/dm814x CPSW3G Ethernet Subsystem supports +two 10/100/1000 Ethernet ports with selectable G/MII, RMII, and RGMII interfaces. +The interface mode is selected by configuring the MII mode selection register(s) +(GMII_SEL) in the System Control Module chapter (SCM). GMII_SEL register(s) and +bit fields placement in SCM are different between SoCs while fields meaning +is the same. + +--------------+ + +-------------------------------+ |SCM | + | CPSW | | +---------+ | + | +--------------------------------+gmii_sel | | + | | | | +---------+ | + | +----v---+ +--------+ | +--------------+ + | |Port 1..<--+-->GMII/MII<-------> + | | | | | | | + | +--------+ | +--------+ | + | | | + | | +--------+ | + | | | RMII <-------> + | +--> | | + | | +--------+ | + | | | + | | +--------+ | + | | | RGMII <-------> + | +--> | | + | +--------+ | + +-------------------------------+ + +CPSW Port's Interface Mode Selection PHY describes MII interface mode between +CPSW Port and Ethernet PHY which depends on Eth PHY and board configuration. + +CPSW Port's Interface Mode Selection PHY device should defined as child device +of SCM node (scm_conf) and can be attached to each CPSW port node using standard +PHY bindings (See phy/phy-bindings.txt). + +Required properties: +- compatible : Should be "ti,am3352-phy-gmii-sel" for am335x platform + "ti,dra7xx-phy-gmii-sel" for dra7xx/am57xx platform + "ti,am43xx-phy-gmii-sel" for am43xx platform + "ti,dm814-phy-gmii-sel" for dm814x platform +- reg : Address and length of the register set for the device +- #phy-cells : must be 2. + cell 1 - CPSW port number (starting from 1) + cell 2 - RMII refclk mode + +Examples: + phy_gmii_sel: phy-gmii-sel { + compatible = "ti,am3352-phy-gmii-sel"; + reg = <0x650 0x4>; + #phy-cells = <2>; + }; + + mac: ethernet at 4a100000 { + compatible = "ti,am335x-cpsw","ti,cpsw"; + ... + + cpsw_emac0: slave at 4a100200 { + ... + phys = <&phy_gmii_sel 1 1>; + }; + + cpsw_emac1: slave at 4a100300 { + ... + phys = <&phy_gmii_sel 2 1>; + }; + };
Signature · 1 line
2.10.5
Re: [PATCH linux-next 01/10] dt-bindings: phy: add cpsw port interface mode selection phy bindings
Quoted 1 line · Grygorii Strashko
Add CPSW Port's Interface Mode Selection PHY (phy-gmii-sel) DT Bindings
Looks good to me. Please send the dts changes separately when they're OK to merge after the driver dependencies have cleared.
For this patch:
PATCH 2/10 phy: ti: introduce phy-gmii-sel driver
In reply to Grygorii StrashkoTI am335x/am437x/dra7(am5)/dm814x CPSW3G Ethernet Subsystem supports two 10/100/1000 Ethernet ports with selectable G/MII, RMII, and RGMII interfaces. The interface mode is selected by configuring the MII mode selection register(s) (GMII_SEL) in the System Control Module chapter (SCM). GMII_SEL register(s) and bit fields placement in SCM are different between SoCs while fields meaning is the same.
Historically CPSW external Port's interface mode selection configuration was introduced using custom API and driver cpsw-phy-sel.c. This leads to unnecessary driver, DT binding and custom API support effort.
This patch introduces CPSW Port's PHY Interface Mode selection Driver (phy-gmii-sel) which implements standard Linux PHY interface and used as a replacement for TI's specific driver cpsw-phy-sel.c and corresponding custom API.
--- drivers/phy/ti/Kconfig | 10 ++ drivers/phy/ti/Makefile | 1 + drivers/phy/ti/phy-gmii-sel.c | 349 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 360 insertions(+) create mode 100644 drivers/phy/ti/phy-gmii-sel.c
drivers/phy/ti/Kconfig +10 -0
@@ -76,3 +76,13 @@ config TWL4030_USB family chips (including the TWL5030 and TPS659x0 devices). This transceiver supports high and full speed devices plus, in host mode, low speed. + +config PHY_TI_GMII_SEL + tristate + default y if TI_CPSW=y + depends on TI_CPSW || COMPILE_TEST + select GENERIC_PHY + default m + help + This driver supports configuring of the TI CPSW Port mode depending on + the Ethernet PHY connected to the CPSW Port.
drivers/phy/ti/Makefile +1 -0
@@ -6,3 +6,4 @@ obj-$(CONFIG_OMAP_USB2) += phy-omap-usb2.o obj-$(CONFIG_TI_PIPE3) += phy-ti-pipe3.o obj-$(CONFIG_PHY_TUSB1210) += phy-tusb1210.o obj-$(CONFIG_TWL4030_USB) += phy-twl4030-usb.o +obj-$(CONFIG_PHY_TI_GMII_SEL) += phy-gmii-sel.o
drivers/phy/ti/phy-gmii-sel.c new file +349 -0
349 lines not on this page · raw message
Signature · 1 line
2.10.5
PATCH 3/10 dt-bindings: net: ti: cpsw: switch to use phy-gmii-sel phy
In reply to Grygorii StrashkoThe cpsw-phy-sel driver was replaced with new PHY driver phy-gmii-sel, so deprecate cpsw-phy-sel bindings and update CPSW binding to use phy-gmii-sel PHY bindings.
--- Documentation/devicetree/bindings/net/cpsw.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/net/cpsw.txt +7 -1
@@ -22,7 +22,8 @@ Required properties: - cpsw-phy-sel : Specifies the phandle to the CPSW phy mode selection device. See also cpsw-phy-sel.txt for it's binding. Note that in legacy cases cpsw-phy-sel may be - a child device instead of a phandle. + a child device instead of a phandle + (DEPRECATED, use phys property instead). Optional properties: - ti,hwmods : Must be "cpgmac0"
@@ -44,6 +45,7 @@ Optional properties: Slave Properties: Required properties: - phy-mode : See ethernet.txt file in the same directory +- phys : phandle on phy-gmii-sel PHY (see phy/ti-phy-gmii-sel.txt) Optional properties: - dual_emac_res_vlan : Specifies VID to be used to segregate the ports
@@ -85,12 +87,14 @@ Examples: phy-mode = "rgmii-txid"; /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 1 0>; }; cpsw_emac1: slave at 1 { phy_id = <&davinci_mdio>, <1>; phy-mode = "rgmii-txid"; /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 2 0>; }; };
@@ -114,11 +118,13 @@ Examples: phy-mode = "rgmii-txid"; /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 1 0>; }; cpsw_emac1: slave at 1 { phy_id = <&davinci_mdio>, <1>; phy-mode = "rgmii-txid"; /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 2 0>; }; };
Signature · 1 line
2.10.5
PATCH 4/10 net: ethernet: ti: cpsw: add support for port interface mode selection phy
In reply to Grygorii StrashkoAdd support for port interface mode selection phy (phy-gmii-sel):
- try to request interface mode selection phy from Port DT node and fail silently if not defined and old CONFIG_TI_CPSW_PHY_SEL driver enabled.
- use new phy if requested successfully.
--- drivers/net/ethernet/ti/cpsw.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
drivers/net/ethernet/ti/cpsw.c +18 -1
@@ -26,6 +26,7 @@#include <linux/netdevice.h> #include <linux/net_tstamp.h> #include <linux/phy.h> +#include <linux/phy/phy.h> #include <linux/workqueue.h> #include <linux/delay.h> #include <linux/pm_runtime.h>
@@ -387,6 +388,7 @@ struct cpsw_slave_data {int phy_if;u8 mac_addr[ETH_ALEN ];u16 dual_emac_res_vlan;/* Reserved VLAN for DualEMAC */ +struct phy *ifphy; };struct cpsw_platform_data {
@@ -1624,7 +1626,12 @@ static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv)phy_start (slave->phy);/* Configure GMII_SEL register */ -cpsw_phy_sel (cpsw->dev, slave->phy->interface, slave->slave_num); +if (!IS_ERR (slave->data->ifphy)) +phy_set_mode_ext (slave->data->ifphy,PHY_MODE_ETHERNET , + slave->data->phy_if); +else +cpsw_phy_sel (cpsw->dev, slave->phy->interface, + slave->slave_num); }static inline void cpsw_add_default_vlan (struct cpsw_priv *priv)
@@ -3274,6 +3281,16 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,if (strcmp (slave_node->name,"slave" ))continue ; + slave_data->ifphy =devm_of_phy_get (&pdev->dev, slave_node, +NULL ); +if (!IS_ENABLED (CONFIG_TI_CPSW_PHY_SEL ) && +IS_ERR (slave_data->ifphy)) { + ret =PTR_ERR (slave_data->ifphy); +dev_err (&pdev->dev, +"%d: Error retrieving port phy: %d\n" , i, ret); +return ret; + } + slave_data->phy_node =of_parse_phandle (slave_node,"phy-handle" ,0 ); parp =of_get_property (slave_node,"phy_id" , &lenp);
Signature · 1 line
2.10.5
PATCH 5/10 ARM: dts: dra7: switch to use phy-gmii-sel
In reply to Grygorii StrashkoSwitch to use phy-gmii-sel PHY instead of cpsw-phy-sel.
--- arch/arm/boot/dts/dra7-l4.dtsi | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
arch/arm/boot/dts/dra7-l4.dtsi +8 -7
@@ -77,18 +77,18 @@ }; }; + phy_gmii_sel: phy-gmii-sel { + compatible = "ti,dra7xx-phy-gmii-sel"; + reg = <0x554 0x4>; + #phy-cells = <1>; + }; + scm_conf_clocks: clocks { #address-cells = <1>; #size-cells = <0>; }; }; - phy_sel: cpsw-phy-sel at 554 { - compatible = "ti,dra7xx-cpsw-phy-sel"; - reg= <0x554 0x4>; - reg-names = "gmii-sel"; - }; - dra7_pmx_core: pinmux at 1400 { compatible = "ti,dra7-padconf", "pinctrl-single";
@@ -3060,7 +3060,6 @@ <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>; ranges = <0 0 0x4000>; syscon = <&scm_conf>; - cpsw-phy-sel = <&phy_sel>; status = "disabled"; davinci_mdio: mdio at 1000 {
@@ -3075,11 +3074,13 @@ cpsw_emac0: slave at 200 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 1>; }; cpsw_emac1: slave at 300 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 2>; }; }; };
Signature · 1 line
2.10.5
PATCH 6/10 ARM: dts: dm814x: switch to use phy-gmii-sel
In reply to Grygorii StrashkoSwitch to use phy-gmii-sel PHY instead of cpsw-phy-sel.
--- arch/arm/boot/dts/dm814x.dtsi | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
arch/arm/boot/dts/dm814x.dtsi +9 -6
@@ -343,6 +343,12 @@ #size-cells = <1>; ranges = <0 0 0x800>; + phy_gmii_sel: phy-gmii-sel { + compatible = "ti,dm814-phy-gmii-sel"; + reg = <0x650 0x4>; + #phy-cells = <1>; + }; + scm_clocks: clocks { #address-cells = <1>; #size-cells = <0>;
@@ -549,17 +555,14 @@ cpsw_emac0: slave at 4a100200 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 1>; + }; cpsw_emac1: slave at 4a100300 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; - }; - - phy_sel: cpsw-phy-sel at 48140650 { - compatible = "ti,am3352-cpsw-phy-sel"; - reg= <0x48140650 0x4>; - reg-names = "gmii-sel"; + phys = <&phy_gmii_sel 2>; }; };
Signature · 1 line
2.10.5
PATCH 7/10 ARM: dts: am4372: switch to use phy-gmii-sel
In reply to Grygorii StrashkoSwitch to use phy-gmii-sel PHY instead of cpsw-phy-sel.
--- arch/arm/boot/dts/am437x-l4.dtsi | 17 +++++++++-------- arch/arm/boot/dts/am43x-epos-evm.dts | 5 +---- 2 files changed, 10 insertions(+), 12 deletions(-)
arch/arm/boot/dts/am437x-l4.dtsi +9 -8
@@ -280,12 +280,6 @@ #size-cells = <1>; ranges = <0 0 0x4000>; - phy_sel: cpsw-phy-sel at 650 { - compatible = "ti,am43xx-cpsw-phy-sel"; - reg= <0x650 0x4>; - reg-names = "gmii-sel"; - }; - am43xx_pinmux: pinmux at 800 { compatible = "ti,am437-padconf", "pinctrl-single";
@@ -300,11 +294,17 @@ }; scm_conf: scm_conf at 0 { - compatible = "syscon"; + compatible = "syscon", "simple-bus"; reg = <0x0 0x800>; #address-cells = <1>; #size-cells = <1>; + phy_gmii_sel: phy-gmii-sel { + compatible = "ti,am43xx-phy-gmii-sel"; + reg = <0x650 0x4>; + #phy-cells = <2>; + }; + scm_clocks: clocks { #address-cells = <1>; #size-cells = <0>;
@@ -555,7 +555,6 @@ cpts_clock_shift = <29>; ranges = <0 0 0x8000>; syscon = <&scm_conf>; - cpsw-phy-sel = <&phy_sel>; davinci_mdio: mdio at 1000 { compatible = "ti,am4372-mdio","ti,cpsw-mdio","ti,davinci_mdio";
@@ -572,11 +571,13 @@ cpsw_emac0: slave at 200 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 1 0>; }; cpsw_emac1: slave at 300 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 2 0>; }; }; };
arch/arm/boot/dts/am43x-epos-evm.dts +1 -4
@@ -584,10 +584,7 @@ &cpsw_emac0 { phy-handle = <ðphy0>; phy-mode = "rmii"; -}; - -&phy_sel { - rmii-clock-ext; + phys = <&phy_gmii_sel 1 1>; }; &i2c0 {
Signature · 1 line
2.10.5
PATCH 8/10 ARM: dts: am335x: switch to use phy-gmii-sel
In reply to Grygorii StrashkoSwitch to use phy-gmii-sel PHY instead of cpsw-phy-sel.
--- arch/arm/boot/dts/am335x-baltos-ir2110.dts | 4 ---- arch/arm/boot/dts/am335x-baltos-ir3220.dts | 4 ---- arch/arm/boot/dts/am335x-baltos-ir5221.dts | 4 ---- arch/arm/boot/dts/am335x-chiliboard.dts | 4 ---- arch/arm/boot/dts/am335x-icev2.dts | 4 ---- arch/arm/boot/dts/am335x-igep0033.dtsi | 4 ---- arch/arm/boot/dts/am335x-lxm.dts | 4 ---- arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi | 5 ----- arch/arm/boot/dts/am335x-moxa-uc-8100-me-t.dts | 5 ----- arch/arm/boot/dts/am335x-phycore-som.dtsi | 4 ---- arch/arm/boot/dts/am33xx-l4.dtsi | 15 ++++++++------- 11 files changed, 8 insertions(+), 49 deletions(-)
arch/arm/boot/dts/am335x-baltos-ir2110.dts +0 -4
@@ -72,7 +72,3 @@ dual_emac_res_vlan = <2>; phy-handle = <&phy1>; }; - -&phy_sel { - rmii-clock-ext = <1>; -};
arch/arm/boot/dts/am335x-baltos-ir3220.dts +0 -4
@@ -114,7 +114,3 @@ dual_emac_res_vlan = <2>; phy-handle = <&phy1>; }; - -&phy_sel { - rmii-clock-ext = <1>; -};
arch/arm/boot/dts/am335x-baltos-ir5221.dts +0 -4
@@ -133,10 +133,6 @@ phy-handle = <&phy1>; }; -&phy_sel { - rmii-clock-ext = <1>; -}; - &dcan1 { pinctrl-names = "default"; pinctrl-0 = <&dcan1_pins>;
arch/arm/boot/dts/am335x-chiliboard.dts +0 -4
@@ -151,10 +151,6 @@ phy-mode = "rmii"; }; -&phy_sel { - rmii-clock-ext; -}; - /* USB */ &usb { status = "okay";
arch/arm/boot/dts/am335x-icev2.dts +0 -4
@@ -484,10 +484,6 @@ dual_emac; }; -&phy_sel { - rmii-clock-ext; -}; - &davinci_mdio { pinctrl-names = "default", "sleep"; pinctrl-0 = <&davinci_mdio_default>;
arch/arm/boot/dts/am335x-igep0033.dtsi +0 -4
@@ -123,10 +123,6 @@ phy-mode = "rmii"; }; -&phy_sel { - rmii-clock-ext; -}; - &elm { status = "okay"; };
arch/arm/boot/dts/am335x-lxm.dts +0 -4
@@ -328,10 +328,6 @@ dual_emac_res_vlan = <3>; }; -&phy_sel { - rmii-clock-ext; -}; - &mac { pinctrl-names = "default", "sleep"; pinctrl-0 = <&cpsw_default>;
arch/arm/boot/dts/am335x-moxa-uc-2100-common.dtsi +0 -5
@@ -159,11 +159,6 @@ status = "okay"; }; -&phy_sel { - reg= <0x44e10650 0xf5>; - rmii-clock-ext; -}; - &sham { status = "okay"; };
arch/arm/boot/dts/am335x-moxa-uc-8100-me-t.dts +0 -5
@@ -446,11 +446,6 @@ dual_emac_res_vlan = <2>; }; -&phy_sel { - reg= <0x44e10650 0xf5>; - rmii-clock-ext; -}; - &sham { status = "okay"; };
arch/arm/boot/dts/am335x-phycore-som.dtsi +0 -4
@@ -100,10 +100,6 @@ status = "okay"; }; -&phy_sel { - rmii-clock-ext; -}; - /* I2C Busses */ &am33xx_pinmux { i2c0_pins: pinmux_i2c0 {
arch/arm/boot/dts/am33xx-l4.dtsi +8 -7
@@ -279,12 +279,6 @@ #pinctrl-cells = <1>; ranges = <0 0 0x2000>; - phy_sel: cpsw-phy-sel at 650 { - compatible = "ti,am3352-cpsw-phy-sel"; - reg= <0x650 0x4>; - reg-names = "gmii-sel"; - }; - am33xx_pinmux: pinmux at 800 { compatible = "pinctrl-single"; reg = <0x800 0x238>;
@@ -302,6 +296,12 @@ #size-cells = <1>; ranges = <0 0 0x800>; + phy_gmii_sel: phy-gmii-sel { + compatible = "ti,am3352-phy-gmii-sel"; + reg = <0x650 0x4>; + #phy-cells = <2>; + }; + scm_clocks: clocks { #address-cells = <1>; #size-cells = <0>;
@@ -717,7 +717,6 @@ interrupts = <40 41 42 43>; ranges = <0 0 0x8000>; syscon = <&scm_conf>; - cpsw-phy-sel = <&phy_sel>; status = "disabled"; davinci_mdio: mdio at 1000 {
@@ -733,11 +732,13 @@ cpsw_emac0: slave at 200 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 1 1>; }; cpsw_emac1: slave at 300 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 2 1>; }; }; };
Signature · 1 line
2.10.5
PATCH 9/10 dt-bindings: net: ti: deprecate cpsw-phy-sel bindings
In reply to Grygorii StrashkoThe cpsw-phy-sel driver was replaced with new PHY driver phy-gmii-sel, so deprecate cpsw-phy-sel bindings.
--- Documentation/devicetree/bindings/net/cpsw-phy-sel.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/net/cpsw-phy-sel.txt +1 -1
@@ -1,4 +1,4 @@ -TI CPSW Phy mode Selection Device Tree Bindings +TI CPSW Phy mode Selection Device Tree Bindings (DEPRECATED) ----------------------------------------------- Required properties:
Signature · 1 line
2.10.5
Rob Herring
maintainerRe: [PATCH linux-next 09/10] dt-bindings: net: ti: deprecate cpsw-phy-sel bindings
Quoted 9 lines · Grygorii Strashko
The cpsw-phy-sel driver was replaced with new PHY driver phy-gmii-sel, so deprecate cpsw-phy-sel bindings.
Cc Kishon Vijay Abraham I <[email protected]>Cc Tony Lindgren <[email protected]>Signed-off-by Grygorii Strashko <[email protected]>--- Documentation/devicetree/bindings/net/cpsw-phy-sel.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Please add acks/reviewed-bys when posting new versions.
Rob
Re: [PATCH linux-next 09/10] dt-bindings: net: ti: deprecate cpsw-phy-sel bindings
Quoted 4 lines · Rob Herring
Quoted 3 lines · Grygorii Strashko
The cpsw-phy-sel driver was replaced with new PHY driver phy-gmii-sel, so deprecate cpsw-phy-sel bindings.
Quoted 9 lines
Quoted 6 lines
Cc Kishon Vijay Abraham I <[email protected]>Cc Tony Lindgren <[email protected]>Signed-off-by Grygorii Strashko <[email protected]>--- Documentation/devicetree/bindings/net/cpsw-phy-sel.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Please add acks/reviewed-bys when posting new versions.
Sry, missed your ask for this patch.
Signature · 2 lines
regards, -grygorii
PATCH 10/10 net: ethernet: ti: cpsw: deprecate cpsw-phy-sel driver
In reply to Grygorii StrashkoDeprecate cpsw-phy-sel driver as it's been replaced with new TI phy-gmii-sel PHY driver.
--- drivers/net/ethernet/ti/Kconfig | 6 +++--- drivers/net/ethernet/ti/cpsw.h | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-)
drivers/net/ethernet/ti/Kconfig +3 -3
@@ -49,10 +49,11 @@ config TI_DAVINCI_CPDMA will be called davinci_cpdma. This is recommended. config TI_CPSW_PHY_SEL - bool + bool "TI CPSW Phy mode Selection (DEPRECATED)" + default n ---help--- This driver supports configuring of the phy mode connected to - the CPSW. + the CPSW. DEPRECATED: use PHY_TI_GMII_SEL. config TI_CPSW_ALE tristate "TI CPSW ALE Support"
@@ -64,7 +65,6 @@ config TI_CPSW depends on ARCH_DAVINCI || ARCH_OMAP2PLUS || COMPILE_TEST select TI_DAVINCI_CPDMA select TI_DAVINCI_MDIO - select TI_CPSW_PHY_SEL select TI_CPSW_ALE select MFD_SYSCON select REGMAP
drivers/net/ethernet/ti/cpsw.h +6 -0
@@ -21,7 +21,13 @@ ((mac)[2] << 16) | ((mac)[3] << 24))#define mac_lo (mac) (((mac)[4] << 0) | ((mac)[5] << 8)) +#if IS_ENABLED (CONFIG_TI_CPSW_PHY_SEL )void cpsw_phy_sel (struct device *dev,phy_interface_t phy_mode,int slave); +#else +static inline +void cpsw_phy_sel (struct device *dev,phy_interface_t phy_mode,int slave) +{} +#endif int ti_cm_get_macid (struct device *dev,int slave,u8 *mac_addr);#endif /* __CPSW_H__ */
Signature · 1 line
2.10.5