From patchwork Wed Feb 14 09:03:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGFsIFZva8OhxI0=?= X-Patchwork-Id: 13556099 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 959AFC48BEB for ; Wed, 14 Feb 2024 09:04: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: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=58z96210qPIL0r71i8vAmDOTQZ+yryyBudmqxhep7/w=; b=hnI4/47mL2jH86 KsrcSkhg1hhJqQ2UYeh1lMBoTjQX+y9/XMxsLnofsz+mktFI8xQPSxBHodWlJWsL0VsrwD106ZpMr OlbU3dMV62WaCkEkXVWGARFMk8E2BEhP+OKrPlvDLf1TPEm15v+HVkI8uUhbF3Bn9MBl5evnFAhVb M4ieCv9IFyZxMvH0tietj9wM1VpT5rCX+WVb8+bQgMnk/5PT2hDl61ybIeJCPCdB75PC+9D3g0bf5 QABzGwmYsL46OYyxyw9CCmB7BciOfFE4UCsdEMdb9f4KpZXTTZGb6G2LHK7wSsKO3X2frTlMhRuNu ZZQK50/EP8RzIc4RZGlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raBBv-0000000CDO4-2uju; Wed, 14 Feb 2024 09:04:31 +0000 Received: from uho.ysoft.cz ([81.19.3.130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raBBr-0000000CDKd-3C5q for linux-arm-kernel@lists.infradead.org; Wed, 14 Feb 2024 09:04:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ysoft.com; s=20160406-ysoft-com; t=1707901463; bh=dSH5M/hZskQhXXQ7gwJpwqRlm8EjLoGmoPzajteF/A0=; h=From:To:Cc:Subject:Date:From; b=Me3G5LOv5e06zvpXVriQkwtce2FQXZ0w1IDjqmddlNTBwsjouxNcwNECTkKbFzPkZ DPeZhgN6CginrzcnJTvfX/VVVBVed23FAVUJC6NlNhLcbh+PXktTI3i1wYiuL3ULxr S7rbRmuUrL0R26Vq8FjRqLeg4bHgoFsN89H1AnFg= Received: from iota-build.ysoft.local (unknown [10.1.5.151]) by uho.ysoft.cz (Postfix) with ESMTP id 2A610A01B3; Wed, 14 Feb 2024 10:04:23 +0100 (CET) From: =?utf-8?b?TWljaGFsIFZva8OhxI0=?= To: Shawn Guo , Fabio Estevam , Andrew Lunn Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jonathan McDowell , =?utf-8?b?TWljaGFsIFZva8OhxI0=?= Subject: [PATCH v2 1/2] ARM: dts: imx6dl-yapp4: Fix typo in the QCA switch register address Date: Wed, 14 Feb 2024 10:03:27 +0100 Message-Id: <1707901408-17084-1-git-send-email-michal.vokac@ysoft.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240214_010427_980925_1F09525D X-CRM114-Status: GOOD ( 13.48 ) 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 change does not have any functional effect. The switch works just fine without this patch as it has full access to all the addresses on the bus. This is simply a clean-up to set the node name address and reg address to the same value. Fixes: 15b43e497ffd ("ARM: dts: imx6dl-yapp4: Use correct pseudo PHY address for the switch") Signed-off-by: Michal Vokáč Reviewed-by: Andrew Lunn --- changes in v2: - Reword the commit message so it is clear that this patch does not fix a functional problem. arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi b/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi index cfb0fc924b42..5763f8253d51 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi @@ -143,7 +143,7 @@ switch@10 { compatible = "qca,qca8334"; - reg = <10>; + reg = <0x10>; reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; switch_ports: ports { From patchwork Wed Feb 14 09:03:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGFsIFZva8OhxI0=?= X-Patchwork-Id: 13556100 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 71123C48BEC for ; Wed, 14 Feb 2024 09:04:46 +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=T3eSusc8lfnUTLTcoHm7yo4RfbYlrkN7gw+vbpPS91I=; b=0et2DyC6fSo7pH 1wmQa7syT7Hu+2qFpaPj7DFEOF96pCxfEF2aXSAUetFI8dh0tNnUrvAmBoVcP8Va0Ab9X9rr7pA3k HHkunHAohvpy5eXxNS46ljTMZZOwYajpdD/iPuGYU63UbptvTbGRGQinXuzpKUgOm6kcDvzY4h/Dr aGAuvQQqSHfTFTwQm89euKrI8QM8/fdRwYs5tamjjARWBmmVSlKuBxa0pBINsWfREuhIyQ0tzxK0v nDlb0qn/Tl9ukTHF2Wl6u5ZesAQhLvIucpM1DHHTYNM0uM8XNibgsSjQpySEwnmOr9ztFq9nSxd3X CVDG49uBXOSwQMxhi6QA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raBBu-0000000CDNP-3Zbo; Wed, 14 Feb 2024 09:04:30 +0000 Received: from uho.ysoft.cz ([81.19.3.130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raBBr-0000000CDKg-2l82 for linux-arm-kernel@lists.infradead.org; Wed, 14 Feb 2024 09:04:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ysoft.com; s=20160406-ysoft-com; t=1707901463; bh=De7gtKQUI6kPNqgDef3IVCXJrTn70XyIKQzykcjjq/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L7PteXqcQIxxQVD0d9+WyBdF7XK0uUHG7ot4YTRj0L1DTzu6M8zK8NQFogNsVsrX7 9sfuhUaGjSyRsBy2B/IuzKh2IfHWyQibTUo8RTGBqZANgw7xCcS/7JoUo1rmB9jtjX UURSFCo5hYzbKYk6GMwA3frj5zr5JVmry8dm3MnM= Received: from iota-build.ysoft.local (unknown [10.1.5.151]) by uho.ysoft.cz (Postfix) with ESMTP id 6D6E3A0336; Wed, 14 Feb 2024 10:04:23 +0100 (CET) From: =?utf-8?b?TWljaGFsIFZva8OhxI0=?= To: Shawn Guo , Fabio Estevam , Andrew Lunn Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jonathan McDowell , =?utf-8?b?TWljaGFsIFZva8OhxI0=?= Subject: [PATCH v2 2/2] ARM: dts: imx6dl-yapp4: Move the internal switch PHYs under the switch node Date: Wed, 14 Feb 2024 10:03:28 +0100 Message-Id: <1707901408-17084-2-git-send-email-michal.vokac@ysoft.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1707901408-17084-1-git-send-email-michal.vokac@ysoft.com> References: <1707901408-17084-1-git-send-email-michal.vokac@ysoft.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240214_010427_897336_6E5C5A52 X-CRM114-Status: GOOD ( 14.44 ) 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 We identified that the PHYs actually do not work since commit 7da7b84fee58 ("ARM: dts: imx6dl-yapp4: Move phy reset into switch node") as a coincidence of several circumstances. The reset signal is kept asserted by a pull-down resistor on the board unless it is deasserted by GPIO from the SoC. This is to keep the switch dead until it is configured properly by the kernel and user space. Prior to the referenced commit the switch was reset by the FEC driver and the reset GPIO was actively deasserted. The mdio-bus was scanned and the attached switch and its PHYs were found and configured. With the referenced commit the switch is reset by the qca8k driver. Because of another bug in the qca8k driver, functionality of the reset pin depends on its pre-kernel configuration. See commit c44fc98f0a8f ("net: dsa: qca8k: fix illegal usage of GPIO") The problem did not appear until we removed support for the switch and configuration of its reset pin from the bootloader. To fix that, properly describe the internal mdio-bus configuration of the qca8334 switch. The PHYs are internal to the switch and sit on its internal mdio-bus. Fixes: 7da7b84fee58 ("ARM: dts: imx6dl-yapp4: Move phy reset into switch node") Signed-off-by: Michal Vokáč --- changes in v2: - none arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi b/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi index 5763f8253d51..eec1f9092572 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6dl-yapp4-common.dtsi @@ -133,14 +133,6 @@ #address-cells = <1>; #size-cells = <0>; - phy_port2: phy@1 { - reg = <1>; - }; - - phy_port3: phy@2 { - reg = <2>; - }; - switch@10 { compatible = "qca,qca8334"; reg = <0x10>; @@ -165,15 +157,30 @@ eth2: port@2 { reg = <2>; label = "eth2"; + phy-mode = "internal"; phy-handle = <&phy_port2>; }; eth1: port@3 { reg = <3>; label = "eth1"; + phy-mode = "internal"; phy-handle = <&phy_port3>; }; }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + phy_port2: ethernet-phy@1 { + reg = <1>; + }; + + phy_port3: ethernet-phy@2 { + reg = <2>; + }; + }; }; }; };