netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@impinj.com>
To: "vitaly.gaiduk@cloudbear.ru" <vitaly.gaiduk@cloudbear.ru>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>
Cc: "mark.rutland@arm.com" <mark.rutland@arm.com>,
	"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 2/2] net: phy: dp83867: Add SGMII mode type switching
Date: Mon, 9 Sep 2019 17:40:11 +0000	[thread overview]
Message-ID: <1568050810.6344.13.camel@impinj.com> (raw)
In-Reply-To: <1568049566-16708-1-git-send-email-vitaly.gaiduk@cloudbear.ru>

On Mon, 2019-09-09 at 20:19 +0300, Vitaly Gaiduk wrote:
> This patch adds ability to switch beetween two PHY SGMII modes.
> Some hardware, for example, FPGA IP designs may use 6-wire mode
> which enables differential SGMII clock to MAC.
> 
> +
> +		val = phy_read_mmd(phydev, DP83867_DEVADDR, DP83867_SGMIICTL);
> +		/* SGMII type is set to 4-wire mode by default.
> +		 * If we place appropriate property in dts (see above)
> +		 * switch on 6-wire mode.
> +		 */
> +		if (dp83867->sgmii_ref_clk_en)
> +			val |= DP83867_SGMII_TYPE;
> +		else
> +			val &= ~DP83867_SGMII_TYPE;
> +		phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_SGMIICTL, val);

Should use phy_modify_mmd().

  parent reply	other threads:[~2019-09-09 17:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 16:25 [PATCH 2/2] net: phy: dp83867: Add SGMII mode type switching Vitaly Gaiduk
2019-09-05 16:26 ` [PATCH 1/2] net: phy: dp83867: Add documentation for SGMII mode type Vitaly Gaiduk
2019-09-05 17:06   ` Trent Piepho
2019-09-06 19:29   ` Andrew Lunn
2019-09-06 20:45     ` Vitaly Gaiduk
2019-09-07 15:41       ` Florian Fainelli
2019-09-07 15:24   ` David Miller
2019-09-07 15:39   ` Andrew Lunn
     [not found]   ` <2894361567896439@iva5-be053096037b.qloud-c.yandex.net>
2019-09-08  8:54     ` Andrew Lunn
2019-09-09 11:07       ` Vitaly Gaiduk
2019-09-09 11:02   ` [PATCH v2 2/2] net: phy: dp83867: Add SGMII mode type switching Vitaly Gaiduk
2019-09-09 11:02     ` [PATCH v2 1/2] net: phy: dp83867: Add documentation for SGMII mode type Vitaly Gaiduk
2019-09-09 14:23     ` [PATCH v2 2/2] net: phy: dp83867: Add SGMII mode type switching Florian Fainelli
2019-09-09 16:02     ` [PATCH v3] " Vitaly Gaiduk
2019-09-09 16:40       ` Florian Fainelli
2019-09-09 16:52     ` [PATCH v3 2/2] " Vitaly Gaiduk
2019-09-09 16:52       ` [PATCH v3 1/2] net: phy: dp83867: Add documentation for SGMII mode type Vitaly Gaiduk
2019-09-09 16:56         ` Florian Fainelli
2019-09-09 17:19         ` [PATCH v4 2/2] net: phy: dp83867: Add SGMII mode type switching Vitaly Gaiduk
2019-09-09 17:19           ` [PATCH v4 1/2] net: phy: dp83867: Add documentation for SGMII mode type Vitaly Gaiduk
2019-09-11 22:37             ` David Miller
2019-09-09 17:40           ` Trent Piepho [this message]
2019-09-11 22:37           ` [PATCH v4 2/2] net: phy: dp83867: Add SGMII mode type switching David Miller
2019-09-12 10:17             ` Vitaly Gaiduk
2019-09-09 16:56       ` [PATCH v3 " Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1568050810.6344.13.camel@impinj.com \
    --to=tpiepho@impinj.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=vitaly.gaiduk@cloudbear.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).