2024-05-17 05:48:09

by Vineeth Karumanchi

[permalink] [raw]
Subject: [PATCH net-next v2 0/2] net: xilinx_gmii2rgmii: Add clock support

Add input clock support to gmii_to_rgmii IP.
Add "clocks" bindings for the input clock.

Changes in v2:
- remove "clkin" clock name property.

v1 link : https://lore.kernel.org/netdev/[email protected]/

Vineeth Karumanchi (2):
dt-bindings: net: xilinx_gmii2rgmii: Add clock support
net: phy: xilinx-gmii2rgmii: Adopt clock support

.../devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml | 4 ++++
drivers/net/phy/xilinx_gmii2rgmii.c | 7 +++++++
2 files changed, 11 insertions(+)

--
2.34.1



2024-05-17 05:48:29

by Vineeth Karumanchi

[permalink] [raw]
Subject: [PATCH net-next v2 1/2] dt-bindings: net: xilinx_gmii2rgmii: Add clock support

Add input clock support to gmii_to_rgmii IP.
Add "clocks" bindings for the input clock.

Signed-off-by: Vineeth Karumanchi <[email protected]>
---
Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml b/Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml
index 0f781dac6717..672bff6dae28 100644
--- a/Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml
+++ b/Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml
@@ -31,6 +31,9 @@ properties:
phy-handle:
$ref: ethernet-controller.yaml#/properties/phy-handle

+ clocks:
+ description: 200/375 MHz free-running clock is used as input clock.
+
required:
- compatible
- reg
@@ -51,5 +54,6 @@ examples:
compatible = "xlnx,gmii-to-rgmii-1.0";
reg = <8>;
phy-handle = <&phy>;
+ clocks = <&dummy>;
};
};
--
2.34.1


2024-05-17 05:48:48

by Vineeth Karumanchi

[permalink] [raw]
Subject: [PATCH net-next v2 2/2] net: phy: xilinx-gmii2rgmii: Adopt clock support

Add clock support to the gmii_to_rgmii IP.
Make clk optional to keep DTB backward compatibility.

Signed-off-by: Vineeth Karumanchi <[email protected]>
---
drivers/net/phy/xilinx_gmii2rgmii.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c
index 7b1bc5fcef9b..7c51daecf18e 100644
--- a/drivers/net/phy/xilinx_gmii2rgmii.c
+++ b/drivers/net/phy/xilinx_gmii2rgmii.c
@@ -15,6 +15,7 @@
#include <linux/mii.h>
#include <linux/mdio.h>
#include <linux/phy.h>
+#include <linux/clk.h>
#include <linux/of_mdio.h>

#define XILINX_GMII2RGMII_REG 0x10
@@ -85,11 +86,17 @@ static int xgmiitorgmii_probe(struct mdio_device *mdiodev)
struct device *dev = &mdiodev->dev;
struct device_node *np = dev->of_node, *phy_node;
struct gmii2rgmii *priv;
+ struct clk *clkin;

priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;

+ clkin = devm_clk_get_optional_enabled(dev, NULL);
+ if (IS_ERR(clkin))
+ return dev_err_probe(dev, PTR_ERR(clkin),
+ "Failed to get and enable clock from Device Tree\n");
+
phy_node = of_parse_phandle(np, "phy-handle", 0);
if (!phy_node) {
dev_err(dev, "Couldn't parse phy-handle\n");
--
2.34.1


2024-05-17 19:25:55

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH net-next v2 0/2] net: xilinx_gmii2rgmii: Add clock support

On Fri, 17 May 2024 11:17:43 +0530 Vineeth Karumanchi wrote:
> Add input clock support to gmii_to_rgmii IP.
> Add "clocks" bindings for the input clock.

## Form letter - net-next-closed

The merge window for v6.10 has begun and we have already posted our pull
request. Therefore net-next is closed for new drivers, features, code
refactoring and optimizations. We are currently accepting bug fixes only.

Please repost when net-next reopens after May 26th.

RFC patches sent for review only are obviously welcome at any time.

See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle
--
pw-bot: defer


2024-05-19 17:33:43

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH net-next v2 1/2] dt-bindings: net: xilinx_gmii2rgmii: Add clock support

On 17/05/2024 07:47, Vineeth Karumanchi wrote:
> Add input clock support to gmii_to_rgmii IP.
> Add "clocks" bindings for the input clock.

Both sentences look like saying the same... confused.

>
> Signed-off-by: Vineeth Karumanchi <[email protected]>
> ---
> Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml b/Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml
> index 0f781dac6717..672bff6dae28 100644
> --- a/Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml
> +++ b/Documentation/devicetree/bindings/net/xlnx,gmii-to-rgmii.yaml
> @@ -31,6 +31,9 @@ properties:
> phy-handle:
> $ref: ethernet-controller.yaml#/properties/phy-handle
>
> + clocks:
> + description: 200/375 MHz free-running clock is used as input clock.

Missing constraints. Probably you wanted items above description.


Best regards,
Krzysztof