The Gigabit Media Independent Interface (GMII) to Reduced Gigabit Media
Independent Interface (RGMII) core provides the RGMII between RGMII-compliant
Ethernet physical media devices (PHY) and the Gigabit Ethernet controller.
This core can be used in all three modes of operation(10/100/1000 Mb/s).
The Management Data Input/Output (MDIO) interface is used to configure the
Speed of operation. This core can switch dynamically between the three
Different speed modes by configuring the conveter register through mdio write.
The conveter sits b/w the MAC and external phy like below
MACB <==> GMII2RGMII <==> RGMII_PHY
MDIO <========> GMII2RGMII
MCAB <=======>
<========> RGMII
Using MAC MDIO bus we can access both the converter and the external PHY.
We need to program the line speed of the converter during run time based
On the external phy negotiated speed.
This patch series does the below
---> Add mask for Control register 10Mbps speed.
---> Add support for xilinx gmiitorgmii converter.
Kedareswara rao Appana (3):
net: Add mask for Control register 10Mbps speed
Documentation: DT: net: Add Xilinx gmiitorgmii converter device tree
binding documentation
net: phy: Add gmiitorgmii converter support
.../devicetree/bindings/net/xilinx_gmii2rgmii.txt | 38 +++++++
drivers/net/phy/Kconfig | 8 ++
drivers/net/phy/Makefile | 1 +
drivers/net/phy/xilinx_gmii2rgmii.c | 121 +++++++++++++++++++++
include/uapi/linux/mii.h | 1 +
5 files changed, 169 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt
create mode 100644 drivers/net/phy/xilinx_gmii2rgmii.c
--
2.1.2
This patch adds mask for the Control register
10Mbps speed.
Signed-off-by: Kedareswara rao Appana <redacted>
---
Changes for v5:
---> New patch as suggested by Punnaiah.
include/uapi/linux/mii.h | 1 +
1 file changed, 1 insertion(+)
--
2.1.2
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Device-tree binding documentation for xilinx gmiitorgmii converter.
Signed-off-by: Kedareswara rao Appana <redacted>
---
Changes for v5:
---> Fixed Indentation in the example as suggested by Michal.
Changes for v4:
--> Modified compatible as suggested by Rob.
--> Removed underscores from the converter node name as suggested by Rob.
Changes for v3:
--> None.
Changes for v2:
--> New patch.
.../devicetree/bindings/net/xilinx_gmii2rgmii.txt | 38 ++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt
@@ -0,0 +1,38 @@+XILINX GMIITORGMII Converter Driver Device Tree Bindings+--------------------------------------------------------++The Gigabit Media Independent Interface (GMII) to Reduced Gigabit Media+Independent Interface (RGMII) core provides the RGMII between RGMII-compliant+Ethernet physical media devices (PHY) and the Gigabit Ethernet controller.+This core can be used in all three modes of operation(10/100/1000 Mb/s).+The Management Data Input/Output (MDIO) interface is used to configure the+Speed of operation. This core can switch dynamically between the three+Different speed modes by configuring the conveter register through mdio write.++The MDIO is a bus to which the PHY devices are connected. For each+device that exists on this bus, a child node should be created. See+the definition of the PHY node in booting-without-of.txt for an example+of how to define a PHY.++This converter sits between the ethernet MAC and the external phy.+MAC <==> GMII2RGMII <==> RGMII_PHY++Required properties:+- compatible : Should be "xlnx,gmii-to-rgmii-1.0"+- reg : The ID number for the phy, usually a small integer+- phy-handle : Should point to the external phy device.+ See ethernet.txt file in the same directory.++Example:+ mdio {+ #address-cells = <1>;+ #size-cells = <0>;+ phy: ethernet-phy@0 {+ ......+ };+ gmiitorgmii: gmiitorgmii@8 {+ compatible = "xlnx,gmii-to-rgmii-1.0";+ reg = <8>;+ phy-handle = <&phy>;+ };+ };
--
2.1.2
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
This patch adds support for gmiitorgmii converter.
The GMII to RGMII IP core provides the Reduced Gigabit Media
Independent Interface (RGMII) between Ethernet physical media
Devices and the Gigabit Ethernet controller. This core can
Switch dynamically between the three different speed modes of
Operation by configuring the converter register through mdio write.
MDIO interface is used to set operating speed of Ethernet MAC.
This converter sits between the MAC and the external phy
MAC <==> GMII2RGMII <==> RGMII_PHY
Signed-off-by: Kedareswara rao Appana <redacted>
---
Thanks a lot Andrew for your inputs.
Changes for v5:
--> Fixed return values in the probe as suggested by punnaiah.
--> Added a mask for the converter speed as suggested by punnaiah.
Changes for v4:
--> Updated phydev speed for all 3 speeds as suggested by zhuyj.
Changes for v3:
--> Updated the driver as suggested by Andrew.
Changes for v2:
--> Passed struct xphy pointer directly to the fix_mac_speed
API as suggested by the Florian.
--> Added checks for the phy-node fail case as suggested
by the Florian
drivers/net/phy/Kconfig | 8 +++
drivers/net/phy/Makefile | 1 +
drivers/net/phy/xilinx_gmii2rgmii.c | 121 ++++++++++++++++++++++++++++++++++++
3 files changed, 130 insertions(+)
create mode 100644 drivers/net/phy/xilinx_gmii2rgmii.c
On 08/09/2016 02:34 AM, Kedareswara rao Appana wrote:
This patch adds support for gmiitorgmii converter.
The GMII to RGMII IP core provides the Reduced Gigabit Media
Independent Interface (RGMII) between Ethernet physical media
Devices and the Gigabit Ethernet controller. This core can
Switch dynamically between the three different speed modes of
Operation by configuring the converter register through mdio write.
MDIO interface is used to set operating speed of Ethernet MAC.
This converter sits between the MAC and the external phy
MAC <==> GMII2RGMII <==> RGMII_PHY
This looks good, just a few things, see below:
quoted hunk
Signed-off-by: Kedareswara rao Appana <redacted>
---
Thanks a lot Andrew for your inputs.
Changes for v5:
--> Fixed return values in the probe as suggested by punnaiah.
--> Added a mask for the converter speed as suggested by punnaiah.
Changes for v4:
--> Updated phydev speed for all 3 speeds as suggested by zhuyj.
Changes for v3:
--> Updated the driver as suggested by Andrew.
Changes for v2:
--> Passed struct xphy pointer directly to the fix_mac_speed
API as suggested by the Florian.
--> Added checks for the phy-node fail case as suggested
by the Florian
drivers/net/phy/Kconfig | 8 +++
drivers/net/phy/Makefile | 1 +
drivers/net/phy/xilinx_gmii2rgmii.c | 121 ++++++++++++++++++++++++++++++++++++
3 files changed, 130 insertions(+)
create mode 100644 drivers/net/phy/xilinx_gmii2rgmii.c
Don't force that, or at least make the default based on the potential
users/drivers here.
quoted hunk
+ ---help---
+ This driver support xilinx GMII to RGMII IP core it provides
+ the Reduced Gigabit Media Independent Interface(RGMII) between
+ Ethernet physical media devices and the Gigabit Ethernet controller.
+
endif # PHYLIB
config MICREL_KS8995MA
mdio_module_driver() does eliminate a bit of this boilerplate code.
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 08/09/2016 02:34 AM, Kedareswara rao Appana wrote:
This patch adds mask for the Control register
10Mbps speed.
Signed-off-by: Kedareswara rao Appana <redacted>
Reviewed-by: Florian Fainelli <redacted>
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 08/09/2016 02:34 AM, Kedareswara rao Appana wrote:
quoted hunk
Device-tree binding documentation for xilinx gmiitorgmii converter.
Signed-off-by: Kedareswara rao Appana <redacted>
---
Changes for v5:
---> Fixed Indentation in the example as suggested by Michal.
Changes for v4:
--> Modified compatible as suggested by Rob.
--> Removed underscores from the converter node name as suggested by Rob.
Changes for v3:
--> None.
Changes for v2:
--> New patch.
.../devicetree/bindings/net/xilinx_gmii2rgmii.txt | 38 ++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt
@@ -0,0 +1,38 @@+XILINX GMIITORGMII Converter Driver Device Tree Bindings+--------------------------------------------------------++The Gigabit Media Independent Interface (GMII) to Reduced Gigabit Media+Independent Interface (RGMII) core provides the RGMII between RGMII-compliant+Ethernet physical media devices (PHY) and the Gigabit Ethernet controller.+This core can be used in all three modes of operation(10/100/1000 Mb/s).+The Management Data Input/Output (MDIO) interface is used to configure the+Speed of operation. This core can switch dynamically between the three+Different speed modes by configuring the conveter register through mdio write.++The MDIO is a bus to which the PHY devices are connected. For each+device that exists on this bus, a child node should be created. See+the definition of the PHY node in booting-without-of.txt for an example+of how to define a PHY.
I would skip this paragraph which does not really help with
understanding, and just refer to
Documentation/devicetree/bindings/net/phy.txt for examples.
+
+This converter sits between the ethernet MAC and the external phy.
+MAC <==> GMII2RGMII <==> RGMII_PHY
+
+Required properties:
+- compatible : Should be "xlnx,gmii-to-rgmii-1.0"
+- reg : The ID number for the phy, usually a small integer
You would want specify that "reg" property needs to match the one of the
PHY (specified via phy-handle) you are converting to/from for this
"proxy" piece of hardware to work.
If these two have the same "reg" value, is not that going to lead to
duplicate MDIO devices created on the bus, this may work, based on
probing ordering, but seems unusual, you don't really need the "reg"
property here it seems?
+- phy-handle : Should point to the external phy device.
+ See ethernet.txt file in the same directory.
+
+Example:
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ phy: ethernet-phy@0 {
+ ......
+ };
+ gmiitorgmii: gmiitorgmii@8 {
+ compatible = "xlnx,gmii-to-rgmii-1.0";
+ reg = <8>;
+ phy-handle = <&phy>;
+ };
+ };
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 08/09/2016 02:34 AM, Kedareswara rao Appana wrote:
quoted
Device-tree binding documentation for xilinx gmiitorgmii converter.
Signed-off-by: Kedareswara rao Appana <redacted>
---
Changes for v5:
---> Fixed Indentation in the example as suggested by Michal.
Changes for v4:
--> Modified compatible as suggested by Rob.
--> Removed underscores from the converter node name as suggested by Rob.
Changes for v3:
--> None.
Changes for v2:
--> New patch.
.../devicetree/bindings/net/xilinx_gmii2rgmii.txt | 38
++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644
Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt
diff --git
a/Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt
b/Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt
new file mode 100644
index 0000000..5f48793
@@ -0,0 +1,38 @@+XILINX GMIITORGMII Converter Driver Device Tree Bindings+--------------------------------------------------------++The Gigabit Media Independent Interface (GMII) to Reduced Gigabit+Media Independent Interface (RGMII) core provides the RGMII between+RGMII-compliant Ethernet physical media devices (PHY) and the Gigabit
Ethernet controller.
quoted
+This core can be used in all three modes of operation(10/100/1000 Mb/s).
+The Management Data Input/Output (MDIO) interface is used to
+configure the Speed of operation. This core can switch dynamically
+between the three Different speed modes by configuring the conveter
register through mdio write.
quoted
+
+The MDIO is a bus to which the PHY devices are connected. For each
+device that exists on this bus, a child node should be created. See
+the definition of the PHY node in booting-without-of.txt for an
+example of how to define a PHY.
I would skip this paragraph which does not really help with understanding, and
just refer to Documentation/devicetree/bindings/net/phy.txt for examples.
Sure will fix in the next version...
quoted
+
+This converter sits between the ethernet MAC and the external phy.
+MAC <==> GMII2RGMII <==> RGMII_PHY
+
+Required properties:
+- compatible : Should be "xlnx,gmii-to-rgmii-1.0"
+- reg : The ID number for the phy, usually a small integer
You would want specify that "reg" property needs to match the one of the PHY
(specified via phy-handle) you are converting to/from for this "proxy" piece of
hardware to work.
If these two have the same "reg" value, is not that going to lead to duplicate
MDIO devices created on the bus, this may work, based on probing ordering, but
seems unusual, you don't really need the "reg"
property here it seems?
The converter Phy address is different from the external phy address.
Regards,
Kedar.
quoted
+- phy-handle : Should point to the external phy device.
+ See ethernet.txt file in the same directory.
+
+Example:
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ phy: ethernet-phy@0 {
+ ......
+ };
+ gmiitorgmii: gmiitorgmii@8 {
+ compatible = "xlnx,gmii-to-rgmii-1.0";
+ reg = <8>;
+ phy-handle = <&phy>;
+ };
+ };
Don't force that, or at least make the default based on the potential
users/drivers here.
Ok sure will fix in the next version...
quoted
+ ---help---
+ This driver support xilinx GMII to RGMII IP core it provides
+ the Reduced Gigabit Media Independent Interface(RGMII) between
+ Ethernet physical media devices and the Gigabit Ethernet controller.
+
endif # PHYLIB
From: Andrew Lunn <andrew@lunn.ch> Date: 2016-08-15 21:31:10
Signed-off-by: Kedareswara rao Appana <redacted>
---
Thanks a lot Andrew for your inputs.
Changes for v5:
--> Fixed return values in the probe as suggested by punnaiah.
--> Added a mask for the converter speed as suggested by punnaiah.
+/* Xilinx GMII2RGMII Converter driver
+ *
+ * Copyright (C) 2016 Xilinx, Inc.
+ *
+ * Author: Kedareswara rao Appana [off-list ref]
Not cool
https://github.com/lunn/linux/commit/03d375489ceb56e171056f44d0fe9c34ca5a098e
Notice the
Not-Signed-off-by: Andrew Lunn [off-list ref]
and the Copyright i added?
In various emails i gave you the basic idea how this should be done, a
framework of code, and then took your code which did not even compile
and made the core of it work. This is as much my code as your code, so
i expect my Copyright to be kept on this code. And since this is my
code, i need to give a Signed-off-by, which i was not yet ready to
give since the code was not complete or working.
Please put both my Copyright back and Not-Signed-Off-by back and post
the next version as RFC. Once i'm happy this code is O.K, i will give
you a Signed-off-by.
Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signed-off-by: Kedareswara rao Appana <redacted>
---
Thanks a lot Andrew for your inputs.
Changes for v5:
--> Fixed return values in the probe as suggested by punnaiah.
--> Added a mask for the converter speed as suggested by punnaiah.
+/* Xilinx GMII2RGMII Converter driver
+ *
+ * Copyright (C) 2016 Xilinx, Inc.
+ *
+ * Author: Kedareswara rao Appana [off-list ref]
Not cool
https://github.com/lunn/linux/commit/03d375489ceb56e171056f44d0fe9c34ca
5a098e
Notice the
Not-Signed-off-by: Andrew Lunn [off-list ref]
and the Copyright i added?
In various emails i gave you the basic idea how this should be done, a framework
of code, and then took your code which did not even compile and made the core
of it work. This is as much my code as your code, so i expect my Copyright to be
kept on this code. And since this is my code, i need to give a Signed-off-by,
which i was not yet ready to give since the code was not complete or working.
Please put both my Copyright back and Not-Signed-Off-by back and post the
next version as RFC. Once i'm happy this code is O.K, i will give you a Signed-off-
by.
Sorry I should have been included your copyright.
I missed it...
I didn't included your SOF because.
AFAIK without explicit permission of the other person we shouldn't include SOF.
That's why I didn't included your SOF and thanked for your efforts after SOF.
Sorry if my understanding is wrong.
There are few comments for this patch series and I fixed it and sent the v6 version.
V6 version of patch series already got merged on the net-next.
Sent the patch by updating the driver with your copy right
"net: phy: Update copyright info".
Sorry for the noise will fix these type of issues next time onwards...
Regards,
Kedar.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Andrew Lunn <andrew@lunn.ch> Date: 2016-08-16 16:11:01
quoted
https://github.com/lunn/linux/commit/03d375489ceb56e171056f44d0fe9c34ca
5a098e
Notice the
Not-Signed-off-by: Andrew Lunn [off-list ref]
and the Copyright i added?
In various emails i gave you the basic idea how this should be done, a framework
of code, and then took your code which did not even compile and made the core
of it work. This is as much my code as your code, so i expect my Copyright to be
kept on this code. And since this is my code, i need to give a Signed-off-by,
which i was not yet ready to give since the code was not complete or working.
Please put both my Copyright back and Not-Signed-Off-by back and post the
next version as RFC. Once i'm happy this code is O.K, i will give you a Signed-off-
by.
Sorry I should have been included your copyright.
I missed it...
I didn't included your SOF because.
AFAIK without explicit permission of the other person we shouldn't include SOF.
That's why I didn't included your SOF and thanked for your efforts after SOF.
Sorry if my understanding is wrong.
Without a SOB you cannot submit the patch for inclusion at all. You
should however reproduce tags which have been given, i.e. you should
of kept my Not-Signed-Off-by: making it clear i have not yet given
permission for this code to go into mainline.
Andrew