Skip to content

colibri-imx6ull: fix the Ethernet PHY detection

Stefan Eichenberger u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7clk: imx: imx6ul: fix the enet clock gate registerdrivers/clk/imx/clk-imx6ul.c+7 -20 replies
2/7clk: imx: pllv3: wait for the ENET PLL to lockdrivers/clk/imx/clk-pllv3.c+18 -10 replies
3/7clk: imx: pllv3: do not touch the ENET output gatedrivers/clk/imx/clk-pllv3.c+2 -00 replies
4/7clk: imx: imx6ul: add the enet clock treedrivers/clk/imx/clk-imx6ul.c+71 -50 replies
5/7board: toradex: colibri-imx6ull: drop the static serial deviceboard/toradex/colibri-imx6ull/colibri-imx6ull.c+0 -110 replies
6/7arm: dts: imx6ull-colibri: migrate to OF_UPSTREAMarch/arm/dts/Makefile arch/arm/dts/imx6ull-colibri-emmc-eval-v3.dts arch/arm/dts/imx6ull-colibri-emmc-nonwifi.dtsi +8 more+5 -12580 replies
7/7board: toradex: colibri-imx6ull: enable the clock frameworkarch/arm/dts/imx6ull-colibri-eval-v3-u-boot.dtsi board/toradex/colibri-imx6ull/colibri-imx6ull.c configs/colibri-imx6ull-emmc_defconfig +1 more+15 -290 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by.

PatchStefan Eichenberger
1/7T-b
2/7
3/7
4/7
5/7T-b
6/7T-b
7/7T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/7] colibri-imx6ull: fix the Ethernet PHY detection

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
Signature · 1 line
2.56.1