RE: [EXT] Re: [PATCH 2/3] arm64: dts: imx8ulp: Add the fec support

From: Wei Fang
Date: Mon Jul 04 2022 - 22:45:18 EST


Hi Ahmad:

Thanks for your reply. clock_ext_rmii and clock_ext_ts indeed belong into board DT, I will move them to imx.8ulp-evk.dts and resubmit the patch. And refer to imx8ulp reference manual, the enet_clk_ref only has external clock source, so it is related to specifical board. Therefore, can I delete the enet_clk_ref clock in imx8ulp.dtsi (as shown below) and override the clock and clock-names properties in imx8ulp-evk.dts ?

> + clocks = <&cgc1 IMX8ULP_CLK_XBAR_DIVBUS>,
> + <&pcc4 IMX8ULP_CLK_ENET>,
> + <&cgc1 IMX8ULP_CLK_ENET_TS_SEL>;
> + clock-names = "ipg", "ahb", "ptp";


-----Original Message-----
From: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
Sent: 2022年7月4日 15:07
To: Wei Fang <wei.fang@xxxxxxx>; davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx; kuba@xxxxxxxxxx; pabeni@xxxxxxxxxx; robh+dt@xxxxxxxxxx; krzysztof.kozlowski+dt@xxxxxxxxxx; shawnguo@xxxxxxxxxx; s.hauer@xxxxxxxxxxxxxx
Cc: Aisheng Dong <aisheng.dong@xxxxxxx>; devicetree@xxxxxxxxxxxxxxx; Peng Fan <peng.fan@xxxxxxx>; Jacky Bai <ping.bai@xxxxxxx>; netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>; kernel@xxxxxxxxxxxxxx; sudeep.holla@xxxxxxx; festevam@xxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Subject: [EXT] Re: [PATCH 2/3] arm64: dts: imx8ulp: Add the fec support

Caution: EXT Email

Hello Wei,

On 04.07.22 12:10, Wei Fang wrote:
> + clock_ext_rmii: clock-ext-rmii {
> + compatible = "fixed-clock";
> + clock-frequency = <50000000>;
> + #clock-cells = <0>;
> + clock-output-names = "ext_rmii_clk";
> + };
> +
> + clock_ext_ts: clock-ext-ts {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-output-names = "ext_ts_clk";
> + };

How are these SoC-specific? They sound like they belong into board DT.

> + clocks = <&cgc1 IMX8ULP_CLK_XBAR_DIVBUS>,
> + <&pcc4 IMX8ULP_CLK_ENET>,
> + <&cgc1 IMX8ULP_CLK_ENET_TS_SEL>,
> + <&clock_ext_rmii>;
> + clock-names = "ipg", "ahb", "ptp",
> + "enet_clk_ref";

I think the default should be the other way round, assume MAC to provide reference clock and allow override on board-level if PHY does it instead.

Cheers,
Ahmad


--
Pengutronix e.K. | |
Steuerwalder Str. 21 | https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.pengutronix.de%2F&amp;data=05%7C01%7Cwei.fang%40nxp.com%7C9dad0367d54b427c5e8008da5d8bd912%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637925152473535653%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=3tkqsToqq7%2BvNDkC7ZaMm0DsisugDpkVQXCr2zqPbF8%3D&amp;reserved=0 |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |