mbox series

[net-next,v1,0/3] net: phy: micrel: add coma mode support

Message ID 20220427214406.1348872-1-michael@walle.cc
Headers show
Series net: phy: micrel: add coma mode support | expand

Message

Michael Walle April 27, 2022, 9:44 p.m. UTC
Add support to disable coma mode by a GPIO line.

Michael Walle (3):
  dt-bindings: net: micrel: add coma-mode-gpios property
  net: phy: micrel: move the PHY timestamping check
  net: phy: micrel: add coma mode GPIO

 .../devicetree/bindings/net/micrel.txt        |  9 ++++++
 drivers/net/phy/micrel.c                      | 32 ++++++++++++++++---
 2 files changed, 37 insertions(+), 4 deletions(-)

Comments

Florian Fainelli April 27, 2022, 10:06 p.m. UTC | #1
On 4/27/2022 2:44 PM, Michael Walle wrote:
> The LAN8814 has a coma mode pin which puts the PHY into isolate and
> power-dowm mode. Unfortunately, the mode cannot be disabled by a
> register. Usually, the input pin has a pull-up and connected to a GPIO
> which can then be used to disable the mode. Try to get the GPIO and
> deassert it.

Poor choice of word, how about deep sleep, dormant, super isolate?
Michael Walle April 27, 2022, 10:08 p.m. UTC | #2
Am 2022-04-28 00:06, schrieb Florian Fainelli:
> On 4/27/2022 2:44 PM, Michael Walle wrote:
>> The LAN8814 has a coma mode pin which puts the PHY into isolate and
>> power-dowm mode. Unfortunately, the mode cannot be disabled by a
s/dowm/down/

>> register. Usually, the input pin has a pull-up and connected to a GPIO
>> which can then be used to disable the mode. Try to get the GPIO and
>> deassert it.
> 
> Poor choice of word, how about deep sleep, dormant, super isolate?

Which one do you mean? Super isolate sounded like broadcom wording ;)

-michael
Florian Fainelli April 27, 2022, 10:12 p.m. UTC | #3
On 4/27/22 15:08, Michael Walle wrote:
> Am 2022-04-28 00:06, schrieb Florian Fainelli:
>> On 4/27/2022 2:44 PM, Michael Walle wrote:
>>> The LAN8814 has a coma mode pin which puts the PHY into isolate and
>>> power-dowm mode. Unfortunately, the mode cannot be disabled by a
> s/dowm/down/
> 
>>> register. Usually, the input pin has a pull-up and connected to a GPIO
>>> which can then be used to disable the mode. Try to get the GPIO and
>>> deassert it.
>>
>> Poor choice of word, how about deep sleep, dormant, super isolate?
> 
> Which one do you mean? Super isolate sounded like broadcom wording ;)

Coma is not a great term to use IMHO. Yes Super isolate (tm) is a 
Broadcom thing, and you can come out of super isolate mode with register 
writes, so maybe not the best suggestion.
Michael Walle April 27, 2022, 10:17 p.m. UTC | #4
Am 2022-04-28 00:12, schrieb Florian Fainelli:
> On 4/27/22 15:08, Michael Walle wrote:
>> Am 2022-04-28 00:06, schrieb Florian Fainelli:
>>> On 4/27/2022 2:44 PM, Michael Walle wrote:
>>>> The LAN8814 has a coma mode pin which puts the PHY into isolate and
>>>> power-dowm mode. Unfortunately, the mode cannot be disabled by a
>> s/dowm/down/
>> 
>>>> register. Usually, the input pin has a pull-up and connected to a 
>>>> GPIO
>>>> which can then be used to disable the mode. Try to get the GPIO and
>>>> deassert it.
>>> 
>>> Poor choice of word, how about deep sleep, dormant, super isolate?
>> 
>> Which one do you mean? Super isolate sounded like broadcom wording ;)
> 
> Coma is not a great term to use IMHO. Yes Super isolate (tm) is a
> Broadcom thing, and you can come out of super isolate mode with
> register writes, so maybe not the best suggestion.

I didn't come up with that name. It's all in the datasheets and it's
actually already used grep for "COMA_MODE" in phy/mscc. (Yes on that
one you can actually disable it with register access..). Even if
it is not a great name (which I agree), I'd use the same naming as
the datasheet and esp. the pin name.

-michael
Florian Fainelli April 27, 2022, 10:23 p.m. UTC | #5
On 4/27/22 15:17, Michael Walle wrote:
> Am 2022-04-28 00:12, schrieb Florian Fainelli:
>> On 4/27/22 15:08, Michael Walle wrote:
>>> Am 2022-04-28 00:06, schrieb Florian Fainelli:
>>>> On 4/27/2022 2:44 PM, Michael Walle wrote:
>>>>> The LAN8814 has a coma mode pin which puts the PHY into isolate and
>>>>> power-dowm mode. Unfortunately, the mode cannot be disabled by a
>>> s/dowm/down/
>>>
>>>>> register. Usually, the input pin has a pull-up and connected to a GPIO
>>>>> which can then be used to disable the mode. Try to get the GPIO and
>>>>> deassert it.
>>>>
>>>> Poor choice of word, how about deep sleep, dormant, super isolate?
>>>
>>> Which one do you mean? Super isolate sounded like broadcom wording ;)
>>
>> Coma is not a great term to use IMHO. Yes Super isolate (tm) is a
>> Broadcom thing, and you can come out of super isolate mode with
>> register writes, so maybe not the best suggestion.
> 
> I didn't come up with that name. It's all in the datasheets and it's
> actually already used grep for "COMA_MODE" in phy/mscc. (Yes on that
> one you can actually disable it with register access..). Even if
> it is not a great name (which I agree), I'd use the same naming as
> the datasheet and esp. the pin name.

OK then, makes sense to use the datasheet name.
patchwork-bot+netdevbpf@kernel.org April 30, 2022, 12:30 a.m. UTC | #6
Hello:

This series was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 27 Apr 2022 23:44:03 +0200 you wrote:
> Add support to disable coma mode by a GPIO line.
> 
> Michael Walle (3):
>   dt-bindings: net: micrel: add coma-mode-gpios property
>   net: phy: micrel: move the PHY timestamping check
>   net: phy: micrel: add coma mode GPIO
> 
> [...]

Here is the summary with links:
  - [net-next,v1,1/3] dt-bindings: net: micrel: add coma-mode-gpios property
    https://git.kernel.org/netdev/net-next/c/749c61e5b30a
  - [net-next,v1,2/3] net: phy: micrel: move the PHY timestamping check
    https://git.kernel.org/netdev/net-next/c/31d00ca4ce0e
  - [net-next,v1,3/3] net: phy: micrel: add coma mode GPIO
    https://git.kernel.org/netdev/net-next/c/738871b09250

You are awesome, thank you!