From mboxrd@z Thu Jan 1 00:00:00 1970 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 2A81DCDE031 for ; Thu, 26 Sep 2024 19:14:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=y4WZTo6nI26Bhfdln9Gf7wFMawvUlUInYNk7SP122zU=; b=wVz+x5dACEMTpTf4UBAtSSG63T Q18FUQLX8/dVhHd3M3QOwuNgvLtj2HNhfiHxgfvYrSXXZMvX6k3mWffZ4Z02MyjvU1bwbK+QEZX7d Te2YvD6+gK6BzvSH1x7kiH3qhmZO+5mpaETwl7Ru2RpBf5Yd+rFXEAPZElEVgoLYIdmcX/uSlIWU9 L7onhbMkhX/8OxRAkE7hQIRp33aWb/5WHDi+awc8tQBMPUsW/UOQy6M7/HVWcU1GNSP8NCyfTjpS6 u8OTA3DdejTImFNVWvSeCHHgHRyOVIGrBPuZIr12bUh+C9lDoTqSlWUXl6JGMJ3Gz+DmbWkLJlBuh AkE8AzEA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sttwU-00000009DFp-2Rlt; Thu, 26 Sep 2024 19:14:22 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sttvJ-00000009D7x-1UPI for linux-arm-kernel@lists.infradead.org; Thu, 26 Sep 2024 19:13:10 +0000 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-208cf673b8dso12351505ad.3 for ; Thu, 26 Sep 2024 12:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenstorrent.com; s=google; t=1727377988; x=1727982788; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=y4WZTo6nI26Bhfdln9Gf7wFMawvUlUInYNk7SP122zU=; b=cmBqgZcJLvvum3ztj/+BBWhwUDqbrhBsK9iNhwt0LVuxnXrp8+Xvw7oF8UWtz5U+tI yxiIBVrE7YNDFyspJs5CPFIRT9FHSbNYZl5Mf2Yr5ssJJqHo6H5gm04IRYMiLQ8DBq6K W8tHhqEfAJqqfP3ng7bmqKkyz0e6zdhEsBqhtm19oQ+cipYCpIqRfrAp0gSEFVpL2wBr TD/0LH9xxvD56aTWgrEJ0rZ8lOnjJxI8DwZzKNaM1ZrBBQRD6+7qcAwpW2wIdqrrDBe0 Pa/oKWgH1eItqoh+AHShmCt0EBmFu5x+vdU5WlFsaeeB3V4YYNCPNIZo2/kBVaiEnJZf g5SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727377988; x=1727982788; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=y4WZTo6nI26Bhfdln9Gf7wFMawvUlUInYNk7SP122zU=; b=pHvsmYDvYx6Hr+i4kK+C6Rd0s3VvHaVzSNQyXnL3ltiwaNA3+ARQDlM9I0oVuWFAkG sFUzlnuv//LC3rgb31+bF3ll2z+FEf5fnUvC4rbpEHCrkHbCxN/5+AkrDGYYSvFWVl7Y LqPjBSHM8kL+i0APJncBa6XANwORF0v7mJ37IVFkps6uTUAQnBd4cqU4tUD4wIkMd8nK 7TgqhqWPExlJyYcHaDM0fBrXsicB02F+g33EqOpNPuXxajKSCa2NqBjFGL5S3i9Q7fTr ZORhowzLS2yiWxOvjdGQV1BifB/w4Zejs2Hn43mvdEMuxZRY9ZtbLJzUfbnpRDd91r/Z rKwg== X-Forwarded-Encrypted: i=1; AJvYcCU0jizTyuEna75a5V3OqIHmaGch9Npxdmn58y970EFvNvZ3OnnECW1vT50tIFbv4FiG/lgRo4LKYjcpM1qnvTKJ@lists.infradead.org X-Gm-Message-State: AOJu0Yy42XtWQgDZQ7C+eS4KzUa8tHq+e6tVP54IIUz3fWkn4voGxXpJ T46DtFvW5bCS78XhHgB2UeBEc5YJBGJYjRKsDzvqMcYPSKCsnsyr8Zc+n8e10mU= X-Google-Smtp-Source: AGHT+IEMklrWdPx+X7c21DcecTVJ7lxpddUaIsHWWZy+aOWGUu3YS5G/It5NPJNOcBI2+VtqDMCCmw== X-Received: by 2002:a17:903:41ca:b0:206:9ab3:2ebc with SMTP id d9443c01a7336-20b37b7c063mr8647165ad.47.1727377988323; Thu, 26 Sep 2024 12:13:08 -0700 (PDT) Received: from x1 (71-34-69-82.ptld.qwest.net. [71.34.69.82]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20b37e543dasm1740175ad.258.2024.09.26.12.13.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 12:13:08 -0700 (PDT) Date: Thu, 26 Sep 2024 12:13:06 -0700 From: Drew Fustini To: Andrew Lunn Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexandre Torgue , Giuseppe Cavallaro , Jose Abreu , Jisheng Zhang , Maxime Coquelin , Emil Renner Berthing , Drew Fustini , Guo Ren , Fu Wei , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v2 3/3] riscv: dts: thead: Add TH1520 ethernet nodes Message-ID: References: <20240926-th1520-dwmac-v2-0-f34f28ad1dc9@tenstorrent.com> <20240926-th1520-dwmac-v2-3-f34f28ad1dc9@tenstorrent.com> <3e26f580-bc5d-448e-b5bd-9b607c33702b@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3e26f580-bc5d-448e-b5bd-9b607c33702b@lunn.ch> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240926_121309_418528_95D468DF X-CRM114-Status: GOOD ( 15.95 ) 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 On Thu, Sep 26, 2024 at 08:39:29PM +0200, Andrew Lunn wrote: > > +&mdio0 { > > + phy0: ethernet-phy@1 { > > + reg = <1>; > > + }; > > + > > + phy1: ethernet-phy@2 { > > + reg = <2>; > > + }; > > +}; > > Two PHYs on one bus... Thanks for pointing this out. I will move phy1 to mdio1. > > > + gmac1: ethernet@ffe7060000 { > > + compatible = "thead,th1520-gmac", "snps,dwmac-3.70a"; > > + reg = <0xff 0xe7060000 0x0 0x2000>, <0xff 0xec004000 0x0 0x1000>; > > + reg-names = "dwmac", "apb"; > > + interrupts = <67 IRQ_TYPE_LEVEL_HIGH>; > > + interrupt-names = "macirq"; > > + clocks = <&clk CLK_GMAC_AXI>, <&clk CLK_GMAC_AXI>; > > + clock-names = "stmmaceth", "pclk"; > > + snps,pbl = <32>; > > + snps,fixed-burst; > > + snps,multicast-filter-bins = <64>; > > + snps,perfect-filter-entries = <32>; > > + snps,axi-config = <&stmmac_axi_config>; > > + status = "disabled"; > > + > > + mdio1: mdio { > > + compatible = "snps,dwmac-mdio"; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + }; > > + }; > > + > > + gmac0: ethernet@ffe7070000 { > > + compatible = "thead,th1520-gmac", "snps,dwmac-3.70a"; > > + reg = <0xff 0xe7070000 0x0 0x2000>, <0xff 0xec003000 0x0 0x1000>; > > + reg-names = "dwmac", "apb"; > > + interrupts = <66 IRQ_TYPE_LEVEL_HIGH>; > > + interrupt-names = "macirq"; > > + clocks = <&clk CLK_GMAC_AXI>, <&clk CLK_GMAC_AXI>; > > And the MACs are listed in opposite order. Does gmac1 probe first, > find the PHY does not exist, and return -EPROBE_DEFER. Then gmac0 > probes successfully, and then sometime later gmac1 then reprobes? > > I know it is normal to list nodes in address order, but you might be > able to avoid the EPROBE_DEFER if you reverse the order. The probe order seems to always be the ethernet@ffe7060000 (gmac1) first and then ethernet@ffe7070000 (gmac0). I do not see any probe deferral in the boot log [1]. Thanks, Drew [1] https://gist.github.com/pdp7/02a44b024bdb6be5fe61ac21303ab29a