Re: [PATCH net-next v4 2/2] net: dsa: microchip: add property to select internal RMII reference clock

From: Vladimir Oltean
Date: Fri Oct 20 2023 - 10:38:08 EST


On Fri, Oct 20, 2023 at 04:25:04PM +0200, Ante Knezic wrote:
> +static void ksz88x3_config_rmii_clk(struct ksz_device *dev)
> +{
> + bool rmii_clk_internal;
> +
> + if (!ksz_is_ksz88x3(dev))
> + return;
> +
> + rmii_clk_internal = of_property_read_bool(dev->dev->of_node,
> + "microchip,rmii-clk-internal");
> +
> + ksz_cfg(dev, KSZ88X3_REG_FVID_AND_HOST_MODE,
> + KSZ88X3_PORT3_RMII_CLK_INTERNAL, rmii_clk_internal);
> +}

Sorry, I didn't realize on v3 that you didn't completely apply my
feedback on v2. Can "microchip,rmii-clk-internal" be a port device tree
property? You have indeed moved its parsing to port code, but it is
still located directly under the switch node in the device tree.

I'm thinking that if this property was also applicable to other switches
with multiple RMII ports, the setting would be per port rather than global.