ARM: dts: ti: cpsw: switch to phy-gmii-sel phy driver
cover ARM: dts: ti: cpsw: switch to phy-gmii-sel phy driver
Hi Tony,
Hence prerequisite patches [1] have been merged already I'm sending final set of DT patches to complete conversation of TI CPSW driver to use phy-gmii-sel phy driver instead of cpsw-phy-sel.
[1] https://lkml.org/lkml/2018/11/26/154
Grygorii Strashko (6):
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 +- 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 ---- .../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.h | 6 ++++++ 18 files changed, 45 insertions(+), 78 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/6 ARM: dts: dra7: switch to use phy-gmii-sel
Switch 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@554 { - compatible = "ti,dra7xx-cpsw-phy-sel"; - reg= <0x554 0x4>; - reg-names = "gmii-sel"; - }; - dra7_pmx_core: pinmux@1400 { compatible = "ti,dra7-padconf", "pinctrl-single";
@@ -3099,7 +3099,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@1000 {
@@ -3114,11 +3113,13 @@ cpsw_emac0: slave@200 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 1>; }; cpsw_emac1: slave@300 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 2>; }; }; };
Signature · 1 line
2.17.1
PATCH 2/6 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@4a100200 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 1>; + }; cpsw_emac1: slave@4a100300 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; - }; - - phy_sel: cpsw-phy-sel@48140650 { - compatible = "ti,am3352-cpsw-phy-sel"; - reg= <0x48140650 0x4>; - reg-names = "gmii-sel"; + phys = <&phy_gmii_sel 2>; }; };
Signature · 1 line
2.17.1
PATCH 3/6 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@650 { - compatible = "ti,am43xx-cpsw-phy-sel"; - reg= <0x650 0x4>; - reg-names = "gmii-sel"; - }; - am43xx_pinmux: pinmux@800 { compatible = "ti,am437-padconf", "pinctrl-single";
@@ -300,11 +294,17 @@ }; scm_conf: scm_conf@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@1000 { compatible = "ti,am4372-mdio","ti,cpsw-mdio","ti,davinci_mdio";
@@ -572,11 +571,13 @@ cpsw_emac0: slave@200 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 1 0>; }; cpsw_emac1: slave@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.17.1
PATCH 4/6 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@650 { - compatible = "ti,am3352-cpsw-phy-sel"; - reg= <0x650 0x4>; - reg-names = "gmii-sel"; - }; - am33xx_pinmux: pinmux@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@1000 {
@@ -733,11 +732,13 @@ cpsw_emac0: slave@200 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 1 1>; }; cpsw_emac1: slave@300 { /* Filled in by U-Boot */ mac-address = [ 00 00 00 00 00 00 ]; + phys = <&phy_gmii_sel 2 1>; }; }; };
Signature · 1 line
2.17.1
PATCH 5/6 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.17.1
PATCH 6/6 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.17.1
Re: [PATCH 6/6] net: ethernet: ti: cpsw: deprecate cpsw-phy-sel driver
Hi,
Quoted 2 lines · Grygorii Strashko
Deprecate cpsw-phy-sel driver as it's been replaced with new TI phy-gmii-sel PHY driver.
I'm not going to pick up this one, seems that Dave can merge this later on? That is unless Dave wants to ack this one.
Regards,
Tony
Quoted 53 lines
Signed-off-by Grygorii Strashko <[email protected]>--- 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 REGMAPdrivers/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.17.1
Re: [PATCH 6/6] net: ethernet: ti: cpsw: deprecate cpsw-phy-sel driver
In reply to Grygorii StrashkoFrom: Grygorii Strashko <[email protected]>
Date: Wed, 20 Feb 2019 17:25:19 +0200
Quoted 4 lines
Deprecate cpsw-phy-sel driver as it's been replaced with new TI phy-gmii-sel PHY driver.
Signed-off-by Grygorii Strashko <[email protected]>
Re: [PATCH 6/6] net: ethernet: ti: cpsw: deprecate cpsw-phy-sel driver
Quoted 9 lines · David Miller
From: Grygorii Strashko <[email protected]>
Date: Wed, 20 Feb 2019 17:25:19 +0200Quoted 4 lines
Deprecate cpsw-phy-sel driver as it's been replaced with new TI phy-gmii-sel PHY driver.
Signed-off-by Grygorii Strashko <[email protected]>Acked-by David S. Miller <[email protected]>
Thanks for the ack, but actually I'd prefer you to pick this patch at some future date. I suggest Grygorii just repost this one after v5.1-rc1.
This way I can keep my last pending v5.1 branch limited to dts changes to make the arm-soc life easier.
Regards,
Tony
David Miller
maintainerRe: [PATCH 6/6] net: ethernet: ti: cpsw: deprecate cpsw-phy-sel driver
From: Tony Lindgren <[email protected]>
Date: Wed, 20 Feb 2019 12:33:26 -0800
Quoted 7 lines · David Miller
Quoted 6 lines
From: Grygorii Strashko <[email protected]>
Date: Wed, 20 Feb 2019 17:25:19 +0200Quoted 3 lines
Deprecate cpsw-phy-sel driver as it's been replaced with new TI phy-gmii-sel PHY driver.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Grygorii Strashko <[email protected]>Acked-by David S. Miller <[email protected]>Thanks for the ack, but actually I'd prefer you to pick this patch at some future date. I suggest Grygorii just repost this one after v5.1-rc1.
It's so much easier if you group this with those DT changes, they logically belong together as well and it helps someone reading the changes in the tree also if they are side by side.
Why don't you want to integrate this with them?
Re: [PATCH 6/6] net: ethernet: ti: cpsw: deprecate cpsw-phy-sel driver
Quoted 14 lines · David Miller
From: Tony Lindgren <[email protected]>
Date: Wed, 20 Feb 2019 12:33:26 -0800Quoted 11 lines · David Miller
Quoted 9 lines
From: Grygorii Strashko <[email protected]>
Date: Wed, 20 Feb 2019 17:25:19 +0200Quoted 4 lines
Deprecate cpsw-phy-sel driver as it's been replaced with new TI phy-gmii-sel PHY driver.
Signed-off-by Grygorii Strashko <[email protected]>Acked-by David S. Miller <[email protected]>
Quoted 7 lines
Quoted 3 lines
Thanks for the ack, but actually I'd prefer you to pick this patch at some future date. I suggest Grygorii just repost this one after v5.1-rc1.
It's so much easier if you group this with those DT changes, they logically belong together as well and it helps someone reading the changes in the tree also if they are side by side.
I agree that a group of patches should go together in most cases.
Quoted 1 line
Why don't you want to integrate this with them?
Because the arm-soc tree wants dts changes separately in general. The dts changes are considered firmware describing hardware. And it makes it possible to split the arm-soc pile of patches into multiple pull requests. In theory there should be no dependency between dts changes and driver changes, but in reality that's not always the case :)
What I can do is set up a separate branch with just this patch on top of the dts changes that the arm-soc guys can then merge towards the end of the merge cycle. If that works for you, let me know and I'll do it.
Regards,
Tony
David Miller
maintainerRe: [PATCH 6/6] net: ethernet: ti: cpsw: deprecate cpsw-phy-sel driver
From: Tony Lindgren <[email protected]>
Date: Wed, 20 Feb 2019 13:01:27 -0800
Quoted 4 lines
What I can do is set up a separate branch with just this patch on top of the dts changes that the arm-soc guys can then merge towards the end of the merge cycle. If that works for you, let me know and I'll do it.
Yes, it does work for me.
Thanks.
Re: [PATCH 6/6] net: ethernet: ti: cpsw: deprecate cpsw-phy-sel driver
Quoted 9 lines · David Miller
From: Tony Lindgren <[email protected]>
Date: Wed, 20 Feb 2019 13:01:27 -0800Quoted 4 lines
What I can do is set up a separate branch with just this patch on top of the dts changes that the arm-soc guys can then merge towards the end of the merge cycle. If that works for you, let me know and I'll do it.
Yes, it does work for me.
OK I've applied this patch into omap-for-v5.1/cpsw.
Thanks,
Tony
Quoted 7 lines · Grygorii Strashko
Hi Tony,
Hence prerequisite patches [1] have been merged already I'm sending final set of DT patches to complete conversation of TI CPSW driver to use phy-gmii-sel phy driver instead of cpsw-phy-sel.
Great, I was wondering about update of that series, will apply.
Thanks and welcome back!
Tony