* [PATCH net-next v1 1/2] dt-bindings: net: meson-dwmac: add support for the Meson8m2 SoC
2018-03-29 23:00 [PATCH net-next v1 0/2] Meson8m2 support for dwmac-meson8b Martin Blumenstingl
@ 2018-03-29 23:00 ` Martin Blumenstingl
2018-03-29 23:00 ` [PATCH net-next v1 2/2] net: stmmac: dwmac-meson8b: Add " Martin Blumenstingl
2018-04-01 1:57 ` [PATCH net-next v1 0/2] Meson8m2 support for dwmac-meson8b David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Martin Blumenstingl @ 2018-03-29 23:00 UTC (permalink / raw)
To: robh+dt, mark.rutland, netdev, linux-amlogic, davem
Cc: carlo, khilman, Martin Blumenstingl
The Meson8m2 SoC uses a similar (potentially even identical) register
layout for the dwmac glue as Meson8b and GXBB. Unfortunately there is no
documentation available.
Testing shows that both, RMII and RGMII PHYs are working if they are
configured as on Meson8b. Add a new compatible string to the
documentation so differences (if there are any) between Meson8m2 and the
other SoCs can be taken care of within the driver.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
Documentation/devicetree/bindings/net/meson-dwmac.txt | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/meson-dwmac.txt b/Documentation/devicetree/bindings/net/meson-dwmac.txt
index 354dd9896bb5..61cada22ae6c 100644
--- a/Documentation/devicetree/bindings/net/meson-dwmac.txt
+++ b/Documentation/devicetree/bindings/net/meson-dwmac.txt
@@ -9,6 +9,7 @@ Required properties on all platforms:
- compatible: Depending on the platform this should be one of:
- "amlogic,meson6-dwmac"
- "amlogic,meson8b-dwmac"
+ - "amlogic,meson8m2-dwmac"
- "amlogic,meson-gxbb-dwmac"
Additionally "snps,dwmac" and any applicable more
detailed version number described in net/stmmac.txt
@@ -19,13 +20,13 @@ Required properties on all platforms:
configuration (for example the PRG_ETHERNET register range
on Meson8b and newer)
-Required properties on Meson8b and newer:
+Required properties on Meson8b, Meson8m2, GXBB and newer:
- clock-names: Should contain the following:
- "stmmaceth" - see stmmac.txt
- "clkin0" - first parent clock of the internal mux
- "clkin1" - second parent clock of the internal mux
-Optional properties on Meson8b and newer:
+Optional properties on Meson8b, Meson8m2, GXBB and newer:
- amlogic,tx-delay-ns: The internal RGMII TX clock delay (provided
by this driver) in nanoseconds. Allowed values
are: 0ns, 2ns, 4ns, 6ns.
--
2.16.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-next v1 2/2] net: stmmac: dwmac-meson8b: Add support for the Meson8m2 SoC
2018-03-29 23:00 [PATCH net-next v1 0/2] Meson8m2 support for dwmac-meson8b Martin Blumenstingl
2018-03-29 23:00 ` [PATCH net-next v1 1/2] dt-bindings: net: meson-dwmac: add support for the Meson8m2 SoC Martin Blumenstingl
@ 2018-03-29 23:00 ` Martin Blumenstingl
2018-04-01 1:57 ` [PATCH net-next v1 0/2] Meson8m2 support for dwmac-meson8b David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Martin Blumenstingl @ 2018-03-29 23:00 UTC (permalink / raw)
To: robh+dt, mark.rutland, netdev, linux-amlogic, davem
Cc: carlo, khilman, Martin Blumenstingl
The Meson8m2 SoC uses a similar (potentially even identical) register
layout as the Meson8b and GXBB SoCs for the dwmac glue.
Add a new compatible string and update the module description to
indicate support for these SoCs.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
index 2d5d4aea3bcb..7cb794094a70 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
@@ -1,5 +1,5 @@
/*
- * Amlogic Meson8b and GXBB DWMAC glue layer
+ * Amlogic Meson8b, Meson8m2 and GXBB DWMAC glue layer
*
* Copyright (C) 2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
*
@@ -318,6 +318,7 @@ static int meson8b_dwmac_probe(struct platform_device *pdev)
static const struct of_device_id meson8b_dwmac_match[] = {
{ .compatible = "amlogic,meson8b-dwmac" },
+ { .compatible = "amlogic,meson8m2-dwmac" },
{ .compatible = "amlogic,meson-gxbb-dwmac" },
{ }
};
@@ -335,5 +336,5 @@ static struct platform_driver meson8b_dwmac_driver = {
module_platform_driver(meson8b_dwmac_driver);
MODULE_AUTHOR("Martin Blumenstingl <martin.blumenstingl@googlemail.com>");
-MODULE_DESCRIPTION("Amlogic Meson8b and GXBB DWMAC glue layer");
+MODULE_DESCRIPTION("Amlogic Meson8b, Meson8m2 and GXBB DWMAC glue layer");
MODULE_LICENSE("GPL v2");
--
2.16.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next v1 0/2] Meson8m2 support for dwmac-meson8b
2018-03-29 23:00 [PATCH net-next v1 0/2] Meson8m2 support for dwmac-meson8b Martin Blumenstingl
2018-03-29 23:00 ` [PATCH net-next v1 1/2] dt-bindings: net: meson-dwmac: add support for the Meson8m2 SoC Martin Blumenstingl
2018-03-29 23:00 ` [PATCH net-next v1 2/2] net: stmmac: dwmac-meson8b: Add " Martin Blumenstingl
@ 2018-04-01 1:57 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-04-01 1:57 UTC (permalink / raw)
To: martin.blumenstingl
Cc: robh+dt, mark.rutland, netdev, linux-amlogic, carlo, khilman
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: Fri, 30 Mar 2018 01:00:33 +0200
> The Meson8m2 SoC is an updated version of the Meson8 SoC. Some of the
> peripherals are shared with Meson8b (for example the watchdog registers
> and the internal temperature sensor calibration procedure).
> Meson8m2 also seems to include the same Gigabit MAC register layout as
> Meson8b.
>
> The registers in the Amlogic dwmac "glue" seem identical between Meson8b
> and Meson8m2. Manual testing seems to confirm this.
>
> To be extra-safe a new compatible string is added because there's no
> (public) documentation on the Meson8m2 SoC. This will allow us to
> implement any SoC-specific variations later on (if needed).
Series applied, thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread