Commit 7602eb87 authored by Paolo Abeni's avatar Paolo Abeni
Browse files

Merge branch 'net-stmmac-deprecate-snps-en-tx-lpi-clockgating-property'

Russell King says:

====================
net: stmmac: deprecate "snps,en-tx-lpi-clockgating" property

This series deprecates the "snps,en-tx-lpi-clockgating" property for
stmmac.

MII Transmit clock gating, where the MAC hardware supports gating this
clock, is a function of the connected PHY capabilities, which it
reports through its status register.

GMAC versions that support transmit clock gating twiddle the LPITCSE
bit accordingly in the LPI control/status register, which is handled
by the GMAC core specific code.

So, "snps,en-tx-lpi-clockgating" not something that is a GMAC property,
but is a work-around for phylib not providing an interface to determine
whether the PHY allows the transmit clock to be disabled.

This series converts the two SoCs that make use of this property (which,
I hasten to add, is set in the SoC code) to use the PHY capability bit
instead of a DT property, then removes the DT property from the .dtsi,
deprecates it in the snps,dwmac binding, and finally in the stmmac code.

I am expecting some discussion on how to merge this, as I think the
order in which these changes is made is important - we don't want to
deprecate the old way until the new code has landed.
====================

Link: https://patch.msgid.link/Z9FVHEf3uUqtKzyt@shell.armlinux.org.uk


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parents 4df2ebfc cf0a96de
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -494,6 +494,7 @@ properties:

  snps,en-tx-lpi-clockgating:
    $ref: /schemas/types.yaml#/definitions/flag
    deprecated: true
    description:
      Enable gating of the MAC TX clock during TX low-power mode

+0 −1
Original line number Diff line number Diff line
@@ -1781,7 +1781,6 @@ ethernet0: ethernet@5800a000 {
				st,syscon = <&syscfg 0x4>;
				snps,mixed-burst;
				snps,pbl = <2>;
				snps,en-tx-lpi-clockgating;
				snps,axi-config = <&stmmac_axi_config_0>;
				snps,tso;
				access-controllers = <&etzpc 94>;
+0 −2
Original line number Diff line number Diff line
@@ -1022,7 +1022,6 @@ gmac0: ethernet@16030000 {
			snps,force_thresh_dma_mode;
			snps,axi-config = <&stmmac_axi_setup>;
			snps,tso;
			snps,en-tx-lpi-clockgating;
			snps,txpbl = <16>;
			snps,rxpbl = <16>;
			starfive,syscon = <&aon_syscon 0xc 0x12>;
@@ -1053,7 +1052,6 @@ gmac1: ethernet@16040000 {
			snps,force_thresh_dma_mode;
			snps,axi-config = <&stmmac_axi_setup>;
			snps,tso;
			snps,en-tx-lpi-clockgating;
			snps,txpbl = <16>;
			snps,rxpbl = <16>;
			starfive,syscon = <&sys_syscon 0x90 0x2>;
+1 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@ static int starfive_dwmac_probe(struct platform_device *pdev)
		plat_dat->set_clk_tx_rate = stmmac_set_clk_tx_rate;

	dwmac->dev = &pdev->dev;
	plat_dat->flags |= STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP;
	plat_dat->bsp_priv = dwmac;
	plat_dat->dma_cfg->dche = true;

+1 −0
Original line number Diff line number Diff line
@@ -538,6 +538,7 @@ static int stm32_dwmac_probe(struct platform_device *pdev)
		return ret;
	}

	plat_dat->flags |= STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP;
	plat_dat->bsp_priv = dwmac;

	ret = stm32_dwmac_init(plat_dat, false);
Loading