From patchwork Tue Mar 15 09:52:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 12781236 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 A223DC433F5 for ; Tue, 15 Mar 2022 09:54:08 +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:References:In-Reply-To: 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: List-Owner; bh=T8W5FYFfRkRjKQ+w2dabj602ZKUOYQLx1ueLbRp6MkY=; b=c53OWVmNQnfqdI Vd8uZLVGkuKGBGpn8uF7YAoEFh4nnZidCPib5Fr3hfa5MXwPjUrriOsQjYrAksEj3A1t0ZoncuH4Q v4RfDMibxY0NrN9xi2a/drNigrRzL8aOS3iojufY7+T9CfbRYIMqBujoDNZ1P0FoFfOT23aVHSgUY HrnSEKJEPqkuJR4mgu06vDpaziDRMLZDEOvWVqLSiyDGx+osHGqiGe+521rn1c0sz5T3JgpJQuIKD 70umie57+1Ws1a62p5kMeZLF0RdWp1QjaP/F+nEUTZwn4GBYqcGwb+K62T0LAld7CKN++TWIvUbt/ 6DQ9DdhoCAUFmgH6wfMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nU3rU-008dbj-CA; Tue, 15 Mar 2022 09:53:04 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nU3rQ-008dZJ-30 for linux-arm-kernel@lists.infradead.org; Tue, 15 Mar 2022 09:53:02 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 78C6418B17; Tue, 15 Mar 2022 10:52:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=true.cz; s=xnet; t=1647337976; bh=IQtZfpMDBgNq+XqyyqcXkjpmhkMzPfrWtiIPXWEftkA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=O5l+9lqIldUUtx0pEdG7W5ytrn6ar+q2ON3b/cEFsr/nGrVhn48KlshztPUznUGh5 up9ye7AmKTwO0pV9RFJVLYlHmpt8uHnSNL6xWAJXedBMh51fVcIpcIDOR8Wsh9ZxSi gWHiKAB9gUxJBi+o65x5LacW5JNQMg9nyCxrj0Qc= Received: by meh.true.cz (OpenSMTPD) with ESMTP id 8ca2b6eb; Tue, 15 Mar 2022 10:52:32 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: Rob Herring , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec Cc: =?utf-8?q?Petr_=C5=A0tetiar?= , stable@vger.kernel.org, =?utf-8?q?Bastien_Roucari=C3=A8s?= , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] Revert "ARM: dts: sun7i: A20-olinuxino-lime2: Fix ethernet phy-mode" Date: Tue, 15 Mar 2022 10:52:42 +0100 Message-Id: <20220315095244.29718-2-ynezz@true.cz> In-Reply-To: <20220315095244.29718-1-ynezz@true.cz> References: <20220315095244.29718-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220315_025300_305382_3EE3A6EE X-CRM114-Status: GOOD ( 11.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This reverts commit 55dd7e059098ce4bd0a55c251cb78e74604abb57 as it breaks network on my A20-olinuxino-lime2 hardware revision "K" which has Micrel KSZ9031RNXCC-TR Gigabit PHY. Bastien has probably some previous hardware revisions which were based on RTL8211E-VB-CG1 PHY and thus this fix was working on his board. Cc: stable@vger.kernel.org Cc: Bastien Roucariès References: https://github.com/openwrt/openwrt/issues/9153 References: https://github.com/OLIMEX/OLINUXINO/blob/master/HARDWARE/A20-OLinuXino-LIME2/hardware_revision_changes_log.txt Signed-off-by: Petr Štetiar --- arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts index ecb91fb899ff..8077f1716fbc 100644 --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts @@ -112,7 +112,7 @@ &gmac { pinctrl-names = "default"; pinctrl-0 = <&gmac_rgmii_pins>; phy-handle = <&phy1>; - phy-mode = "rgmii-id"; + phy-mode = "rgmii"; status = "okay"; }; From patchwork Tue Mar 15 09:52:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 12781240 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 64E90C433FE for ; Tue, 15 Mar 2022 09:54:33 +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:References:In-Reply-To: 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: List-Owner; bh=hWganL10X4/Unsxp68fKVyjl8ZG0M0cDe1rKAz8SjJs=; b=o9ETriZdEnjRg4 bALDsaDujtRiScsBfqs2/5jpm9Jn6jrNm+zXhCNuIRW2moZBhRfYC9bYPlFcTXyIlcjs/DKy61F+d B5vQPn5oWeQHPFBWf4dyxUnW5MteRbHJqH9E+ELfyqlP6EdS+EmuSVO1M+qcQx+DJbkKsykfm6ATJ 76eFFDpb0Tdx5jN4BOeqyNlIOpxOxiUYclWozwnxkonCrSAWIZhSmeiw2JxbdF74opVvPiDoUkaBe CXxUirrYTacxzEzhQbTHiLOudQwEvZ9YXvA3j7+ZnEOjmpp90qAl6LQRWCnvToRhN1/nfvRA4ckmK Z1+5Fbs705Q82PDL+gKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nU3rm-008dj6-Q8; Tue, 15 Mar 2022 09:53:23 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nU3rQ-008dZm-32 for linux-arm-kernel@lists.infradead.org; Tue, 15 Mar 2022 09:53:02 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id E924F18B18; Tue, 15 Mar 2022 10:52:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=true.cz; s=xnet; t=1647337978; bh=ox4zNWlTMk+MPz4ulEDu2t2rrdbC7u1dcQZJDhylnO4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Jry+YG9VZUmcJHATFEgEDp8HsMPcaeL+R0IjXE7f4GDJc2yuFmMSD4kmRV8kwlOzL tcS+4G9/E95X3nzmyJZ/GKK2Zf5KrMRTAe4CYfZt4l4IdbVZRVic3aTqPq0fjD74lm DqRzxz2fNAONPTmwEHU17mtTTq7b3BdMtreCgi/o= Received: by meh.true.cz (OpenSMTPD) with ESMTP id 61b1a915; Tue, 15 Mar 2022 10:52:34 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: Arnd Bergmann , Olof Johansson , soc@kernel.org, Rob Herring , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec Cc: =?utf-8?q?Petr_=C5=A0tetiar?= , stable@vger.kernel.org, =?utf-8?q?Bastien_Roucari=C3=A8s?= , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH v2 2/3] ARM: dts: sun7i: add support for A20-olinuxino-lime2 Revisions G/G1/G2 Date: Tue, 15 Mar 2022 10:52:43 +0100 Message-Id: <20220315095244.29718-3-ynezz@true.cz> In-Reply-To: <20220315095244.29718-1-ynezz@true.cz> References: <20220315095244.29718-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220315_025300_479476_5F67C24A X-CRM114-Status: GOOD ( 16.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Lime2 HW first public revisions G/G1/G2 used RTL8211E PHYs. Later public revision K and newest are using KSZ9031 PHYs. Up to commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config") it was possible to use same DTS for A20-olinuxino-lime2 with either KSZ9031 or RTL8211E PHYs, thus on all HW revisions. Having commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config") applied, Bastien found out, that his board using RTL8211E PHY doesn't work anymore and tried to fix it by providing proper `phy-mode` in commit 55dd7e059098 ("ARM: dts: sun7i: A20-olinuxino-lime2: Fix ethernet phy-mode") with following reasoning: Commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config") sets the RX/TX delay according to the phy-mode property in the device tree. For the A20-olinuxino-lime2 board this is "rgmii", which is the wrong setting. Indeed, the settings were likely wrong, but only for boards with G/G1/G2 revisions using RTL8211E PHY. Those settings were still correct on boards with HW revisions K and later with KSZ9031 PHY, so this fix was incorrect. So fix it properly by introducing separate DTS for boards with G/G1/G2 revisions using proper PHY mode for RTL8211E PHY. Cc: stable@vger.kernel.org Cc: Bastien Roucariès References: https://github.com/OLIMEX/OLINUXINO/blob/master/HARDWARE/A20-OLinuXino-LIME2/hardware_revision_changes_log.txt Signed-off-by: Petr Štetiar --- arch/arm/boot/dts/Makefile | 2 ++ .../boot/dts/sun7i-a20-olinuxino-lime2-emmc-revG.dts | 11 +++++++++++ arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-revG.dts | 11 +++++++++++ 3 files changed, 24 insertions(+) create mode 100644 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc-revG.dts create mode 100644 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-revG.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index e41eca79c950..241a1a229f0f 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1244,7 +1244,9 @@ dtb-$(CONFIG_MACH_SUN7I) += \ sun7i-a20-olinuxino-lime.dtb \ sun7i-a20-olinuxino-lime-emmc.dtb \ sun7i-a20-olinuxino-lime2.dtb \ + sun7i-a20-olinuxino-lime2-revG.dtb \ sun7i-a20-olinuxino-lime2-emmc.dtb \ + sun7i-a20-olinuxino-lime2-emmc-revG.dtb \ sun7i-a20-olinuxino-micro.dtb \ sun7i-a20-olinuxino-micro-emmc.dtb \ sun7i-a20-orangepi.dtb \ diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc-revG.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc-revG.dts new file mode 100644 index 000000000000..1e29f973614d --- /dev/null +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc-revG.dts @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0+ +#include "sun7i-a20-olinuxino-lime2-emmc.dts" + +/ { + model = "Olimex A20-OLinuXino-LIME2-eMMC (Rev G/G1/G2)"; + compatible = "olimex,a20-olinuxino-lime2-emmc-revG", "allwinner,sun7i-a20"; +}; + +&gmac { + phy-mode = "rgmii-id"; +}; diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-revG.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-revG.dts new file mode 100644 index 000000000000..7122dc99810a --- /dev/null +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-revG.dts @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0+ +#include "sun7i-a20-olinuxino-lime2.dts" + +/ { + model = "Olimex A20-OLinuXino-LIME2 (Rev G/G1/G2)"; + compatible = "olimex,a20-olinuxino-lime2-revG", "allwinner,sun7i-a20"; +}; + +&gmac { + phy-mode = "rgmii-id"; +}; From patchwork Tue Mar 15 09:52:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 12781241 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 43FB9C433EF for ; Tue, 15 Mar 2022 09:54:45 +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:References:In-Reply-To: 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: List-Owner; bh=wcmCbwmUXbEi1VgJq7KEII/A72OA7bIfMTxAyuzrxbI=; b=TLNBfymvp0oKxf N/RIinpvT0k6duM/JH57AvngvLBIplw1tYIhnJQTQYHVZJpQmDCRqRqLY1pFwDL1PXRoVBirLFGME Cfc7z2Jv1uF16WF+ZdjvrAnX3hlHpVmLeopuMa5y9BFtGdgIPHOwCL6fN+se7jVdILp8Zxbs3V2Bv mxCKfXFdFozU89G+7pmYk2fGtB3blmYIKd5bcUDSsSJdYxZnOwWmV9rrgrICWMOdbUf4xKzTPEBk/ HxT+3d4TjBNeiFwgkXy2vYjVOt/87vLt1879rD/tpkmJFYCE8ZO++kgVmdOiDU1Wh8wrt3PJL+MZp xZLlUbNnTO2cq/UL7oew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nU3ry-008dnT-VC; Tue, 15 Mar 2022 09:53:35 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nU3rR-008da8-4s for linux-arm-kernel@lists.infradead.org; Tue, 15 Mar 2022 09:53:03 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 943B218B19; Tue, 15 Mar 2022 10:52:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=true.cz; s=xnet; t=1647337979; bh=lxa537pBCjy7aFFmg6cgXQt1WGC8VIKt+cw8JKVK3cI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=b50Xk3blPN5MJYEGQFQwStNXKPj8VX4PAj++bU1yzDQIhg6FffLdTuyPPoG/Cn5lu FE+EjzntjKu0Xpjv32bvbYotE12Z0kVqoKnyoMcTEMgVxO+23qagJWL4hpR2R0w59A zoYILpQwZMj80D2zfsF5ruvyRNb9KSMT+o4vTeKA= Received: by meh.true.cz (OpenSMTPD) with ESMTP id 93d67bdf; Tue, 15 Mar 2022 10:52:35 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: Rob Herring , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec Cc: =?utf-8?q?Petr_=C5=A0tetiar?= , stable@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] dt-bindings: arm: sunxi: add A20-olinuxino-lime2 Revisions G/G1/G2 Date: Tue, 15 Mar 2022 10:52:44 +0100 Message-Id: <20220315095244.29718-4-ynezz@true.cz> In-Reply-To: <20220315095244.29718-1-ynezz@true.cz> References: <20220315095244.29718-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220315_025301_377538_49356F7C X-CRM114-Status: UNSURE ( 7.81 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add DT bindings for A20-olinuxino-lime2 Revisions G/G1/G2 boards. Cc: stable@vger.kernel.org Signed-off-by: Petr Štetiar Acked-by: Rob Herring --- Documentation/devicetree/bindings/arm/sunxi.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml index c8a3102c0fde..d142209e76a4 100644 --- a/Documentation/devicetree/bindings/arm/sunxi.yaml +++ b/Documentation/devicetree/bindings/arm/sunxi.yaml @@ -610,11 +610,21 @@ properties: - const: olimex,a20-olinuxino-lime2 - const: allwinner,sun7i-a20 + - description: Olimex A20-OlinuXino LIME2 Revisions G/G1/G2 + items: + - const: olimex,a20-olinuxino-lime2-revG + - const: allwinner,sun7i-a20 + - description: Olimex A20-OlinuXino LIME2 (with eMMC) items: - const: olimex,a20-olinuxino-lime2-emmc - const: allwinner,sun7i-a20 + - description: Olimex A20-OlinuXino LIME2 Revisions G/G1/G2 (with eMMC) + items: + - const: olimex,a20-olinuxino-lime2-emmc-revG + - const: allwinner,sun7i-a20 + - description: Olimex A20-OlinuXino Micro items: - const: olimex,a20-olinuxino-micro