From patchwork Wed Aug 17 20:03:31 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: 12946385 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 8AF8FC25B08 for ; Wed, 17 Aug 2022 20:03:44 +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=wTwmtPGe7q50hjUadLIcLPj2TCuQ/9nPdpLMipFRD84=; b=yhHw7d2aQmvMZN 7UcC2kSDCEJQeiw6Tl7+iPR5zuFDXo02uXMEAz4N5AfhzfYjLKHPcLlM575sX4YwRcJc/4/p9DHur bnXpFLNUVHhaJHSy2u6zyWQ92r9D2HatNDzI18mmFnTBFhx7lei/W4GfGcZJ1Bt5rzBOQ76mCUfZ2 tiw0WV48RdAmDrLpR1yIRNyJxLHLvnKmLRSoCu8dbVnUNct2d6O7wPoODu/f04bFgz7AWZKCxnjJU cZD51/1xRwdWRV3417XNB0icADgklbcImGIVs4XS2s/qGwuPDtrMtUjygXcrWX95qx/UpcR9BTHdH lbar4idz0IRYtq36omig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOPGR-0065KI-PA; Wed, 17 Aug 2022 20:03:43 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOPGP-0065Ih-Nk for linux-phy@lists.infradead.org; Wed, 17 Aug 2022 20:03:43 +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 dfw.source.kernel.org (Postfix) with ESMTPS id 0D4FE614EE; Wed, 17 Aug 2022 20:03:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED50CC433D6; Wed, 17 Aug 2022 20:03:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660766620; bh=0ZcQMibMEVZJPOojqwq2yBUXq0LRnX3KICwqnQfqKLw=; h=From:To:Cc:Subject:Date:From; b=Hi3P8xdLSdIRaXdyCEilVUGu31fLrjs2H8b1VQ217qL7JEa/6KPFRJjRrTfnYihB9 r6z6ImlHAgBnf5vzPQmxudqvNiNTt+wJdzYdTFJHFUmelT3UPf8pknlXJF2fCI/Gwk GlkfyAQqNTIseRoLdVpeuyHIePIpiFXEJaYpR4In96sECKk/hIXdMtq84B+si8N1OE JGlQK9IC17FvHsR4zyLxanoPRP65aASolOouBG3AjZViAPdf0HgytjuKb8veoe5mLZ w8dZI6DMsc0SdE1XBag55q5WXk0/ezTcHOkq90rFHqwGdq6EdywXREM9FX0vYm3UkL ls2NOUwaWC3wg== 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 v2 0/4] mvebu a3720 comphy: Fix serdes transmit amplitude Date: Wed, 17 Aug 2022 22:03:31 +0200 Message-Id: <20220817200335.911-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_130341_834296_F5FD6A20 X-CRM114-Status: GOOD ( 11.38 ) 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 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(-)