mbox series

[v3,00/19] ARM: imx: make Ethernet refclock configurable

Message ID 20230131084642.709385-1-o.rempel@pengutronix.de (mailing list archive)
Headers show
Series ARM: imx: make Ethernet refclock configurable | expand

Message

Oleksij Rempel Jan. 31, 2023, 8:46 a.m. UTC
changes v3:
- add Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
- rebase on top of abelvesa/for-next

changes v2:
- remove "ARM: imx6q: use of_clk_get_by_name() instead of_clk_get() to
  get ptp clock" patch
- fix build warnings
- add "Acked-by: Lee Jones <lee@kernel.org>"
- reword some commits as suggested by Fabio

Most of i.MX SoC variants have configurable FEC/Ethernet reference
lock
used by RMII specification. This functionality is located in the
general purpose registers (GRPx) and till now was not implemented as
part of SoC clock tree.

With this patch set, we move forward and add this missing functionality
to some of i.MX clk drivers. So, we will be able to configure clock
opology
by using devicetree and be able to troubleshoot clock dependencies
by using clk_summary etc.

Currently implemented and tested i.MX6Q, i.MX6DL and i.MX6UL variants.


Oleksij Rempel (19):
  clk: imx: add clk-gpr-mux driver
  clk: imx6q: add ethernet refclock mux support
  ARM: imx6q: skip ethernet refclock reconfiguration if enet_clk_ref is
    present
  ARM: dts: imx6qdl: use enet_clk_ref instead of enet_out for the FEC
    node
  ARM: dts: imx6dl-lanmcu: configure ethernet reference clock parent
  ARM: dts: imx6dl-alti6p: configure ethernet reference clock parent
  ARM: dts: imx6dl-plybas: configure ethernet reference clock parent
  ARM: dts: imx6dl-plym2m: configure ethernet reference clock parent
  ARM: dts: imx6dl-prtmvt: configure ethernet reference clock parent
  ARM: dts: imx6dl-victgo: configure ethernet reference clock parent
  ARM: dts: imx6q-prtwd2: configure ethernet reference clock parent
  ARM: dts: imx6qdl-skov-cpu: configure ethernet reference clock parent
  ARM: dts: imx6dl-eckelmann-ci4x10: configure ethernet reference clock
    parent
  clk: imx: add imx_obtain_fixed_of_clock()
  clk: imx6ul: fix enet1 gate configuration
  clk: imx6ul: add ethernet refclock mux support
  ARM: dts: imx6ul: set enet_clk_ref to CLK_ENETx_REF_SEL
  ARM: mach-imx: imx6ul: remove not optional ethernet refclock overwrite
  ARM: dts: imx6ul-prti6g: configure ethernet reference clock parent

 arch/arm/boot/dts/imx6dl-alti6p.dts           |  12 +-
 arch/arm/boot/dts/imx6dl-eckelmann-ci4x10.dts |  13 +-
 arch/arm/boot/dts/imx6dl-lanmcu.dts           |  12 +-
 arch/arm/boot/dts/imx6dl-plybas.dts           |  12 +-
 arch/arm/boot/dts/imx6dl-plym2m.dts           |  12 +-
 arch/arm/boot/dts/imx6dl-prtmvt.dts           |  11 +-
 arch/arm/boot/dts/imx6dl-victgo.dts           |  12 +-
 arch/arm/boot/dts/imx6q-prtwd2.dts            |  17 ++-
 arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi       |  12 +-
 arch/arm/boot/dts/imx6qdl.dtsi                |   4 +-
 arch/arm/boot/dts/imx6ul-prti6g.dts           |  14 ++-
 arch/arm/boot/dts/imx6ul.dtsi                 |  10 +-
 arch/arm/mach-imx/mach-imx6q.c                |  10 +-
 arch/arm/mach-imx/mach-imx6ul.c               |  20 ---
 drivers/clk/imx/Makefile                      |   1 +
 drivers/clk/imx/clk-gpr-mux.c                 | 119 ++++++++++++++++++
 drivers/clk/imx/clk-imx6q.c                   |  13 ++
 drivers/clk/imx/clk-imx6ul.c                  |  33 ++++-
 drivers/clk/imx/clk.c                         |  14 +++
 drivers/clk/imx/clk.h                         |   8 ++
 include/dt-bindings/clock/imx6qdl-clock.h     |   4 +-
 include/dt-bindings/clock/imx6ul-clock.h      |   7 +-
 include/linux/mfd/syscon/imx6q-iomuxc-gpr.h   |   6 +-
 23 files changed, 296 insertions(+), 80 deletions(-)
 create mode 100644 drivers/clk/imx/clk-gpr-mux.c

Comments

Abel Vesa Jan. 31, 2023, 12:51 p.m. UTC | #1
On 23-01-31 09:46:23, Oleksij Rempel wrote:
> changes v3:
> - add Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
> - rebase on top of abelvesa/for-next

Applied all clk/imx ones. Thanks!

> 
> changes v2:
> - remove "ARM: imx6q: use of_clk_get_by_name() instead of_clk_get() to
>   get ptp clock" patch
> - fix build warnings
> - add "Acked-by: Lee Jones <lee@kernel.org>"
> - reword some commits as suggested by Fabio
> 
> Most of i.MX SoC variants have configurable FEC/Ethernet reference
> lock
> used by RMII specification. This functionality is located in the
> general purpose registers (GRPx) and till now was not implemented as
> part of SoC clock tree.
> 
> With this patch set, we move forward and add this missing functionality
> to some of i.MX clk drivers. So, we will be able to configure clock
> opology
> by using devicetree and be able to troubleshoot clock dependencies
> by using clk_summary etc.
> 
> Currently implemented and tested i.MX6Q, i.MX6DL and i.MX6UL variants.
> 
> 
> Oleksij Rempel (19):
>   clk: imx: add clk-gpr-mux driver
>   clk: imx6q: add ethernet refclock mux support
>   ARM: imx6q: skip ethernet refclock reconfiguration if enet_clk_ref is
>     present
>   ARM: dts: imx6qdl: use enet_clk_ref instead of enet_out for the FEC
>     node
>   ARM: dts: imx6dl-lanmcu: configure ethernet reference clock parent
>   ARM: dts: imx6dl-alti6p: configure ethernet reference clock parent
>   ARM: dts: imx6dl-plybas: configure ethernet reference clock parent
>   ARM: dts: imx6dl-plym2m: configure ethernet reference clock parent
>   ARM: dts: imx6dl-prtmvt: configure ethernet reference clock parent
>   ARM: dts: imx6dl-victgo: configure ethernet reference clock parent
>   ARM: dts: imx6q-prtwd2: configure ethernet reference clock parent
>   ARM: dts: imx6qdl-skov-cpu: configure ethernet reference clock parent
>   ARM: dts: imx6dl-eckelmann-ci4x10: configure ethernet reference clock
>     parent
>   clk: imx: add imx_obtain_fixed_of_clock()
>   clk: imx6ul: fix enet1 gate configuration
>   clk: imx6ul: add ethernet refclock mux support
>   ARM: dts: imx6ul: set enet_clk_ref to CLK_ENETx_REF_SEL
>   ARM: mach-imx: imx6ul: remove not optional ethernet refclock overwrite
>   ARM: dts: imx6ul-prti6g: configure ethernet reference clock parent
> 
>  arch/arm/boot/dts/imx6dl-alti6p.dts           |  12 +-
>  arch/arm/boot/dts/imx6dl-eckelmann-ci4x10.dts |  13 +-
>  arch/arm/boot/dts/imx6dl-lanmcu.dts           |  12 +-
>  arch/arm/boot/dts/imx6dl-plybas.dts           |  12 +-
>  arch/arm/boot/dts/imx6dl-plym2m.dts           |  12 +-
>  arch/arm/boot/dts/imx6dl-prtmvt.dts           |  11 +-
>  arch/arm/boot/dts/imx6dl-victgo.dts           |  12 +-
>  arch/arm/boot/dts/imx6q-prtwd2.dts            |  17 ++-
>  arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi       |  12 +-
>  arch/arm/boot/dts/imx6qdl.dtsi                |   4 +-
>  arch/arm/boot/dts/imx6ul-prti6g.dts           |  14 ++-
>  arch/arm/boot/dts/imx6ul.dtsi                 |  10 +-
>  arch/arm/mach-imx/mach-imx6q.c                |  10 +-
>  arch/arm/mach-imx/mach-imx6ul.c               |  20 ---
>  drivers/clk/imx/Makefile                      |   1 +
>  drivers/clk/imx/clk-gpr-mux.c                 | 119 ++++++++++++++++++
>  drivers/clk/imx/clk-imx6q.c                   |  13 ++
>  drivers/clk/imx/clk-imx6ul.c                  |  33 ++++-
>  drivers/clk/imx/clk.c                         |  14 +++
>  drivers/clk/imx/clk.h                         |   8 ++
>  include/dt-bindings/clock/imx6qdl-clock.h     |   4 +-
>  include/dt-bindings/clock/imx6ul-clock.h      |   7 +-
>  include/linux/mfd/syscon/imx6q-iomuxc-gpr.h   |   6 +-
>  23 files changed, 296 insertions(+), 80 deletions(-)
>  create mode 100644 drivers/clk/imx/clk-gpr-mux.c
> 
> -- 
> 2.30.2
>
Shawn Guo March 6, 2023, 2:02 a.m. UTC | #2
On Tue, Jan 31, 2023 at 09:46:23AM +0100, Oleksij Rempel wrote:
> changes v3:
> - add Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
> - rebase on top of abelvesa/for-next
> 
> changes v2:
> - remove "ARM: imx6q: use of_clk_get_by_name() instead of_clk_get() to
>   get ptp clock" patch
> - fix build warnings
> - add "Acked-by: Lee Jones <lee@kernel.org>"
> - reword some commits as suggested by Fabio
> 
> Most of i.MX SoC variants have configurable FEC/Ethernet reference
> lock
> used by RMII specification. This functionality is located in the
> general purpose registers (GRPx) and till now was not implemented as
> part of SoC clock tree.
> 
> With this patch set, we move forward and add this missing functionality
> to some of i.MX clk drivers. So, we will be able to configure clock
> opology
> by using devicetree and be able to troubleshoot clock dependencies
> by using clk_summary etc.
> 
> Currently implemented and tested i.MX6Q, i.MX6DL and i.MX6UL variants.
> 
> 
> Oleksij Rempel (19):
>   clk: imx: add clk-gpr-mux driver
>   clk: imx6q: add ethernet refclock mux support
>   ARM: imx6q: skip ethernet refclock reconfiguration if enet_clk_ref is
>     present
>   ARM: dts: imx6qdl: use enet_clk_ref instead of enet_out for the FEC
>     node
>   ARM: dts: imx6dl-lanmcu: configure ethernet reference clock parent
>   ARM: dts: imx6dl-alti6p: configure ethernet reference clock parent
>   ARM: dts: imx6dl-plybas: configure ethernet reference clock parent
>   ARM: dts: imx6dl-plym2m: configure ethernet reference clock parent
>   ARM: dts: imx6dl-prtmvt: configure ethernet reference clock parent
>   ARM: dts: imx6dl-victgo: configure ethernet reference clock parent
>   ARM: dts: imx6q-prtwd2: configure ethernet reference clock parent
>   ARM: dts: imx6qdl-skov-cpu: configure ethernet reference clock parent
>   ARM: dts: imx6dl-eckelmann-ci4x10: configure ethernet reference clock
>     parent
>   clk: imx: add imx_obtain_fixed_of_clock()
>   clk: imx6ul: fix enet1 gate configuration
>   clk: imx6ul: add ethernet refclock mux support
>   ARM: dts: imx6ul: set enet_clk_ref to CLK_ENETx_REF_SEL
>   ARM: mach-imx: imx6ul: remove not optional ethernet refclock overwrite
>   ARM: dts: imx6ul-prti6g: configure ethernet reference clock parent

Applied all mach-imx and DTS ones, thanks!