[RFC PATCH net-next 0/5] net: dsa: add support for RTL8365MB-VC
Thread information
[Search the linux-kernel archive]
Alvin Šipraga [this message] ` [RFC PATCH net-next 1/5] net: dsa: realtek-smi: fix mdio_free bug on module unload Alvin Šipraga ` Andrew Lunn ` Alvin Šipraga ` Andrew Lunn ` Linus Walleij ` Alvin Šipraga ` Vladimir Oltean ` Alvin Šipraga ` Vladimir Oltean ` [RFC PATCH net-next 2/5] dt-bindings: net: dsa: realtek-smi: document new compatible rtl8365mb Alvin Šipraga ` Andrew Lunn ` Florian Fainelli ` Rob Herring ` Linus Walleij ` [RFC PATCH net-next 3/5] net: dsa: tag_rtl8_4: add realtek 8 byte protocol 4 tag Alvin Šipraga ` Andrew Lunn ` Alvin Šipraga ` Andrew Lunn ` Alvin Šipraga ` Vladimir Oltean ` Alvin Šipraga ` Vladimir Oltean ` Alvin Šipraga ` Vladimir Oltean ` Alvin Šipraga ` Vladimir Oltean ` [RFC PATCH net-next 4/5] net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC Alvin Šipraga ` Vladimir Oltean ` Alvin Šipraga ` Vladimir Oltean ` Alvin Šipraga ` Vladimir Oltean ` Alvin Šipraga ` Vladimir Oltean ` Alvin Šipraga ` Andrew Lunn ` Alvin Šipraga ` Linus Walleij ` Andrew Lunn ` Alvin Šipraga ` Andrew Lunn ` Alvin Šipraga ` DENG Qingfang ` Alvin Šipraga ` [RFC PATCH net-next 5/5] net: phy: realtek: add support for RTL8365MB-VC internal PHYs Alvin Šipraga ` Florian Fainelli ` Linus Walleij
| From: | Alvin Šipraga <alvin-AT-pqrs.dk> | |
| To: | Linus Walleij <linus.walleij-AT-linaro.org>, Andrew Lunn <andrew-AT-lunn.ch>, Vivien Didelot <vivien.didelot-AT-gmail.com>, Florian Fainelli <f.fainelli-AT-gmail.com>, Vladimir Oltean <olteanv-AT-gmail.com>, "David S. Miller" <davem-AT-davemloft.net>, Jakub Kicinski <kuba-AT-kernel.org>, Rob Herring <robh+dt-AT-kernel.org>, Heiner Kallweit <hkallweit1-AT-gmail.com>, Russell King <linux-AT-armlinux.org.uk> | |
| Subject: | [RFC PATCH net-next 0/5] net: dsa: add support for RTL8365MB-VC | |
| Date: | Sun, 22 Aug 2021 21:31:38 +0200 | |
| Message-ID: | <20210822193145.1312668-1-alvin@pqrs.dk> | |
| Cc: | mir-AT-bang-olufsen.dk, alvin-AT-pqrs.dk, Alvin Šipraga <alsi-AT-bang-olufsen.dk>, netdev-AT-vger.kernel.org, devicetree-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org |
From: Alvin Šipraga <alsi@bang-olufsen.dk>
This series adds support for Realtek's RTL8365MB-VC, a 4+1 port
10/100/1000M Ethernet switch. The driver - rtl8365mb - was developed by
Michael Ramussen and myself.
Summary of patches:
- The first patch in the series is a bugfix in realtek-smi which I
found when writing the new rtl8365mb subdriver and building
realtek-smi as a module. If desired, I can spin it off into a
separate patch and target it for net (not net-next).
- The second patch updates the dt-bindings for the new compatible
string.
- The third patch adds the 8 byte tag protocol driver.
- The fourth patch adds the rtl8365mb subdriver - the main feature of
this patch series.
- The fifth patch adds a PHY driver for the internal PHYs found in the
RTL8365MB-VC. This is not strictly necessary for the rtl8365mb
driver to work, but it avoids using the poll-only Generic PHY driver
directly by hooking into the IRQs made available by the switch
driver.
This is my first time in the DSA subsystem, so I am submitting this as
an RFC patch series for now. Apologies if I have made some terrible
mistakes along the way. All feedback - no matter how minor - is thus
very welcome.
There is a lot more work that can be done on this driver, particularly
when it comes to offloading certain DSA features to the hardware. I
intend to revisit this later when I have more time. In the mean time,
the driver seems to be in a good enough state for upstream submission.
Finally, there is an outstanding issue in probing the PHY driver when
fw_devlink=on. This seems to be a generic problem with DSA drivers which
create a dependency between an internal interrupt-controller and child
PHY nodes, realtek-smi being one of them. See [1] for an ongoing
discussion about that. Since this seems to be an existing problem and
not unique to this new driver, I hope that it will not impede the
upstreaming of this patch series.
[1] https://lore.kernel.org/netdev/cd0d9c40-d07b-e2ab-b068-d0...
Alvin Šipraga (5):
net: dsa: realtek-smi: fix mdio_free bug on module unload
dt-bindings: net: dsa: realtek-smi: document new compatible rtl8365mb
net: dsa: tag_rtl8_4: add realtek 8 byte protocol 4 tag
net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC
net: phy: realtek: add support for RTL8365MB-VC internal PHYs
.../bindings/net/dsa/realtek-smi.txt | 1 +
drivers/net/dsa/Kconfig | 1 +
drivers/net/dsa/Makefile | 2 +-
drivers/net/dsa/realtek-smi-core.c | 10 +
drivers/net/dsa/realtek-smi-core.h | 2 +
drivers/net/dsa/rtl8365mb.c | 2124 +++++++++++++++++
drivers/net/dsa/rtl8366rb.c | 8 +
drivers/net/phy/realtek.c | 8 +
include/net/dsa.h | 2 +
net/dsa/Kconfig | 6 +
net/dsa/Makefile | 1 +
net/dsa/tag_rtl8_4.c | 178 ++
12 files changed, 2342 insertions(+), 1 deletion(-)
create mode 100644 drivers/net/dsa/rtl8365mb.c
create mode 100644 net/dsa/tag_rtl8_4.c
--
2.32.0
