All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] RFC: Realtek 83xx SMI driver core
@ 2017-11-05 23:19 Linus Walleij
  2017-11-05 23:19 ` [PATCH 1/4] RFC: net/dsa: Allow DSA PHYs to define link IRQs Linus Walleij
                   ` (4 more replies)
  0 siblings, 5 replies; 32+ messages in thread
From: Linus Walleij @ 2017-11-05 23:19 UTC (permalink / raw)
  To: Andrew Lunn, Vivien Didelot, Florian Fainelli; +Cc: netdev, Linus Walleij

Hi folks,

I'm working a bit on this. Since DSA is big, complex and hard for
a novice I just wanted to throw what I have in my tree out there
so you can take a look at how I hacked this up and give me some
help how to continue.

I am running it for trials on the D-Link DIR-685 and it looks
fun, but my ethernet driver for Gemini is not yet working so
I cannot really do proper testing. I'll get there I guess.

Example from dmesg:
realtek-smi 0.switch: deasserted RESET
realtek-smi 0.switch: found an RTL8366RB switch
DSA: switch 0 0 parsed
DSA: tree 0 parsed
realtek-smi 0.switch: RTL5937 ver 3 chip found
realtek-smi 0.switch: active low/falling IRQ
realtek-smi 0.switch: set MAC: CE:32:3B:FB:58:13
libphy: dsa slave smi: probed
RTL8366RB Gigabit Ethernet dsa-0.0:00: attached PHY driver [RTL8366RB Gigabit Ethernet] (mii_bus:phy_addr=dsa-0.0:00, irq=37)
RTL8366RB Gigabit Ethernet dsa-0.0:01: attached PHY driver [RTL8366RB Gigabit Ethernet] (mii_bus:phy_addr=dsa-0.0:01, irq=38)
RTL8366RB Gigabit Ethernet dsa-0.0:02: attached PHY driver [RTL8366RB Gigabit Ethernet] (mii_bus:phy_addr=dsa-0.0:02, irq=39)
RTL8366RB Gigabit Ethernet dsa-0.0:03: attached PHY driver [RTL8366RB Gigabit Ethernet] (mii_bus:phy_addr=dsa-0.0:03, irq=40)
RTL8366RB Gigabit Ethernet dsa-0.0:04: attached PHY driver [RTL8366RB Gigabit Ethernet] (mii_bus:phy_addr=dsa-0.0:04, irq=41)
realtek-smi 0.switch: adjust link on CPU port
gmac-gemini 60000000.ethernet eth0: connected to PHY "fixed-0:00"
Generic PHY fixed-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00, irq=POLL)
phy_id=0x00000000, phy_mode=rgmii
gmac-gemini 60000000.ethernet: set GMAC0 and GMAC1 to MII/RGMII mode
gmac-gemini 60000000.ethernet eth0: connect to RGMII
gmac-gemini 60000000.ethernet eth0: opened
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
realtek-smi 0.switch: enable port 0
IPv6: ADDRCONF(NETDEV_UP): lan0: link is not ready
realtek-smi 0.switch lan0: Link is Down
realtek-smi 0.switch lan0: Link is Up - 1Gbps/Full - flow control rx/tx
IPv6: ADDRCONF(NETDEV_CHANGE): lan0: link becomes ready

cat /proc/interrupts
 36:          6  FTGPIO010  15 Level     RTL8366RB
 37:          3  RTL8366RB   0 Edge      dsa-0.0:00
 38:          0  RTL8366RB   1 Edge      dsa-0.0:01
 39:          2  RTL8366RB   2 Edge      dsa-0.0:02
 40:          2  RTL8366RB   3 Edge      dsa-0.0:03
 41:          0  RTL8366RB   4 Edge      dsa-0.0:04

Plugged some cables in/out. Hooray, no polling needed.

Linus Walleij (4):
  RFC: net/dsa: Allow DSA PHYs to define link IRQs
  RFC: net: phy: realtek: Support RTL8366RB variant
  RFC: net: dsa: Add bindings for Realtek SMI DSAs
  RFC: net: dsa: realtek-smi: Add Realtek SMI driver

 .../devicetree/bindings/net/dsa/realtek-smi.txt    |  104 ++
 drivers/net/dsa/Kconfig                            |   12 +
 drivers/net/dsa/Makefile                           |    2 +
 drivers/net/dsa/realtek-smi.c                      |  436 ++++++++
 drivers/net/dsa/realtek-smi.h                      |  145 +++
 drivers/net/dsa/rtl8366.c                          |  493 +++++++++
 drivers/net/dsa/rtl8366rb.c                        | 1103 ++++++++++++++++++++
 drivers/net/phy/realtek.c                          |   32 +
 net/dsa/slave.c                                    |    8 +
 9 files changed, 2335 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
 create mode 100644 drivers/net/dsa/realtek-smi.c
 create mode 100644 drivers/net/dsa/realtek-smi.h
 create mode 100644 drivers/net/dsa/rtl8366.c
 create mode 100644 drivers/net/dsa/rtl8366rb.c

-- 
2.13.6

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2018-04-02 16:10 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-05 23:19 [PATCH 0/4] RFC: Realtek 83xx SMI driver core Linus Walleij
2017-11-05 23:19 ` [PATCH 1/4] RFC: net/dsa: Allow DSA PHYs to define link IRQs Linus Walleij
2017-11-05 23:19 ` [PATCH 2/4] RFC: net: phy: realtek: Support RTL8366RB variant Linus Walleij
2017-11-05 23:19 ` [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs Linus Walleij
2017-11-05 23:48   ` Andrew Lunn
     [not found]     ` <20171105234831.GA24822-g2DYL2Zd6BY@public.gmane.org>
2017-11-29 12:24       ` Linus Walleij
2017-11-29 15:56         ` Andrew Lunn
2017-11-29 21:28           ` Linus Walleij
     [not found]             ` <CACRpkdZVXgFMiHpyUqw7ONYDcq6Htn3rTMRaBJkzd6T3WtX36A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-29 21:48               ` Florian Fainelli
2017-11-29 21:56             ` Andrew Lunn
     [not found]               ` <20171129215659.GC1706-g2DYL2Zd6BY@public.gmane.org>
2017-11-29 23:19                 ` Linus Walleij
2017-11-29 23:26                   ` Florian Fainelli
     [not found]                     ` <f9bfa1e1-7f05-1e2b-6663-09d4d3bf6a12-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-29 23:36                       ` Andrew Lunn
2017-12-02 12:56                     ` Linus Walleij
     [not found]                       ` <CACRpkdYoMVNh8eaTnaDQ59bsh4bC88biLaYSXyhnc4W83PMWzA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-04 22:50                         ` Andrew Lunn
2017-11-05 23:19 ` [PATCH 4/4] RFC: net: dsa: realtek-smi: Add Realtek SMI driver Linus Walleij
2017-11-05 23:59   ` Andrew Lunn
2017-11-06  8:25     ` Linus Walleij
2017-11-09 12:49   ` Roman Yeryomin
2017-11-09 13:24     ` Andrew Lunn
2017-11-09 15:11       ` Roman Yeryomin
2017-11-09 15:38         ` Andrew Lunn
2017-11-09 17:21           ` Roman Yeryomin
2017-11-09 17:24             ` Andrew Lunn
2017-11-09 18:08               ` Florian Fainelli
2017-11-10  8:16                 ` Linus Walleij
2017-11-10 12:05                 ` Roman Yeryomin
2017-11-10 12:02               ` Roman Yeryomin
2017-11-10 13:51                 ` Andrew Lunn
2017-11-10 12:17       ` Egil Hjelmeland
2017-11-10 14:01         ` Andrew Lunn
2018-04-02 16:10 ` [PATCH 0/4] RFC: Realtek 83xx SMI driver core Carl-Daniel Hailfinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.