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 76D97C7EE39 for ; Sun, 29 Jun 2025 14:49:43 +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=WDYIQ9lxwYybHCC9iPb9gi4mCl7dg/YIwxya4w3k148=; b=LhqYgp6X6PeAbM/79E4RfA5dcE 3cuM8IqgNV5oE0FeSv9xiePY5m06/POgrNunHncdpHSAQ6ADR38f/56aJczXiP48ATHxIfxbr7jIZ A699ms9Xn7tvNu/tWNftM06efOd4LnQMUnBOyoiQzvRWDyR19yMLp67vAglbYMz8y8ZuwwBLCVvHj ro493XeIFCnoBWRqCobXI+RoBqIADaoRX0Kwl4o66XA83E880EWalnoY7/hc+1CrA38h1frUGzvDL s92xOfuT+hTjxa0xRrMqb6g6kuxSPLUF3xYh8q86EIjIUykQd6G9KxATaKsS98+t+h0KP+dUTtIDz iGorflrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uVtLc-00000000NSj-3Mul; Sun, 29 Jun 2025 14:49:36 +0000 Received: from pidgin.makrotopia.org ([2a07:2ec0:3002::65]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uVtJJ-00000000NHF-3EpT; Sun, 29 Jun 2025 14:47:14 +0000 Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.98.2) (envelope-from ) id 1uVtJ6-000000001Bw-12Mh; Sun, 29 Jun 2025 14:47:00 +0000 Date: Sun, 29 Jun 2025 15:46:56 +0100 From: Daniel Golle To: Frank Wunderlich Cc: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Georgi Djakov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Frank Wunderlich , Johnson Wang , =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= , Landen Chao , DENG Qingfang , Sean Wang , Lorenzo Bianconi , Felix Fietkau , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH v7 07/14] arm64: dts: mediatek: mt7988: add basic ethernet-nodes Message-ID: References: <20250628165451.85884-1-linux@fw-web.de> <20250628165451.85884-8-linux@fw-web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250628165451.85884-8-linux@fw-web.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250629_074713_812641_21CC116F X-CRM114-Status: GOOD ( 23.63 ) 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 Sat, Jun 28, 2025 at 06:54:42PM +0200, Frank Wunderlich wrote: > From: Frank Wunderlich > > Add basic ethernet related nodes. > > Mac1+2 needs pcs (sgmii+usxgmii) to work correctly which will be linked > later when driver is merged. > > Signed-off-by: Daniel Golle > Signed-off-by: Frank Wunderlich > --- > v6: > - fix whitespace-errors for pdma irqs (spaces vs. tabs) > - move sram from eth reg to own sram node (needs CONFIG_SRAM) > > v5: > - add reserved irqs and change names to fe0..fe3 > - change rx-ringX to pdmaX to be closer to documentation > > v4: > - comment for fixed-link on gmac0 > - update 2g5 phy node > - unit-name dec instead of hex to match reg property > - move compatible before reg > - drop phy-mode > - add interrupts for RSS > - add interrupt-names and drop reserved irqs for ethernet > - some reordering > - eth-reg and clock whitespace-fix based on angelos review > --- > arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 137 +++++++++++++++++++++- > 1 file changed, 134 insertions(+), 3 deletions(-) > > diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi > index 560ec86dbec0..cf765a6b1fa8 100644 > --- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi > +++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi > @@ -680,7 +680,28 @@ xphyu3port0: usb-phy@11e13000 { > }; > }; > > - clock-controller@11f40000 { > + xfi_tphy0: phy@11f20000 { > + compatible = "mediatek,mt7988-xfi-tphy"; > + reg = <0 0x11f20000 0 0x10000>; > + clocks = <&xfi_pll CLK_XFIPLL_PLL_EN>, > + <&topckgen CLK_TOP_XFI_PHY_0_XTAL_SEL>; > + clock-names = "xfipll", "topxtal"; > + resets = <&watchdog 14>; > + mediatek,usxgmii-performance-errata; > + #phy-cells = <0>; > + }; > + > + xfi_tphy1: phy@11f30000 { > + compatible = "mediatek,mt7988-xfi-tphy"; > + reg = <0 0x11f30000 0 0x10000>; > + clocks = <&xfi_pll CLK_XFIPLL_PLL_EN>, > + <&topckgen CLK_TOP_XFI_PHY_1_XTAL_SEL>; > + clock-names = "xfipll", "topxtal"; > + resets = <&watchdog 15>; > + #phy-cells = <0>; > + }; > + > + xfi_pll: clock-controller@11f40000 { > compatible = "mediatek,mt7988-xfi-pll"; > reg = <0 0x11f40000 0 0x1000>; > resets = <&watchdog 16>; > @@ -714,19 +735,129 @@ phy_calibration_p3: calib@97c { > }; > }; > > - clock-controller@15000000 { > + ethsys: clock-controller@15000000 { > compatible = "mediatek,mt7988-ethsys", "syscon"; > reg = <0 0x15000000 0 0x1000>; > #clock-cells = <1>; > #reset-cells = <1>; > }; > > - clock-controller@15031000 { > + ethwarp: clock-controller@15031000 { > compatible = "mediatek,mt7988-ethwarp"; > reg = <0 0x15031000 0 0x1000>; > #clock-cells = <1>; > #reset-cells = <1>; > }; > + > + eth: ethernet@15100000 { > + compatible = "mediatek,mt7988-eth"; > + reg = <0 0x15100000 0 0x80000>; I think this should be reg = <0 0x15100000 0 0x40000>; as the range from 15140000 ~ 1517ffff is used as SRAM on MT7981/MT7986 and doesn't seem to be used at all on MT7988. root@OpenWrt:~# devmem 0x15140000 32 0xDEADBEEF ... root@OpenWrt:~# devmem 0x1517fffc 32 0xDEADBEEF (with 0xDEADBEEF all that range) 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 0D612C7EE39 for ; Sun, 29 Jun 2025 14:49:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Type:MIME-Version:References:Message-ID:Subject: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=WDYIQ9lxwYybHCC9iPb9gi4mCl7dg/YIwxya4w3k148=; b=eHBFnHUDcWnnSbX+y8P8sBI7ih p62aLrNdqLmP79oln7hjsgopH9c2GsPcKXYv8qfHN7wmGSWBoJqIJl0YbuyamK2S2dI1tKi/H7Q/z 6ad52+ZAsva1bGz9d7RBOMWdE//ku6Q9JpdwmEsT2cpNf9lCKP7o6ljJIBfmiSCs4pOLCkQ5uW484 uSs7pt9N8NOk2NRkJ95ckCoxkppSxRpTz5RjWMuL2G7Z7fzr75BR5fgMABf24QAVZ4IP4ODsZ+NMw qDjBxOLQamiSsxhppMZZYWYhUOaXeuapMkrmnwmQUyLo8/Xv438fvPcrCfOyqbtwY6RYl7gaXYzT2 qD1zIexg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uVtLd-00000000NTB-1Fwo; Sun, 29 Jun 2025 14:49:37 +0000 Received: from pidgin.makrotopia.org ([2a07:2ec0:3002::65]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uVtJJ-00000000NHF-3EpT; Sun, 29 Jun 2025 14:47:14 +0000 Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.98.2) (envelope-from ) id 1uVtJ6-000000001Bw-12Mh; Sun, 29 Jun 2025 14:47:00 +0000 Date: Sun, 29 Jun 2025 15:46:56 +0100 From: Daniel Golle To: Frank Wunderlich Subject: Re: [PATCH v7 07/14] arm64: dts: mediatek: mt7988: add basic ethernet-nodes Message-ID: References: <20250628165451.85884-1-linux@fw-web.de> <20250628165451.85884-8-linux@fw-web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250628165451.85884-8-linux@fw-web.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250629_074713_812641_21CC116F X-CRM114-Status: GOOD ( 23.63 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Landen Chao , Eric Dumazet , Rob Herring , linux-pm@vger.kernel.org, Chanwoo Choi , MyungJoo Ham , Johnson Wang , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , devicetree@vger.kernel.org, Conor Dooley , Sean Wang , DENG Qingfang , linux-mediatek@lists.infradead.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno , =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kyungmin Park , Georgi Djakov , Krzysztof Kozlowski , Vladimir Oltean , "David S. Miller" , Felix Fietkau Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Sat, Jun 28, 2025 at 06:54:42PM +0200, Frank Wunderlich wrote: > From: Frank Wunderlich > > Add basic ethernet related nodes. > > Mac1+2 needs pcs (sgmii+usxgmii) to work correctly which will be linked > later when driver is merged. > > Signed-off-by: Daniel Golle > Signed-off-by: Frank Wunderlich > --- > v6: > - fix whitespace-errors for pdma irqs (spaces vs. tabs) > - move sram from eth reg to own sram node (needs CONFIG_SRAM) > > v5: > - add reserved irqs and change names to fe0..fe3 > - change rx-ringX to pdmaX to be closer to documentation > > v4: > - comment for fixed-link on gmac0 > - update 2g5 phy node > - unit-name dec instead of hex to match reg property > - move compatible before reg > - drop phy-mode > - add interrupts for RSS > - add interrupt-names and drop reserved irqs for ethernet > - some reordering > - eth-reg and clock whitespace-fix based on angelos review > --- > arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 137 +++++++++++++++++++++- > 1 file changed, 134 insertions(+), 3 deletions(-) > > diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi > index 560ec86dbec0..cf765a6b1fa8 100644 > --- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi > +++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi > @@ -680,7 +680,28 @@ xphyu3port0: usb-phy@11e13000 { > }; > }; > > - clock-controller@11f40000 { > + xfi_tphy0: phy@11f20000 { > + compatible = "mediatek,mt7988-xfi-tphy"; > + reg = <0 0x11f20000 0 0x10000>; > + clocks = <&xfi_pll CLK_XFIPLL_PLL_EN>, > + <&topckgen CLK_TOP_XFI_PHY_0_XTAL_SEL>; > + clock-names = "xfipll", "topxtal"; > + resets = <&watchdog 14>; > + mediatek,usxgmii-performance-errata; > + #phy-cells = <0>; > + }; > + > + xfi_tphy1: phy@11f30000 { > + compatible = "mediatek,mt7988-xfi-tphy"; > + reg = <0 0x11f30000 0 0x10000>; > + clocks = <&xfi_pll CLK_XFIPLL_PLL_EN>, > + <&topckgen CLK_TOP_XFI_PHY_1_XTAL_SEL>; > + clock-names = "xfipll", "topxtal"; > + resets = <&watchdog 15>; > + #phy-cells = <0>; > + }; > + > + xfi_pll: clock-controller@11f40000 { > compatible = "mediatek,mt7988-xfi-pll"; > reg = <0 0x11f40000 0 0x1000>; > resets = <&watchdog 16>; > @@ -714,19 +735,129 @@ phy_calibration_p3: calib@97c { > }; > }; > > - clock-controller@15000000 { > + ethsys: clock-controller@15000000 { > compatible = "mediatek,mt7988-ethsys", "syscon"; > reg = <0 0x15000000 0 0x1000>; > #clock-cells = <1>; > #reset-cells = <1>; > }; > > - clock-controller@15031000 { > + ethwarp: clock-controller@15031000 { > compatible = "mediatek,mt7988-ethwarp"; > reg = <0 0x15031000 0 0x1000>; > #clock-cells = <1>; > #reset-cells = <1>; > }; > + > + eth: ethernet@15100000 { > + compatible = "mediatek,mt7988-eth"; > + reg = <0 0x15100000 0 0x80000>; I think this should be reg = <0 0x15100000 0 0x40000>; as the range from 15140000 ~ 1517ffff is used as SRAM on MT7981/MT7986 and doesn't seem to be used at all on MT7988. root@OpenWrt:~# devmem 0x15140000 32 0xDEADBEEF ... root@OpenWrt:~# devmem 0x1517fffc 32 0xDEADBEEF (with 0xDEADBEEF all that range)