Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2522920rdb; Mon, 12 Feb 2024 07:34:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWTY+81G7IqfXGtY1gKsWsmTbbQqMrAfjSomnDJzKAqQiNl8SQu6uAcV64wGlTgQ+QrBFYX8Ug5RrHlIugb8/Ezz5jUN0emYtn9Db7p+A== X-Google-Smtp-Source: AGHT+IEPj3KENzxesWPu7QEJQBtNQbw2NFX4w+0FdGRjx4hvICarTLqQ/B6noOFw402Yviy9qWaR X-Received: by 2002:aa7:cb46:0:b0:561:aa3:f9e5 with SMTP id w6-20020aa7cb46000000b005610aa3f9e5mr4207444edt.3.1707752081290; Mon, 12 Feb 2024 07:34:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707752081; cv=pass; d=google.com; s=arc-20160816; b=JhAuKWrH0VZpPVi+gLJV/2uO22MreWo3mr9DFGDNbiif3h20MusufDRGY78ulqDLkt 5gbktaa42VsfjWTmmI+h2jnJM9SyYHSzPRuwuBEDy3sjSQ5oG8WkXHANjbv/PFJd2lfL PpqRJ+JyYjITkK8UfV85/0uHCA7iimqG5AOy+orv1HHYS3YR5j6re2h2wvUsYdCvP7Kq xfOMR1GsZfEaBGQtA2WuWt6u2+fHO7MM8sTTisDHRKSWXCVihFPSFUT2dkRRpA64d2Y0 TB1ueVAcWM3WBPH3bAkmUJQ3wZrdQ4fhehTu9y3JtIIwtb/Q6qLqSw9T2dmDKwrAn8Vx IbEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=QwP7+vYJVnFVVKsfuTsRnpA+bIGWaq73j27LVda+WRU=; fh=eXah6EP0/vNZvSY3wPFgryr+QRz+s1+rGwUh70+3o/Y=; b=dvH7lEI0elx2LNI0sU/qWALrBfuKV2nkF6uylpIZywdTOFYIKkF/XF16hOYWmAfVZb X0EC1MWChXu67RDyjuDPITiqJGkMwm4y26mX87/wtVlbcfRuADC9WeZCyRYp5hFBWqis WM8yXoTThGd06POGvmcQB/x4+0fIz7RnsLm4Ix7uE/DNhPCOxPm8wHzqx9SL95nKAVUh deMtRoHbJFOQskGupy3VGkRnu7+jmVQMm7HWJdkUROXhYK3vFT5dABYS+PU29gtrhQtQ 9s7hQ12TdN06sjnOr42ol8h6zfJKTikCgfySPavzwfiiPDZ6U8TEinB4WrJ9NPaUt0DJ jX1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ysoft.com header.s=20160406-ysoft-com header.b=rfuR8igs; arc=pass (i=1 spf=pass spfdomain=ysoft.com dkim=pass dkdomain=ysoft.com dmarc=pass fromdomain=ysoft.com); spf=pass (google.com: domain of linux-kernel+bounces-61903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ysoft.com X-Forwarded-Encrypted: i=2; AJvYcCXh/cpTgscxtKrcNVsy6Wl/Ubmb/zYkpwYtLZuuUnQZ7Rsmb3GsXgV2wX1wvenqKo0K6hPyuNDZQeTAGm0uw35wVsV0crksSZyw5xS3/g== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b24-20020a50ccd8000000b005606d9efde6si2828395edj.41.2024.02.12.07.34.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 07:34:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ysoft.com header.s=20160406-ysoft-com header.b=rfuR8igs; arc=pass (i=1 spf=pass spfdomain=ysoft.com dkim=pass dkdomain=ysoft.com dmarc=pass fromdomain=ysoft.com); spf=pass (google.com: domain of linux-kernel+bounces-61903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ysoft.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 117481F23625 for ; Mon, 12 Feb 2024 15:34:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 725E73C68A; Mon, 12 Feb 2024 15:33:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ysoft.com header.i=@ysoft.com header.b="rfuR8igs" Received: from uho.ysoft.cz (uho.ysoft.cz [81.19.3.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F39213C48D; Mon, 12 Feb 2024 15:33:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=81.19.3.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707752030; cv=none; b=C8w6qz/S053zp7U2UoaUyEKiwN5eulNlztVa4Xz36E1Ru5trSgzSoVGtthuudflCVg/Acxu+bVV2H6yncpd0/302xCzTehTs27TPVBsU2N6IQhbROldssnS8kUBos2JkBLkg0lOFtY+lsPDa5MOqcZXH32LTSEIo9SYlWF+virQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707752030; c=relaxed/simple; bh=nZ7JakMV/OQQ3RXKu0+j/ry9JPOICh3xO7KrxgQ5VCc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=GUjRGIf/BeDGhFh4IVFB81LYTJADNMpczIYl6H4jmNJAo8vXKsarkRCuTOrHziOW/K1nIXt0GLEurIPZQI63pijK5iOws4+Kk0MPv9IjayhN+Nhy04t1h3goFVZGj3xLKo5tHZman+/3CZTFVgmUgfYIgS7u8eBDJOpPQ9WBZvc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ysoft.com; spf=pass smtp.mailfrom=ysoft.com; dkim=pass (1024-bit key) header.d=ysoft.com header.i=@ysoft.com header.b=rfuR8igs; arc=none smtp.client-ip=81.19.3.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ysoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ysoft.com 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?q?Michal=20Vok=C3=A1=C4=8D?= 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?q?Michal=20Vok=C3=A1=C4=8D?= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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>; + }; + }; }; }; }; -- 2.1.4