On 1/14/20 8:20 AM, Christophe ROULLIER wrote: > On 1/13/20 6:30 PM, Marek Vasut wrote: >> On 1/13/20 5:14 PM, Christophe ROULLIER wrote: >> [...] >>>>> Christophe you can complete my answer if it is not enough clear. >>>> I would expect that you should describe _all_ the clock which are routed >>>> into the ethernet IP in the DT and if the driver doesn't need some of >>>> those clock, the driver should just not enable such clock. >>> Hi Marek, >> Hi, >> >>> You are right, we will add by default all clocks used by stm32mp157, and >>> modify driver to decide if we need to enable it or not. >>> >>> So ACK to add ETHCK_K in stm32mp157c.dtsi >> Do you want me to send the kernel patch ? I have it somewhere here too, >> I can roll it out tomorrow-ish. > > Hi Marek, > > I have not changed yet, the kernel and uboot driver code, to manage this > behavior. I will implement and push new code soon.
The kernel code already does what is needed. You only need similar patch to the DT, cfr attachment.
>From a84e5d5680c2b1e3e08cba67aaff0b5417f80790 Mon Sep 17 00:00:00 2001 From: Marek Vasut <ma...@denx.de> Date: Tue, 3 Dec 2019 00:50:25 +0100 Subject: [PATCH] ARM: dts: stm32: Add missing ETHCK clock to ethernet node Add missing 'eth-ck' clock to the ethernet node. These clock are used to generate external clock signal for the PHY in case 'st,eth_ref_clk_sel' is specified. Signed-off-by: Marek Vasut <ma...@denx.de> Cc: Patrick Delaunay <patrick.delau...@st.com> Cc: Patrice Chotard <patrice.chot...@st.com> --- arch/arm/boot/dts/stm32mp157c.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/arm/boot/dts/stm32mp157c.dtsi index f20e0101b577..9e7e6328f97c 100644 --- a/arch/arm/boot/dts/stm32mp157c.dtsi +++ b/arch/arm/boot/dts/stm32mp157c.dtsi @@ -1380,11 +1380,13 @@ clock-names = "stmmaceth", "mac-clk-tx", "mac-clk-rx", + "eth-ck", "ethstp", "syscfg-clk"; clocks = <&rcc ETHMAC>, <&rcc ETHTX>, <&rcc ETHRX>, + <&rcc ETHCK_K>, <&rcc ETHSTP>, <&rcc SYSCFG>; st,syscon = <&syscfg 0x4>; -- 2.24.1