LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2] clk: qcom: clk-rpm: add missing rpm clk for ipq806x
[not found] <robh@kernel.org>
@ 2020-02-26 21:48 ` Ansuel Smith
2020-03-03 14:59 ` Rob Herring
2020-03-04 21:38 ` [PATCH v9 1/2] net: mdio: add ipq8064 mdio driver Ansuel Smith
1 sibling, 1 reply; 10+ messages in thread
From: Ansuel Smith @ 2020-02-26 21:48 UTC (permalink / raw)
Cc: Ansuel Smith, John Crispin, Andy Gross, Bjorn Andersson,
Michael Turquette, Stephen Boyd, Rob Herring, Mark Rutland,
linux-arm-msm, linux-clk, devicetree, linux-kernel
Add missing definition of rpm clk for ipq806x soc
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Acked-by: John Crispin <john@phrozen.org>
---
.../devicetree/bindings/clock/qcom,rpmcc.txt | 1 +
drivers/clk/qcom/clk-rpm.c | 35 +++++++++++++++++++
include/dt-bindings/clock/qcom,rpmcc.h | 4 +++
3 files changed, 40 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt b/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt
index 944719bd586f..4bb2cbeff2b4 100644
--- a/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt
+++ b/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt
@@ -15,6 +15,7 @@ Required properties :
"qcom,rpmcc-msm8916", "qcom,rpmcc"
"qcom,rpmcc-msm8974", "qcom,rpmcc"
"qcom,rpmcc-apq8064", "qcom,rpmcc"
+ "qcom,rpmcc-ipq806x", "qcom,rpmcc"
"qcom,rpmcc-msm8996", "qcom,rpmcc"
"qcom,rpmcc-msm8998", "qcom,rpmcc"
"qcom,rpmcc-qcs404", "qcom,rpmcc"
diff --git a/drivers/clk/qcom/clk-rpm.c b/drivers/clk/qcom/clk-rpm.c
index 9e3110a71f12..f71d228fd6bd 100644
--- a/drivers/clk/qcom/clk-rpm.c
+++ b/drivers/clk/qcom/clk-rpm.c
@@ -543,10 +543,45 @@ static const struct rpm_clk_desc rpm_clk_apq8064 = {
.num_clks = ARRAY_SIZE(apq8064_clks),
};
+/* ipq806x */
+DEFINE_CLK_RPM(ipq806x, afab_clk, afab_a_clk, QCOM_RPM_APPS_FABRIC_CLK);
+DEFINE_CLK_RPM(ipq806x, cfpb_clk, cfpb_a_clk, QCOM_RPM_CFPB_CLK);
+DEFINE_CLK_RPM(ipq806x, daytona_clk, daytona_a_clk, QCOM_RPM_DAYTONA_FABRIC_CLK);
+DEFINE_CLK_RPM(ipq806x, ebi1_clk, ebi1_a_clk, QCOM_RPM_EBI1_CLK);
+DEFINE_CLK_RPM(ipq806x, sfab_clk, sfab_a_clk, QCOM_RPM_SYS_FABRIC_CLK);
+DEFINE_CLK_RPM(ipq806x, sfpb_clk, sfpb_a_clk, QCOM_RPM_SFPB_CLK);
+DEFINE_CLK_RPM(ipq806x, nss_fabric_0_clk, nss_fabric_0_a_clk, QCOM_RPM_NSS_FABRIC_0_CLK);
+DEFINE_CLK_RPM(ipq806x, nss_fabric_1_clk, nss_fabric_1_a_clk, QCOM_RPM_NSS_FABRIC_1_CLK);
+
+static struct clk_rpm *ipq806x_clks[] = {
+ [RPM_APPS_FABRIC_CLK] = &ipq806x_afab_clk,
+ [RPM_APPS_FABRIC_A_CLK] = &ipq806x_afab_a_clk,
+ [RPM_CFPB_CLK] = &ipq806x_cfpb_clk,
+ [RPM_CFPB_A_CLK] = &ipq806x_cfpb_a_clk,
+ [RPM_DAYTONA_FABRIC_CLK] = &ipq806x_daytona_clk,
+ [RPM_DAYTONA_FABRIC_A_CLK] = &ipq806x_daytona_a_clk,
+ [RPM_EBI1_CLK] = &ipq806x_ebi1_clk,
+ [RPM_EBI1_A_CLK] = &ipq806x_ebi1_a_clk,
+ [RPM_SYS_FABRIC_CLK] = &ipq806x_sfab_clk,
+ [RPM_SYS_FABRIC_A_CLK] = &ipq806x_sfab_a_clk,
+ [RPM_SFPB_CLK] = &ipq806x_sfpb_clk,
+ [RPM_SFPB_A_CLK] = &ipq806x_sfpb_a_clk,
+ [RPM_NSS_FABRIC_0_CLK] = &ipq806x_nss_fabric_0_clk,
+ [RPM_NSS_FABRIC_0_A_CLK] = &ipq806x_nss_fabric_0_a_clk,
+ [RPM_NSS_FABRIC_1_CLK] = &ipq806x_nss_fabric_1_clk,
+ [RPM_NSS_FABRIC_1_A_CLK] = &ipq806x_nss_fabric_1_a_clk,
+};
+
+static const struct rpm_clk_desc rpm_clk_ipq806x = {
+ .clks = ipq806x_clks,
+ .num_clks = ARRAY_SIZE(ipq806x_clks),
+};
+
static const struct of_device_id rpm_clk_match_table[] = {
{ .compatible = "qcom,rpmcc-msm8660", .data = &rpm_clk_msm8660 },
{ .compatible = "qcom,rpmcc-apq8060", .data = &rpm_clk_msm8660 },
{ .compatible = "qcom,rpmcc-apq8064", .data = &rpm_clk_apq8064 },
+ { .compatible = "qcom,rpmcc-ipq806x", .data = &rpm_clk_ipq806x },
{ }
};
MODULE_DEVICE_TABLE(of, rpm_clk_match_table);
diff --git a/include/dt-bindings/clock/qcom,rpmcc.h b/include/dt-bindings/clock/qcom,rpmcc.h
index 8e3095720552..ae74c43c485d 100644
--- a/include/dt-bindings/clock/qcom,rpmcc.h
+++ b/include/dt-bindings/clock/qcom,rpmcc.h
@@ -37,6 +37,10 @@
#define RPM_XO_A0 27
#define RPM_XO_A1 28
#define RPM_XO_A2 29
+#define RPM_NSS_FABRIC_0_CLK 30
+#define RPM_NSS_FABRIC_0_A_CLK 31
+#define RPM_NSS_FABRIC_1_CLK 32
+#define RPM_NSS_FABRIC_1_A_CLK 33
/* SMD RPM clocks */
#define RPM_SMD_XO_CLK_SRC 0
--
2.25.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] clk: qcom: clk-rpm: add missing rpm clk for ipq806x
2020-02-26 21:48 ` [PATCH v2] clk: qcom: clk-rpm: add missing rpm clk for ipq806x Ansuel Smith
@ 2020-03-03 14:59 ` Rob Herring
2020-03-09 21:12 ` Stephen Boyd
0 siblings, 1 reply; 10+ messages in thread
From: Rob Herring @ 2020-03-03 14:59 UTC (permalink / raw)
To: Ansuel Smith
Cc: Ansuel Smith, John Crispin, Andy Gross, Bjorn Andersson,
Michael Turquette, Stephen Boyd, Mark Rutland, linux-arm-msm,
linux-clk, devicetree, linux-kernel
On Wed, 26 Feb 2020 22:48:12 +0100, Ansuel Smith wrote:
> Add missing definition of rpm clk for ipq806x soc
>
> Signed-off-by: John Crispin <john@phrozen.org>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> Acked-by: John Crispin <john@phrozen.org>
> ---
> .../devicetree/bindings/clock/qcom,rpmcc.txt | 1 +
> drivers/clk/qcom/clk-rpm.c | 35 +++++++++++++++++++
> include/dt-bindings/clock/qcom,rpmcc.h | 4 +++
> 3 files changed, 40 insertions(+)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v9 1/2] net: mdio: add ipq8064 mdio driver
[not found] <robh@kernel.org>
2020-02-26 21:48 ` [PATCH v2] clk: qcom: clk-rpm: add missing rpm clk for ipq806x Ansuel Smith
@ 2020-03-04 21:38 ` Ansuel Smith
2020-03-04 21:38 ` [PATCH v9 2/2] dt-bindings: net: Add ipq806x mdio bindings Ansuel Smith
2020-03-07 6:07 ` [PATCH v9 1/2] net: mdio: add ipq8064 mdio driver David Miller
1 sibling, 2 replies; 10+ messages in thread
From: Ansuel Smith @ 2020-03-04 21:38 UTC (permalink / raw)
Cc: Ansuel Smith, Christian Lamparter, Andy Gross, Bjorn Andersson,
David S. Miller, Rob Herring, Mark Rutland, Andrew Lunn,
Florian Fainelli, Heiner Kallweit, Russell King, linux-arm-msm,
netdev, devicetree, linux-kernel
Currently ipq806x soc use generic bitbang driver to
comunicate with the gmac ethernet interface.
Add a dedicated driver created by chunkeey to fix this.
Co-developed-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
Changes in v9:
- Use device_node_to_regmap instead of
syscon_node_to_regmap
Changes in v8:
- Drop syscon_regmap_lookup_by_phandle and make
clock definition in dts mandatory
Changes in v7:
- Add myself as module author and copyright
- Reduced usleep_range to 8-10 as suggested by chunkeey
Changes in v6:
- Fix error in commit description
- Add co-developed tag
Changes in v5:
- Rename define to more rappresentative name
Changes in v4:
- Fix wrong print value in dev_err
Changes in v3:
- Fix wrong return logic on error
Changes in v2:
- Use regmap_read_poll_timeout
- Reject clause 45
drivers/net/phy/Kconfig | 8 ++
drivers/net/phy/Makefile | 1 +
drivers/net/phy/mdio-ipq8064.c | 166 +++++++++++++++++++++++++++++++++
3 files changed, 175 insertions(+)
create mode 100644 drivers/net/phy/mdio-ipq8064.c
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 9dabe03a668c..ec2a5493a7e8 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -157,6 +157,14 @@ config MDIO_I2C
This is library mode.
+config MDIO_IPQ8064
+ tristate "Qualcomm IPQ8064 MDIO interface support"
+ depends on HAS_IOMEM && OF_MDIO
+ depends on MFD_SYSCON
+ help
+ This driver supports the MDIO interface found in the network
+ interface units of the IPQ8064 SoC
+
config MDIO_MOXART
tristate "MOXA ART MDIO interface support"
depends on ARCH_MOXART || COMPILE_TEST
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
index fe5badf13b65..8f02bd2089f3 100644
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -36,6 +36,7 @@ obj-$(CONFIG_MDIO_CAVIUM) += mdio-cavium.o
obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o
obj-$(CONFIG_MDIO_HISI_FEMAC) += mdio-hisi-femac.o
obj-$(CONFIG_MDIO_I2C) += mdio-i2c.o
+obj-$(CONFIG_MDIO_IPQ8064) += mdio-ipq8064.o
obj-$(CONFIG_MDIO_MOXART) += mdio-moxart.o
obj-$(CONFIG_MDIO_MSCC_MIIM) += mdio-mscc-miim.o
obj-$(CONFIG_MDIO_OCTEON) += mdio-octeon.o
diff --git a/drivers/net/phy/mdio-ipq8064.c b/drivers/net/phy/mdio-ipq8064.c
new file mode 100644
index 000000000000..1bd18857e1c5
--- /dev/null
+++ b/drivers/net/phy/mdio-ipq8064.c
@@ -0,0 +1,166 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Qualcomm IPQ8064 MDIO interface driver
+ *
+ * Copyright (C) 2019 Christian Lamparter <chunkeey@gmail.com>
+ * Copyright (C) 2020 Ansuel Smith <ansuelsmth@gmail.com>
+ */
+
+#include <linux/delay.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/regmap.h>
+#include <linux/of_mdio.h>
+#include <linux/phy.h>
+#include <linux/platform_device.h>
+#include <linux/mfd/syscon.h>
+
+/* MII address register definitions */
+#define MII_ADDR_REG_ADDR 0x10
+#define MII_BUSY BIT(0)
+#define MII_WRITE BIT(1)
+#define MII_CLKRANGE_60_100M (0 << 2)
+#define MII_CLKRANGE_100_150M (1 << 2)
+#define MII_CLKRANGE_20_35M (2 << 2)
+#define MII_CLKRANGE_35_60M (3 << 2)
+#define MII_CLKRANGE_150_250M (4 << 2)
+#define MII_CLKRANGE_250_300M (5 << 2)
+#define MII_CLKRANGE_MASK GENMASK(4, 2)
+#define MII_REG_SHIFT 6
+#define MII_REG_MASK GENMASK(10, 6)
+#define MII_ADDR_SHIFT 11
+#define MII_ADDR_MASK GENMASK(15, 11)
+
+#define MII_DATA_REG_ADDR 0x14
+
+#define MII_MDIO_DELAY_USEC (1000)
+#define MII_MDIO_RETRY_MSEC (10)
+
+struct ipq8064_mdio {
+ struct regmap *base; /* NSS_GMAC0_BASE */
+};
+
+static int
+ipq8064_mdio_wait_busy(struct ipq8064_mdio *priv)
+{
+ u32 busy;
+
+ return regmap_read_poll_timeout(priv->base, MII_ADDR_REG_ADDR, busy,
+ !(busy & MII_BUSY), MII_MDIO_DELAY_USEC,
+ MII_MDIO_RETRY_MSEC * USEC_PER_MSEC);
+}
+
+static int
+ipq8064_mdio_read(struct mii_bus *bus, int phy_addr, int reg_offset)
+{
+ u32 miiaddr = MII_BUSY | MII_CLKRANGE_250_300M;
+ struct ipq8064_mdio *priv = bus->priv;
+ u32 ret_val;
+ int err;
+
+ /* Reject clause 45 */
+ if (reg_offset & MII_ADDR_C45)
+ return -EOPNOTSUPP;
+
+ miiaddr |= ((phy_addr << MII_ADDR_SHIFT) & MII_ADDR_MASK) |
+ ((reg_offset << MII_REG_SHIFT) & MII_REG_MASK);
+
+ regmap_write(priv->base, MII_ADDR_REG_ADDR, miiaddr);
+ usleep_range(8, 10);
+
+ err = ipq8064_mdio_wait_busy(priv);
+ if (err)
+ return err;
+
+ regmap_read(priv->base, MII_DATA_REG_ADDR, &ret_val);
+ return (int)ret_val;
+}
+
+static int
+ipq8064_mdio_write(struct mii_bus *bus, int phy_addr, int reg_offset, u16 data)
+{
+ u32 miiaddr = MII_WRITE | MII_BUSY | MII_CLKRANGE_250_300M;
+ struct ipq8064_mdio *priv = bus->priv;
+
+ /* Reject clause 45 */
+ if (reg_offset & MII_ADDR_C45)
+ return -EOPNOTSUPP;
+
+ regmap_write(priv->base, MII_DATA_REG_ADDR, data);
+
+ miiaddr |= ((phy_addr << MII_ADDR_SHIFT) & MII_ADDR_MASK) |
+ ((reg_offset << MII_REG_SHIFT) & MII_REG_MASK);
+
+ regmap_write(priv->base, MII_ADDR_REG_ADDR, miiaddr);
+ usleep_range(8, 10);
+
+ return ipq8064_mdio_wait_busy(priv);
+}
+
+static int
+ipq8064_mdio_probe(struct platform_device *pdev)
+{
+ struct device_node *np = pdev->dev.of_node;
+ struct ipq8064_mdio *priv;
+ struct mii_bus *bus;
+ int ret;
+
+ bus = devm_mdiobus_alloc_size(&pdev->dev, sizeof(*priv));
+ if (!bus)
+ return -ENOMEM;
+
+ bus->name = "ipq8064_mdio_bus";
+ bus->read = ipq8064_mdio_read;
+ bus->write = ipq8064_mdio_write;
+ snprintf(bus->id, MII_BUS_ID_SIZE, "%s-mii", dev_name(&pdev->dev));
+ bus->parent = &pdev->dev;
+
+ priv = bus->priv;
+ priv->base = device_node_to_regmap(np);
+ if (IS_ERR(priv->base)) {
+ if (priv->base == ERR_PTR(-EPROBE_DEFER))
+ return -EPROBE_DEFER;
+
+ dev_err(&pdev->dev, "error getting device regmap, error=%pe\n",
+ priv->base);
+ return PTR_ERR(priv->base);
+ }
+
+ ret = of_mdiobus_register(bus, np);
+ if (ret)
+ return ret;
+
+ platform_set_drvdata(pdev, bus);
+ return 0;
+}
+
+static int
+ipq8064_mdio_remove(struct platform_device *pdev)
+{
+ struct mii_bus *bus = platform_get_drvdata(pdev);
+
+ mdiobus_unregister(bus);
+
+ return 0;
+}
+
+static const struct of_device_id ipq8064_mdio_dt_ids[] = {
+ { .compatible = "qcom,ipq8064-mdio" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, ipq8064_mdio_dt_ids);
+
+static struct platform_driver ipq8064_mdio_driver = {
+ .probe = ipq8064_mdio_probe,
+ .remove = ipq8064_mdio_remove,
+ .driver = {
+ .name = "ipq8064-mdio",
+ .of_match_table = ipq8064_mdio_dt_ids,
+ },
+};
+
+module_platform_driver(ipq8064_mdio_driver);
+
+MODULE_DESCRIPTION("Qualcomm IPQ8064 MDIO interface driver");
+MODULE_AUTHOR("Christian Lamparter <chunkeey@gmail.com>");
+MODULE_AUTHOR("Ansuel Smith <ansuelsmth@gmail.com>");
+MODULE_LICENSE("GPL");
--
2.25.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v9 2/2] dt-bindings: net: Add ipq806x mdio bindings
2020-03-04 21:38 ` [PATCH v9 1/2] net: mdio: add ipq8064 mdio driver Ansuel Smith
@ 2020-03-04 21:38 ` Ansuel Smith
2020-03-07 6:07 ` David Miller
2020-03-07 6:07 ` [PATCH v9 1/2] net: mdio: add ipq8064 mdio driver David Miller
1 sibling, 1 reply; 10+ messages in thread
From: Ansuel Smith @ 2020-03-04 21:38 UTC (permalink / raw)
Cc: Ansuel Smith, Andy Gross, Bjorn Andersson, David S. Miller,
Rob Herring, Mark Rutland, Andrew Lunn, Florian Fainelli,
Heiner Kallweit, Russell King, linux-arm-msm, netdev, devicetree,
linux-kernel
Add documentations for ipq806x mdio driver.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
Changes in v9:
- Update License
- Drop syscon
Changes in v8:
- Fix error in dtb check
- Remove not needed reset definition from example
- Add include header for ipq806x clocks
- Fix wrong License type
Changes in v7:
- Fix dt_binding_check problem
.../bindings/net/qcom,ipq8064-mdio.yaml | 53 +++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
diff --git a/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml b/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
new file mode 100644
index 000000000000..b9f90081046f
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/qcom,ipq8064-mdio.yaml
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/qcom,ipq8064-mdio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm ipq806x MDIO bus controller
+
+maintainers:
+ - Ansuel Smith <ansuelsmth@gmail.com>
+
+description:
+ The ipq806x soc have a MDIO dedicated controller that is
+ used to communicate with the gmac phy connected.
+
+allOf:
+ - $ref: "mdio.yaml#"
+
+properties:
+ compatible:
+ const: qcom,ipq8064-mdio
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - "#address-cells"
+ - "#size-cells"
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-ipq806x.h>
+
+ mdio0: mdio@37000000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compatible = "qcom,ipq8064-mdio";
+ reg = <0x37000000 0x200000>;
+
+ clocks = <&gcc GMAC_CORE1_CLK>;
+
+ switch@10 {
+ compatible = "qca,qca8337";
+ /* ... */
+ };
+ };
--
2.25.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v9 1/2] net: mdio: add ipq8064 mdio driver
2020-03-04 21:38 ` [PATCH v9 1/2] net: mdio: add ipq8064 mdio driver Ansuel Smith
2020-03-04 21:38 ` [PATCH v9 2/2] dt-bindings: net: Add ipq806x mdio bindings Ansuel Smith
@ 2020-03-07 6:07 ` David Miller
1 sibling, 0 replies; 10+ messages in thread
From: David Miller @ 2020-03-07 6:07 UTC (permalink / raw)
To: ansuelsmth
Cc: chunkeey, agross, bjorn.andersson, robh+dt, mark.rutland, andrew,
f.fainelli, hkallweit1, linux, linux-arm-msm, netdev, devicetree,
linux-kernel
From: Ansuel Smith <ansuelsmth@gmail.com>
Date: Wed, 4 Mar 2020 22:38:32 +0100
> Currently ipq806x soc use generic bitbang driver to
> comunicate with the gmac ethernet interface.
> Add a dedicated driver created by chunkeey to fix this.
>
> Co-developed-by: Christian Lamparter <chunkeey@gmail.com>
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Applied to net-next.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v9 2/2] dt-bindings: net: Add ipq806x mdio bindings
2020-03-04 21:38 ` [PATCH v9 2/2] dt-bindings: net: Add ipq806x mdio bindings Ansuel Smith
@ 2020-03-07 6:07 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2020-03-07 6:07 UTC (permalink / raw)
To: ansuelsmth
Cc: agross, bjorn.andersson, robh+dt, mark.rutland, andrew,
f.fainelli, hkallweit1, linux, linux-arm-msm, netdev, devicetree,
linux-kernel
From: Ansuel Smith <ansuelsmth@gmail.com>
Date: Wed, 4 Mar 2020 22:38:33 +0100
> Add documentations for ipq806x mdio driver.
>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Applied to net-next.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] clk: qcom: clk-rpm: add missing rpm clk for ipq806x
2020-03-03 14:59 ` Rob Herring
@ 2020-03-09 21:12 ` Stephen Boyd
0 siblings, 0 replies; 10+ messages in thread
From: Stephen Boyd @ 2020-03-09 21:12 UTC (permalink / raw)
To: Ansuel Smith, Rob Herring
Cc: Ansuel Smith, John Crispin, Andy Gross, Bjorn Andersson,
Michael Turquette, Mark Rutland, linux-arm-msm, linux-clk,
devicetree, linux-kernel
Quoting Rob Herring (2020-03-03 06:59:20)
> On Wed, 26 Feb 2020 22:48:12 +0100, Ansuel Smith wrote:
> > Add missing definition of rpm clk for ipq806x soc
> >
> > Signed-off-by: John Crispin <john@phrozen.org>
> > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> > Acked-by: John Crispin <john@phrozen.org>
> > ---
> > .../devicetree/bindings/clock/qcom,rpmcc.txt | 1 +
> > drivers/clk/qcom/clk-rpm.c | 35 +++++++++++++++++++
> > include/dt-bindings/clock/qcom,rpmcc.h | 4 +++
> > 3 files changed, 40 insertions(+)
> >
>
> Acked-by: Rob Herring <robh@kernel.org>
Ansuel, can you send this again and address it To: somebody like me? My
MUA fails at getting emails when they're addressed to nobody.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] clk: qcom: clk-rpm: add missing rpm clk for ipq806x
2020-03-10 14:37 [PATCH v2] clk: qcom: clk-rpm: add missing rpm clk for ipq806x Ansuel Smith
2020-03-10 18:41 ` Rob Herring
@ 2020-03-13 20:57 ` Stephen Boyd
1 sibling, 0 replies; 10+ messages in thread
From: Stephen Boyd @ 2020-03-13 20:57 UTC (permalink / raw)
To: Ansuel Smith
Cc: Ansuel Smith, John Crispin, Andy Gross, Bjorn Andersson,
Michael Turquette, Rob Herring, Mark Rutland, linux-arm-msm,
linux-clk, devicetree, linux-kernel
Quoting Ansuel Smith (2020-03-10 07:37:56)
> Add missing definition of rpm clk for ipq806x soc
>
> Signed-off-by: John Crispin <john@phrozen.org>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> Acked-by: John Crispin <john@phrozen.org>
> ---
Applied to clk-next and added Rob's review tag from v1. Please help and
do it next time.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] clk: qcom: clk-rpm: add missing rpm clk for ipq806x
2020-03-10 14:37 [PATCH v2] clk: qcom: clk-rpm: add missing rpm clk for ipq806x Ansuel Smith
@ 2020-03-10 18:41 ` Rob Herring
2020-03-13 20:57 ` Stephen Boyd
1 sibling, 0 replies; 10+ messages in thread
From: Rob Herring @ 2020-03-10 18:41 UTC (permalink / raw)
To: Ansuel Smith
Cc: sboyd, Ansuel Smith, John Crispin, Andy Gross, Bjorn Andersson,
Michael Turquette, Mark Rutland, linux-arm-msm, linux-clk,
devicetree, linux-kernel
On Tue, 10 Mar 2020 15:37:56 +0100, Ansuel Smith wrote:
> Add missing definition of rpm clk for ipq806x soc
>
> Signed-off-by: John Crispin <john@phrozen.org>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> Acked-by: John Crispin <john@phrozen.org>
> ---
> .../devicetree/bindings/clock/qcom,rpmcc.txt | 1 +
> drivers/clk/qcom/clk-rpm.c | 35 +++++++++++++++++++
> include/dt-bindings/clock/qcom,rpmcc.h | 4 +++
> 3 files changed, 40 insertions(+)
>
Please add Acked-by/Reviewed-by tags when posting new versions. However,
there's no need to repost patches *only* to add the tags. The upstream
maintainer will do that for acks received on the version they apply.
If a tag was not added on purpose, please state why and what changed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] clk: qcom: clk-rpm: add missing rpm clk for ipq806x
@ 2020-03-10 14:37 Ansuel Smith
2020-03-10 18:41 ` Rob Herring
2020-03-13 20:57 ` Stephen Boyd
0 siblings, 2 replies; 10+ messages in thread
From: Ansuel Smith @ 2020-03-10 14:37 UTC (permalink / raw)
To: sboyd
Cc: Ansuel Smith, John Crispin, Andy Gross, Bjorn Andersson,
Michael Turquette, Rob Herring, Mark Rutland, linux-arm-msm,
linux-clk, devicetree, linux-kernel
Add missing definition of rpm clk for ipq806x soc
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Acked-by: John Crispin <john@phrozen.org>
---
.../devicetree/bindings/clock/qcom,rpmcc.txt | 1 +
drivers/clk/qcom/clk-rpm.c | 35 +++++++++++++++++++
include/dt-bindings/clock/qcom,rpmcc.h | 4 +++
3 files changed, 40 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt b/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt
index 944719bd586f..4bb2cbeff2b4 100644
--- a/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt
+++ b/Documentation/devicetree/bindings/clock/qcom,rpmcc.txt
@@ -15,6 +15,7 @@ Required properties :
"qcom,rpmcc-msm8916", "qcom,rpmcc"
"qcom,rpmcc-msm8974", "qcom,rpmcc"
"qcom,rpmcc-apq8064", "qcom,rpmcc"
+ "qcom,rpmcc-ipq806x", "qcom,rpmcc"
"qcom,rpmcc-msm8996", "qcom,rpmcc"
"qcom,rpmcc-msm8998", "qcom,rpmcc"
"qcom,rpmcc-qcs404", "qcom,rpmcc"
diff --git a/drivers/clk/qcom/clk-rpm.c b/drivers/clk/qcom/clk-rpm.c
index 9e3110a71f12..f71d228fd6bd 100644
--- a/drivers/clk/qcom/clk-rpm.c
+++ b/drivers/clk/qcom/clk-rpm.c
@@ -543,10 +543,45 @@ static const struct rpm_clk_desc rpm_clk_apq8064 = {
.num_clks = ARRAY_SIZE(apq8064_clks),
};
+/* ipq806x */
+DEFINE_CLK_RPM(ipq806x, afab_clk, afab_a_clk, QCOM_RPM_APPS_FABRIC_CLK);
+DEFINE_CLK_RPM(ipq806x, cfpb_clk, cfpb_a_clk, QCOM_RPM_CFPB_CLK);
+DEFINE_CLK_RPM(ipq806x, daytona_clk, daytona_a_clk, QCOM_RPM_DAYTONA_FABRIC_CLK);
+DEFINE_CLK_RPM(ipq806x, ebi1_clk, ebi1_a_clk, QCOM_RPM_EBI1_CLK);
+DEFINE_CLK_RPM(ipq806x, sfab_clk, sfab_a_clk, QCOM_RPM_SYS_FABRIC_CLK);
+DEFINE_CLK_RPM(ipq806x, sfpb_clk, sfpb_a_clk, QCOM_RPM_SFPB_CLK);
+DEFINE_CLK_RPM(ipq806x, nss_fabric_0_clk, nss_fabric_0_a_clk, QCOM_RPM_NSS_FABRIC_0_CLK);
+DEFINE_CLK_RPM(ipq806x, nss_fabric_1_clk, nss_fabric_1_a_clk, QCOM_RPM_NSS_FABRIC_1_CLK);
+
+static struct clk_rpm *ipq806x_clks[] = {
+ [RPM_APPS_FABRIC_CLK] = &ipq806x_afab_clk,
+ [RPM_APPS_FABRIC_A_CLK] = &ipq806x_afab_a_clk,
+ [RPM_CFPB_CLK] = &ipq806x_cfpb_clk,
+ [RPM_CFPB_A_CLK] = &ipq806x_cfpb_a_clk,
+ [RPM_DAYTONA_FABRIC_CLK] = &ipq806x_daytona_clk,
+ [RPM_DAYTONA_FABRIC_A_CLK] = &ipq806x_daytona_a_clk,
+ [RPM_EBI1_CLK] = &ipq806x_ebi1_clk,
+ [RPM_EBI1_A_CLK] = &ipq806x_ebi1_a_clk,
+ [RPM_SYS_FABRIC_CLK] = &ipq806x_sfab_clk,
+ [RPM_SYS_FABRIC_A_CLK] = &ipq806x_sfab_a_clk,
+ [RPM_SFPB_CLK] = &ipq806x_sfpb_clk,
+ [RPM_SFPB_A_CLK] = &ipq806x_sfpb_a_clk,
+ [RPM_NSS_FABRIC_0_CLK] = &ipq806x_nss_fabric_0_clk,
+ [RPM_NSS_FABRIC_0_A_CLK] = &ipq806x_nss_fabric_0_a_clk,
+ [RPM_NSS_FABRIC_1_CLK] = &ipq806x_nss_fabric_1_clk,
+ [RPM_NSS_FABRIC_1_A_CLK] = &ipq806x_nss_fabric_1_a_clk,
+};
+
+static const struct rpm_clk_desc rpm_clk_ipq806x = {
+ .clks = ipq806x_clks,
+ .num_clks = ARRAY_SIZE(ipq806x_clks),
+};
+
static const struct of_device_id rpm_clk_match_table[] = {
{ .compatible = "qcom,rpmcc-msm8660", .data = &rpm_clk_msm8660 },
{ .compatible = "qcom,rpmcc-apq8060", .data = &rpm_clk_msm8660 },
{ .compatible = "qcom,rpmcc-apq8064", .data = &rpm_clk_apq8064 },
+ { .compatible = "qcom,rpmcc-ipq806x", .data = &rpm_clk_ipq806x },
{ }
};
MODULE_DEVICE_TABLE(of, rpm_clk_match_table);
diff --git a/include/dt-bindings/clock/qcom,rpmcc.h b/include/dt-bindings/clock/qcom,rpmcc.h
index 8e3095720552..ae74c43c485d 100644
--- a/include/dt-bindings/clock/qcom,rpmcc.h
+++ b/include/dt-bindings/clock/qcom,rpmcc.h
@@ -37,6 +37,10 @@
#define RPM_XO_A0 27
#define RPM_XO_A1 28
#define RPM_XO_A2 29
+#define RPM_NSS_FABRIC_0_CLK 30
+#define RPM_NSS_FABRIC_0_A_CLK 31
+#define RPM_NSS_FABRIC_1_CLK 32
+#define RPM_NSS_FABRIC_1_A_CLK 33
/* SMD RPM clocks */
#define RPM_SMD_XO_CLK_SRC 0
--
2.25.0
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-03-13 20:57 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <robh@kernel.org>
2020-02-26 21:48 ` [PATCH v2] clk: qcom: clk-rpm: add missing rpm clk for ipq806x Ansuel Smith
2020-03-03 14:59 ` Rob Herring
2020-03-09 21:12 ` Stephen Boyd
2020-03-04 21:38 ` [PATCH v9 1/2] net: mdio: add ipq8064 mdio driver Ansuel Smith
2020-03-04 21:38 ` [PATCH v9 2/2] dt-bindings: net: Add ipq806x mdio bindings Ansuel Smith
2020-03-07 6:07 ` David Miller
2020-03-07 6:07 ` [PATCH v9 1/2] net: mdio: add ipq8064 mdio driver David Miller
2020-03-10 14:37 [PATCH v2] clk: qcom: clk-rpm: add missing rpm clk for ipq806x Ansuel Smith
2020-03-10 18:41 ` Rob Herring
2020-03-13 20:57 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).