From patchwork Wed Aug 17 19:31:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12946331 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6AD25C2BB41 for ; Wed, 17 Aug 2022 19:31:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=2HwmLQVoFYUNpDqJq+5R5VygF8Zh8iB1PUE30rYwHwk=; b=TqQMww5kKKqNYT yWJ3Drg4eAfkyRMFvEZJbFqDsbxHX+08K/Vegm2CQEhjRUO5C7T4xWU3e8KkPsSsBj3p+usL4JkjZ zUpsgmEJi4KLaqNi/YUp/bb1qzm0xdme9vGU64KZWUohbIGZtJu2D35Iq/BPqAEcZjRxqhLg89n3z unkJtcgIIfWBfOmegp+JHJWH+x6P7fEDNxDgxCKXTXj4tb2lbu95xWK2i44xMTKHJeUpjQckjNJD7 UYRVXQs1ZLAFFxJgq7GWBo/PSW2QP1OI/u2gvt2pY9mF/wOooxG+1Ddi1xd7na2Yn/3S2Kp1C5GhM Difn5NERJrAM6NjSbRxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOOlK-005kI0-Qh; Wed, 17 Aug 2022 19:31:34 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOOlI-005kBq-5S for linux-phy@lists.infradead.org; Wed, 17 Aug 2022 19:31:33 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 516E5B81F49; Wed, 17 Aug 2022 19:31:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FF80C433D6; Wed, 17 Aug 2022 19:31:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660764685; bh=folaEiqwvPtEOi1ekaQcirtyCHSCVGrI+j/lwWcW9o4=; h=From:To:Cc:Subject:Date:From; b=cBDJ7OdwSban6nhrj+lYajXImQUp/x28+Vh//RpP1ThS8CLRlGJYbseB5U+LQh98P 8jLEihOuV+itRpV4zyUuXusoF3qJqRmJZ6b9XqORWlrHLUiGvcpw7ppWVoWm0boDHM 6mDDmOIM5GRXCIFzXbMJgNkRShMbmhjjUNl6h99ezfCqFZFQaC51tOUQ5U4jKmmNS4 rpyZZrV3v3al3Dy3mM1sgjmQsptXMyOip2f/goUqzNU8KbNhlzQMPgQdFcPWVkoEpd 63b3DkTFgFfOHbdj49L2jUq+Da+fvF5R0SNplPZuwhVRhN9q9QEHoW6ccKHJJafi8o G14hfwD8UywYg== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Vinod Koul , Kishon Vijay Abraham I , Linux Phy , Gregory Clement , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus Cc: Kees Cook , linux-kernel@vger.kernel.org, pali@kernel.org, josef.schlehofer@nic.cz, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH linux-phy 0/4] mvebu a3720 comphy: Fix serdes transmit amplitude Date: Wed, 17 Aug 2022 21:31:15 +0200 Message-Id: <20220817193119.4463-1-kabel@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220817_123132_387162_DEFAF09B X-CRM114-Status: GOOD ( 10.70 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org 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(-)