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: 199876 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:268b:b0:106:f285:ce21 with SMTP id mn11csp2616dyc; Mon, 12 Feb 2024 07:44:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXuKtl3s6pWsCj3gERQQZ2GTU8iVyyKdkXVkRKxrOQ40FH/NUNGXtZRFT1tz05KN9LBHq5D5RfxLBT/YVygTY/uLvyE5A== X-Google-Smtp-Source: AGHT+IFSduZQB8e1YsTwE2UOVOdu5ZAp9K5M6CTiBUB4g43QQa+G0BjnFubejS7E/EkemtocJimS X-Received: by 2002:a17:902:dac2:b0:1d8:b6c8:d9e0 with SMTP id q2-20020a170902dac200b001d8b6c8d9e0mr6358815plx.68.1707752676276; Mon, 12 Feb 2024 07:44:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707752676; cv=pass; d=google.com; s=arc-20160816; b=hV7KHMftKqQogLMoEPi4zCNHSo1mkm7uf+jXl2uA64uBFMYWvt7ngnu7KbBnu9tz8H IL3JqB/ybp4gzy9uWkSReABVJpLjjZ3UbMDhnrWmYltutWBJtaCw/KbvXG9JBG7vnKij Lphoos0VR4uA8YCiNAUOaQp1q+7hjFbdqLF42WYaXJ4+TKzcyTDwsjI8SsRwWVC6YjRh p7MB0CMoPTp0iyvTX1PvlB89iwOuUKBMLnISBYx73Ut03XMBkHQhBPo7U48FyXeb6oid tRF77tmpXOnCmrc7dXcHeErBjWcF16db8lI9Z+xHZ2giiCfH+w+MIZW8ldyY1qrsU1CB H9IA== 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=jTrTTQJB4S4jQGnvIx3MH1BzVhhaxPSIkJmIQ5xdBW4=; b=VBdjsCD14DEUBBL0TTM/7lygi+gJ2+JV9lsvT0+NHx2dMTBaWtQqfeUZO/7ePz6Za9 Y0mele7LrbMNehsfXiWUTYSw1PDFZAZyyWf2NOqvOs0OoEmXvqoTR3s79mEGHvKcJOSv c/REGclADBL6lAVywTJRD9lOIfFcSbjs1Tf4yYoTYYhC7qz7cNZWmLpxDuEtwQyZPNzE xOjaksMfaFV8R/oCOYreG9jd3CSTLX52eKmBnY4qdHc9pnbLyb3s08zKQ4HatiIcMLMH zRe73bU5vdVXBnRXxusM48bs65WIiquo+iMIeRlcmwyUMN4LsuwnculO2a/a4RL9ln6U 8HuQ==; 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-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61903-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ysoft.com X-Forwarded-Encrypted: i=2; AJvYcCXucvXtQIwpJ6bTgJFHcNgk7mFrAS6DHbv+S1A7jY01uKz6id61t8wQpFFJOaHrtJ2WAIJDneIo7TNdsYqOvH89xjbYZQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e12-20020a170902b78c00b001d99ab3b516si409891pls.40.2024.02.12.07.44.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 07:44:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61903-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=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-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61903-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 3B02728490E for ; Mon, 12 Feb 2024 15:34:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E05D3D0C4; Mon, 12 Feb 2024 15:33:53 +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?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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790708470281019822 X-GMAIL-MSGID: 1790708470281019822 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>; + }; + }; }; }; };