2019-10-29 11:17:26

by Christophe Roullier

[permalink] [raw]
Subject: [PATCH 0/5] net: ethernet: stmmac: some fixes and optimizations

Some improvements (manage syscfg as optional clock, update slew rate of
ETH_MDIO pin, Enable gating of the MAC TX clock during TX low-power mode)
Fix warning build message when W=1

Christophe Roullier (5):
net: ethernet: stmmac: Add support for syscfg clock
net: ethernet: stmmac: fix warning when w=1 option is used during
build
ARM: dts: stm32: remove syscfg clock on stm32mp157c ethernet
ARM: dts: stm32: adjust slew rate for Ethernet
ARM: dts: stm32: Enable gating of the MAC TX clock during TX low-power
mode on stm32mp157c

arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 9 +++-
arch/arm/boot/dts/stm32mp157c.dtsi | 7 ++--
.../net/ethernet/stmicro/stmmac/dwmac-stm32.c | 42 ++++++++++++-------
3 files changed, 38 insertions(+), 20 deletions(-)

--
2.17.1


2019-10-29 11:17:55

by Christophe Roullier

[permalink] [raw]
Subject: [net: ethernet: stmmac: some fixes and optimizations 4/5] ARM: dts: stm32: adjust slew rate for Ethernet

ETH_MDIO slew-rate should be set to "0" instead of "2"

Signed-off-by: Christophe Roullier <[email protected]>
---
arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi
index e4a0d51ec3a8..79566d4fb9fc 100644
--- a/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi
+++ b/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi
@@ -217,13 +217,18 @@
<STM32_PINMUX('C', 2, AF11)>, /* ETH_RGMII_TXD2 */
<STM32_PINMUX('E', 2, AF11)>, /* ETH_RGMII_TXD3 */
<STM32_PINMUX('B', 11, AF11)>, /* ETH_RGMII_TX_CTL */
- <STM32_PINMUX('A', 2, AF11)>, /* ETH_MDIO */
<STM32_PINMUX('C', 1, AF11)>; /* ETH_MDC */
bias-disable;
drive-push-pull;
- slew-rate = <3>;
+ slew-rate = <2>;
};
pins2 {
+ pinmux = <STM32_PINMUX('A', 2, AF11)>; /* ETH_MDIO */
+ bias-disable;
+ drive-push-pull;
+ slew-rate = <0>;
+ };
+ pins3 {
pinmux = <STM32_PINMUX('C', 4, AF11)>, /* ETH_RGMII_RXD0 */
<STM32_PINMUX('C', 5, AF11)>, /* ETH_RGMII_RXD1 */
<STM32_PINMUX('B', 0, AF11)>, /* ETH_RGMII_RXD2 */
--
2.17.1

2019-10-29 17:55:43

by Christophe Roullier

[permalink] [raw]
Subject: [net: ethernet: stmmac: some fixes and optimizations 5/5] ARM: dts: stm32: Enable gating of the MAC TX clock during TX low-power mode on stm32mp157c

When there is no activity on ethernet phy link, the ETH_GTX_CLK is cut

Signed-off-by: Christophe Roullier <[email protected]>
---
arch/arm/boot/dts/stm32mp157c.dtsi | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/arm/boot/dts/stm32mp157c.dtsi
index f13c2348d130..8df2986dd452 100644
--- a/arch/arm/boot/dts/stm32mp157c.dtsi
+++ b/arch/arm/boot/dts/stm32mp157c.dtsi
@@ -1334,6 +1334,7 @@
st,syscon = <&syscfg 0x4>;
snps,mixed-burst;
snps,pbl = <2>;
+ snps,en-tx-lpi-clockgating;
snps,axi-config = <&stmmac_axi_config_0>;
snps,tso;
status = "disabled";
--
2.17.1

2019-10-29 17:56:15

by Christophe Roullier

[permalink] [raw]
Subject: [net: ethernet: stmmac: some fixes and optimizations 3/5] ARM: dts: stm32: remove syscfg clock on stm32mp157c ethernet

Syscfg is now activated automatically when syscfg registers are used

Signed-off-by: Christophe Roullier <[email protected]>
---
arch/arm/boot/dts/stm32mp157c.dtsi | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/arm/boot/dts/stm32mp157c.dtsi
index 9b11654a0a39..f13c2348d130 100644
--- a/arch/arm/boot/dts/stm32mp157c.dtsi
+++ b/arch/arm/boot/dts/stm32mp157c.dtsi
@@ -1326,13 +1326,11 @@
clock-names = "stmmaceth",
"mac-clk-tx",
"mac-clk-rx",
- "ethstp",
- "syscfg-clk";
+ "ethstp";
clocks = <&rcc ETHMAC>,
<&rcc ETHTX>,
<&rcc ETHRX>,
- <&rcc ETHSTP>,
- <&rcc SYSCFG>;
+ <&rcc ETHSTP>;
st,syscon = <&syscfg 0x4>;
snps,mixed-burst;
snps,pbl = <2>;
--
2.17.1

2019-10-30 01:12:33

by David Miller

[permalink] [raw]
Subject: Re: [PATCH 0/5] net: ethernet: stmmac: some fixes and optimizations

From: Christophe Roullier <[email protected]>
Date: Tue, 29 Oct 2019 11:14:36 +0100

> Some improvements (manage syscfg as optional clock, update slew rate of
> ETH_MDIO pin, Enable gating of the MAC TX clock during TX low-power mode)
> Fix warning build message when W=1

Please fix up several issues with this submission:

1) Bug fixes should target the 'net' GIT tree. Anything else, and this
means cleanups, new features, and optimizations, should all target
the 'net-next' GIT tree.

2) Your subject lines are too much, for example:

[net: ethernet: stmmac: some fixes and optimizations 1/5] net: ethernet: stmmac: Add support for syscfg clock

The "net: ethernet: stmmac: some fixes and optimizations" part
should be completely removed. 'net' should be separate to indicate
the target GIT tree (or 'net-next' as could be the case) and then
we're left with, for example:

[PATCH net-next 1/5] net: ethernet: stmmac: Add support for syscfg clock

3) There should be a seprate series with the bug fixes targetting 'net',
then you should wait for those fixes to propagate into 'net-next', at which
time you can submit a second patch series targetting 'net-next' with all
the cleanups, feature additions, and optimizations.

Thank you.