From patchwork Sat Dec 29 14:35:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10744915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1CA7614E2 for ; Sat, 29 Dec 2018 14:37:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AFE128A75 for ; Sat, 29 Dec 2018 14:37:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F325E28A9C; Sat, 29 Dec 2018 14:37:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 997D328A75 for ; Sat, 29 Dec 2018 14:37:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DBgq9g7mfuMdcUi8n3jqwc1EdfDam+KK7OtG+Yopt/o=; b=lK5qGVXlCzqE+R 4VQcZ+AMJdrySIlY9gB+cFK2uUn+SvZDv1pZw5hq/GyT2Fcu8eDgvFkuew6wqSWmcTKA+QjIj1VRs ATg07pENAuJCSG7E5BkttOAvCGHSbAIO+mgRpLHtDDbk7X1niSL3UxEh3vjUTJ9ucooUQxzL6mL5x gLMXnYiUsSKoilyU+HBGysVbR4vGqsom1BAM7zN7gF4f4zwShzDnY3Y2EPY/yWNdHrZ7QfzU/BMIQ F/BXqhXYc1uTS7bYnBsBKUnBTe8YMOcW9YJ6gYD+7uhH15L979Eo0VuMreyDJuGw+k67gXme+nLBw CcmdNbrqDSZjPnDro5Tg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gdFjd-00044I-HH; Sat, 29 Dec 2018 14:37:05 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gdFj5-0003XZ-Ur; Sat, 29 Dec 2018 14:36:34 +0000 Received: by mail-wr1-x443.google.com with SMTP id q18so23184379wrx.9; Sat, 29 Dec 2018 06:36:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=e3wgQw6VtGUASHsXZNXi3LuOVnjSs4aHkOWDavF1HK4=; b=Q730wkm+Vvx3N3zGKhrukZfxR6m/owsdnDEfgbz1uS1yP7XvfG2ilAbYzNQunnBD6d AOI3efIwrczLr0Gfw9ztYemj80nQmFhW/pBXHiBYVFz665cFDCrc53cTLrq+Robf6gk8 lBzF6f89IYIwGWE+diX1n0EM1fntN1rgl5KEf7V2n8w0D/0EqI8711XFh6+Kg5R2tvnB JSuGvUaoZq2FvUZ+Ejw2iDp87RdMjeSHxNAHbO1SY3d7E86GYuGNLO58YBI8iCiBdntJ jZEMnqTT38exeXmEZW5q/rKmq9Z6lAT5rJOtI4vqfjIGMnMr1hCptGWx7pOZ2UYdrnsP J1YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=e3wgQw6VtGUASHsXZNXi3LuOVnjSs4aHkOWDavF1HK4=; b=q5g/MMGaSpODAwUak/Ki4ku88pFYW1hdbXUpXckMYJqebG9Hf7zvIbRQrpdOxdq1NN EBxqid39VyuTgxZ9pTXzdvBlwjDSDuhi2RpDqb0pOp42ncE7XMV64A2TDULKXimo5JrY r81wSR+GSRZ9hRU2dFeXMMy+VbjPfzX9jtILDqVDEdw+lZxcXmBTaDWSBRwosyz3/MJj N5CCOG2OSdLmUZkCVpjNthGSnTkyMf65pzhxccmvoHvLYZjTJ9M7huH2ApnK3MJgf2Is 57MlmQzQ6W3OrY2oaHr3h53z9STzCoAjyJ1N9mtCQdXyyUxX1T0Vmb0RZhG9lUAlTptX mhgA== X-Gm-Message-State: AJcUukfMe4d+D5NwpGRLEedveRKVn26mrxCRHJdXiQicMK600cHIL6iA Qt+XQV55YhEBMKNIsv65prQ02HcR X-Google-Smtp-Source: ALg8bN6MUT4VPzo5n6Jh3/XRkqJKJ+MBAULhQZgValKxGUFygdL8QUkKXq51uHu3m/GJ6Busdmw3Wg== X-Received: by 2002:adf:8506:: with SMTP id 6mr18856219wrh.128.1546094181047; Sat, 29 Dec 2018 06:36:21 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD7294600914F24DE1716D3FC.dip0.t-ipconnect.de. [2003:dc:d729:4600:914f:24de:1716:d3fc]) by smtp.googlemail.com with ESMTPSA id k135sm53626412wmd.42.2018.12.29.06.36.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Dec 2018 06:36:20 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com, ingrassia@epigenesys.com Subject: [PATCH v3 2/2] ARM: dts: meson8b: fix the Ethernet data line signals in eth_rgmii_pins Date: Sat, 29 Dec 2018 15:35:56 +0100 Message-Id: <20181229143556.27339-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181229143556.27339-1-martin.blumenstingl@googlemail.com> References: <20181229143556.27339-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181229_063631_993175_AED4EA9B X-CRM114-Status: GOOD ( 16.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org, jianxin.pan@amlogic.com, linus.luessing@c0d3.blue Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP According to the Odroid-C1+ schematics the Ethernet TXD1 signal is routed to GPIOH_5 and the TXD0 signal is routed to GPIOH_6. The public S805 datasheet shows that TXD0 can be routed to DIF_2_P and TXD1 can be routed to DIF_2_N instead. The pin groups eth_txd0_0 (GPIOH_6) and eth_txd0_1 (DIF_2_P) are both configured as Ethernet TXD0 and TXD1 data lines in meson8b.dtsi. At the same time eth_txd1_0 (GPIOH_5) and eth_txd1_1 (DIF_2_N) are configured as TXD0 and TXD1 data lines as well. This results in a bad Ethernet receive performance. Presumably this is due to the eth_txd0 and eth_txd1 signal being routed to the wrong pins. As a result of that data can only be transmitted on eth_txd2 and eth_txd3. However, I have no scope to fully confirm this assumption. The vendor u-boot sources for Odroid-C1 use the following Ethernet pinmux configuration: SET_CBUS_REG_MASK(PERIPHS_PIN_MUX_6, 0x3f4f); SET_CBUS_REG_MASK(PERIPHS_PIN_MUX_7, 0xf00000); This translates to the following pin groups in the mainline kernel: - register 6 bit 0: eth_rxd1 (DIF_0_P) - register 6 bit 1: eth_rxd0 (DIF_0_N) - register 6 bit 2: eth_rx_dv (DIF_1_P) - register 6 bit 3: eth_rx_clk (DIF_1_N) - register 6 bit 6: eth_tx_en (DIF_3_P) - register 6 bit 8: eth_ref_clk (DIF_3_N) - register 6 bit 9: eth_mdc (DIF_4_P) - register 6 bit 10: eth_mdio_en (DIF_4_N) - register 6 bit 11: eth_tx_clk (GPIOH_9) - register 6 bit 12: eth_txd2 (GPIOH_8) - register 6 bit 13: eth_txd3 (GPIOH_7) - register 7 bit 20: eth_txd0_0 (GPIOH_6) - register 7 bit 21: eth_txd1_0 (GPIOH_5) - register 7 bit 22: eth_rxd3 (DIF_2_P) - register 7 bit 23: eth_rxd2 (DIF_2_N) Drop the eth_txd0_1 and eth_txd1_1 groups from eth_rgmii_pins to fix the Ethernet transmit performance on Odroid-C1. Also add the eth_rxd2 and eth_rxd3 groups so we don't rely on the bootloader to set them up. iperf3 statistics before this change: - transmitting from Odroid-C1: 741 Mbits/sec (0 retries) - receiving on Odroid-C1: 199 Mbits/sec (1713 retries) iperf3 statistics after this change: - transmitting from Odroid-C1: 667 Mbits/sec (0 retries) - receiving on Odroid-C1: 750 Mbits/sec (0 retries) Fixes: b96446541d8390 ("ARM: dts: meson8b: extend ethernet controller description") Signed-off-by: Martin Blumenstingl Cc: Emiliano Ingrassia Cc: Linus Lüssing Tested-by: Emiliano Ingrassia Reviewed-by: Emiliano Ingrassia --- arch/arm/boot/dts/meson8b.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi index 22d775460767..dc125769fe85 100644 --- a/arch/arm/boot/dts/meson8b.dtsi +++ b/arch/arm/boot/dts/meson8b.dtsi @@ -270,9 +270,7 @@ groups = "eth_tx_clk", "eth_tx_en", "eth_txd1_0", - "eth_txd1_1", "eth_txd0_0", - "eth_txd0_1", "eth_rx_clk", "eth_rx_dv", "eth_rxd1", @@ -281,7 +279,9 @@ "eth_mdc", "eth_ref_clk", "eth_txd2", - "eth_txd3"; + "eth_txd3", + "eth_rxd3", + "eth_rxd2"; function = "ethernet"; bias-disable; };