All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Behún" <kabel@kernel.org>
To: Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Linux Phy <linux-phy@lists.infradead.org>,
	Gregory Clement <gregory.clement@bootlin.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Daniel Scally <djrscally@gmail.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: "Kees Cook" <keescook@chromium.org>,
	linux-kernel@vger.kernel.org, pali@kernel.org,
	josef.schlehofer@nic.cz, "Marek Behún" <kabel@kernel.org>
Subject: [PATCH linux-phy v2 0/4] mvebu a3720 comphy: Fix serdes transmit amplitude
Date: Wed, 17 Aug 2022 22:03:31 +0200	[thread overview]
Message-ID: <20220817200335.911-1-kabel@kernel.org> (raw)

Changes since v1:
- fix
    static const char * array should probably be static const char * const
  warning in patch 2
- fix wrong parameter order to function comphy_find_best_tx_amp()
  in patch 3

Original cover letter:

This series adds support for setting serdes transmit amplitude for
ethernet modes (sgmii, 1000base-x, 2500base-x) in the Marvell A3720
comphy driver.

The amplitude is set according to setting in device tree.

Finally the Turris MOX device tree is changed to set the 2500base-x
mode tx amplitude to 1025 mV.

This is needed to fix a weird issue wherein when A3720 sends a packet
to Topaz, and the packet contains a long sequence of 'J's or '\xb5'
bytes (these translate to '010101010101'... in 8b/10b encoding), the
packet may be lost on Topaz due to FCS error. The probability of
loss grows with number of 'J's:

  loss
                         ______
  100%                .-^
                     /
                    /
   50%             /
                  /
                 /
    0%  ______.-^
            90    114    125     number of consecutive 'J's

Marek Behún (4):
  string.h: Add str_has_proper_prefix()
  device property: Add {fwnode/device}_get_tx_p2p_amplitude()
  phy: marvell: phy-mvebu-a3700-comphy: Support changing tx amplitude
    for ethernet
  arm64: dts: armada-3720-turris-mox: Change comphy tx amplitude for
    2500base-x mode

 .../dts/marvell/armada-3720-turris-mox.dts    |  10 ++
 drivers/base/property.c                       | 130 ++++++++++++++++++
 drivers/phy/marvell/phy-mvebu-a3700-comphy.c  | 109 ++++++++++++++-
 include/linux/property.h                      |   5 +
 include/linux/string.h                        |  18 +++
 5 files changed, 271 insertions(+), 1 deletion(-)

-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

WARNING: multiple messages have this Message-ID (diff)
From: "Marek Behún" <kabel@kernel.org>
To: Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Linux Phy <linux-phy@lists.infradead.org>,
	Gregory Clement <gregory.clement@bootlin.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Daniel Scally <djrscally@gmail.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: "Kees Cook" <keescook@chromium.org>,
	linux-kernel@vger.kernel.org, pali@kernel.org,
	josef.schlehofer@nic.cz, "Marek Behún" <kabel@kernel.org>
Subject: [PATCH linux-phy v2 0/4] mvebu a3720 comphy: Fix serdes transmit amplitude
Date: Wed, 17 Aug 2022 22:03:31 +0200	[thread overview]
Message-ID: <20220817200335.911-1-kabel@kernel.org> (raw)

Changes since v1:
- fix
    static const char * array should probably be static const char * const
  warning in patch 2
- fix wrong parameter order to function comphy_find_best_tx_amp()
  in patch 3

Original cover letter:

This series adds support for setting serdes transmit amplitude for
ethernet modes (sgmii, 1000base-x, 2500base-x) in the Marvell A3720
comphy driver.

The amplitude is set according to setting in device tree.

Finally the Turris MOX device tree is changed to set the 2500base-x
mode tx amplitude to 1025 mV.

This is needed to fix a weird issue wherein when A3720 sends a packet
to Topaz, and the packet contains a long sequence of 'J's or '\xb5'
bytes (these translate to '010101010101'... in 8b/10b encoding), the
packet may be lost on Topaz due to FCS error. The probability of
loss grows with number of 'J's:

  loss
                         ______
  100%                .-^
                     /
                    /
   50%             /
                  /
                 /
    0%  ______.-^
            90    114    125     number of consecutive 'J's

Marek Behún (4):
  string.h: Add str_has_proper_prefix()
  device property: Add {fwnode/device}_get_tx_p2p_amplitude()
  phy: marvell: phy-mvebu-a3700-comphy: Support changing tx amplitude
    for ethernet
  arm64: dts: armada-3720-turris-mox: Change comphy tx amplitude for
    2500base-x mode

 .../dts/marvell/armada-3720-turris-mox.dts    |  10 ++
 drivers/base/property.c                       | 130 ++++++++++++++++++
 drivers/phy/marvell/phy-mvebu-a3700-comphy.c  | 109 ++++++++++++++-
 include/linux/property.h                      |   5 +
 include/linux/string.h                        |  18 +++
 5 files changed, 271 insertions(+), 1 deletion(-)

-- 
2.35.1


             reply	other threads:[~2022-08-17 20:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17 20:03 Marek Behún [this message]
2022-08-17 20:03 ` [PATCH linux-phy v2 0/4] mvebu a3720 comphy: Fix serdes transmit amplitude Marek Behún
2022-08-17 20:03 ` [PATCH linux-phy v2 1/4] string.h: Add str_has_proper_prefix() Marek Behún
2022-08-17 20:03   ` Marek Behún
2022-08-18 19:10   ` Andy Shevchenko
2022-08-18 19:10     ` Andy Shevchenko
2022-08-18 19:48     ` Marek Behún
2022-08-18 19:48       ` Marek Behún
2022-08-18 19:56       ` Andy Shevchenko
2022-08-18 19:56         ` Andy Shevchenko
2022-08-18 20:03         ` Marek Behún
2022-08-18 20:03           ` Marek Behún
2022-08-18 20:12         ` Marek Behún
2022-08-18 20:12           ` Marek Behún
2022-08-17 20:03 ` [PATCH linux-phy v2 2/4] device property: Add {fwnode/device}_get_tx_p2p_amplitude() Marek Behún
2022-08-17 20:03   ` Marek Behún
2022-08-18 19:22   ` Andy Shevchenko
2022-08-18 19:22     ` Andy Shevchenko
2022-08-18 19:41     ` Marek Behún
2022-08-18 19:41       ` Marek Behún
2022-08-18 20:10       ` Andy Shevchenko
2022-08-18 20:10         ` Andy Shevchenko
2022-08-18 20:17         ` Marek Behún
2022-08-18 20:17           ` Marek Behún
2022-08-17 20:03 ` [PATCH linux-phy v2 3/4] phy: marvell: phy-mvebu-a3700-comphy: Support changing tx amplitude for ethernet Marek Behún
2022-08-17 20:03   ` Marek Behún
2022-08-17 20:03 ` [PATCH linux-phy v2 4/4] arm64: dts: armada-3720-turris-mox: Change comphy tx amplitude for 2500base-x mode Marek Behún
2022-08-17 20:03   ` Marek Behún

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=20220817200335.911-1-kabel@kernel.org \
    --to=kabel@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=djrscally@gmail.com \
    --cc=gregory.clement@bootlin.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=josef.schlehofer@nic.cz \
    --cc=keescook@chromium.org \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=pali@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=vkoul@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.