mbox series

[net-next,0/2] dsa: add MT7530 GPIO support

Message ID 20210111054428.3273-1-dqfext@gmail.com
Headers show
Series dsa: add MT7530 GPIO support | expand

Message

Qingfang Deng Jan. 11, 2021, 5:44 a.m. UTC
MT7530's LED controller can be used as GPIO controller. Add support for
it.

DENG Qingfang (2):
  dt-bindings: net: dsa: add MT7530 GPIO controller binding
  drivers: net: dsa: mt7530: MT7530 optional GPIO support

 .../devicetree/bindings/net/dsa/mt7530.txt    |  6 ++
 drivers/net/dsa/mt7530.c                      | 96 +++++++++++++++++++
 drivers/net/dsa/mt7530.h                      | 20 ++++
 3 files changed, 122 insertions(+)

Comments

Qingfang Deng Jan. 12, 2021, 2:50 a.m. UTC | #1
Hi Marek,

On Mon, Jan 11, 2021 at 11:46 PM Marek BehĂșn <kabel@kernel.org> wrote:
>

> what modes does the LED support? Does it support blinking on rx/tx?

> What about link status?


Yes. But unfortunately they cannot be controlled individually, unless
on GPIO mode.

> I'd like to know because I am still working on patches which add

> ethernet PHY/switch LEDs, with transparent offloading of netdev trigger.

>

> Marek
Bartosz Golaszewski Jan. 14, 2021, 9:36 a.m. UTC | #2
On Mon, Jan 11, 2021 at 2:43 PM Vladimir Oltean <olteanv@gmail.com> wrote:
>
> On Mon, Jan 11, 2021 at 01:44:26PM +0800, DENG Qingfang wrote:
> > MT7530's LED controller can be used as GPIO controller. Add support for
> > it.
> >
> > DENG Qingfang (2):
> >   dt-bindings: net: dsa: add MT7530 GPIO controller binding
> >   drivers: net: dsa: mt7530: MT7530 optional GPIO support
> >
> >  .../devicetree/bindings/net/dsa/mt7530.txt    |  6 ++
> >  drivers/net/dsa/mt7530.c                      | 96 +++++++++++++++++++
> >  drivers/net/dsa/mt7530.h                      | 20 ++++
> >  3 files changed, 122 insertions(+)
> >
> > --
> > 2.25.1
>
> Adding GPIO and LED maintainers to also have a look.
> https://patchwork.kernel.org/project/netdevbpf/cover/20210111054428.3273-1-dqfext@gmail.com/

Can you resend the series with GPIO maintainers in CC?

Bart
Florian Fainelli Jan. 14, 2021, 5:08 p.m. UTC | #3
On 1/11/21 6:50 PM, DENG Qingfang wrote:
> Hi Marek,

> 

> On Mon, Jan 11, 2021 at 11:46 PM Marek BehĂșn <kabel@kernel.org> wrote:

>>

>> what modes does the LED support? Does it support blinking on rx/tx?

>> What about link status?


Just to be crystal clear here, if you configure the LEDs to be in GPIO
mode, you can defer to the leds-gpio driver for all configuration, and
you can still offload blinking of the LEDs to the hardware or does
blinking require you to use a software managed timer?
-- 
Florian
Rob Herring Jan. 14, 2021, 7:11 p.m. UTC | #4
On Mon, 11 Jan 2021 13:44:27 +0800, DENG Qingfang wrote:
> Add device tree binding to support MT7530 GPIO controller.
> 
> Signed-off-by: DENG Qingfang <dqfext@gmail.com>
> ---
>  Documentation/devicetree/bindings/net/dsa/mt7530.txt | 6 ++++++
>  1 file changed, 6 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>
Linus Walleij Jan. 18, 2021, 2:43 p.m. UTC | #5
On Mon, Jan 11, 2021 at 6:46 AM DENG Qingfang <dqfext@gmail.com> wrote:

> Add device tree binding to support MT7530 GPIO controller.

>

> Signed-off-by: DENG Qingfang <dqfext@gmail.com>


This is a good way to turn it into a GPIO controller.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>


Yours,
Linus Walleij