From patchwork Mon Feb 12 15:23:41 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: 13553409 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 2359CC4829B for ; Mon, 12 Feb 2024 15:24: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: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=+EfPsPkPiXosLx44/x+8WAWOnFHoDO1o9UdbgZqRCWY=; b=hwTI3pGM0DAJk4 Ng5tJ6Qt1cB+xSZAA5D/M9hyXwSbEGa1YtkVL5BmuqjJ67K1O0d7n5iZENMjozYJJwM+0TvU6Ytjt QMT+YzFtYiHziynufymLuyvE48pU+c91hihcClYnDkNeopvDrDiqGwORhUWJOHL1YWuH2xdZ/F0Lu mw6Vb157Ql8yMC+Uo/txWuLXzbL+DMHsxQ1st7jhBkmownfk4dozEyTzxuPj53e2mTA/NMBaiinrE g131tEYEjVn/dkVdMAXuJ8gKYNnWAo7xqy3g7PRpi/JfjiCjUAj33Aq6fKNwl5ygVsJ1pZuZHqa39 hb4yT44vehE67G/ymlVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZYAQ-00000005wo4-3tDx; Mon, 12 Feb 2024 15:24:22 +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 1rZYAN-00000005wkA-2KWb for linux-arm-kernel@lists.infradead.org; Mon, 12 Feb 2024 15:24:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ysoft.com; s=20160406-ysoft-com; t=1707751453; bh=oQZRF4F+VMaG/PnSRd+2qqxRcUHkMwMcRftkyRxLyiU=; h=From:To:Cc:Subject:Date:From; b=QDAPGFOGUDnlVz3BO72IhRUYgGrnYfQD5uonfWZtkNNE3Uzn73yfp3T0CSLyD/ZIe pxK/ZzJmYyewYaCYddymNprnTvdUF6QsV+IHie3zbpqmdwWjJNUgqs7JZ4mzqCcou9 ujWxwEoMOQC7MmtDASvNymzst1A8hD0cU652TuE8= Received: from iota-build.ysoft.local (unknown [10.1.5.151]) by uho.ysoft.cz (Postfix) with ESMTP id C54E3A05D4; Mon, 12 Feb 2024 16:24:13 +0100 (CET) From: =?utf-8?b?TWljaGFsIFZva8OhxI0=?= To: Shawn Guo , Fabio Estevam 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, Andrew Lunn , =?utf-8?b?TWljaGFsIFZva8OhxI0=?= Subject: [PATCH 1/2] ARM: dts: imx6dl-yapp4: Fix the QCA switch register address Date: Mon, 12 Feb 2024 16:23:41 +0100 Message-Id: <1707751422-31517-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-20240212_072419_906120_746FEEF1 X-CRM114-Status: GOOD ( 11.79 ) 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 The switch address in the node name is in hex while the address in the reg property is decimal which is wrong. Fix that and write the reg address as a hexadecimal number. Fixes: 15b43e497ffd ("ARM: dts: imx6dl-yapp4: Use correct pseudo PHY address for the switch") Signed-off-by: Michal Vokáč --- 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 Mon Feb 12 15:23:42 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: 13553408 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 359DAC48297 for ; Mon, 12 Feb 2024 15:24:36 +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=EwlNk2dak+6SZGb7I03b1hA4gBrjlgelhavGA6gOlIc=; b=mjT2dEWRVttksZ R1ShSxoT9Ee7BYgyCmyryN7sjYuj3k+UtQDAKjKdhj6I42hHwynaCiRCxW7qv0ugCOE6uqCG6m3Bb TqjAWdAtX/l+hJ//P4hB3rKD3RfhFXJi9MJzL36BDigiGSa3pEvgwx/jfKgcmRhCk/8v8L7tUns5a HgSFLYCxCam0GGgbwd1d6IJFAXsNh6HrqCx1/YF6tiPy4mt0TRJRHZw+PCcNZfTq/xtCXjbS9GQYJ XfCAuLUtAjJLOX7GHBSAE/GBdAQxe9R5XR03VgTTVPmbGjiMMO7lD4eyGq7QNJ2VQEXY2Cy3NkhL1 7yfA8/szZTKzMUx8uR+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZYAR-00000005wod-2drx; Mon, 12 Feb 2024 15:24:23 +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 1rZYAN-00000005wkC-1Xk3 for linux-arm-kernel@lists.infradead.org; Mon, 12 Feb 2024 15:24:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ysoft.com; s=20160406-ysoft-com; t=1707751454; bh=QwP7+vYJVnFVVKsfuTsRnpA+bIGWaq73j27LVda+WRU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rfuR8igsmgh3iRm14guk/ulANfdOHQA9ARPp5MyoF8mlODIsGd1Nm6ll37njEwypX t5xjur7jtKjK0J6yDxfkw6TsXTULwPU/07r9Cu52SHILCPUeg+sRFMB+r2lcvx+zWJ h1iv0WTa+33l+U8mDUTmbSFgWSBLi7aJRKkPEXVw= Received: from iota-build.ysoft.local (unknown [10.1.5.151]) by uho.ysoft.cz (Postfix) with ESMTP id 1247CA0669; Mon, 12 Feb 2024 16:24:14 +0100 (CET) From: =?utf-8?b?TWljaGFsIFZva8OhxI0=?= To: Shawn Guo , Fabio Estevam 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, Andrew Lunn , =?utf-8?b?TWljaGFsIFZva8OhxI0=?= Subject: [PATCH 2/2] ARM: dts: imx6dl-yapp4: Move the internal switch PHYs under the switch node Date: Mon, 12 Feb 2024 16:23:42 +0100 Message-Id: <1707751422-31517-2-git-send-email-michal.vokac@ysoft.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1707751422-31517-1-git-send-email-michal.vokac@ysoft.com> References: <1707751422-31517-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-20240212_072419_914772_E3611B0A X-CRM114-Status: GOOD ( 14.58 ) 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áč --- 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>; + }; + }; }; }; };