2022-09-29 01:50:39

by Jianguo Zhang

[permalink] [raw]
Subject: [PATCH v7 0/4] Mediatek ethernet patches for mt8188

Changes in v7:

v7:
1) Add 'Reviewed-by: AngeloGioacchino Del Regno
<[email protected]>' info in commit message of
patch 'dt-bindings: net: snps,dwmac: add new property snps,clk-csr',
'arm64: dts: mediatek: mt2712e: Update the name of property 'clk_csr''
and 'net: stmmac: add a parse for new property 'snps,clk-csr''.

v6:
1) Update commit message of patch 'dt-bindings: net: snps,dwmac: add new property snps,clk-csr'
2) Add a parse for new property 'snps,clk-csr' in patch
'net: stmmac: add a parse for new property 'snps,clk-csr''

v5:
1) Rename the property 'clk_csr' as 'snps,clk-csr' in binding
file as Krzysztof Kozlowski'comment.
2) Add DTS patch 'arm64: dts: mediatek: mt2712e: Update the name of property 'clk_csr''
as Krzysztof Kozlowski'comment.
3) Add driver patch 'net: stmmac: Update the name of property 'clk_csr''
as Krzysztof Kozlowski'comment.

v4:
1) Update the commit message of patch 'dt-bindings: net: snps,dwmac: add clk_csr property'
as Krzysztof Kozlowski'comment.

v3:
1) List the names of SoCs mt8188 and mt8195 in correct order as
AngeloGioacchino Del Regno's comment.
2) Add patch version info as Krzysztof Kozlowski'comment.

v2:
1) Delete patch 'stmmac: dwmac-mediatek: add support for mt8188' as
Krzysztof Kozlowski's comment.
2) Update patch 'dt-bindings: net: mediatek-dwmac: add support for
mt8188' as Krzysztof Kozlowski's comment.
3) Add clk_csr property to fix warning ('clk_csr' was unexpected) when
runnig 'make dtbs_check'.

v1:
1) Add ethernet driver entry for mt8188.
2) Add binding document for ethernet on mt8188.


Jianguo Zhang (4):
dt-bindings: net: mediatek-dwmac: add support for mt8188
dt-bindings: net: snps,dwmac: add new property snps,clk-csr
arm64: dts: mediatek: mt2712e: Update the name of property 'clk_csr'
net: stmmac: add a parse for new property 'snps,clk-csr'

.../devicetree/bindings/net/mediatek-dwmac.yaml | 10 ++++++++--
Documentation/devicetree/bindings/net/snps,dwmac.yaml | 5 +++++
arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 2 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 ++-
4 files changed, 16 insertions(+), 4 deletions(-)

--
2.25.1



2022-09-29 01:50:51

by Jianguo Zhang

[permalink] [raw]
Subject: [PATCH v7 2/4] dt-bindings: net: snps,dwmac: add new property snps,clk-csr

Add description for new property snps,clk-csr in binding file

Signed-off-by: Jianguo Zhang <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
---
Documentation/devicetree/bindings/net/snps,dwmac.yaml | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 491597c02edf..4d5a56661322 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -288,6 +288,11 @@ properties:
is supported. For example, this is used in case of SGMII and
MAC2MAC connection.

+ snps,clk-csr:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Frequency division factor for MDC clock.
+
mdio:
$ref: mdio.yaml#
unevaluatedProperties: false
--
2.25.1

2022-09-29 01:50:58

by Jianguo Zhang

[permalink] [raw]
Subject: [PATCH v7 4/4] net: stmmac: add a parse for new property 'snps,clk-csr'

Parse new property 'snps,clk-csr' firstly because the new property
is documented in binding file, if failed, fall back to old property
'clk_csr' for legacy case

Signed-off-by: Jianguo Zhang <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 9f5cac4000da..3db6cb0b6124 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -444,7 +444,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
* or get clk_csr from device tree.
*/
plat->clk_csr = -1;
- of_property_read_u32(np, "clk_csr", &plat->clk_csr);
+ if (of_property_read_u32(np, "snps,clk-csr", &plat->clk_csr))
+ of_property_read_u32(np, "clk_csr", &plat->clk_csr);

/* "snps,phy-addr" is not a standard property. Mark it as deprecated
* and warn of its use. Remove this when phy node support is added.
--
2.25.1

2022-09-29 01:58:35

by Jianguo Zhang

[permalink] [raw]
Subject: [PATCH v7 1/4] dt-bindings: net: mediatek-dwmac: add support for mt8188

Add binding document for the ethernet on mt8188

Signed-off-by: Jianguo Zhang <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
.../devicetree/bindings/net/mediatek-dwmac.yaml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
index 61b2fb9e141b..0fa2132fa4f4 100644
--- a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
@@ -19,6 +19,7 @@ select:
contains:
enum:
- mediatek,mt2712-gmac
+ - mediatek,mt8188-gmac
- mediatek,mt8195-gmac
required:
- compatible
@@ -37,6 +38,11 @@ properties:
- enum:
- mediatek,mt8195-gmac
- const: snps,dwmac-5.10a
+ - items:
+ - enum:
+ - mediatek,mt8188-gmac
+ - const: mediatek,mt8195-gmac
+ - const: snps,dwmac-5.10a

clocks:
minItems: 5
@@ -74,7 +80,7 @@ properties:
or will round down. Range 0~31*170.
For MT2712 RMII/MII interface, Allowed value need to be a multiple of 550,
or will round down. Range 0~31*550.
- For MT8195 RGMII/RMII/MII interface, Allowed value need to be a multiple of 290,
+ For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value need to be a multiple of 290,
or will round down. Range 0~31*290.

mediatek,rx-delay-ps:
@@ -84,7 +90,7 @@ properties:
or will round down. Range 0~31*170.
For MT2712 RMII/MII interface, Allowed value need to be a multiple of 550,
or will round down. Range 0~31*550.
- For MT8195 RGMII/RMII/MII interface, Allowed value need to be a multiple
+ For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value need to be a multiple
of 290, or will round down. Range 0~31*290.

mediatek,rmii-rxc:
--
2.25.1

2022-09-29 02:22:53

by Jianguo Zhang

[permalink] [raw]
Subject: [PATCH v7 3/4] arm64: dts: mediatek: mt2712e: Update the name of property 'clk_csr'

Update the name of property 'clk_csr' as 'snps,clk-csr' to align with
the property name in the binding file.

Signed-off-by: Jianguo Zhang <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi
index 4797537cb368..e6d7453e56e0 100644
--- a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi
@@ -756,7 +756,7 @@ eth: ethernet@1101c000 {
snps,mtl-tx-config = <&mtl_tx_setup>;
snps,txpbl = <1>;
snps,rxpbl = <1>;
- clk_csr = <0>;
+ snps,clk-csr = <0>;
status = "disabled";
};

--
2.25.1

2022-09-30 12:26:22

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH v7 0/4] Mediatek ethernet patches for mt8188

Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <[email protected]>:

On Thu, 29 Sep 2022 09:47:54 +0800 you wrote:
> Changes in v7:
>
> v7:
> 1) Add 'Reviewed-by: AngeloGioacchino Del Regno
> <[email protected]>' info in commit message of
> patch 'dt-bindings: net: snps,dwmac: add new property snps,clk-csr',
> 'arm64: dts: mediatek: mt2712e: Update the name of property 'clk_csr''
> and 'net: stmmac: add a parse for new property 'snps,clk-csr''.
>
> [...]

Here is the summary with links:
- [v7,1/4] dt-bindings: net: mediatek-dwmac: add support for mt8188
https://git.kernel.org/netdev/net-next/c/c827b7a3fed5
- [v7,2/4] dt-bindings: net: snps,dwmac: add new property snps,clk-csr
https://git.kernel.org/netdev/net-next/c/22ba1afdec08
- [v7,3/4] arm64: dts: mediatek: mt2712e: Update the name of property 'clk_csr'
https://git.kernel.org/netdev/net-next/c/7871785ce92d
- [v7,4/4] net: stmmac: add a parse for new property 'snps,clk-csr'
https://git.kernel.org/netdev/net-next/c/83936ea8d8ad

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html