net: stmmac: add SL2610 ethernet support
Subsystems (5)
v2 cover net: stmmac: add SL2610 ethernet support
This series add SL2610 ethernet support.
since v1:
- switch to one MDIO bus solution instead of MDIO demultiplexer
- remove patches to add eth nodes to dtsi and enable eth for rdk. They will be send separately
- add constraints for interrupts, clocks, resets and so on
- update dt-bindings example
- use .set_phy_intf_sel()
- use PHY_INTF_SEL_RGMII and PHY_INTF_SEL_RMII
A consolidated MAINTAINERS update will follow once the subsystem series have merged, avoiding overlapping changes to the Synaptics entry.
Jisheng Zhang (2):
dt-bindings: net: Add Synaptics SL2610 DWMAC
net: stmmac: Add glue layer for Synaptics SL2610 SoC
.../devicetree/bindings/net/snps,dwmac.yaml | 1 + .../bindings/net/syna,sl2610-dwmac.yaml | 128 ++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/Kconfig | 11 ++ drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + .../net/ethernet/stmicro/stmmac/dwmac-syna.c | 141 ++++++++++++++++++ 5 files changed, 282 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
Signature · 1 line
2.55.0
PATCH v2 1/2 dt-bindings: net: Add Synaptics SL2610 DWMAC
Describe the Synaptics SL2610 integration of DWMAC 5.20. The PHY interface mode and the routing of the shared MDC/MDIO signals are controlled through system-controller registers.
Add the compatible to the common DWMAC schema and show a PHY connected to MAC1's MDIO bus in the example.
--- .../devicetree/bindings/net/snps,dwmac.yaml | 1 + .../bindings/net/syna,sl2610-dwmac.yaml | 128 ++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml
Documentation/devicetree/bindings/net/snps,dwmac.yaml +1 -0
@@ -119,6 +119,7 @@ properties: - sophgo,sg2044-dwmac - starfive,jh7100-dwmac - starfive,jh7110-dwmac + - syna,sl2610-dwmac - tesla,fsd-ethqos - thead,th1520-gmac - ultrarisc,dp1000-gmac
Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml new file +128 -0
128 lines not on this page · raw message
MAINTAINERS +1 -0
@@ -3807,6 +3807,7 @@ M: Jisheng Zhang <[email protected]> M: Sebastian Hesselbarth <[email protected]> L: [email protected] (moderated for non-subscribers) S: Maintained +F: Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml F: arch/arm/boot/dts/synaptics/ F: arch/arm/mach-berlin/ F: arch/arm64/boot/dts/synaptics/
Signature · 1 line
2.55.0
Rob Herring (Arm)
maintainerRe: [PATCH net-next v2 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC
Quoted 7 lines · Jisheng Zhang
Describe the Synaptics SL2610 integration of DWMAC 5.20. The PHY interface mode and the routing of the shared MDC/MDIO signals are controlled through system-controller registers.
Add the compatible to the common DWMAC schema and show a PHY connected to MAC1's MDIO bus in the example.
Quoted 7 lines
Signed-off-by Jisheng Zhang <[email protected]>--- .../devicetree/bindings/net/snps,dwmac.yaml | 1 + .../bindings/net/syna,sl2610-dwmac.yaml | 128 ++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:Documentation/devicetree/bindings/net/syna,sl2610-dwmac.example.dts:24:18: fatal error: dt-bindings/clock/syna,sl2610.h: No such file or directory
24 | #include <dt-bindings/clock/syna,sl2610.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.dtbs:140: Documentation/devicetree/bindings/net/syna,sl2610-dwmac.example.dtb] Error 1 make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/linux-dt-review/Makefile:1726: dt_binding_check] Error 2
make: *** [Makefile:248: __sub-make] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
PATCH v2 2/2 net: stmmac: Add glue layer for Synaptics SL2610 SoC
In reply to Jisheng ZhangAdd dwmac glue driver to support the DesignWare-based GMAC controllers in the Synaptics SL2610 SoC.
--- drivers/net/ethernet/stmicro/stmmac/Kconfig | 11 ++ drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + .../net/ethernet/stmicro/stmmac/dwmac-syna.c | 141 ++++++++++++++++++ 3 files changed, 153 insertions(+) create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
MAINTAINERS +1 -0
@@ -3811,6 +3811,7 @@ F: Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml F: arch/arm/boot/dts/synaptics/ F: arch/arm/mach-berlin/ F: arch/arm64/boot/dts/synaptics/ +F: drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c ARM/TEGRA HDMI CEC SUBSYSTEM SUPPORT M: Hans Verkuil <[email protected]>
drivers/net/ethernet/stmicro/stmmac/Kconfig +11 -0
@@ -310,6 +310,17 @@ config DWMAC_SUN55I stmmac device driver. This driver is used for A523/T527 GMAC200 ethernet controller. +config DWMAC_SYNA + tristate "Synaptics SL2610 DWMAC support" + depends on OF && HAS_DMA && (ARCH_BERLIN || COMPILE_TEST) + select MFD_SYSCON + help + Support for the Synaptics SL2610 DesignWare Ethernet MAC glue. + This configures the PHY interface through the system controller. + + To compile this driver as a module, choose M here. The module + will be called dwmac-syna. + config DWMAC_THEAD tristate "T-HEAD dwmac support" depends on OF && (ARCH_THEAD || COMPILE_TEST)
drivers/net/ethernet/stmicro/stmmac/Makefile +1 -0
@@ -35,6 +35,7 @@ obj-$(CONFIG_DWMAC_STM32) += dwmac-stm32.o obj-$(CONFIG_DWMAC_SUNXI) += dwmac-sunxi.o obj-$(CONFIG_DWMAC_SUN8I) += dwmac-sun8i.o obj-$(CONFIG_DWMAC_SUN55I) += dwmac-sun55i.o +obj-$(CONFIG_DWMAC_SYNA) += dwmac-syna.o obj-$(CONFIG_DWMAC_THEAD) += dwmac-thead.o obj-$(CONFIG_DWMAC_ULTRARISC) += dwmac-ultrarisc.o obj-$(CONFIG_DWMAC_DWC_QOS_ETH) += dwmac-dwc-qos-eth.o
drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c new file +141 -0
141 lines not on this page · raw message
Signature · 1 line
2.55.0
Re: [PATCH net-next v2 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC
drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c line 66
Quoted 9 lines
drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c new file +9
-0+static int syna_dwmac_init (struct device *dev,void *priv) +{ +struct syna_dwmac *dwmac = priv; +u32 mdio_sel; + +/* Only the MAC providing the shared MDIO bus selects its master. */ +if (!dwmac->plat->mdio_node || + !of_device_is_available (dwmac->plat->mdio_node)) +return 0 ;
I think it would be good to have some sort of validation here, that if both MACs have an available mdio node, the probe of the second one fails with EINVAL and an error messages.
Andrew