net: mdio: Add IPQ MDIO reset related function
Subsystems (5)
PATCH v2 3/3 dt-bindings: net: Add the properties for ipq4019 MDIO
In reply to Luo JieThe new added properties resource "reg" is for configuring ethernet LDO in the IPQ5018 chipset, the property "clocks" is for configuring the MDIO clock source frequency.
--- .../bindings/net/qcom,ipq4019-mdio.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml +14 -1
@@ -14,7 +14,9 @@ allOf: properties: compatible: - const: qcom,ipq4019-mdio + enum: + - qcom,ipq4019-mdio + - qcom,ipq5018-mdio "#address-cells": const: 1
@@ -23,7 +25,18 @@ properties: const: 0 reg: + minItems: 1 + maxItems: 2 + description: + the first Address and length of the register set for the MDIO controller. + the second Address and length of the register for ethernet LDO, this second + address range is only required by the platform IPQ50xx. + + clocks: maxItems: 1 + description: | + MDIO clock source frequency fixed to 100MHZ, this clock should be specified + by the platform IPQ807x, IPQ60xx and IPQ50xx. required: - compatible
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v2 2/3 MDIO: Kconfig: Specify more IPQ chipset supported
In reply to Luo JieThe IPQ MDIO driver currently supports the chipset IPQ40xx, IPQ807x, IPQ60xx and IPQ50xx.
Add the compatible 'qcom,ipq5018-mdio' because of ethernet LDO dedicated to the IPQ5018 platform.
--- drivers/net/mdio/Kconfig | 2 +- drivers/net/mdio/mdio-ipq4019.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/net/mdio/Kconfig +1 -1
@@ -172,7 +172,7 @@ config MDIO_IPQ4019 depends on COMMON_CLK help This driver supports the MDIO interface found in Qualcomm - IPQ40xx series Soc-s. + IPQ40xx, IPQ60xx, IPQ807x and IPQ50xx series Soc-s. config MDIO_IPQ8064 tristate "Qualcomm IPQ8064 MDIO interface support"
drivers/net/mdio/mdio-ipq4019.c +1 -0
@@ -262,6 +262,7 @@ static int ipq4019_mdio_remove(struct platform_device *pdev)static const struct of_device_id ipq4019_mdio_dt_ids[] = { { .compatible ="qcom,ipq4019-mdio" }, + { .compatible ="qcom,ipq5018-mdio" }, { } };MODULE_DEVICE_TABLE (of, ipq4019_mdio_dt_ids);
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v2 1/3 net: mdio: Add the reset function for IPQ MDIO driver
In reply to Luo Jie1. configure the MDIO clock source frequency.
2. the LDO resource is needed to configure the ethernet LDO available for CMN_PLL.
--- drivers/net/mdio/Kconfig | 1 + drivers/net/mdio/mdio-ipq4019.c | 47 +++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+)
drivers/net/mdio/Kconfig +1 -0
@@ -169,6 +169,7 @@ config MDIO_OCTEON config MDIO_IPQ4019 tristate "Qualcomm IPQ4019 MDIO interface support" depends on HAS_IOMEM && OF_MDIO + depends on COMMON_CLK help This driver supports the MDIO interface found in Qualcomm IPQ40xx series Soc-s.
drivers/net/mdio/mdio-ipq4019.c +47 -0
80 lines not on this page · raw message
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
v2 cover net: mdio: Add IPQ MDIO reset related function
This patch series add the MDIO reset features, which includes configuring MDIO clock source frequency and indicating CMN_PLL that ethernet LDO has been ready, this ethernet LDO is dedicated in the IPQ5018 platform.
Specify more chipset IPQ40xx, IPQ807x, IPQ60xx and IPQ50xx supported by this MDIO driver.
Changes in v2:
* Addressed review comments (Andrew Lunn).
* Remove the IS_ERR().
* make binding patch part of series.
* document the property 'reg' and 'clock'.
Changes in v1:
* make MDIO_IPQ4019 unchanged for backwards compatibility.
* remove the PHY reset functions
Luo Jie (3):
net: mdio: Add the reset function for IPQ MDIO driver
MDIO: Kconfig: Specify more IPQ chipset supported
dt-bindings: net: Add the properties for ipq4019 MDIO
.../bindings/net/qcom,ipq4019-mdio.yaml | 15 +++++- drivers/net/mdio/Kconfig | 3 +- drivers/net/mdio/mdio-ipq4019.c | 48 +++++++++++++++++++ 3 files changed, 64 insertions(+), 2 deletions(-)
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Andrew Lunn
maintainerRe: [PATCH v2 1/3] net: mdio: Add the reset function for IPQ MDIO driver
In reply to Luo Jiedrivers/net/mdio/mdio-ipq4019.c static int ipq4019_mdio_write(struct mii_bus *bus, int mii_id, int regnum, · line 207
Quoted 5 lines
drivers/net/mdio/mdio-ipq4019.c +5
-0+ ret =clk_prepare_enable (priv->mdio_clk); +if (ret) +return ret; + +return 0 ;
This can be simplified to just:
return clk_prepare_enable(priv->mdio_clk);
AndrewRe: [PATCH v2 2/3] MDIO: Kconfig: Specify more IPQ chipset supported
In reply to Luo JieQuoted 7 lines · Luo Jie
The IPQ MDIO driver currently supports the chipset IPQ40xx, IPQ807x, IPQ60xx and IPQ50xx.
Add the compatible 'qcom,ipq5018-mdio' because of ethernet LDO dedicated to the IPQ5018 platform.
Signed-off-by Luo Jie <[email protected]>
Andrew
Re: [PATCH v2 3/3] dt-bindings: net: Add the properties for ipq4019 MDIO
In reply to Luo JieQuoted 5 lines · Luo Jie
The new added properties resource "reg" is for configuring ethernet LDO in the IPQ5018 chipset, the property "clocks" is for configuring the MDIO clock source frequency.
Signed-off-by Luo Jie <[email protected]>
Andrew
Re: [PATCH v2 1/3] net: mdio: Add the reset function for IPQ MDIO driver
In reply to Andrew LunnQuoted 10 lines · Andrew Lunn
drivers/net/mdio/mdio-ipq4019.c static int ipq4019_mdio_write(struct mii_bus *bus, int mii_id, int regnum, · line 207
Quoted 5 lines
drivers/net/mdio/mdio-ipq4019.c +5
-0+ ret =clk_prepare_enable (priv->mdio_clk); +if (ret) +return ret; + +return 0 ;This can be simplified to just:
return clk_prepare_enable(priv->mdio_clk); Andrew
Thanks Andrew for the comments, will update it in the next patch set.