Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp180577rdb; Wed, 17 Jan 2024 23:31:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IF1YdD4e8J17u1chJsCkBoRDma0DXeSyBvoYySVvK6mO/smqhkupPuMPMO2CIYpFfzZWSnb X-Received: by 2002:a05:6359:650b:b0:175:9567:1af8 with SMTP id sk11-20020a056359650b00b0017595671af8mr388661rwb.53.1705563109107; Wed, 17 Jan 2024 23:31:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705563109; cv=pass; d=google.com; s=arc-20160816; b=Hq+qImeu388x/vk8YpXcVVLWNOI9WBz7mCwDplSjjxDrOn8adoGfZc3tY9Ug4vMQXi kgfG+COObTtTufjWIeQT9SBJWSSgJ06cWJ+YXQPkn/oPqAkHZuVGRRgXGn3soox0f2K1 kXdMX3WY6TWLpJOMzOr1zHJw2Jo5y3Gpm25WhOIYLvo90u4qGTWhOZy2EGE2HTHJFTup QlCSbyKallkx6UA9UZtacu39OKC8KxXR0qU7332nra5qt0SkNUsUHbgqOy//ZWhr41FD CU+0v5GD9sRhD2l3DHFwRrDJSE8pQ7P5VfsLEDestLleZ+JAlVKQVCwyeAt2TtiiQ3xX 4Myw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=D9ZkcwjkVkGoVyXUCHS1LAJlQ3CiUF2oO0UMAU5d3Pw=; fh=rYl8b8HteJYhNtCnUMUDkX+5+jttherX047CPGajTGw=; b=BKxgkxdIcNJ1jTvf0eQBCHVw0/JlEXU67vWZ7cKOjhle0PoTGAGyM4jjJ+96OemkRc ZXlK1EZ5DPYXcpK9SjS2rni+Ho97G4KexdVOFEta0SGy0gKaZ2pH32ECTauT3avgECQC myRvVMvO2tkE2KLYQWMtzzgrTNG4GxHm6+LQQW2iCe66JZuGf262cnCDKc0G295mSnTI 8OOLp8dM8qs1f/RaLvHB7m+oQa4luMGIuOMTzHPgekslXBouz6RhZHU47GueVLT7J88A dEkqqCVTspnJWoWTYXPqfDlmNfuY1zTSPpAnzCzyI1XJRHIBbjoneSJD6h3WnVrYhTwP NjNA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kwiboo.se header.s=fe-e1b5cab7be header.b=zGmVbKeo; arc=pass (i=1 spf=pass spfdomain=fe-bounces.kwiboo.se dkim=pass dkdomain=kwiboo.se dmarc=pass fromdomain=kwiboo.se); spf=pass (google.com: domain of linux-kernel+bounces-29764-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29764-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kwiboo.se Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h4-20020a654804000000b005cdf7387492si1001396pgs.263.2024.01.17.23.31.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 23:31:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29764-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kwiboo.se header.s=fe-e1b5cab7be header.b=zGmVbKeo; arc=pass (i=1 spf=pass spfdomain=fe-bounces.kwiboo.se dkim=pass dkdomain=kwiboo.se dmarc=pass fromdomain=kwiboo.se); spf=pass (google.com: domain of linux-kernel+bounces-29764-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29764-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kwiboo.se 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 AE71F286373 for ; Thu, 18 Jan 2024 07:31:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F2761B65C; Thu, 18 Jan 2024 07:31:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b="zGmVbKeo" Received: from smtp.forwardemail.net (smtp.forwardemail.net [149.28.215.223]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45BA6C127 for ; Thu, 18 Jan 2024 07:31:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=149.28.215.223 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705563100; cv=none; b=uE4Fj8X2r6EUC1v9Avb0RFmREP6NDTChmz9AY0jwuok4ZC8IWn7CSpZp+3+tozfP5+Ev8zd3dh8oFhBtD1eEfzgHIaW5JMm8vZX10uHTvXMOdeeJMgpc3tGPzDyYbI1GBT8UpzOJwxrpZnb2oMXIevsc8atQ7NLEB5JWKCwTmKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705563100; c=relaxed/simple; bh=dcyPHowVowojvYwqybjhAHT+o5+hBycJepvY2VZ/r+w=; h=DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent:Subject: From:To:Cc:References:Content-Language:In-Reply-To:Content-Type: Content-Transfer-Encoding:X-Report-Abuse-To:X-Report-Abuse: X-Complaints-To:X-ForwardEmail-Version:X-ForwardEmail-Sender: X-ForwardEmail-ID; b=kivErcx1mL+AfMOPbnu0PHFs+qZK02wRcJ70TZFKPCrbDCLY6Z8ytl9h1jGE0Cz+PPo+sKnkqK8yijeP9TBTP29Fhs8LLC6DbuXjlhrjKGflqD/dPRdTXx68LdvEPNKc2PdNfMjvp0tLD8QdeJQReNeYnudAamTyUy+DjrX5ixc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kwiboo.se; spf=pass smtp.mailfrom=fe-bounces.kwiboo.se; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b=zGmVbKeo; arc=none smtp.client-ip=149.28.215.223 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fe-bounces.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: References: Cc: To: From: Subject: MIME-Version: Date: Message-ID; q=dns/txt; s=fe-e1b5cab7be; t=1705563094; bh=D9ZkcwjkVkGoVyXUCHS1LAJlQ3CiUF2oO0UMAU5d3Pw=; b=zGmVbKeofuLzzupz6023S9mfUpt7WC2oeGojsHwqrzjGIcQZqyCvckAOc5KjTW0uBnKRvjxYF jVL6pe7g5uLQbLhuDntzSY/Lxik7FZqvEkn+V0BJkqly72pbde5zMmgEfBfRKLh4eBqfp/NAa6q uJaGnMQgtlCT/h8lqueW09QYKbklZ2ScALkaLHoshupJlflgcZIDosgZbJHTh3DgW1qwwCjcSdF YnPYSbKMEMo9OdZAwt0O3+v7gCBAprI6fPBmxH5Ho+6hlflbYmcPF60mfKB1HJqux7+zKPUAMOa RqpVY2Yoc80wyhERLm2tG4TWrBXa+PoD/MwHNIuuZfwA== Message-ID: Date: Thu, 18 Jan 2024 08:31:30 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] arm64: dts: rockchip: rock-pi-e: fix location of snps properties From: Jonas Karlman To: Trevor Woerner , "Chen-Yu Tsai" Cc: linux-kernel@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org References: <20240116204103.29318-1-twoerner@gmail.com> <20240116204103.29318-2-twoerner@gmail.com> <20240117054705.GA33225@localhost> <852071ad-24e8-40a8-9b10-623abf1dc4bf@kwiboo.se> Content-Language: en-US In-Reply-To: <852071ad-24e8-40a8-9b10-623abf1dc4bf@kwiboo.se> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Report-Abuse-To: abuse@forwardemail.net X-Report-Abuse: abuse@forwardemail.net X-Complaints-To: abuse@forwardemail.net X-ForwardEmail-Version: 0.4.40 X-ForwardEmail-Sender: rfc822; jonas@kwiboo.se, smtp.forwardemail.net, 149.28.215.223 X-ForwardEmail-ID: 65a8d3d6d66eecd94fbb69d3 On 2024-01-17 09:15, Jonas Karlman wrote: > On 2024-01-17 06:47, Trevor Woerner wrote: >> On Wed 2024-01-17 @ 12:38:39 PM, Chen-Yu Tsai wrote: >>> On Wed, Jan 17, 2024 at 4:41 AM Trevor Woerner wrote: >>>> >>>> A number of snps (Synopsys) properties are not in their correct location. >>> >>> Nope. If you read the snps,dwmac.yaml binding file, you'll see that these >>> properties have been deprecated. They are properties pertaining to the PHY >>> and should be described under the PHY node. Support for reset GPIOs on PHY >>> devices in phylib has been there since v4.16. The snps prefixed properties >>> were deprecated in v5.3. >> >> If that's the case, then the bindings and the drivers are out of sync in both >> U-Boot and Linux. I discovered this issue while working with older and newer >> revisions of the rock-pi-e board. The first three spins of the rock-pi-e have >> the rtl8211e PHY but the last one (v1.21) has the rtl8211f PHY. >> >> With the existing layout nothing works in U-Boot and in Linux the rtl8211e >> works but not the rtl8211f. With this patch both the rtl8211e and the rtl8211f >> PHYs work using the exact same device trees on both older and newer rock-pi-e >> boards in both U-Boot and Linux. > > For linux this is probably related to the same chicken-and-egg reset > issue outlined at [1]. The phy is not reset before it is probed and > cannot be probed because it is not reset. > > As for U-Boot the designware/gmac_rockchip ethernet driver may need some > adjustments to properly integrate with eth-phy uclass to properly reset > the phy described in a ethernet-phy node before it can be probed. > > Following config options is disabled for rock-pi-e-rk3328 defconfig: > > # CONFIG_DM_ETH_PHY is not set > # CONFIG_PHY_REALTEK is not set > > Also the driver needs to be updated to make use eth-phy uclass for it to > work correctly. More similar to how the dwc_eth_qos driver works related > to ethernet phy. I have just sent out a U-Boot series that fix ethernet on the v1.21 revision of the ROCK Pi E board, see [2]. Would expect that ethernet also starts to work in linux with those patches applied to U-Boot. I only tested and verified ethernet in U-Boot. Hopefully someone can take a closer look at the issue on linux side so that it does not need to depend on PHY being reset by the bootloader. [2] https://lore.kernel.org/u-boot/20240118071949.927089-1-jonas@kwiboo.se/T/ Regards, Jonas > > [1] https://lore.kernel.org/linux-rockchip/47d55aca-bee6-810f-379f-9431649fefa6@kwiboo.se/ > > Regards, > Jonas > >> >> Comparing the rock-pi-e's dts file with the one from the roc-rk3328-cc board, >> which also uses the layout in this patch, and which also uses the rtl8211e >> external PHY, is what led me in this direction. >> >>> >>> ChenYu >>> >>>> Fixes: b918e81f2145 ("arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E") >>>> Signed-off-by: Trevor Woerner >>>> --- >>>> arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts | 10 +++++----- >>>> 1 file changed, 5 insertions(+), 5 deletions(-) >>>> >>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts >>>> index 096cfa19036e..0739b8fec86e 100644 >>>> --- a/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts >>>> +++ b/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts >>>> @@ -150,8 +150,11 @@ &gmac2io { >>>> phy-mode = "rgmii"; >>>> phy-supply = <&vcc_io>; >>>> pinctrl-names = "default"; >>>> - pinctrl-0 = <&rgmiim1_pins>; >>>> + pinctrl-0 = <&rgmiim1_pins>, <ð_phy_reset_pin>; >>>> snps,aal; >>>> + snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; >>>> + snps,reset-active-low; >>>> + snps,reset-delays-us = <0 10000 50000>; >>>> snps,rxpbl = <0x4>; >>>> snps,txpbl = <0x4>; >>>> tx_delay = <0x26>; >>>> @@ -165,13 +168,10 @@ mdio { >>>> >>>> rtl8211: ethernet-phy@1 { >>>> reg = <1>; >>>> - pinctrl-0 = <ð_phy_int_pin>, <ð_phy_reset_pin>; >>>> + pinctrl-0 = <ð_phy_int_pin>; >>>> pinctrl-names = "default"; >>>> interrupt-parent = <&gpio1>; >>>> interrupts = <24 IRQ_TYPE_LEVEL_LOW>; >>>> - reset-assert-us = <10000>; >>>> - reset-deassert-us = <50000>; >>>> - reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; >>>> }; >>>> }; >>>> }; >>>> -- >>>> 2.43.0.76.g1a87c842ece3 >>>>