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 0/7] colibri-imx6ull: fix the Ethernet PHY detection
Date: Fri, 20 Nov 2026 12:10:06 +0100	[thread overview]
Message-ID: <20261120111037.110741-1-eichest@gmail.com> (raw)

Since commit a5d990854f2c ("regulator: fixed: fix regulator-fixed-clock")
the regulator-fixed-clock driver gets its clock in a probe hook, so it
can no longer probe without CONFIG_CLK. On the Colibri iMX6ULL the
Ethernet PHY supply is such a regulator. Its 150ms startup delay is
skipped, and the first FEC probe does not find the PHY.

This series fixes the problem by moving the board to the clock framework
(CONFIG_CLK_IMX6UL). The i.MX6UL clock driver could not yet drive the
FEC, so most of the series makes the ENET clocks usable:

- Patch 1 fixes the ENET gate, which pointed at the uart3 gate. It is a
  standalone fix and can be applied on its own.
- Patches 2 and 3 fix the PLLv3 ENET PLL: wait for lock after power up,
  and stop setting and clearing bit 13. That bit is an output gate, which
  the SoC drivers already model as a separate clock. Patch 3 also affects
  i.MX6Q/DL, where every PLL6 consumer goes through the pll6_enet gate
  on that bit.
- Patch 4 adds the ENET clock tree to the i.MX6UL driver: the PLL6
  bypass, the reference dividers with their 125M gates, the GPR1
  reference clock selectors, the PTP clock and the AHB gate.

The rest prepares and switches the board:

- Patch 5 removes the static serial_mxc device. It duplicates the
  device tree instance and cannot get its clocks once CCF is enabled.
- Patch 6 moves the Colibri iMX6ULL device trees to OF_UPSTREAM.
- Patch 7 enables the clock framework. With it, the hand-rolled FEC clock
  setup is no longer needed. setup_gpmi_nand() has to go as well, because
  it now overwrites the ENFC parent chosen by the CCM driver and breaks
  NAND. SYS_MALLOC_F_LEN is raised for the pre-relocation CCM probe.

A note on patch 4: U-Boot has no clock type for the IOMUXC GPR muxes, so
the ENETn_CLK_SEL selectors are plain muxes on the GPR1 register, and the
ENET2_TX_CLK direction bit stays in board code. A follow-up could add a
syscon-based GPR mux clock like the one in Linux. That would also remove
the remaining board code.

On the Colibri iMX6ULL, Ethernet now finds the PHY on the first probe.

The series was tested on the following modules:
- Colibri iMX6ULL
- Colibri iMX6ULL eMMC
- Colibri iMX6
- Apalis iMX6

Francesco Dolcini (4):
  clk: imx: imx6ul: fix the enet clock gate register
  board: toradex: colibri-imx6ull: drop the static serial device
  arm: dts: imx6ull-colibri: migrate to OF_UPSTREAM
  board: toradex: colibri-imx6ull: enable the clock framework

Stefan Eichenberger (3):
  clk: imx: pllv3: wait for the ENET PLL to lock
  clk: imx: pllv3: do not touch the ENET output gate
  clk: imx: imx6ul: add the enet clock tree

 arch/arm/dts/Makefile                         |   2 -
 arch/arm/dts/imx6ull-colibri-emmc-eval-v3.dts |  17 -
 .../arm/dts/imx6ull-colibri-emmc-nonwifi.dtsi | 187 -----
 .../dts/imx6ull-colibri-eval-v3-u-boot.dtsi   |   6 +
 arch/arm/dts/imx6ull-colibri-eval-v3.dts      |  14 -
 arch/arm/dts/imx6ull-colibri-eval-v3.dtsi     | 121 ---
 arch/arm/dts/imx6ull-colibri-nonwifi.dtsi     | 161 ----
 arch/arm/dts/imx6ull-colibri.dtsi             | 748 ------------------
 arch/arm/mach-imx/mx6/Kconfig                 |   1 +
 board/toradex/colibri-imx6ull/MAINTAINERS     |   8 +-
 .../toradex/colibri-imx6ull/colibri-imx6ull.c |  45 +-
 configs/colibri-imx6ull-emmc_defconfig        |   4 +-
 configs/colibri-imx6ull_defconfig             |   4 +-
 drivers/clk/imx/clk-imx6ul.c                  |  81 +-
 drivers/clk/imx/clk-pllv3.c                   |  21 +-
 15 files changed, 116 insertions(+), 1304 deletions(-)
 delete mode 100644 arch/arm/dts/imx6ull-colibri-emmc-eval-v3.dts
 delete mode 100644 arch/arm/dts/imx6ull-colibri-emmc-nonwifi.dtsi
 delete mode 100644 arch/arm/dts/imx6ull-colibri-eval-v3.dts
 delete mode 100644 arch/arm/dts/imx6ull-colibri-eval-v3.dtsi
 delete mode 100644 arch/arm/dts/imx6ull-colibri-nonwifi.dtsi
 delete mode 100644 arch/arm/dts/imx6ull-colibri.dtsi

-- 
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 Stefan Eichenberger [this message]
2026-11-20 11:10 ` [PATCH v1 1/7] clk: imx: imx6ul: fix the enet clock gate register Stefan Eichenberger
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-1-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.