All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Eichenberger <eichest@gmail.com>
To: trini@konsulko.com, ilias.apalodimas@linaro.org,
	peng.fan@nxp.com, jh80.chung@samsung.com,
	tanmay.kathpalia@altera.com, sbabic@nabladev.com,
	festevam@gmail.com, uboot-imx@nxp.com,
	francesco.dolcini@toradex.com, lukma@nabladev.com,
	dlechner@baylibre.com, msp@baylibre.com,
	stefan.eichenberger@toradex.com, Max.Merchel@ew.tq-group.com,
	nora.schiffer@ew.tq-group.com, primoz.fiser@norik.com,
	jbx6244@gmail.com, aford173@gmail.com,
	cniedermaier@dh-electronics.com
Cc: u-boot@lists.u-boot-project.org
Subject: [PATCH v1 1/7] clk: imx: imx6ul: fix the enet clock gate register
Date: Fri, 20 Nov 2026 12:10:07 +0100	[thread overview]
Message-ID: <20261120111037.110741-2-eichest@gmail.com> (raw)
In-Reply-To: <20261120111037.110741-1-eichest@gmail.com>

From: Francesco Dolcini <francesco.dolcini@toradex.com>

IMX6UL_CLK_ENET was registered on CCGR1 bit 10, which is CG5, the uart3
gate: enabling the FEC clock would have gated uart3 and left ENET alone.
The ENET gate is CCM_CCGR0[CG6] on i.MX6ULL and CCM_CCGR3[CG2] on
i.MX6UL, as the reference manuals and Linux have it.

Fixes: 0f53197c3d6c ("clk: imx: add i.MX6UL clk driver")
Tested-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
---
 drivers/clk/imx/clk-imx6ul.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c
index 32fb949ffbc..a73fb40b8ac 100644
--- a/drivers/clk/imx/clk-imx6ul.c
+++ b/drivers/clk/imx/clk-imx6ul.c
@@ -9,6 +9,7 @@
 #include <log.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
+#include <asm/mach-imx/sys_proto.h>
 #include <dt-bindings/clock/imx6ul-clock.h>
 
 #include "clk.h"
@@ -259,8 +260,12 @@ static int imx6ul_clk_probe(struct udevice *dev)
 	clk_dm(IMX6UL_CLK_PWM1,
 	       imx_clk_gate2(dev, "pwm1", "perclk", base + 0x78, 16));
 
-	clk_dm(IMX6UL_CLK_ENET,
-	       imx_clk_gate2(dev, "enet", "ipg", base + 0x6c, 10));
+	if (is_mx6ull())
+		clk_dm(IMX6UL_CLK_ENET,
+		       imx_clk_gate2(dev, "enet", "ipg", base + 0x68, 12));
+	else
+		clk_dm(IMX6UL_CLK_ENET,
+		       imx_clk_gate2(dev, "enet", "ipg", base + 0x74, 4));
 	clk_dm(IMX6UL_CLK_ENET_REF,
 	       imx_clk_fixed_factor(dev, "enet_ref", "pll6_enet", 1, 1));
 
-- 
2.56.1


  reply	other threads:[~2026-11-20 13:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 11:10 [PATCH v1 0/7] colibri-imx6ull: fix the Ethernet PHY detection Stefan Eichenberger
2026-11-20 11:10 ` Stefan Eichenberger [this message]
2026-11-20 11:10 ` [PATCH v1 2/7] clk: imx: pllv3: wait for the ENET PLL to lock Stefan Eichenberger
2026-11-20 11:10 ` [PATCH v1 3/7] clk: imx: pllv3: do not touch the ENET output gate Stefan Eichenberger
2026-11-20 11:10 ` [PATCH v1 4/7] clk: imx: imx6ul: add the enet clock tree Stefan Eichenberger
2026-11-20 11:10 ` [PATCH v1 5/7] board: toradex: colibri-imx6ull: drop the static serial device Stefan Eichenberger
2026-11-20 11:10 ` [PATCH v1 6/7] arm: dts: imx6ull-colibri: migrate to OF_UPSTREAM Stefan Eichenberger
2026-11-20 11:10 ` [PATCH v1 7/7] board: toradex: colibri-imx6ull: enable the clock framework Stefan Eichenberger

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=20261120111037.110741-2-eichest@gmail.com \
    --to=eichest@gmail.com \
    --cc=Max.Merchel@ew.tq-group.com \
    --cc=aford173@gmail.com \
    --cc=cniedermaier@dh-electronics.com \
    --cc=dlechner@baylibre.com \
    --cc=festevam@gmail.com \
    --cc=francesco.dolcini@toradex.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jbx6244@gmail.com \
    --cc=jh80.chung@samsung.com \
    --cc=lukma@nabladev.com \
    --cc=msp@baylibre.com \
    --cc=nora.schiffer@ew.tq-group.com \
    --cc=peng.fan@nxp.com \
    --cc=primoz.fiser@norik.com \
    --cc=sbabic@nabladev.com \
    --cc=stefan.eichenberger@toradex.com \
    --cc=tanmay.kathpalia@altera.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.org \
    --cc=uboot-imx@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.