linux-stable/arch/arm/mach-imx
Oleksij Rempel 5e16360a01 ARM: imx6q: skip ethernet refclock reconfiguration if enet_clk_ref is present
Current mach-imx6q code has following logic:
- if ptp clock of the ethernet controller node is attached to the SoC
  internal enet_ref clock, then we configure RMII reference clock pin as
  output by setting IOMUXC_GPR1 BIT(21).
  In this case - MAC (SoC) is the clock provider, PHY is the clock consumer.
- if ptp clock of the ethernet controller node is not attached to the
  enet_ref clock, then we configure RMII reference clock pin as input by
  clearing IOMUXC_GPR1 BIT(21).
  In this case - PHY is the clock provider, MAC is the clock consumer.

According to the Freescale MX6SDL ReferenceManual v4, IOMUXC_GPR1 BIT(21)
(page 2033) this configuration bit is not related to the PTP (IEEE1588)
clock:
21 ENET_CLK_SEL - choose enet reference clk mode:
   0 - get enet tx reference clk from pad (external OSC for both external
       PHY and Internal Controller)
   1 - get enet tx reference clk from internal clock from anatop (loopback
       through pad), this clock also sent out to external PHY.

According to the Documentation/devicetree/bindings/net/fsl,fec.yaml:
      The "ptp"(option), for IEEE1588 timer clock that requires the clock.
      The "enet_clk_ref"(option), for MAC transmit/receiver reference clock
      like RGMII TXC clock or RMII reference clock. It depends on board
      design, the clock is required if RGMII TXC and RMII reference clock
      source from SOC internal PLL.
      The "enet_out"(option), output clock for external device, like supply
      clock for PHY. The clock is required if PHY clock source from SOC.

We can see, that "enet_clk_ref" clock is the best fit for this purpose.
Other properties like "ptp" is designed for IEEE1588 and "enet_out" do
not have real functionality within imx related clock infrastructure.

Since the "enet_clk_ref" is not used by the imx6qdl devicetrees, we can
use it as indicator of potentially properly configured DT. At same time
we can keep ptp clock based logic as the fallback for old DTs.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-03-06 09:57:02 +08:00
..
anatop.c ARM: imx: Use correct SRC base address 2020-12-01 08:09:01 +08:00
avic.c irq: remove handle_domain_{irq,nmi}() 2021-10-26 10:13:31 +01:00
common.h ARM: imx: common: Move prototype outside the SMP block 2021-07-14 15:28:43 +08:00
cpu-imx5.c ARM: imx: add missing of_node_put() 2022-12-31 21:13:40 +08:00
cpu-imx25.c ARM: imx: add missing of_node_put() 2022-12-31 21:13:40 +08:00
cpu-imx27.c ARM: imx: add missing of_node_put() 2022-12-31 21:13:40 +08:00
cpu-imx31.c ARM: imx: add missing of_node_put() 2022-12-31 21:13:40 +08:00
cpu-imx35.c ARM: imx: add missing of_node_put() 2022-12-31 21:13:40 +08:00
cpu.c soc: imx: move cpu code to drivers/soc/imx 2020-05-20 23:03:50 +08:00
cpuidle-imx5.c cpuidle,arch: Mark all regular cpuidle_state:: Enter methods __cpuidle 2023-01-13 11:48:18 +01:00
cpuidle-imx6q.c cpuidle, arch: Mark all ct_cpuidle_enter() callers __cpuidle 2023-01-13 11:48:17 +01:00
cpuidle-imx6sl.c cpuidle,arch: Mark all regular cpuidle_state:: Enter methods __cpuidle 2023-01-13 11:48:18 +01:00
cpuidle-imx6sx.c cpuidle, arch: Mark all ct_cpuidle_enter() callers __cpuidle 2023-01-13 11:48:17 +01:00
cpuidle-imx7ulp.c cpuidle,arch: Mark all regular cpuidle_state:: Enter methods __cpuidle 2023-01-13 11:48:18 +01:00
cpuidle.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 159 2019-05-30 11:26:37 -07:00
crmregs-imx3.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
gpc.c ARM: imx: Remove unnecessary blank lines 2020-03-11 15:17:02 +08:00
hardware.h ARM: imx: Remove unused IMX_GPIO_NR() macro 2021-01-29 16:47:25 +08:00
headsmp.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
hotplug.c ARM: imx: add smp support for imx7d 2021-06-12 12:02:57 +08:00
iim.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
irq-common.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
irq-common.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
Kconfig ARM: Kconfig: clean up platform selection 2022-08-18 16:44:59 +02:00
mach-imx1.c ARM: imx: avic: Convert to using IRQCHIP_DECLARE 2021-03-15 12:21:18 +08:00
mach-imx6q.c ARM: imx6q: skip ethernet refclock reconfiguration if enet_clk_ref is present 2023-03-06 09:57:02 +08:00
mach-imx6sl.c ARM: imx: use device_initcall for imx_soc_device_init 2020-05-20 23:03:42 +08:00
mach-imx6sx.c ARM: imx6sx: remove Atheros AR8031 PHY fixup 2021-05-23 11:32:46 +08:00
mach-imx6ul.c ARM: imx: mach-imx6ul: add imx6ulz support 2023-01-26 19:25:34 +08:00
mach-imx7d-cm4.c ARM: imx: Provide support for NXP i.MX7D Cortex-M4 2018-07-03 15:17:57 +08:00
mach-imx7d.c ARM: imx: add smp support for imx7d 2021-06-12 12:02:57 +08:00
mach-imx7ulp.c ARM: imx: imx7ulp: Add a comment explaining the B2 silicon version 2020-11-10 09:56:01 +08:00
mach-imx25.c ARM: imx: avic: Convert to using IRQCHIP_DECLARE 2021-03-15 12:21:18 +08:00
mach-imx27.c ARM: imx: avic: Convert to using IRQCHIP_DECLARE 2021-03-15 12:21:18 +08:00
mach-imx31.c ARM: imx: avic: Convert to using IRQCHIP_DECLARE 2021-03-15 12:21:18 +08:00
mach-imx35.c ARM: imx: avic: Convert to using IRQCHIP_DECLARE 2021-03-15 12:21:18 +08:00
mach-imx50.c ARM: imx: Initialize SoC ID on i.MX50 2021-05-13 15:42:21 +08:00
mach-imx51.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 159 2019-05-30 11:26:37 -07:00
mach-imx53.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 159 2019-05-30 11:26:37 -07:00
mach-imxrt.c ARM: imx: Add initial support for i.MXRT10xx family 2022-01-28 17:46:42 +08:00
mach-ls1021a.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mach-vf610.c ARM: imx: use device_initcall for imx_soc_device_init 2020-05-20 23:03:42 +08:00
Makefile ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
mm-imx3.c ARM: imx3: Remove unneeded #include <linux/pinctrl/machine.h> 2022-11-11 15:04:15 +08:00
mmdc.c ARM: imx: Call ida_simple_remove() for ida_simple_get 2023-01-26 07:55:53 +08:00
mx2x.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
mx3x.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mx27.h ARM: imx: Remove unused definitions 2020-09-22 14:08:13 +08:00
mx31.h ARM: imx: Remove unused definitions 2020-09-22 14:08:13 +08:00
mx35.h ARM: imx: Remove unused definitions 2020-09-22 14:08:13 +08:00
mxc.h ARM: imx: move cpu definitions into a header 2020-05-20 23:03:47 +08:00
platsmp.c ARM: imx: add smp support for imx7d 2021-06-12 12:02:57 +08:00
pm-imx5.c ARM: mach-imx: Fix a spelling in the file pm-imx5.c 2021-03-15 12:21:59 +08:00
pm-imx6.c Merge branches 'devel-stable' and 'misc' into for-linus 2021-11-02 09:04:22 +00:00
pm-imx7ulp.c ARM: imx: Add missing of_node_put() 2020-02-18 17:46:08 +08:00
pm-imx25.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pm-imx27.c ARM: imx: pm-imx27: Include "common.h" 2021-05-23 10:48:56 +08:00
resume-imx6.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
src.c ARM: imx: register reset controller from a platform driver 2021-10-15 09:38:06 +08:00
ssi-fiq-ksym.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ssi-fiq.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
suspend-imx6.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
suspend-imx53.S ARM: imx: pm-imx5: Fix references to imx5_cpu_suspend_info 2021-05-13 15:40:08 +08:00
system.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
tzic.c irq: remove handle_domain_{irq,nmi}() 2021-10-26 10:13:31 +01:00