[v2,2/2] ARM: dts: imx6dl-yapp4: Move the internal switch PHYs under the switch node
Message ID | 1707901408-17084-2-git-send-email-michal.vokac@ysoft.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-64912-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1082898dyb; Wed, 14 Feb 2024 01:07:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWFgyXmi2eVRWbe5AuY4DY+fSS//GnB48eBBoVyQsPPqDpI52y0FI1ChW4CbpcaAyFM0d5+9ZonGFNPdtzyn553/Rjg+Q== X-Google-Smtp-Source: AGHT+IHmzRJf1BxPSGDWDpNs+J4bnw00gqfT1cWPCtLTGS/53qHrY5StTtasRMQQObANtI4AggVW X-Received: by 2002:a17:903:2a90:b0:1db:51c0:c203 with SMTP id lv16-20020a1709032a9000b001db51c0c203mr2284924plb.24.1707901641456; Wed, 14 Feb 2024 01:07:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707901641; cv=pass; d=google.com; s=arc-20160816; b=IhAiEGPrrBibNaKJKeJqyk8PJZJXyGJ5k8z06aRBE/6AiZm9gPjc6qrZxUpAKwjTTr mOWYFGuggqPewTTJPGRpE0ztak8p6X3mZXayTmXKiNeyykQf65Cbe/ysYKsDx8g+uTUf +U9XXxQ2hDPuzO+dhRpMtbZ4RqANBaBjy5teQ5HXIfnHvLcMSDumloVc3jawBNuRPQkv MbyhkfixZFh5zoohf7EpE+Ii/AVX+ud5sfWESMm0ddv9VsuphJM9HjQJaVm6fRytI/xH YiixGvqlCD7mn6fuicGo3tPPSTua9iARH5SjOOcBLcRQxYoaSbW1wpGsMpZziZsR2AQJ NvRw== 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=De7gtKQUI6kPNqgDef3IVCXJrTn70XyIKQzykcjjq/E=; fh=N4SVOqSP8r0RqHs0m9/k7CGt+l3TNk2cehDj7lNl6zs=; b=jdZjgMl6jFx+UXvstH6EQZ6Xmf3h+/uHtWd8vVuOBHReq06QdbeMqBS/Li3PXLWC1a wej9eyaJxSka/g7JAHmGc0L/V/xRLxvzq2psItLlMIVrrQfMMnVC37UxRj+yr2VhN9oA Rvqisgp7I78JxjSsdXRWn90zWFwU4JIdiQh5rFFa7TSc8EQhBo/ywyT4saKC0g6vHVuh s9nkGp3iQDatczASoK1E7ayp/sgZCRSe+QpEKMDCGkHl7XhnWrAjT91dRNkz7EdJ7evX sxvWqQWFCnB/uqpIU4Wswn5cAwb6LGtHJ7nUo3Wt9pJDRO8N0n1wtIQA47zteRwmcqt1 dvDQ==; 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=L7PteXqc; 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-64912-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64912-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ysoft.com X-Forwarded-Encrypted: i=2; AJvYcCWEMh23/IvcyEpToj6F13ejKBLcVmEyezi5b1DJKP8f8swLCcYMuY9f/MFTakPJZceFtI5T99DKuoOHPwRcEku36YpACQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b7-20020a170902650700b001da2c14ab72si2882762plk.636.2024.02.14.01.07.21 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 01:07:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64912-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ysoft.com header.s=20160406-ysoft-com header.b=L7PteXqc; 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-64912-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64912-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6DA7F286D87 for <ouuuleilei@gmail.com>; Wed, 14 Feb 2024 09:05:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D212F12E72; Wed, 14 Feb 2024 09:04:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ysoft.com header.i=@ysoft.com header.b="L7PteXqc" 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 B351679D2; Wed, 14 Feb 2024 09:04:31 +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=1707901473; cv=none; b=tMf5lBoLNUC8l/MIcxkqHrtGFnrQ9IahtvPQHUXo5uGvRzwz2AO+ZmZLIk4GbcYBI0FYAWpbMIFumgaqa0w1n7BL5bOTyLMAQK4HeBX0eIn4EiC2e33mXqRPPTBSVLOw8sxxjl00QXrlGeGYx2J9VQnGXtaMm2DTmRT9L+g8Whg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707901473; c=relaxed/simple; bh=NabSFMAj7QEe5/xa7bW5tvQsHBXSCoMhb1gIoOGlJ8w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=kAv9f+B7HLy3eMfs4hLXSz/WmSj8gB49OMM5t73LoDB4hdy7margtWOSalORdR2Goju29NOFDPqtPfc88R6KHR0R8AOMhnJr3g+wCc5Tj+fA4ieZBEHT4rpsfsIFeHd2OxcNkeDfDC8mQGsPlPGFbVPPaDxUJXtpfUwVQsTwCxs= 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=L7PteXqc; 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=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=?= <michal.vokac@ysoft.com> To: Shawn Guo <shawnguo@kernel.org>, Fabio Estevam <festevam@gmail.com>, Andrew Lunn <andrew@lunn.ch> Cc: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, NXP Linux Team <linux-imx@nxp.com>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jonathan McDowell <noodles@earth.li>, =?utf-8?b?TWljaGFsIFZva8OhxI0=?= <michal.vokac@ysoft.com> 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790864671398976653 X-GMAIL-MSGID: 1790864671398976653 |
Series |
[v2,1/2] ARM: dts: imx6dl-yapp4: Fix typo in the QCA switch register address
|
|
Commit Message
Michal Vokáč
Feb. 14, 2024, 9:03 a.m. UTC
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áč <michal.vokac@ysoft.com>
---
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>; + }; + }; }; }; };