On 16/02/2024 10:36, Yang Xiwen wrote:It's not PHY which needs special treatment. It's the MAC. The PHY needs to be reset with MAC and BUS clocks disabled explicitly(see hisi_femac_phy_reset() in patch 1). I can't find a way to implement this easily except moving all clocks/resets management to MAC driver. Especially when the boot loader might has enabled the clocks already (so the clocks need to be disabled explicitly(i.e. call clk_prepare_enable() and clk_disable() for them, and ensure there is only one consumer).
Why? You have phy node, so phy should know what to do.It ought to be. But it seems a bit hard to implement it like this.+ maxItems: 2items:
+
+ reset-names:
+ items:
+ - const: mac
+ - const: phy
+
+ hisilicon,phy-reset-delays-us:
+ minItems: 3
+ maxItems: 3
+ description: |
+ The 1st cell is reset pre-delay in micro seconds.
+ The 2nd cell is reset pulse in micro seconds.
+ The 3rd cell is reset post-delay in micro seconds.
- description:
Anyway, isn't this property of the phy?
Best regards,
Krzysztof