From: Amit Singh Tomar <amittomer25@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v1 1/7] clk: actions: Add Ethernet clocks
Date: Sat, 9 May 2020 19:55:09 +0530 [thread overview]
Message-ID: <1589034315-19722-2-git-send-email-amittomer25@gmail.com> (raw)
In-Reply-To: <1589034315-19722-1-git-send-email-amittomer25@gmail.com>
This commit adds clocks needed for ethernet operations for
Actions OWL family of SoCs (S700 and S900).
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
---
arch/arm/include/asm/arch-owl/regs_s700.h | 2 ++
arch/arm/include/asm/arch-owl/regs_s900.h | 4 ++++
drivers/clk/owl/clk_owl.c | 9 +++++++++
drivers/clk/owl/clk_owl.h | 2 --
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/arch-owl/regs_s700.h b/arch/arm/include/asm/arch-owl/regs_s700.h
index 2f21c15cca8c..90459ae95eeb 100644
--- a/arch/arm/include/asm/arch-owl/regs_s700.h
+++ b/arch/arm/include/asm/arch-owl/regs_s700.h
@@ -53,4 +53,6 @@
#define CMU_CVBSPLL 0x00B8
#define CMU_SSTSCLK 0x00C0
+#define CMU_DEVCLKEN1_ETH BIT(23)
+
#endif
diff --git a/arch/arm/include/asm/arch-owl/regs_s900.h b/arch/arm/include/asm/arch-owl/regs_s900.h
index 9e9106ddaab9..084bc9b8c3fb 100644
--- a/arch/arm/include/asm/arch-owl/regs_s900.h
+++ b/arch/arm/include/asm/arch-owl/regs_s900.h
@@ -61,4 +61,8 @@
#define CMU_TVOUTPLLDEBUG0 (0x00EC)
#define CMU_TVOUTPLLDEBUG1 (0x00FC)
+#define CMU_DEVCLKEN1_ETH BIT(22)
+#define CLK_ETHERNET CLK_ETH_MAC
+#define CMU_ETHERNETPLL CMU_ASSISTPLL
+
#endif
diff --git a/drivers/clk/owl/clk_owl.c b/drivers/clk/owl/clk_owl.c
index 5607b2b7b516..b80862e17f51 100644
--- a/drivers/clk/owl/clk_owl.c
+++ b/drivers/clk/owl/clk_owl.c
@@ -85,6 +85,11 @@ int owl_clk_enable(struct clk *clk)
/* Enable UART3 interface clock */
setbits_le32(priv->base + CMU_DEVCLKEN1, CMU_DEVCLKEN1_UART3);
break;
+ case CLK_RMII_REF:
+ case CLK_ETHERNET:
+ setbits_le32(priv->base + CMU_DEVCLKEN1, CMU_DEVCLKEN1_ETH);
+ setbits_le32(priv->base + CMU_ETHERNETPLL, 5);
+ break;
default:
return -EINVAL;
}
@@ -110,6 +115,10 @@ int owl_clk_disable(struct clk *clk)
/* Disable UART3 interface clock */
clrbits_le32(priv->base + CMU_DEVCLKEN1, CMU_DEVCLKEN1_UART3);
break;
+ case CLK_RMII_REF:
+ case CLK_ETHERNET:
+ clrbits_le32(priv->base + CMU_DEVCLKEN1, CMU_DEVCLKEN1_ETH);
+ break;
default:
return -EINVAL;
}
diff --git a/drivers/clk/owl/clk_owl.h b/drivers/clk/owl/clk_owl.h
index b8d33624c5f5..a2065a726d46 100644
--- a/drivers/clk/owl/clk_owl.h
+++ b/drivers/clk/owl/clk_owl.h
@@ -59,6 +59,4 @@ struct owl_clk_priv {
#define CMU_DEVCLKEN1_UART5 BIT(21)
#define CMU_DEVCLKEN1_UART3 BIT(11)
-#define CMU_DEVCLKEN1_ETH_S700 BIT(23)
-
#endif
--
2.7.4
next prev parent reply other threads:[~2020-05-09 14:25 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-09 14:25 [PATCH v1 0/7] add Ethernet support for S700 Amit Singh Tomar
2020-05-09 14:25 ` Amit Singh Tomar [this message]
2020-07-08 3:02 ` [PATCH v1 1/7] clk: actions: Add Ethernet clocks Tom Rini
2020-05-09 14:25 ` [PATCH v1 2/7] net: phy: realtek: Add support for RTL8201F PHY module Amit Singh Tomar
2020-07-08 3:02 ` Tom Rini
2020-05-09 14:25 ` [PATCH v1 3/7] net: phy: realtek: Introduce PHY_RTL8201F_S700_RMII_TIMINGS to adjust rx/tx timings Amit Singh Tomar
2020-07-08 3:02 ` Tom Rini
2020-05-09 14:25 ` [PATCH v1 4/7] net: designware: s700: Add glue code for S700 mac Amit Singh Tomar
2020-07-08 3:03 ` Tom Rini
2020-05-09 14:25 ` [PATCH v1 5/7] arm: dts: s700: add node for ethernet controller Amit Singh Tomar
2020-05-12 14:18 ` André Przywara
2020-05-12 14:25 ` Tom Rini
2020-05-12 14:42 ` Amit Tomer
2020-05-12 14:53 ` Tom Rini
2020-05-12 14:53 ` André Przywara
2020-05-12 15:09 ` Tom Rini
2020-05-12 16:14 ` Amit Tomer
2020-05-12 16:39 ` André Przywara
2020-05-12 19:59 ` Tom Rini
2020-05-12 14:37 ` Amit Tomer
2020-05-12 14:56 ` André Przywara
2020-07-08 3:03 ` Tom Rini
2020-05-09 14:25 ` [PATCH v1 6/7] owl: Kconfig: Enable DM eth for OWL platform Amit Singh Tomar
2020-07-08 3:03 ` Tom Rini
2020-05-09 14:25 ` [PATCH v1 7/7] configs: Enable mac and phy configs Amit Singh Tomar
2020-07-08 3:03 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1589034315-19722-2-git-send-email-amittomer25@gmail.com \
--to=amittomer25@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox