All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frieder Schrempf <frieder@fris.de>
To: Lukasz Majewski <lukma@denx.de>
Cc: Frieder Schrempf <frieder.schrempf@kontron.de>,
	Peng Fan <peng.fan@nxp.com>,
	u-boot@lists.denx.de, Ye Li <ye.li@nxp.com>
Subject: [RESEND PATCH 3/6] clk: imx8mm: Add SPI clocks
Date: Mon,  7 Jun 2021 14:36:43 +0200	[thread overview]
Message-ID: <20210607123707.189163-4-frieder@fris.de> (raw)
In-Reply-To: <20210607123707.189163-1-frieder@fris.de>

From: Frieder Schrempf <frieder.schrempf@kontron.de>

Add the clocks for the ECSPI controllers. This is ported from
Linux v5.13-rc4.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
---
 drivers/clk/imx/clk-imx8mm.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c
index d32ff8409a..3aa8c641f9 100644
--- a/drivers/clk/imx/clk-imx8mm.c
+++ b/drivers/clk/imx/clk-imx8mm.c
@@ -131,6 +131,15 @@ static const char *imx8mm_usb_core_sels[] = {"clock-osc-24m", "sys_pll1_100m", "
 static const char *imx8mm_usb_phy_sels[] = {"clock-osc-24m", "sys_pll1_100m", "sys_pll1_40m", "sys_pll2_100m",
 					     "sys_pll2_200m", "clk_ext2", "clk_ext3", "audio_pll2_out", };
 
+static const char *imx8mm_ecspi1_sels[] = {"clock-osc-24m", "sys_pll2_200m", "sys_pll1_40m", "sys_pll1_160m",
+					   "sys_pll1_800m", "sys_pll3_out", "sys_pll2_250m", "audio_pll2_out", };
+
+static const char *imx8mm_ecspi2_sels[] = {"clock-osc-24m", "sys_pll2_200m", "sys_pll1_40m", "sys_pll1_160m",
+					   "sys_pll1_800m", "sys_pll3_out", "sys_pll2_250m", "audio_pll2_out", };
+
+static const char *imx8mm_ecspi3_sels[] = {"clock-osc-24m", "sys_pll2_200m", "sys_pll1_40m", "sys_pll1_160m",
+					   "sys_pll1_800m", "sys_pll3_out", "sys_pll2_250m", "audio_pll2_out", };
+
 static ulong imx8mm_clk_get_rate(struct clk *clk)
 {
 	struct clk *c;
@@ -393,7 +402,19 @@ static int imx8mm_clk_probe(struct udevice *dev)
 		imx8m_clk_composite("usb_core_ref", imx8mm_usb_core_sels, base + 0xb100));
 	clk_dm(IMX8MM_CLK_USB_PHY_REF,
 		imx8m_clk_composite("usb_phy_ref", imx8mm_usb_phy_sels, base + 0xb180));
-
+	clk_dm(IMX8MM_CLK_ECSPI1,
+	       imx8m_clk_composite("ecspi1", imx8mm_ecspi1_sels, base + 0xb280));
+	clk_dm(IMX8MM_CLK_ECSPI2,
+	       imx8m_clk_composite("ecspi2", imx8mm_ecspi2_sels, base + 0xb300));
+	clk_dm(IMX8MM_CLK_ECSPI3,
+	       imx8m_clk_composite("ecspi3", imx8mm_ecspi3_sels, base + 0xc180));
+
+	clk_dm(IMX8MM_CLK_ECSPI1_ROOT,
+	       imx_clk_gate4("ecspi1_root_clk", "ecspi1", base + 0x4070, 0));
+	clk_dm(IMX8MM_CLK_ECSPI2_ROOT,
+	       imx_clk_gate4("ecspi2_root_clk", "ecspi2", base + 0x4080, 0));
+	clk_dm(IMX8MM_CLK_ECSPI3_ROOT,
+	       imx_clk_gate4("ecspi3_root_clk", "ecspi3", base + 0x4090, 0));
 	clk_dm(IMX8MM_CLK_I2C1_ROOT,
 	       imx_clk_gate4("i2c1_root_clk", "i2c1", base + 0x4170, 0));
 	clk_dm(IMX8MM_CLK_I2C2_ROOT,
-- 
2.25.1


  parent reply	other threads:[~2021-06-07 12:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 12:36 [RESEND PATCH 0/6] Add support for Kontron i.MX6UL/ULL and i.MX8MM modules/boards Frieder Schrempf
2021-06-07 12:36 ` [RESEND PATCH 1/6] mtd: spi-nor-ids: Add support for Macronix MX25V8035F and MX25R1635F Frieder Schrempf
2021-07-10 15:53   ` sbabic
2021-07-10 19:36   ` sbabic
2021-06-07 12:36 ` [RESEND PATCH 2/6] spi: fsl_qspi: Build driver only if DM_SPI is available Frieder Schrempf
2021-07-10 15:52   ` sbabic
2021-07-10 19:35   ` sbabic
2021-06-07 12:36 ` Frieder Schrempf [this message]
2021-07-10 15:52   ` [RESEND PATCH 3/6] clk: imx8mm: Add SPI clocks sbabic
2021-07-10 19:34   ` sbabic
2021-06-07 12:36 ` [RESEND PATCH 4/6] imx8m: Restrict usable memory to space below 4G boundary Frieder Schrempf
2021-07-10 15:53   ` sbabic
2021-07-10 19:36   ` sbabic
2021-06-07 12:36 ` [RESEND PATCH 5/6] imx: imx6ul: Add support for Kontron Electronics SL/BL i.MX6UL/ULL boards (N63xx/N64xx) Frieder Schrempf
2021-07-10 14:49   ` Stefano Babic
2021-06-07 12:36 ` [RESEND PATCH 6/6] imx: imx8mm: Add support for Kontron Electronics SL/BL i.MX8M-Mini boards (N801x) Frieder Schrempf
2021-06-07 14:22   ` Frieder Schrempf
2021-06-17  6:58   ` Stefano Babic
2021-07-10 14:53   ` Stefano Babic

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=20210607123707.189163-4-frieder@fris.de \
    --to=frieder@fris.de \
    --cc=frieder.schrempf@kontron.de \
    --cc=lukma@denx.de \
    --cc=peng.fan@nxp.com \
    --cc=u-boot@lists.denx.de \
    --cc=ye.li@nxp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.