From nobody Sun Dec 14 02:02:13 2025 Received: from mxout1.routing.net (mxout1.routing.net [134.0.28.11]) (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 E58FB28DB49; Wed, 9 Jul 2025 11:12:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059526; cv=none; b=Lu3PV/GlOB64sOrDzLk8eKCOFn3qC0qmPSNrgUYC4Aywli8hJeJnh+PKwD2l2w+Y4Dg4ExsIozCKU6I6Bdx+29nS3PFhlBr04jKfCAYsvBMj5+uV68FQ4H1WLi6kIFJTG2ywmUkaAa4lhGiKffAd+2pxPFyQOq62ZOK+O8VhDfE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059526; c=relaxed/simple; bh=GbWaO6C8SVL0MTrQUBPai4tQm9kGMFCFoPeWn9KjrLA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GpXGGuy/jvC5oAmBmSghgAEGgwpMlLk29XXQ0vhbMPWeHcRzdOXf0Ab0F5iQWAY4cFd0F91PmXGI9+7DOaD2RzoXmi0gFa1PO2zMCcdMxqQ1nEaf8h+7NX/T4TuBi/a18JeXB+6a6lvNlkc14bKlNQVs/bViWMTrWSIMYYfsbvc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=ZexAPPkG; arc=none smtp.client-ip=134.0.28.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="ZexAPPkG" Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout1.routing.net (Postfix) with ESMTP id AB37341A15; Wed, 9 Jul 2025 11:11:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1752059516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RH5WdhVK7EinTfZXKFUPt/JLvwf0Zd06FmJFOD2Rltk=; b=ZexAPPkG8nkwl9FfZvh0ia1UVyCDwjR/9vVlh0dlIyt5bMBvyYAwn+kbA7RV9Nb0A4rY3W Ip/CybEmY2Dy3diD81PrlEdaTcZKb2G+UcKofd9OFUp2VvOou1mn1BnSHp4rNdg5aOWG0L /0vMtCyIq89cdpiAVGjvubUyLw4VI6s= Received: from frank-u24.. (fttx-pool-217.61.157.99.bambit.de [217.61.157.99]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 4B080122701; Wed, 9 Jul 2025 11:11:56 +0000 (UTC) From: Frank Wunderlich To: 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 , Johnson Wang , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Landen Chao , DENG Qingfang , Sean Wang , Daniel Golle , Lorenzo Bianconi , Felix Fietkau Cc: Frank Wunderlich , 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, Krzysztof Kozlowski Subject: [PATCH v9 01/13] dt-bindings: net: mediatek,net: update mac subnode pattern for mt7988 Date: Wed, 9 Jul 2025 13:09:37 +0200 Message-ID: <20250709111147.11843-2-linux@fw-web.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250709111147.11843-1-linux@fw-web.de> References: <20250709111147.11843-1-linux@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich MT7888 have 3 Macs and so its nodes have names from mac0 - mac2. Update pattern to fix this. Fixes: c94a9aabec36 ("dt-bindings: net: mediatek,net: add mt7988-eth bindin= g") Signed-off-by: Frank Wunderlich Reviewed-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/net/mediatek,net.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/mediatek,net.yaml b/Docu= mentation/devicetree/bindings/net/mediatek,net.yaml index 9e02fd80af83..175d1d011dc6 100644 --- a/Documentation/devicetree/bindings/net/mediatek,net.yaml +++ b/Documentation/devicetree/bindings/net/mediatek,net.yaml @@ -382,7 +382,7 @@ allOf: - const: xgp3 =20 patternProperties: - "^mac@[0-1]$": + "^mac@[0-2]$": type: object unevaluatedProperties: false allOf: --=20 2.43.0 From nobody Sun Dec 14 02:02:13 2025 Received: from mxout3.routing.net (mxout3.routing.net [134.0.28.8]) (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 8F0DA28DB5E; Wed, 9 Jul 2025 11:12:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.8 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059527; cv=none; b=WXQVM2kFse/5qCeDaCrioj9xKf6OeVLae4aGYkUPIM7Ldu4tBNgrKjg8l4QNF6BsYEsZi33S5jQMl2JgzKEoW0r1Z0CBN+7hJCQxV7clx9B1rFWO68khjlhq7JjTGz45uF8uSDaTbP+r/1QYEJYrBrJzEZo5d4DaXywzL+Mefjw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059527; c=relaxed/simple; bh=DXD601dCHjG/IeJJ4zYhvxLgHvhDD4JGTSqzTPEUyGo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XUI+nPE+3+rxoPY6sXMCiUG9ARw+SlDfX4zsvJLJrXW/KOEY54ITHVlDAXaalgdzSdJfSxGOn0JkbjXl5z4Xu8NTvg8bN1mB1FJTZEn2ePe7F1fVNeVcTka3SXr06L3+ZzPGdpg2eNH/zQeSonsv8DCYmPv0ploWk8SFg4HqA/c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=cPzLell4; arc=none smtp.client-ip=134.0.28.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="cPzLell4" Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout3.routing.net (Postfix) with ESMTP id 1A15A60FC0; Wed, 9 Jul 2025 11:11:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1752059517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q5oYVbNPFfzoohPL6ayLqmjVRgDniDHqGOnI/CRFHHI=; b=cPzLell4YaPiY1K/gXjudjgwVWJ0gjgm298qVUHPOYxFFxuVjSrq56FO5j7cLj8WdB3eej CZ5r8f4/wXoELm1glyIDDlsxJqBu/cQX3WAcse7+JG0fdWW5kd/7oHnf8uah0t67lh172X wcEWFD/CEU3oGeI2MTNHxWf0u/0o/tU= Received: from frank-u24.. (fttx-pool-217.61.157.99.bambit.de [217.61.157.99]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id B36511226D4; Wed, 9 Jul 2025 11:11:56 +0000 (UTC) From: Frank Wunderlich To: 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 , Johnson Wang , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Landen Chao , DENG Qingfang , Sean Wang , Daniel Golle , Lorenzo Bianconi , Felix Fietkau Cc: Frank Wunderlich , 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: [PATCH v9 02/13] dt-bindings: net: mediatek,net: allow up to 8 IRQs Date: Wed, 9 Jul 2025 13:09:38 +0200 Message-ID: <20250709111147.11843-3-linux@fw-web.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250709111147.11843-1-linux@fw-web.de> References: <20250709111147.11843-1-linux@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Increase the maximum IRQ count to 8 (4 FE + 4 RSS/LRO). Frame-engine-IRQs (max 4): MT7621, MT7628: 1 FE-IRQ MT7622, MT7623: 3 FE-IRQs (only two used by the driver for now) MT7981, MT7986, MT7988: 4 FE-IRQs (only two used by the driver for now) Mediatek Filogic SoCs (mt798x) have 4 additional IRQs for RSS and/or LRO. So MT798x have 8 IRQs in total. MT7981 does not have a ethernet-node yet. MT7986 Ethernet node is updated with RSS/LRO IRQs in this series. MT7988 Ethernet node is added in this series. Signed-off-by: Frank Wunderlich Reviewed-by: Krzysztof Kozlowski --- v9: - set interrupt minitems to 8 for filogic - mt7981 does not have a ethernet node yet, so no ABI break - devicetree for mt7986 is updated later in this series, ABI-Break, but RSS/LRO should use interrupt names and is simply disabled when using older DT - extend mt7986 example with PDMA-IRQs because minItems now 8 v8: separate irq-count change from interrupt-names patch --- .../devicetree/bindings/net/mediatek,net.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/net/mediatek,net.yaml b/Docu= mentation/devicetree/bindings/net/mediatek,net.yaml index 175d1d011dc6..99dc0401eb9a 100644 --- a/Documentation/devicetree/bindings/net/mediatek,net.yaml +++ b/Documentation/devicetree/bindings/net/mediatek,net.yaml @@ -40,7 +40,7 @@ properties: =20 interrupts: minItems: 1 - maxItems: 4 + maxItems: 8 =20 power-domains: maxItems: 1 @@ -272,7 +272,7 @@ allOf: then: properties: interrupts: - minItems: 4 + minItems: 8 =20 clocks: minItems: 15 @@ -310,7 +310,7 @@ allOf: then: properties: interrupts: - minItems: 4 + minItems: 8 =20 clocks: minItems: 15 @@ -348,7 +348,7 @@ allOf: then: properties: interrupts: - minItems: 4 + minItems: 8 =20 clocks: minItems: 24 @@ -507,7 +507,11 @@ examples: interrupts =3D , , , - ; + , + , + , + , + ; clocks =3D <ðsys CLK_ETH_FE_EN>, <ðsys CLK_ETH_GP2_EN>, <ðsys CLK_ETH_GP1_EN>, --=20 2.43.0 From nobody Sun Dec 14 02:02:13 2025 Received: from mxout4.routing.net (mxout4.routing.net [134.0.28.9]) (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 A97D928DF23; Wed, 9 Jul 2025 11:12:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059527; cv=none; b=sStmPHkD2ZqbCS6ulNrqxX+nF9iPL0s+FRsag2QXyDeB3tYCJRWejV075RNENeQFUsbOTdmOJrrPyF0K5IQ+ARJFgXojtb5xPHQzOMf1RZ0/Nlm7geEjrXRub5U0bLhe1KLYP50LvHwUSjkdRR3245Pm2amQW7tsRPUEwlRLZZs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059527; c=relaxed/simple; bh=uPn48diOGZBtLQOkWW7G6OT3hvBkeThACjnlKlvsVGQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kEeubxVIlBTCn+1o1fkgw1tqsfqAkNV4RB0C5pic5Z0fbFd3H592bRJrGuPEQwYAqM/cF5M7FZmBO90LxFC1Fv1JBzV3mr6YTwswko0tqXoQYo3Nk0WtRkMBJnYyU5hFG0YQneKcHUqhP3QMThZpXsP0aBJHKQtPvhxoHF/8igk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=E3Dsrg/z; arc=none smtp.client-ip=134.0.28.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="E3Dsrg/z" Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout4.routing.net (Postfix) with ESMTP id 7C60D100864; Wed, 9 Jul 2025 11:11:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1752059517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AgqruDlJ2JwMJ376oRztOa8rbeaRA0eUEn0DX/LJh+M=; b=E3Dsrg/zsmdmFUoQrGlkMDLg/LbNOHZllMVBxvpkbFBEoOY/+809aqMHJs6FczTFXtkw+u mXdmRSTFu6ToV+IgrG22OSYw4WJsgY6S1vEmbfm1s6gWU7SnB0OyTJBjmm073saHUSjN7h 0ScHHSlY4cy0e4qp2rbFd3K40jlYUtA= Received: from frank-u24.. (fttx-pool-217.61.157.99.bambit.de [217.61.157.99]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 1FDB2122701; Wed, 9 Jul 2025 11:11:57 +0000 (UTC) From: Frank Wunderlich To: 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 , Johnson Wang , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Landen Chao , DENG Qingfang , Sean Wang , Daniel Golle , Lorenzo Bianconi , Felix Fietkau Cc: Frank Wunderlich , 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: [PATCH v9 03/13] dt-bindings: net: mediatek,net: allow irq names Date: Wed, 9 Jul 2025 13:09:39 +0200 Message-ID: <20250709111147.11843-4-linux@fw-web.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250709111147.11843-1-linux@fw-web.de> References: <20250709111147.11843-1-linux@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich In preparation for MT7988 and RSS/LRO allow the interrupt-names property. In this way driver can request the interrupts by name which is much more readable in the driver code and SoC's dtsi than relying on a specific order. Frame-engine-IRQs (fe0..3): MT7621, MT7628: 1 FE-IRQ MT7622, MT7623: 3 FE-IRQs (only two used by the driver for now) MT7981, MT7986: 4 FE-IRQs (only two used by the driver for now) RSS/LRO IRQs (pdma0..3) additional only on Filogic (MT798x) with count of 4. So all IRQ-names (8) for Filogic. Set boundaries for all compatibles same as irq count. Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski --- v9: - add interrupt-names minitems to 8 for filogic - mt7981 does not have a ethernet node yet - devicetree for mt7986 is updated later in this series - small rephrase IRQ =3D> FE-IRQ and mention total count of IRQs on Filogic. - kept angelos RB because of small change, i hope it is ok :) v8: - fixed typo in mt7621 section "interrupt-namess" - separated interrupt count from interrupt-names - rephrased description a bit to explain the "why" v7: fixed wrong rebase v6: new patch splitted from the mt7988 changes --- .../devicetree/bindings/net/mediatek,net.yaml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Documentation/devicetree/bindings/net/mediatek,net.yaml b/Docu= mentation/devicetree/bindings/net/mediatek,net.yaml index 99dc0401eb9a..d2b5461e73bc 100644 --- a/Documentation/devicetree/bindings/net/mediatek,net.yaml +++ b/Documentation/devicetree/bindings/net/mediatek,net.yaml @@ -42,6 +42,18 @@ properties: minItems: 1 maxItems: 8 =20 + interrupt-names: + minItems: 1 + items: + - const: fe0 + - const: fe1 + - const: fe2 + - const: fe3 + - const: pdma0 + - const: pdma1 + - const: pdma2 + - const: pdma3 + power-domains: maxItems: 1 =20 @@ -135,6 +147,10 @@ allOf: minItems: 3 maxItems: 3 =20 + interrupt-names: + minItems: 3 + maxItems: 3 + clocks: minItems: 4 maxItems: 4 @@ -166,6 +182,9 @@ allOf: interrupts: maxItems: 1 =20 + interrupt-names: + maxItems: 1 + clocks: minItems: 2 maxItems: 2 @@ -192,6 +211,10 @@ allOf: minItems: 3 maxItems: 3 =20 + interrupt-names: + minItems: 3 + maxItems: 3 + clocks: minItems: 11 maxItems: 11 @@ -232,6 +255,10 @@ allOf: minItems: 3 maxItems: 3 =20 + interrupt-names: + minItems: 3 + maxItems: 3 + clocks: minItems: 17 maxItems: 17 @@ -274,6 +301,9 @@ allOf: interrupts: minItems: 8 =20 + interrupt-names: + minItems: 8 + clocks: minItems: 15 maxItems: 15 @@ -312,6 +342,9 @@ allOf: interrupts: minItems: 8 =20 + interrupt-names: + minItems: 8 + clocks: minItems: 15 maxItems: 15 @@ -350,6 +383,9 @@ allOf: interrupts: minItems: 8 =20 + interrupt-names: + minItems: 8 + clocks: minItems: 24 maxItems: 24 --=20 2.43.0 From nobody Sun Dec 14 02:02:13 2025 Received: from mxout2.routing.net (mxout2.routing.net [134.0.28.12]) (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 8815528DB48; Wed, 9 Jul 2025 11:12:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059527; cv=none; b=i4rU1l72smuhIqf1m6XlohJHAMyn0djqbre+sxCBx44OlacFajXD3oNoYFb/s8bpKdo887hf9qRV0OtQAwlEo/uPC3f87l4Em9A6zvuAXFCB6bLLVFKbOOukM6aH0UIcuWYiMMbjsY7iWAiShsKox6Js8y+MVBK5hpByFKI657E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059527; c=relaxed/simple; bh=a0wG9B1wdMoAKQ8jKykL5CDdJ2yJntzJ5rgOaL6Jkxk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d2S/olMbF7NzzHV7A6nprg4nxSvpUelH1pF7hDVL7Oqyl+fGAwWDdKWwayAfdchKLHHD6UsTVz5EDJsO+jVnLfVaDEwd4AkKnaanNf61M0cMSWb6j+PdRvx1nWDD7Ceb7prPoEhC0Q3ccDEYVIFU29ZHbNeyRqSoqhsBU+62CV8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=RFZxMvmJ; arc=none smtp.client-ip=134.0.28.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="RFZxMvmJ" Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout2.routing.net (Postfix) with ESMTP id DDE0B603F9; Wed, 9 Jul 2025 11:11:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1752059518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N5yOskSQPOfeXqxzAKp+ra3y71xfGoumsHkxo/gxJUM=; b=RFZxMvmJ/Twz30DHlBhpB9sfybpktL4WYCl7NgYMWsNRwcZuVmxR5ajqPh1IUrsRuw0ygK qr5+9Y96dApHHtjMLEqvbZ0oWSUOarZzTdZ+UP/ja1ac1M4sPMB0tC4gy0UeP1Yq+MVE03 p6jIOaP2TlwfiuMU6e1OlHjYl6FDUi4= Received: from frank-u24.. (fttx-pool-217.61.157.99.bambit.de [217.61.157.99]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 867901226D4; Wed, 9 Jul 2025 11:11:57 +0000 (UTC) From: Frank Wunderlich To: 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 , Johnson Wang , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Landen Chao , DENG Qingfang , Sean Wang , Daniel Golle , Lorenzo Bianconi , Felix Fietkau Cc: Frank Wunderlich , 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: [PATCH v9 04/13] dt-bindings: net: mediatek,net: add sram property Date: Wed, 9 Jul 2025 13:09:40 +0200 Message-ID: <20250709111147.11843-5-linux@fw-web.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250709111147.11843-1-linux@fw-web.de> References: <20250709111147.11843-1-linux@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Meditak Filogic SoCs (MT798x) have dedicated MMIO-SRAM for dma operations. MT7981 and MT7986 currently use static offset to ethernet MAC register which will be changed in separate patch once this way is accepted. Add "sram" property to map ethernet controller to dedicated mmio-sram node. Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski --- v9: - add "sram: false" for non-filogic v8: - splitted out mac subnode pattern - dropped reg naming change - rephrased description - drop change of reg-name v6: - split out the interrupt-names into separate patch - update irq(name) min count to 4 - add sram-property - drop second reg entry and minitems as there is only 1 item left again v5: - fix v4 logmessage and change description a bit describing how i get the irq count. - update binding for 8 irqs with different names (rx,tx =3D> fe0..fe3) including the 2 reserved irqs which can be used later - change rx-ringX to pdmaX to be closer to hardware documentation v4: - increase max interrupts to 6 because of adding RSS/LRO interrupts (4) and dropping 2 reserved irqs (0+3) around rx+tx - dropped Robs RB due to this change - allow interrupt names - add interrupt-names without reserved IRQs on mt7988 this requires mtk driver patch: https://patchwork.kernel.org/project/netdevbpf/patch/20250616080738.11799= 3-2-linux@fw-web.de/ v2: - change reg to list of items --- .../devicetree/bindings/net/mediatek,net.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/net/mediatek,net.yaml b/Docu= mentation/devicetree/bindings/net/mediatek,net.yaml index d2b5461e73bc..b45f67f92e80 100644 --- a/Documentation/devicetree/bindings/net/mediatek,net.yaml +++ b/Documentation/devicetree/bindings/net/mediatek,net.yaml @@ -66,6 +66,10 @@ properties: - const: gmac - const: ppe =20 + sram: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to mmio SRAM + mediatek,ethsys: $ref: /schemas/types.yaml#/definitions/phandle description: @@ -162,6 +166,8 @@ allOf: - const: gp1 - const: gp2 =20 + sram: false + mediatek,infracfg: false =20 mediatek,wed: false @@ -194,6 +200,8 @@ allOf: - const: ethif - const: fe =20 + sram: false + mediatek,infracfg: false =20 mediatek,wed: false @@ -233,6 +241,8 @@ allOf: - const: sgmii_ck - const: eth2pll =20 + sram: false + mediatek,infracfg: false =20 mediatek,sgmiisys: @@ -283,6 +293,8 @@ allOf: - const: sgmii_ck - const: eth2pll =20 + sram: false + mediatek,sgmiisys: minItems: 2 maxItems: 2 --=20 2.43.0 From nobody Sun Dec 14 02:02:13 2025 Received: from mxout1.routing.net (mxout1.routing.net [134.0.28.11]) (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 7F78C28C840; Wed, 9 Jul 2025 11:12:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059528; cv=none; b=h1Ps3ffl81lmmzyCETavmnbLj1smwBVWjHYH7cJNYKHT4Y0CvhlynAz6kmMCIZc4DRvgOzQA8orb91rs1cV8l9IcRGJe6c8ZJ3GWedtyvjYb47FD8caHyyOAnqH8OijsJqkeSedfr3Lk59X1UzNcxX26XHUPYtE6TwRZk/tdNLo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059528; c=relaxed/simple; bh=JgZ1cPMKbEPkJlrteoo8n9KC9VeiMg4oo1zrlG+bnQQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a6Dqjp5vptkeY4KrRCcizGzEQXqvCnWKfGvuILA2jWqMjKEOmmiMyR+5q4C5X61FUp0AIPOA3LmBk+42JBEZQ7kQpsl1UOlXZUGxZMeZJitACIy2+De8G72ZHUqSAiag33OaDvt4Iz1FiAfOgt9yQmJZ6EB/2YvLl0adt2dtNC8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=dLQkg3wi; arc=none smtp.client-ip=134.0.28.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="dLQkg3wi" Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout1.routing.net (Postfix) with ESMTP id 50D5441A63; Wed, 9 Jul 2025 11:11:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1752059518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R99PFLgv7EGPI4uV/VSEzfV0kYW/ZQPDNvpGbpm2GOY=; b=dLQkg3wi/gHz7fm81ibCgiT0hBuNPMXQjgNl+blFdfenoNG1xoKripTkobC9583AZzBGoU n2r4mggX3C6grlU8ckCVWm8KiDx+8JaBLp/mLkp5MY3VF1V4PJmoMNF1gXuUZj3t7C+E2d ZfLE6ZYCOOiTSuZETsQIPscUuQG5ZK8= Received: from frank-u24.. (fttx-pool-217.61.157.99.bambit.de [217.61.157.99]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id EA7881226CC; Wed, 9 Jul 2025 11:11:57 +0000 (UTC) From: Frank Wunderlich To: 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 , Johnson Wang , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Landen Chao , DENG Qingfang , Sean Wang , Daniel Golle , Lorenzo Bianconi , Felix Fietkau Cc: Frank Wunderlich , 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: [PATCH v9 05/13] dt-bindings: net: dsa: mediatek,mt7530: add dsa-port definition for mt7988 Date: Wed, 9 Jul 2025 13:09:41 +0200 Message-ID: <20250709111147.11843-6-linux@fw-web.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250709111147.11843-1-linux@fw-web.de> References: <20250709111147.11843-1-linux@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add own dsa-port binding for SoC with internal switch where only phy-mode 'internal' is valid. Signed-off-by: Frank Wunderlich Reviewed-by: Rob Herring (Arm) Reviewed-by: AngeloGioacchino Del Regno --- .../bindings/net/dsa/mediatek,mt7530.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml= b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml index 51205f9f2985..9b983fdbf3c7 100644 --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml @@ -190,6 +190,18 @@ required: - reg =20 $defs: + builtin-dsa-port: + patternProperties: + "^(ethernet-)?ports$": + patternProperties: + "^(ethernet-)?port@[0-6]$": + if: + required: [ ethernet ] + then: + properties: + phy-mode: + const: internal + mt7530-dsa-port: patternProperties: "^(ethernet-)?ports$": @@ -297,7 +309,7 @@ allOf: - airoha,en7581-switch - airoha,an7583-switch then: - $ref: "#/$defs/mt7530-dsa-port" + $ref: "#/$defs/builtin-dsa-port" properties: gpio-controller: false mediatek,mcm: false --=20 2.43.0 From nobody Sun Dec 14 02:02:13 2025 Received: from mxout3.routing.net (mxout3.routing.net [134.0.28.8]) (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 BF27228D8D2; Wed, 9 Jul 2025 11:12:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.8 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059528; cv=none; b=MCe9YeK13bKw8O3AS3AuU60cMf4WYlYz/QbTM/3DQsq9whGmTwnMoVf2uzUAI+1FovehGARaKBnwTAI8g2Uz4J+U1P4vGQnXY9QfVfAC6b443NZ7UR52rj7F5zkN6ONLRbvPQJmXEelqwerZxHLQNFrT62BGr3ZIR8dpLDbETRU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059528; c=relaxed/simple; bh=/2RYzQamWMFGRk3UZGy8S3jPYaE9HT85GHRvJ+BZpds=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gxdcViI977HiRSrhZ7riWkrDoXw1BXB47hnHF1+VLz5d5GBX3iW3rle25B/oTtb5BojEb+QWWcS9/Vj4Ws9qrVavvCP5qZkHJxBHEdUbmurv1g9VEncvC4WKvUQ97+T2WTETngLUhFR8N2wqMgjBebaU1+lNelydDqCs2iCiWDk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=tj1fyevw; arc=none smtp.client-ip=134.0.28.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="tj1fyevw" Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout3.routing.net (Postfix) with ESMTP id B60B16155E; Wed, 9 Jul 2025 11:11:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1752059518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hvtxU4D3ohmA54ipUVXLZQjWygAPvZxaNNALd63s61k=; b=tj1fyevws4Va+n8znT+7CGT2YMnpss12MJuuIHoijYxKQQvO60Bx+aF8NugfDLRFa9XRcp 5cEMUwRNMu+uhQ+ZdQWA7o3X2f7HAQ4VR6sMXHS+cu6mGGcPsaWvdnnHN/Rq8HGXMRb6j4 uuU29DYNhxiynHu6cPX5N9Oe19uBXlo= Received: from frank-u24.. (fttx-pool-217.61.157.99.bambit.de [217.61.157.99]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 5BA881226D4; Wed, 9 Jul 2025 11:11:58 +0000 (UTC) From: Frank Wunderlich To: 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 , Johnson Wang , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Landen Chao , DENG Qingfang , Sean Wang , Daniel Golle , Lorenzo Bianconi , Felix Fietkau Cc: Frank Wunderlich , 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: [PATCH v9 06/13] dt-bindings: net: dsa: mediatek,mt7530: add internal mdio bus Date: Wed, 9 Jul 2025 13:09:42 +0200 Message-ID: <20250709111147.11843-7-linux@fw-web.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250709111147.11843-1-linux@fw-web.de> References: <20250709111147.11843-1-linux@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Mt7988 buildin switch has own mdio bus where ge-phys are connected. Add related property for this. Signed-off-by: Frank Wunderlich Reviewed-by: Rob Herring (Arm) Reviewed-by: AngeloGioacchino Del Regno --- v2: - change from patternproperty to property - add unevaluatedProperties and mediatek,pio subproperty --- .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml= b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml index 9b983fdbf3c7..815a90808901 100644 --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml @@ -136,6 +136,16 @@ properties: See Documentation/devicetree/bindings/regulator/mt6323-regulator.txt= for details for the regulator setup on these boards. =20 + mdio: + $ref: /schemas/net/mdio.yaml# + unevaluatedProperties: false + + properties: + mediatek,pio: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle pointing to the mediatek pinctrl node. + mediatek,mcm: type: boolean description: --=20 2.43.0 From nobody Sun Dec 14 02:02:13 2025 Received: from mxout4.routing.net (mxout4.routing.net [134.0.28.9]) (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 CD7E928D8E4; Wed, 9 Jul 2025 11:12:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059528; cv=none; b=stvdi72bUp8ztG0Lv75OfL0dIGIXNDIzlhjrqftASuyAoPAPEy7pJ9A2x9kZkQfzJ337WtGQ3cO6lg5PL1GtdWwJrm/xhdKXWyuhXHrF0LV/gWE4WdKR7xWwf44WfxVLj8C3ELQXcRMY55tleRZcE04xEMvPvMQpyPADrQzLRpQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059528; c=relaxed/simple; bh=CObOU1nPBTDZB7mIJgDVNzak8Lzgdng0yMMxU3zsrmg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=vGVbYINkiGvq7d4JvOT56BOv4zadpyA2NvVgk4Arly5W8Gf14ZheT55Bpcm42WU1uPAa1+Xuv6r5gXZfcCmOy7MR9wo5/cplAGNRt6JWq0c7XTmgc7phZ6mP+DADIS6eCYM/dQPJZlpkNWecTpgni0u5jPHlMpKoNlZ0fy0yz5I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=qSlqOF4l; arc=none smtp.client-ip=134.0.28.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="qSlqOF4l" Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout4.routing.net (Postfix) with ESMTP id 20E831008E0; Wed, 9 Jul 2025 11:11:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1752059519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MnTvkXnLPnEsvcW3pJgPQSCioz7Knyu5VGFT/VMkz+g=; b=qSlqOF4lz0CDSZ1vHo349SAGdLFIJeKBU8e/U06hL1eUlc8BDTtkLkOAojH3JuPafkL0gD yGEZMpQudM81sWcM7HXIZDZv9o8dx0vDf94YoppkyimDJveOIt3JOdRBAWDTBWgIGTP8LP IcJcS0+ctJIT/fo9afDXdD8D1HXfjAo= Received: from frank-u24.. (fttx-pool-217.61.157.99.bambit.de [217.61.157.99]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id BA1F01226CC; Wed, 9 Jul 2025 11:11:58 +0000 (UTC) From: Frank Wunderlich To: 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 , Johnson Wang , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Landen Chao , DENG Qingfang , Sean Wang , Daniel Golle , Lorenzo Bianconi , Felix Fietkau Cc: Frank Wunderlich , 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: [PATCH v9 07/13] arm64: dts: mediatek: mt7986: add sram node Date: Wed, 9 Jul 2025 13:09:43 +0200 Message-ID: <20250709111147.11843-8-linux@fw-web.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250709111147.11843-1-linux@fw-web.de> References: <20250709111147.11843-1-linux@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Currently sram is allocated in driver via offset from reg of ethernet node. Change it to use a dedicated sram node like mt7988. Signed-off-by: Frank Wunderlich --- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index 559990dcd1d1..550f569451fb 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -523,7 +523,7 @@ wed1: wed@15011000 { =20 eth: ethernet@15100000 { compatible =3D "mediatek,mt7986-eth"; - reg =3D <0 0x15100000 0 0x80000>; + reg =3D <0 0x15100000 0 0x40000>; interrupts =3D , , , @@ -553,6 +553,7 @@ eth: ethernet@15100000 { <&topckgen CLK_TOP_SGM_325M_SEL>; assigned-clock-parents =3D <&apmixedsys CLK_APMIXED_NET2PLL>, <&apmixedsys CLK_APMIXED_SGMPLL>; + sram =3D <ð_sram>; #address-cells =3D <1>; #size-cells =3D <0>; mediatek,ethsys =3D <ðsys>; @@ -562,6 +563,15 @@ eth: ethernet@15100000 { status =3D "disabled"; }; =20 + /*15100000+0x40000*/ + eth_sram: sram@15140000 { + compatible =3D "mmio-sram"; + reg =3D <0 0x15140000 0 0x40000>; + #address-cells =3D <1>; + #size-cells =3D <1>; + ranges =3D <0 0x15140000 0 0x40000>; + }; + wo_ccif0: syscon@151a5000 { compatible =3D "mediatek,mt7986-wo-ccif", "syscon"; reg =3D <0 0x151a5000 0 0x1000>; --=20 2.43.0 From nobody Sun Dec 14 02:02:13 2025 Received: from mxout2.routing.net (mxout2.routing.net [134.0.28.12]) (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 0549C2949F6; Wed, 9 Jul 2025 11:12:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059530; cv=none; b=LA3cmbsVXeWQKUuLYq9UM5gUyB4Fs6CO7/RGB4IbHzcCjzLs7WAxjktcoKYK6fThlEkJvbJH3xT1kOatVJMwb1vSVSSonKcgId4DPutitVFl5Vj5G9QTI7C2KgQ0JlSozCS7vNVCDZ9SvSyLBPSpQiHaoRDMAaRXnRepLCGcgYI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059530; c=relaxed/simple; bh=lQAu2tIPEXCCCzYBKC7snv+3M2ulaW8agVoti3Zz6x4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kVH5NJ5XMyM6wJZHzGYXANklcP6eQa/INx0eRDOWj53wFYXDSDn9uuIG/+hNwVM7zkn7Ve7ApGAbRUYYWCfbAAwv+j/cIq2/1Wtxj+WcTgLZK/J+pafMkkr/xXTK5lZZeb5FcP4yxHVTMNCeM40A4nSUAu+y1cKhq1jtQ2J50/Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=lVBT424f; arc=none smtp.client-ip=134.0.28.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="lVBT424f" Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout2.routing.net (Postfix) with ESMTP id 7DB9E6040A; Wed, 9 Jul 2025 11:11:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1752059519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/DFlzGS4zzCC/sNdVHvfF03tDckTw+Jco+WJ71ccd2s=; b=lVBT424feIKKNcNhessVgO4XM6IIsxP55aMMvEwDnVn9iA1lfSrF/YFmNP5WdArQYTqc6J ozdiFbV9jqimVWFmttv94rXXG+EuJfe/EIt4z/f8w0A6dSwNK+JA0F22Ketk2kCNBuhXPI 7CTxJ3ee2E4eUkYLfohpnBsB2gFaMKs= Received: from frank-u24.. (fttx-pool-217.61.157.99.bambit.de [217.61.157.99]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 221F61226D4; Wed, 9 Jul 2025 11:11:59 +0000 (UTC) From: Frank Wunderlich To: 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 , Johnson Wang , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Landen Chao , DENG Qingfang , Sean Wang , Daniel Golle , Lorenzo Bianconi , Felix Fietkau Cc: Frank Wunderlich , 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: [PATCH v9 08/13] arm64: dts: mediatek: mt7986: add interrupts for RSS and interrupt names Date: Wed, 9 Jul 2025 13:09:44 +0200 Message-ID: <20250709111147.11843-9-linux@fw-web.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250709111147.11843-1-linux@fw-web.de> References: <20250709111147.11843-1-linux@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add interrupts for RSS/LRO and names to access them via name instead of index. Signed-off-by: Frank Wunderlich --- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index 550f569451fb..a9e079fd42c6 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -527,7 +527,13 @@ eth: ethernet@15100000 { interrupts =3D , , , - ; + , + , + , + , + ; + interrupt-names =3D "fe0", "fe1", "fe2", "fe3", "pdma0", + "pdma1", "pdma2", "pdma3"; clocks =3D <ðsys CLK_ETH_FE_EN>, <ðsys CLK_ETH_GP2_EN>, <ðsys CLK_ETH_GP1_EN>, --=20 2.43.0 From nobody Sun Dec 14 02:02:13 2025 Received: from mxout3.routing.net (mxout3.routing.net [134.0.28.8]) (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 16B4F28DF1B; Wed, 9 Jul 2025 11:12:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.8 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059532; cv=none; b=ia6hoaGxvqAch+kup+M1UMwai3XYIrGeNNbPD0zCThODZfGMzlRB1xxsc5ooiZWeyEbZlT+aWJrdR/IPBMyW/GCrCS4Oo7ZajIQSVhcXehz1iN1Ynfw4Yq6oGzr8bA4CY4DP9CL6tAKpST3DHVmXz+WJZTqOriBX1wsfo+OztZ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059532; c=relaxed/simple; bh=Xzjm+CKcYCaFeYzUOaaMEJ+RPtr4AXHoa3hfNXKmIXM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GWhZXOSvlTvdMp6u/l3qOrE0etOzia7a/p3uJY6oGuhN+yEjkK7PfDm/q/AsXj9SnkTfNTB5gFavqSGmPprB9UvyeLCk8jidb/wKV5Wd/UMjYosHW5vQIuvGyOfVXYT67nStpxq4L2OwSetZ7TFRcDick/R+ftlyo6Mta8g53FA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=aEJXDdPy; arc=none smtp.client-ip=134.0.28.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="aEJXDdPy" Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout3.routing.net (Postfix) with ESMTP id D7B226157B; Wed, 9 Jul 2025 11:11:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1752059519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JpfJwF7HfZu8IfI5rIOwd1xM5jktfrJoJ7prr99YUps=; b=aEJXDdPyQSLQTin8Si5faLt2EorXVxqlfr3L62zrNkSrfwJUArO7I3ClRWVQ1ij3d3Zhk0 8adKMH80xhNySl0PkFNRMFKsJfTEfD2PcINwFfhKVinrKW2Zoe5NtC/59sG9UnSsrFbyz0 Roe97Xv08cSgBnxuIz+LfjgtsCVmjR0= Received: from frank-u24.. (fttx-pool-217.61.157.99.bambit.de [217.61.157.99]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 7FECF1226CC; Wed, 9 Jul 2025 11:11:59 +0000 (UTC) From: Frank Wunderlich To: 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 , Johnson Wang , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Landen Chao , DENG Qingfang , Sean Wang , Daniel Golle , Lorenzo Bianconi , Felix Fietkau Cc: Frank Wunderlich , 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: [PATCH v9 09/13] arm64: dts: mediatek: mt7988: add basic ethernet-nodes Date: Wed, 9 Jul 2025 13:09:45 +0200 Message-ID: <20250709111147.11843-10-linux@fw-web.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250709111147.11843-1-linux@fw-web.de> References: <20250709111147.11843-1-linux@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- v8: - change ethernet register size to 0x40000 range from 0x15140000 ~ 0x1517ffff is not usable on mt7988 =3D> 0xDEADBEEF 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/dt= s/mediatek/mt7988a.dtsi index 560ec86dbec0..897b5a82b53e 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 { }; }; =20 - clock-controller@11f40000 { + xfi_tphy0: phy@11f20000 { + compatible =3D "mediatek,mt7988-xfi-tphy"; + reg =3D <0 0x11f20000 0 0x10000>; + clocks =3D <&xfi_pll CLK_XFIPLL_PLL_EN>, + <&topckgen CLK_TOP_XFI_PHY_0_XTAL_SEL>; + clock-names =3D "xfipll", "topxtal"; + resets =3D <&watchdog 14>; + mediatek,usxgmii-performance-errata; + #phy-cells =3D <0>; + }; + + xfi_tphy1: phy@11f30000 { + compatible =3D "mediatek,mt7988-xfi-tphy"; + reg =3D <0 0x11f30000 0 0x10000>; + clocks =3D <&xfi_pll CLK_XFIPLL_PLL_EN>, + <&topckgen CLK_TOP_XFI_PHY_1_XTAL_SEL>; + clock-names =3D "xfipll", "topxtal"; + resets =3D <&watchdog 15>; + #phy-cells =3D <0>; + }; + + xfi_pll: clock-controller@11f40000 { compatible =3D "mediatek,mt7988-xfi-pll"; reg =3D <0 0x11f40000 0 0x1000>; resets =3D <&watchdog 16>; @@ -714,19 +735,129 @@ phy_calibration_p3: calib@97c { }; }; =20 - clock-controller@15000000 { + ethsys: clock-controller@15000000 { compatible =3D "mediatek,mt7988-ethsys", "syscon"; reg =3D <0 0x15000000 0 0x1000>; #clock-cells =3D <1>; #reset-cells =3D <1>; }; =20 - clock-controller@15031000 { + ethwarp: clock-controller@15031000 { compatible =3D "mediatek,mt7988-ethwarp"; reg =3D <0 0x15031000 0 0x1000>; #clock-cells =3D <1>; #reset-cells =3D <1>; }; + + eth: ethernet@15100000 { + compatible =3D "mediatek,mt7988-eth"; + reg =3D <0 0x15100000 0 0x40000>; + interrupts =3D , + , + , + , + , + , + , + ; + interrupt-names =3D "fe0", "fe1", "fe2", "fe3", "pdma0", + "pdma1", "pdma2", "pdma3"; + clocks =3D <ðsys CLK_ETHDMA_CRYPT0_EN>, + <ðsys CLK_ETHDMA_FE_EN>, + <ðsys CLK_ETHDMA_GP2_EN>, + <ðsys CLK_ETHDMA_GP1_EN>, + <ðsys CLK_ETHDMA_GP3_EN>, + <ðwarp CLK_ETHWARP_WOCPU2_EN>, + <ðwarp CLK_ETHWARP_WOCPU1_EN>, + <ðwarp CLK_ETHWARP_WOCPU0_EN>, + <ðsys CLK_ETHDMA_ESW_EN>, + <&topckgen CLK_TOP_ETH_GMII_SEL>, + <&topckgen CLK_TOP_ETH_REFCK_50M_SEL>, + <&topckgen CLK_TOP_ETH_SYS_200M_SEL>, + <&topckgen CLK_TOP_ETH_SYS_SEL>, + <&topckgen CLK_TOP_ETH_XGMII_SEL>, + <&topckgen CLK_TOP_ETH_MII_SEL>, + <&topckgen CLK_TOP_NETSYS_SEL>, + <&topckgen CLK_TOP_NETSYS_500M_SEL>, + <&topckgen CLK_TOP_NETSYS_PAO_2X_SEL>, + <&topckgen CLK_TOP_NETSYS_SYNC_250M_SEL>, + <&topckgen CLK_TOP_NETSYS_PPEFB_250M_SEL>, + <&topckgen CLK_TOP_NETSYS_WARP_SEL>, + <ðsys CLK_ETHDMA_XGP1_EN>, + <ðsys CLK_ETHDMA_XGP2_EN>, + <ðsys CLK_ETHDMA_XGP3_EN>; + clock-names =3D "crypto", "fe", "gp2", "gp1", "gp3", + "ethwarp_wocpu2", "ethwarp_wocpu1", + "ethwarp_wocpu0", "esw", "top_eth_gmii_sel", + "top_eth_refck_50m_sel", "top_eth_sys_200m_sel", + "top_eth_sys_sel", "top_eth_xgmii_sel", + "top_eth_mii_sel", "top_netsys_sel", + "top_netsys_500m_sel", "top_netsys_pao_2x_sel", + "top_netsys_sync_250m_sel", + "top_netsys_ppefb_250m_sel", + "top_netsys_warp_sel","xgp1", "xgp2", "xgp3"; + assigned-clocks =3D <&topckgen CLK_TOP_NETSYS_2X_SEL>, + <&topckgen CLK_TOP_NETSYS_GSW_SEL>, + <&topckgen CLK_TOP_USXGMII_SBUS_0_SEL>, + <&topckgen CLK_TOP_USXGMII_SBUS_1_SEL>, + <&topckgen CLK_TOP_SGM_0_SEL>, + <&topckgen CLK_TOP_SGM_1_SEL>; + assigned-clock-parents =3D <&apmixedsys CLK_APMIXED_NET2PLL>, + <&topckgen CLK_TOP_NET1PLL_D4>, + <&topckgen CLK_TOP_NET1PLL_D8_D4>, + <&topckgen CLK_TOP_NET1PLL_D8_D4>, + <&apmixedsys CLK_APMIXED_SGMPLL>, + <&apmixedsys CLK_APMIXED_SGMPLL>; + sram =3D <ð_sram>; + #address-cells =3D <1>; + #size-cells =3D <0>; + mediatek,ethsys =3D <ðsys>; + mediatek,infracfg =3D <&topmisc>; + + gmac0: mac@0 { + compatible =3D "mediatek,eth-mac"; + reg =3D <0>; + phy-mode =3D "internal"; + + /* Connected to internal switch */ + fixed-link { + speed =3D <10000>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible =3D "mediatek,eth-mac"; + reg =3D <1>; + status =3D "disabled"; + }; + + gmac2: mac@2 { + compatible =3D "mediatek,eth-mac"; + reg =3D <2>; + status =3D "disabled"; + }; + + mdio_bus: mdio-bus { + #address-cells =3D <1>; + #size-cells =3D <0>; + + /* internal 2.5G PHY */ + int_2p5g_phy: ethernet-phy@15 { + compatible =3D "ethernet-phy-ieee802.3-c45"; + reg =3D <15>; + }; + }; + }; + + eth_sram: sram@15400000 { + compatible =3D "mmio-sram"; + reg =3D <0 0x15400000 0 0x200000>; + #address-cells =3D <1>; + #size-cells =3D <1>; + ranges =3D <0 0x15400000 0 0x200000>; + }; }; =20 thermal-zones { --=20 2.43.0 From nobody Sun Dec 14 02:02:13 2025 Received: from mxout1.routing.net (mxout1.routing.net [134.0.28.11]) (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 6BB6A292B48; Wed, 9 Jul 2025 11:12:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059530; cv=none; b=hfmzHgd1mOGnAUrumjAADWZLFsryN6p5gdowTU4EYDvUb2g0EMyhYmWnbJSglbJwMASdWzouliqemcVBf2nrNsn1mWbdLdNBV3lH1AqyfIzauc9cdy4vQhS90B6zxeKssau3ijvrGpUICJtUV2mr4qgis28lSXmyFlw4V95hleI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059530; c=relaxed/simple; bh=exQ/2CQAlL19culfJFiJUORb3TZY55oQ3uWrzU2G+TM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y8qDCrHeyO5OvPM9wlrz9pyWLskL6FkjDMDPsNkNqN8H/CF6PVjzyK95WIfbBgLtHQBaTIHPidApnITSoCLnNX7U0jCbuZmjDqgyNqJNCRbQeulvJp31LHDgxwpquKmQs67iB5dtjmhsfqkpw4o90A8wf64JY/jd16ATe+6VdUE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=fLHoX1zq; arc=none smtp.client-ip=134.0.28.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="fLHoX1zq" Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout1.routing.net (Postfix) with ESMTP id 40ADD407C9; Wed, 9 Jul 2025 11:12:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1752059520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7+G2ewwh12FRHs0BmRpZAB4ebqu3ayA7q35EEAvJ0xA=; b=fLHoX1zqlaK1vwYtIYOEsvkDkwPcDvx8iZ+Wf5SoVJnkO3cLG/zaz9hF7RqXaj7iICQXaD okI3RjyweohELDJsF9AGrpJ9VpdPQMOPOm6Hg0r1xxx7uYiNsMJtHodCd6Uqv92FFmO6Sw PyFP+PD6vDUeTekJ+tuPkrZqG7QzqMY= Received: from frank-u24.. (fttx-pool-217.61.157.99.bambit.de [217.61.157.99]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id DE05A1226D4; Wed, 9 Jul 2025 11:11:59 +0000 (UTC) From: Frank Wunderlich To: 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 , Johnson Wang , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Landen Chao , DENG Qingfang , Sean Wang , Daniel Golle , Lorenzo Bianconi , Felix Fietkau Cc: Frank Wunderlich , 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: [PATCH v9 10/13] arm64: dts: mediatek: mt7988: add switch node Date: Wed, 9 Jul 2025 13:09:46 +0200 Message-ID: <20250709111147.11843-11-linux@fw-web.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250709111147.11843-1-linux@fw-web.de> References: <20250709111147.11843-1-linux@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add mt7988 builtin mt753x switch nodes. Signed-off-by: Daniel Golle Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- v4: - drop phy-mode for gsw-phy - reorder phy-mode after phy-handle - drop interrupt parent from switch v2: - drop labels and led-function too (have to be in board) --- arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 148 ++++++++++++++++++++++ 1 file changed, 148 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7988a.dtsi index 897b5a82b53e..366203a72d6d 100644 --- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi @@ -742,6 +742,154 @@ ethsys: clock-controller@15000000 { #reset-cells =3D <1>; }; =20 + switch: switch@15020000 { + compatible =3D "mediatek,mt7988-switch"; + reg =3D <0 0x15020000 0 0x8000>; + interrupt-controller; + #interrupt-cells =3D <1>; + interrupts =3D ; + resets =3D <ðwarp MT7988_ETHWARP_RST_SWITCH>; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + gsw_port0: port@0 { + reg =3D <0>; + phy-handle =3D <&gsw_phy0>; + phy-mode =3D "internal"; + }; + + gsw_port1: port@1 { + reg =3D <1>; + phy-handle =3D <&gsw_phy1>; + phy-mode =3D "internal"; + }; + + gsw_port2: port@2 { + reg =3D <2>; + phy-handle =3D <&gsw_phy2>; + phy-mode =3D "internal"; + }; + + gsw_port3: port@3 { + reg =3D <3>; + phy-handle =3D <&gsw_phy3>; + phy-mode =3D "internal"; + }; + + port@6 { + reg =3D <6>; + ethernet =3D <&gmac0>; + phy-mode =3D "internal"; + + fixed-link { + speed =3D <10000>; + full-duplex; + pause; + }; + }; + }; + + mdio { + #address-cells =3D <1>; + #size-cells =3D <0>; + mediatek,pio =3D <&pio>; + + gsw_phy0: ethernet-phy@0 { + compatible =3D "ethernet-phy-ieee802.3-c22"; + reg =3D <0>; + interrupts =3D <0>; + nvmem-cells =3D <&phy_calibration_p0>; + nvmem-cell-names =3D "phy-cal-data"; + + leds { + #address-cells =3D <1>; + #size-cells =3D <0>; + + gsw_phy0_led0: led@0 { + reg =3D <0>; + status =3D "disabled"; + }; + + gsw_phy0_led1: led@1 { + reg =3D <1>; + status =3D "disabled"; + }; + }; + }; + + gsw_phy1: ethernet-phy@1 { + compatible =3D "ethernet-phy-ieee802.3-c22"; + reg =3D <1>; + interrupts =3D <1>; + nvmem-cells =3D <&phy_calibration_p1>; + nvmem-cell-names =3D "phy-cal-data"; + + leds { + #address-cells =3D <1>; + #size-cells =3D <0>; + + gsw_phy1_led0: led@0 { + reg =3D <0>; + status =3D "disabled"; + }; + + gsw_phy1_led1: led@1 { + reg =3D <1>; + status =3D "disabled"; + }; + }; + }; + + gsw_phy2: ethernet-phy@2 { + compatible =3D "ethernet-phy-ieee802.3-c22"; + reg =3D <2>; + interrupts =3D <2>; + nvmem-cells =3D <&phy_calibration_p2>; + nvmem-cell-names =3D "phy-cal-data"; + + leds { + #address-cells =3D <1>; + #size-cells =3D <0>; + + gsw_phy2_led0: led@0 { + reg =3D <0>; + status =3D "disabled"; + }; + + gsw_phy2_led1: led@1 { + reg =3D <1>; + status =3D "disabled"; + }; + }; + }; + + gsw_phy3: ethernet-phy@3 { + compatible =3D "ethernet-phy-ieee802.3-c22"; + reg =3D <3>; + interrupts =3D <3>; + nvmem-cells =3D <&phy_calibration_p3>; + nvmem-cell-names =3D "phy-cal-data"; + + leds { + #address-cells =3D <1>; + #size-cells =3D <0>; + + gsw_phy3_led0: led@0 { + reg =3D <0>; + status =3D "disabled"; + }; + + gsw_phy3_led1: led@1 { + reg =3D <1>; + status =3D "disabled"; + }; + }; + }; + }; + }; + ethwarp: clock-controller@15031000 { compatible =3D "mediatek,mt7988-ethwarp"; reg =3D <0 0x15031000 0 0x1000>; --=20 2.43.0 From nobody Sun Dec 14 02:02:13 2025 Received: from mxout2.routing.net (mxout2.routing.net [134.0.28.12]) (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 DD412293C7E; Wed, 9 Jul 2025 11:12:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059531; cv=none; b=RU0qmiYULabPtNa9Maz0cOE7GVlCMjtuqmNCGBmJvhsi9KmBR8QBLkGV7+KySTCK5+QSrrwTVz6aYFX5VwqW42Gzb9iC/AjRLAeiH9SYesAl4INbMAVZ1IGDGXbAk3OsUnI4Z2TkJxwakEBLGqCPcLFsDFFq7C7TsrBIMTI81Hc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059531; c=relaxed/simple; bh=P/EOW+pd0YQ7LiMHFX+KMFe53eWNEXq3yNdzkShDgOU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JF3w61CS1hNbEY350Ez15UZHjMLswSJR5E+qHJOk71dCZiNvPKpnTBRqTJ5nrnoUkeUjXv2flSDDeRj+bGlfhcTNpmYdChuWnch3QzRUSTQcmDMpJMnBg8wRNACaZYFx/8zxW+RizfnDuNaPngxLM4WHGlWBNvcJJPkbc6/iQn8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=SQsLJ1Xd; arc=none smtp.client-ip=134.0.28.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="SQsLJ1Xd" Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout2.routing.net (Postfix) with ESMTP id 9DBF360415; Wed, 9 Jul 2025 11:12:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1752059520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c58atM53j6xJlfjeW4uz3/6gYrG19vaD/Ky2Z6w23+4=; b=SQsLJ1XddLx1flDYfMiD06aaz+xu+cU00lgxQ3taCPskDgSMkgFi132EYmOdPemFqylPKe n3r8uSV62h28uKwjHZGQsouRST6hYoxKJIUEvzjNULrtDPVbPyzUyzIwiVtUEMkYQqZjQN j1QrcCIXTTec6aLcxt9pT4vYLStmmGo= Received: from frank-u24.. (fttx-pool-217.61.157.99.bambit.de [217.61.157.99]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 464E81226CC; Wed, 9 Jul 2025 11:12:00 +0000 (UTC) From: Frank Wunderlich To: 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 , Johnson Wang , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Landen Chao , DENG Qingfang , Sean Wang , Daniel Golle , Lorenzo Bianconi , Felix Fietkau Cc: Frank Wunderlich , 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: [PATCH v9 11/13] arm64: dts: mediatek: mt7988a-bpi-r4: add aliases for ethernet Date: Wed, 9 Jul 2025 13:09:47 +0200 Message-ID: <20250709111147.11843-12-linux@fw-web.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250709111147.11843-1-linux@fw-web.de> References: <20250709111147.11843-1-linux@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add aliases for gmacs to allow bootloader setting mac-adresses. Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi b/ar= ch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi index 21eb91c8609f..20073eb4d1bd 100644 --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi @@ -8,6 +8,12 @@ #include "mt7988a.dtsi" =20 / { + aliases { + ethernet0 =3D &gmac0; + ethernet1 =3D &gmac1; + ethernet2 =3D &gmac2; + }; + chosen { stdout-path =3D "serial0:115200n8"; }; --=20 2.43.0 From nobody Sun Dec 14 02:02:13 2025 Received: from mxout3.routing.net (mxout3.routing.net [134.0.28.8]) (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 45BE4295511; Wed, 9 Jul 2025 11:12:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.8 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059532; cv=none; b=WPJx6dHXL1YtJCRBfw5SYduzfEvAAh82HD2MO5S3eVpARpOLAkorucSSLTTpziNQtuC/yGqXJWvLsqGUsq6oQSREtULO9mqUCR+9N8XkMq0GIbfLReTBGdZMNwdc/9fT4m+L3r7K51rTSCtvDEIMcXFQMpxQkBK77eAu9yuKyQs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059532; c=relaxed/simple; bh=6rXB9uhFua0CDavnN2LWnw7HTLqju5HTq/AgWYbkQns=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JJXYe93/N9ad8FYCB7v8b8aZsxiY70S7L7tX4fJ2i89ioG874MD3mlca3en+dhbt3qnLQsEuvza/+eMf5kohE4DyroE0Npx952A3h8L4IDOYAR9VLNwYWzxVf2LXkxMHJLoi9Sv5K2o/htk8IfGZaZreEqdqXLtQZtZK+0spMoQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=eHq6GCOv; arc=none smtp.client-ip=134.0.28.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="eHq6GCOv" Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout3.routing.net (Postfix) with ESMTP id 061B3615AD; Wed, 9 Jul 2025 11:12:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1752059521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Po3wYPbug5oitTRavuGEWn/QaJpRE4HKrgqN22L2B/4=; b=eHq6GCOvMKJLjDIFCWWtOJ5N3SuUfzKInZyDutULnAVvHYjZ50Shuy0EnsfJHQcbacLeCz EOE7SrUPkf3KJMlXxnvsN02T660DpHBslWIHnzrOWIO3MNEi0pxtnGLQgNHWWl5KjSkJwA 3bhy6gNDQi3R1VcK+oz/c3ja1Plv0V8= Received: from frank-u24.. (fttx-pool-217.61.157.99.bambit.de [217.61.157.99]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id A399B1226D4; Wed, 9 Jul 2025 11:12:00 +0000 (UTC) From: Frank Wunderlich To: 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 , Johnson Wang , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Landen Chao , DENG Qingfang , Sean Wang , Daniel Golle , Lorenzo Bianconi , Felix Fietkau Cc: Frank Wunderlich , 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: [PATCH v9 12/13] arm64: dts: mediatek: mt7988a-bpi-r4: add sfp cages and link to gmac Date: Wed, 9 Jul 2025 13:09:48 +0200 Message-ID: <20250709111147.11843-13-linux@fw-web.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250709111147.11843-1-linux@fw-web.de> References: <20250709111147.11843-1-linux@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add SFP cages to Bananapi-R4 board. The 2.5g phy variant only contains the wan-SFP, so add this to common dtsi and the lan-sfp only to the dual-SFP variant. Signed-off-by: Daniel Golle Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- v4: - update 2g5-board (reorder and drop phy-connection-type) - order sfp properties v3: - enable mac with 2.5g phy on r4 phy variant because driver is now mainline --- .../mediatek/mt7988a-bananapi-bpi-r4-2g5.dts | 11 +++++++++++ .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 19 +++++++++++++++++++ .../dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 19 +++++++++++++++++++ 3 files changed, 49 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts b= /arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts index 53de9c113f60..6f0c81e3fd94 100644 --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts @@ -9,3 +9,14 @@ / { model =3D "Banana Pi BPI-R4 (1x SFP+, 1x 2.5GbE)"; chassis-type =3D "embedded"; }; + +&gmac1 { + phy =3D <&int_2p5g_phy>; + phy-mode =3D "internal"; + status =3D "okay"; +}; + +&int_2p5g_phy { + pinctrl-0 =3D <&i2p5gbe_led0_pins>; + pinctrl-names =3D "i2p5gbe-led"; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arc= h/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts index 36bd1ef2efab..4b3796ba82e3 100644 --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts @@ -8,6 +8,25 @@ / { compatible =3D "bananapi,bpi-r4", "mediatek,mt7988a"; model =3D "Banana Pi BPI-R4 (2x SFP+)"; chassis-type =3D "embedded"; + + /* SFP2 cage (LAN) */ + sfp2: sfp2 { + compatible =3D "sff,sfp"; + i2c-bus =3D <&i2c_sfp2>; + maximum-power-milliwatt =3D <3000>; + + los-gpios =3D <&pio 2 GPIO_ACTIVE_HIGH>; + mod-def0-gpios =3D <&pio 83 GPIO_ACTIVE_LOW>; + rate-select0-gpios =3D <&pio 3 GPIO_ACTIVE_LOW>; + tx-disable-gpios =3D <&pio 0 GPIO_ACTIVE_HIGH>; + tx-fault-gpios =3D <&pio 1 GPIO_ACTIVE_HIGH>; + }; +}; + +&gmac1 { + managed =3D "in-band-status"; + phy-mode =3D "usxgmii"; + sfp =3D <&sfp2>; }; =20 &pca9545 { diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi b/ar= ch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi index 20073eb4d1bd..4d709ee527df 100644 --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi @@ -63,6 +63,19 @@ reg_3p3v: regulator-3p3v { regulator-boot-on; regulator-always-on; }; + + /* SFP1 cage (WAN) */ + sfp1: sfp1 { + compatible =3D "sff,sfp"; + i2c-bus =3D <&i2c_sfp1>; + maximum-power-milliwatt =3D <3000>; + + los-gpios =3D <&pio 54 GPIO_ACTIVE_HIGH>; + mod-def0-gpios =3D <&pio 82 GPIO_ACTIVE_LOW>; + rate-select0-gpios =3D <&pio 21 GPIO_ACTIVE_LOW>; + tx-disable-gpios =3D <&pio 70 GPIO_ACTIVE_HIGH>; + tx-fault-gpios =3D <&pio 69 GPIO_ACTIVE_HIGH>; + }; }; =20 &cci { @@ -133,6 +146,12 @@ map-cpu-active-low { }; }; =20 +&gmac2 { + managed =3D "in-band-status"; + phy-mode =3D "usxgmii"; + sfp =3D <&sfp1>; +}; + &i2c0 { pinctrl-names =3D "default"; pinctrl-0 =3D <&i2c0_pins>; --=20 2.43.0 From nobody Sun Dec 14 02:02:13 2025 Received: from mxout4.routing.net (mxout4.routing.net [134.0.28.9]) (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 86AED2BE7D9; Wed, 9 Jul 2025 11:12:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.0.28.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059533; cv=none; b=NhicIaz5frOMAHiyNBCUv1KUHgy7FeUZVhu4qdDUa10t5hEy30C/iJCLPsYCh1fY0QaWILNAx1DBkKhtldKGrapMtndmJyjeZTi+X7lZ7XT/nMBUfIP2JNVX8qAUnNLP8aAizjX3tAo9L+rRkIfQgT9tNwDlj5MaqmqE7pjIHfY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752059533; c=relaxed/simple; bh=owery2Y9xho1bAvAYoxF0F6uDfB7KsKdTzyV/Nr07xM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Er5VodP2n+B/eeO9ABPQLyZ/E444TWfp+IxJ5BSlVKRK5OMtptiOe9rYHARJoqNxI9Q4uwaPw9P0XwwoZNH1lS550R7HRJFZvuSxDAXRXP+w/HBbu1ixjJWBHhJ/3dXcz9Im6qR3FxEy6IoRDZ6pCQAtp+N60MaI77rh/N7gAt4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de; spf=pass smtp.mailfrom=fw-web.de; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b=MzVzvAE1; arc=none smtp.client-ip=134.0.28.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fw-web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fw-web.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mailerdienst.de header.i=@mailerdienst.de header.b="MzVzvAE1" Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout4.routing.net (Postfix) with ESMTP id 63661100935; Wed, 9 Jul 2025 11:12:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1752059521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Mw75z6h4HeFha6AF7YI1R1VXg23z1dS7Y1C1o8vw7rQ=; b=MzVzvAE1gokUWwIKohEWFrqkPn4hiv/+0+mq6sOvaeCNU1/FTCDq2+GTySkfzPhl6ikOep ZGnFWnZqezfYLi7yFydOCJnMZWb9U2wsDEfnlrdP8rXQMx4xpbleJjClGOoMSCfIUYeGOI WiKHQTbWf/Q44EYQYxitbsg1xxXa0U8= Received: from frank-u24.. (fttx-pool-217.61.157.99.bambit.de [217.61.157.99]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 0C9701226CC; Wed, 9 Jul 2025 11:12:01 +0000 (UTC) From: Frank Wunderlich To: 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 , Johnson Wang , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Landen Chao , DENG Qingfang , Sean Wang , Daniel Golle , Lorenzo Bianconi , Felix Fietkau Cc: Frank Wunderlich , 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: [PATCH v9 13/13] arm64: dts: mediatek: mt7988a-bpi-r4: configure switch phys and leds Date: Wed, 9 Jul 2025 13:09:49 +0200 Message-ID: <20250709111147.11843-14-linux@fw-web.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250709111147.11843-1-linux@fw-web.de> References: <20250709111147.11843-1-linux@fw-web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Assign pinctrl to switch phys and leds. Signed-off-by: Daniel Golle Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- v4: - reorder switch phy(-led) properties v2: - add labels and led-function and include after dropping from soc dtsi --- .../dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi b/ar= ch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi index 4d709ee527df..7c9df606f60d 100644 --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi @@ -4,6 +4,7 @@ =20 #include #include +#include =20 #include "mt7988a.dtsi" =20 @@ -152,6 +153,66 @@ &gmac2 { sfp =3D <&sfp1>; }; =20 +&gsw_phy0 { + pinctrl-0 =3D <&gbe0_led0_pins>; + pinctrl-names =3D "gbe-led"; +}; + +&gsw_phy0_led0 { + function =3D LED_FUNCTION_WAN; + color =3D ; + status =3D "okay"; +}; + +&gsw_port0 { + label =3D "wan"; +}; + +&gsw_phy1 { + pinctrl-0 =3D <&gbe1_led0_pins>; + pinctrl-names =3D "gbe-led"; +}; + +&gsw_phy1_led0 { + function =3D LED_FUNCTION_LAN; + color =3D ; + status =3D "okay"; +}; + +&gsw_port1 { + label =3D "lan1"; +}; + +&gsw_phy2 { + pinctrl-0 =3D <&gbe2_led0_pins>; + pinctrl-names =3D "gbe-led"; +}; + +&gsw_phy2_led0 { + function =3D LED_FUNCTION_LAN; + color =3D ; + status =3D "okay"; +}; + +&gsw_port2 { + label =3D "lan2"; +}; + +&gsw_phy3 { + pinctrl-0 =3D <&gbe3_led0_pins>; + pinctrl-names =3D "gbe-led"; +}; + +&gsw_phy3_led0 { + function =3D LED_FUNCTION_LAN; + color =3D ; + status =3D "okay"; +}; + +&gsw_port3 { + label =3D "lan3"; +}; + &i2c0 { pinctrl-names =3D "default"; pinctrl-0 =3D <&i2c0_pins>; --=20 2.43.0