Re: [PATCH v4 net-next 0/5] net: phy: Fix SMSC LAN87xx external reset

2021-01-18 Thread Marco Felsch
Hi Laurent, thanks for your patches :) Can you check your setup since we get 6 individual emails: 'git send-email --thread ...' ;) On 21-01-18 16:57, Badel, Laurent wrote: > Description: > External PHY reset from the FEC driver was introduced in commit [1] to > mitigate an issue with iMX SoCs a

[PATCH] net: phy: smsc: fix clk error handling

2021-01-11 Thread Marco Felsch
fclk in support") Suggested-by: Jakub Kicinski Signed-off-by: Marco Felsch --- drivers/net/phy/smsc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c index 0fc39ac5ca88..10722fed666d 100644 --- a/drivers/net/phy/smsc.c +

Re: [PATCH net] net: phy: smsc: add missed clk_disable_unprepare in smsc_phy_probe()

2020-11-16 Thread Marco Felsch
On 20-11-14 11:45, Florian Fainelli wrote: > > > On 11/14/2020 11:26 AM, Jakub Kicinski wrote: > > On Thu, 12 Nov 2020 19:23:59 +0800 Zhang Changzhong wrote: > >> Add the missing clk_disable_unprepare() before return from > >> smsc_phy_probe() in the error handling case. > >> > >> Fixes: bedd8d78

Re: [PATCH net 0/4] Restore and fix PHY reset for SMSC LAN8720

2020-10-29 Thread Marco Felsch
Hi, thanks for your patches :) On 20-10-27 23:25, Badel, Laurent wrote: > Subject: [PATCH net 0/4] Restore and fix PHY reset for SMSC LAN8720 > > Description: > A recent patchset [1] added support in the SMSC PHY driver for managing > the ref clock and therefore removed the PHY_RST_AFTER_CLK_EN

Re: PHY reset question

2020-10-07 Thread Marco Felsch
On 20-10-07 11:20, Marek Vasut wrote: > On 10/7/20 11:06 AM, Marco Felsch wrote: ... > > You're right, just wanted to provide you a link :) > > Can you CC me on the next version of those patches ? I seems the LAN8710 > is causing grief to many. No need to since this se

Re: PHY reset question

2020-10-07 Thread Marco Felsch
On 20-10-07 10:23, Marek Vasut wrote: > On 10/7/20 10:14 AM, Marco Felsch wrote: > > Hi Marek, > > Hi, > > [...] > > > On 20-10-06 14:11, Florian Fainelli wrote: > >> On 10/6/2020 1:24 PM, Marek Vasut wrote: > > > > ... > > > >&

Re: PHY reset question

2020-10-07 Thread Marco Felsch
Hi Marek, On 20-10-06 14:11, Florian Fainelli wrote: > On 10/6/2020 1:24 PM, Marek Vasut wrote: ... > > If this happens on MX6 with FEC, can you please try these two patches? > > > > https://patchwork.ozlabs.org/project/netdev/patch/20201006135253.97395-1-ma...@denx.de/ > > > > https://patchwo

[PATCH v3 3/5] dt-bindings: net: phy: smsc: document reference clock

2020-09-09 Thread Marco Felsch
Add support to specify the reference clock for the phy. Signed-off-by: Marco Felsch Reviewed-by: Florian Fainelli --- v3: - Add Florian's tag v2: - no change Documentation/devicetree/bindings/net/smsc-lan87xx.txt | 4 1 file changed, 4 insertions(+) diff --git a/Document

[PATCH v3 0/5] SMSC: Cleanups and clock setup

2020-09-09 Thread Marco Felsch
Hi, this small series cleans the smsc-phy code a bit and adds the support to specify the phy clock source. Adding the phy clock source support is also the main purpose of this series. Each file has its own changelog. Thanks a lot to Florian and Andrew for reviewing it. Regards, Marco Marco

[PATCH v3 1/5] net: phy: smsc: skip ENERGYON interrupt if disabled

2020-09-09 Thread Marco Felsch
Don't enable the interrupt if the platform disable the energy detection by "smsc,disable-energy-detect". Signed-off-by: Marco Felsch Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- v3: - Add Florian's tag - use 'if(phydev->interrupts == PHY_INTERRUP

[PATCH v3 2/5] net: phy: smsc: simplify config_init callback

2020-09-09 Thread Marco Felsch
Exit the driver specific config_init hook early if energy detection is disabled. We can do this because we don't need to clear the interrupt status here. Clearing the status should be removed anyway since this is handled by the phy_enable_interrupts(). Signed-off-by: Marco Felsch Review

[PATCH v3 4/5] net: phy: smsc: LAN8710/20: add phy refclk in support

2020-09-09 Thread Marco Felsch
hy: smsc: LAN8710/20: add PHY_RST_AFTER_CLK_EN flag") Signed-off-by: Marco Felsch Reviewed-by: Florian Fainelli --- v3: - Add Florian's tag - s/phy-state-machine/PHY library state machine/ - s/phy/PHY/ - reword last sentence of the commit message v2: - use non-devres clk_* functi

[PATCH v3 5/5] net: phy: smsc: LAN8710/20: remove PHY_RST_AFTER_CLK_EN flag

2020-09-09 Thread Marco Felsch
Don't reset the phy without respect to the PHY library state machine because this breaks the phy IRQ mode. The same behaviour can be archived now by specifying the refclk. Signed-off-by: Marco Felsch --- v3: - s/phy-state-machine/PHY library state machine/ - reword last sentence of the c

Re: [PATCH v2 1/5] net: phy: smsc: skip ENERGYON interrupt if disabled

2020-09-09 Thread Marco Felsch
On 20-09-08 18:58, Florian Fainelli wrote: > > > On 9/8/2020 4:25 AM, Marco Felsch wrote: > > Don't enable the interrupt if the platform disable the energy detection > > by "smsc,disable-energy-detect". > > > > Signed-off-by: Marco Felsch > &g

[PATCH v2 2/5] net: phy: smsc: simplify config_init callback

2020-09-08 Thread Marco Felsch
Exit the driver specific config_init hook early if energy detection is disabled. We can do this because we don't need to clear the interrupt status here. Clearing the status should be removed anyway since this is handled by the phy_enable_interrupts(). Signed-off-by: Marco Felsch --- v2:

[PATCH v2 4/5] net: phy: smsc: LAN8710/20: add phy refclk in support

2020-09-08 Thread Marco Felsch
msc: LAN8710/20: add PHY_RST_AFTER_CLK_EN flag") Signed-off-by: Marco Felsch --- v2: - use non-devres clk_* functions and instead use the remove() function - propagate errors upstream if the optional clk can't be retrieved. - make use if dev_err_probe() - adapt commit subject to cover that o

[PATCH v2 3/5] dt-bindings: net: phy: smsc: document reference clock

2020-09-08 Thread Marco Felsch
Add support to specify the reference clock for the phy. Signed-off-by: Marco Felsch --- v2: - no change Documentation/devicetree/bindings/net/smsc-lan87xx.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/net/smsc-lan87xx.txt b/Documentation

[PATCH v2 1/5] net: phy: smsc: skip ENERGYON interrupt if disabled

2020-09-08 Thread Marco Felsch
Don't enable the interrupt if the platform disable the energy detection by "smsc,disable-energy-detect". Signed-off-by: Marco Felsch Reviewed-by: Andrew Lunn --- v2: - Add Andrew's tag drivers/net/phy/smsc.c | 15 +++ 1 file changed, 11 insertions(+), 4 deleti

[PATCH v2 5/5] net: phy: smsc: LAN8710/20: remove PHY_RST_AFTER_CLK_EN flag

2020-09-08 Thread Marco Felsch
Don't reset the phy without respect to the phy-state-machine because this breaks the phy IRQ mode. We can archive the same behaviour if the refclk in is specified. Signed-off-by: Marco Felsch --- v2: - adapt the subject to align with previous patch drivers/net/phy/smsc.c | 1 - 1 file ch

[PATCH v2 0/5] SMSC: Cleanups and clock setup

2020-09-08 Thread Marco Felsch
Hi, this small series cleans the smsc-phy code a bit and adds the support to specify the phy clock source. Adding the phy clock source support is also the main purpose of this series. Each file has its own changelog. Regards, Marco Marco Felsch (5): net: phy: smsc: skip ENERGYON interrupt

Re: [PATCH net-next 3/3] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-07 Thread Marco Felsch
On 20-09-04 08:37, Florian Fainelli wrote: ... > > Is this really necessary? The devm_clk_get_optional() function already > > registers the devm_clk_release() hook. > > Yes, because you can unbind the PHY driver from sysfs, and if you want to > bind that driver again, which will call .probe() ag

Re: [PATCH net-next 3/3] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-07 Thread Marco Felsch
On 20-09-04 08:38, Florian Fainelli wrote: > > > On 9/3/2020 11:18 PM, Marco Felsch wrote: > > On 20-09-02 21:39, Florian Fainelli wrote: > > > The internal Gigabit PHY on Broadcom STB chips has a digital clock which > > > drives its MDIO interface among othe

Re: [PATCH net-next 3/3] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-07 Thread Marco Felsch
On 20-09-04 08:37, Florian Fainelli wrote: > > > On 9/3/2020 11:15 PM, Marco Felsch wrote: > > Hi Florian, > > > > On 20-09-02 21:39, Florian Fainelli wrote: > > > The internal Gigabit PHY on Broadcom STB chips has a digital clock which > > > driv

Re: [PATCH net-next 3/3] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-03 Thread Marco Felsch
On 20-09-02 21:39, Florian Fainelli wrote: > The internal Gigabit PHY on Broadcom STB chips has a digital clock which > drives its MDIO interface among other things, the driver now requests > and manage that clock during .probe() and .remove() accordingly. Hi Florian, Seems like you added the sam

Re: [PATCH net-next 3/3] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-03 Thread Marco Felsch
Hi Florian, On 20-09-02 21:39, Florian Fainelli wrote: > The internal Gigabit PHY on Broadcom STB chips has a digital clock which > drives its MDIO interface among other things, the driver now requests > and manage that clock during .probe() and .remove() accordingly. > > Signed-off-by: Florian F

Re: [PATCH 4/5] net: phy: smsc: add phy refclk in support

2020-09-01 Thread Marco Felsch
On 20-08-31 09:32, Florian Fainelli wrote: > > > On 8/31/2020 6:48 AM, Marco Felsch wrote: > > Add support to specify the clock provider for the phy refclk and don't > > rely on 'magic' host clock setup. [1] tried to address this by > > introducing a f

Re: [PATCH 4/5] net: phy: smsc: add phy refclk in support

2020-09-01 Thread Marco Felsch
On 20-08-31 16:08, Andrew Lunn wrote: > > + priv->refclk = devm_clk_get_optional(dev, NULL); > > + if (IS_ERR(priv->refclk)) { > > + if (PTR_ERR(priv->refclk) == -EPROBE_DEFER) > > + return -EPROBE_DEFER; > > + > > + /* Clocks are optional all errors should

Re: [PATCH 5/5] net: phy: smsc: LAN8710/LAN8720: remove PHY_RST_AFTER_CLK_EN flag

2020-09-01 Thread Marco Felsch
Hi Andrew, On 20-08-31 16:11, Andrew Lunn wrote: > On Mon, Aug 31, 2020 at 03:48:36PM +0200, Marco Felsch wrote: > > Don't reset the phy without respect to the phy-state-machine because > > this breaks the phy IRQ mode. We can archive the same behaviour if the > &

Re: [PATCH 1/5] net: phy: smsc: skip ENERGYON interrupt if disabled

2020-09-01 Thread Marco Felsch
Hi Andrew, thanks for your fast response :) On 20-08-31 16:02, Andrew Lunn wrote: > On Mon, Aug 31, 2020 at 03:48:32PM +0200, Marco Felsch wrote: > > Don't enable the interrupt if the platform disable the energy detection > > by "smsc,disable-energy-detect". > &

[PATCH 5/5] net: phy: smsc: LAN8710/LAN8720: remove PHY_RST_AFTER_CLK_EN flag

2020-08-31 Thread Marco Felsch
Don't reset the phy without respect to the phy-state-machine because this breaks the phy IRQ mode. We can archive the same behaviour if the refclk in is specified. Signed-off-by: Marco Felsch --- drivers/net/phy/smsc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/phy/sms

[PATCH 2/5] net: phy: smsc: simplify config_init callback

2020-08-31 Thread Marco Felsch
Exit the driver specific config_init hook early if energy detection is disabled. We can do this because we don't need to clear the interrupt status here. Clearing the status should be removed anyway since this is handled by the phy_enable_interrupts(). Signed-off-by: Marco Felsch --- dr

[PATCH 4/5] net: phy: smsc: add phy refclk in support

2020-08-31 Thread Marco Felsch
msc: LAN8710/20: add PHY_RST_AFTER_CLK_EN flag") Signed-off-by: Marco Felsch --- drivers/net/phy/smsc.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c index 79574fcbd880..b98a7845681f 100644 --- a/drivers/net/phy/sms

[PATCH 3/5] dt-bindings: net: phy: smsc: document reference clock

2020-08-31 Thread Marco Felsch
Add support to specify the reference clock for the phy. Signed-off-by: Marco Felsch --- Documentation/devicetree/bindings/net/smsc-lan87xx.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/net/smsc-lan87xx.txt b/Documentation/devicetree/bindings/net

[PATCH 1/5] net: phy: smsc: skip ENERGYON interrupt if disabled

2020-08-31 Thread Marco Felsch
Don't enable the interrupt if the platform disable the energy detection by "smsc,disable-energy-detect". Signed-off-by: Marco Felsch --- drivers/net/phy/smsc.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/smsc.c b/drivers

[PATCH 0/5] SMSC: Cleanups and clock setup

2020-08-31 Thread Marco Felsch
Hi, this small series cleans the smsc-phy code a bit and adds the support to specify the phy clock source. Adding the phy clock source support is also the main purpose of this series. Regards, Marco Marco Felsch (5): net: phy: smsc: skip ENERGYON interrupt if disabled net: phy: smsc

[RESEND PATCH v2 1/1] net: phy: micrel: add 125MHz reference clock workaround

2018-05-15 Thread Marco Felsch
dt-binding documentation] [m.fel...@pengutronix.de: use already existing result var for read/write] [m.fel...@pengutronix.de: add error handling] [m.fel...@pengutronix.de: add more comments] Signed-off-by: Marco Felsch --- .../bindings/net/micrel-ksz90x1.txt | 7 + drivers/net/ph

[RESEND PATCH v2 0/1] net: phy: micrel: add 125MHz reference clock workaround

2018-05-15 Thread Marco Felsch
This patch adds the workaround for the errata#2. The KSZ9031 phy 125MHz reference clock jitter is to high if the phy is configured as slave. This will cause errors if a application uses the clock as MAC reference clock. The workaround is to configure the phy as master. v2: - add more code and dt-b

Re: [PATCH v2 0/1] net: phy: micrel: add 125MHz reference clock workaround

2018-05-15 Thread Marco Felsch
I forgot to set the thread option. I will resend with thread option enabled. On 05/15/2018 09:45 AM, Marco Felsch wrote: This patch adds the workaround for the errata#2. The KSZ9031 phy 125MHz reference clock jitter is to high if the phy is configured as slave. This will cause errors if a

[PATCH v2 1/1] net: phy: micrel: add 125MHz reference clock workaround

2018-05-15 Thread Marco Felsch
dt-binding documentation] [m.fel...@pengutronix.de: use already existing result var for read/write] [m.fel...@pengutronix.de: add error handling] [m.fel...@pengutronix.de: add more comments] Signed-off-by: Marco Felsch --- .../bindings/net/micrel-ksz90x1.txt | 7 + drivers/net/ph

[PATCH v2 1/1] net: phy: micrel: add 125MHz reference clock workaround

2018-05-15 Thread Marco Felsch
dt-binding documentation] [m.fel...@pengutronix.de: use already existing result var for read/write] [m.fel...@pengutronix.de: add error handling] [m.fel...@pengutronix.de: add more comments] Signed-off-by: Marco Felsch --- .../bindings/net/micrel-ksz90x1.txt | 7 + drivers/net/ph

[PATCH v2 0/1] net: phy: micrel: add 125MHz reference clock workaround

2018-05-15 Thread Marco Felsch
This patch adds the workaround for the errata#2. The KSZ9031 phy 125MHz reference clock jitter is to high if the phy is configured as slave. This will cause errors if a application uses the clock as MAC reference clock. The workaround is to configure the phy as master. v2: - add more code and dt-b

[PATCH] net: phy: micrel: workaround for errata #2 for KSZ9031

2018-05-14 Thread Marco Felsch
From: Markus Niebel handle errata #2 for KSZ9031: force 1000Base-T master Attention: enabling the workaround will cause no link to other GIGE master. Signed-off-by: Markus Niebel [m.fel...@pengutronix.de: move dt binding to the KSZ9031 entry] Signed-off-by: Marco Felsch --- .../devicetree