mbox series

[net-next,00/13,v3] net: dsa: realtek: MDIO interface and RTL8367S

Message ID 20211231043306.12322-1-luizluca@gmail.com (mailing list archive)
Headers show
Series net: dsa: realtek: MDIO interface and RTL8367S | expand

Message

Luiz Angelo Daros de Luca Dec. 31, 2021, 4:32 a.m. UTC
The old realtek-smi driver was linking subdrivers into a single
realtek-smi.ko After this series, each subdriver will be an independent
module required by either realtek-smi (platform driver) or the new
realtek-mdio (mdio driver). Both interface drivers (SMI or MDIO) are
independent, and they might even work side-by-side, although it will be
difficult to find such device. The subdriver can be individually
selected but only at buildtime, saving some storage space for custom
embedded systems.

Existing realtek-smi devices continue to work untouched during the
tests. The realtek-smi was moved into a realtek subdirectory, but it
normally does not break things.

I couldn't identify a fixed relation between port numbers (0..9) and
external interfaces (0..2), and I'm not sure if it is fixed for each
chip version or a device configuration. Until there is more info about
it, there is a new port property "realtek,ext-int" that can inform the
external interface.

The rtl8365mb might now handle multiple CPU ports and extint ports not
used as CPU ports. RTL8367S has an SGMII external interface, but my test
device (TP-Link Archer C5v4) uses only the second RGMII interface. We
need a test device with more external ports to test these features.
The driver still cannot handle SGMII ports.

The rtl8365mb was tested with a MDIO-connected RTL8367S (TP-Link Acher
C5v4) and a SMI-connected RTL8365MB-VC switch (Asus RT-AC88U)

The rtl8366rb subdriver was not tested with this patch series, but it
was only slightly touched. It would be nice to test it, especially in an
MDIO-connected switch.

Best,

Luiz

Changelog:

v1-v2)
- formatting fixes
- dropped the rtl8365mb->rtl8367c rename
- other suggestions
	
v2-v3)
* realtek-mdio.c:
  - cleanup realtek-mdio.c (BUG_ON, comments and includes)   
  - check devm_regmap_init return code
  - removed realtek,rtl8366s string from realtek-mdio
* realtek-smi.c:
  - removed void* type cast
* rtl8365mb.c:
  - using macros to identify EXT interfaces
  - rename some extra extport->extint cases
  - allow extint as non cpu (not tested)
  - allow multple cpu ports (not tested)
  - dropped cpu info from struct rtl8365mb
* dropped dt-bindings changes (dealing outside this series)
* formatting issues fixed

Comments

Jakub Kicinski Jan. 1, 2022, 2:30 a.m. UTC | #1
On Fri, 31 Dec 2021 01:32:55 -0300 Luiz Angelo Daros de Luca wrote:
> Subject: [PATCH net-next 00/13 v3] net: dsa: realtek: MDIO interface and RTL8367S

Would you mind reposting with the subject fixed? It says 00/13 even
though there is only 11 patches. That confuses patchwork into expecting
13 patches and considering the series incomplete.
Luiz Angelo Daros de Luca Jan. 1, 2022, 6:49 p.m. UTC | #2
> On Fri, 31 Dec 2021 01:32:55 -0300 Luiz Angelo Daros de Luca wrote:
> > Subject: [PATCH net-next 00/13 v3] net: dsa: realtek: MDIO interface and RTL8367S
>
> Would you mind reposting with the subject fixed? It says 00/13 even
> though there is only 11 patches. That confuses patchwork into expecting
> 13 patches and considering the series incomplete.

Thanks Jakub. Sorry for the noise. I'll resend a v4 tomorrow with the
cover letter fixed (and any received Reviewed-by).
There is another missing static that the kernel bot reported.

Luiz,