From: arinc9.unal@gmail.com
To: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Daniel Golle <daniel@makrotopia.org>,
Landen Chao <Landen.Chao@mediatek.com>,
DENG Qingfang <dqfext@gmail.com>,
Sean Wang <sean.wang@mediatek.com>
Cc: "Arınç ÜNAL" <arinc.unal@arinc9.com>,
erkin.bozoglu@xeront.com, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: [PATCH v2 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988
Date: Fri, 7 Apr 2023 15:50:05 +0300 [thread overview]
Message-ID: <20230407125008.42474-3-arinc.unal@arinc9.com> (raw)
In-Reply-To: <20230407125008.42474-1-arinc.unal@arinc9.com>
From: Arınç ÜNAL <arinc.unal@arinc9.com>
The switch on MT7988 has got only port 6 as a CPU port. The only phy-mode
to be used is internal. Add this.
Some bindings are incorrect for this switch now, so move them to more
specific places.
Address the incorrect information of which ports can be used as a user
port. Any port can be used as a user port.
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Acked-by: Daniel Golle <daniel@makrotopia.org>
---
.../bindings/net/dsa/mediatek,mt7530.yaml | 71 ++++++++++++-------
1 file changed, 46 insertions(+), 25 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index 7045a98d9593..922865a2aabf 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -152,30 +152,6 @@ properties:
ethsys.
maxItems: 1
-patternProperties:
- "^(ethernet-)?ports$":
- type: object
-
- patternProperties:
- "^(ethernet-)?port@[0-9]+$":
- type: object
-
- properties:
- reg:
- description:
- Port address described must be 5 or 6 for CPU port and from 0 to 5
- for user ports.
-
- allOf:
- - if:
- required: [ ethernet ]
- then:
- properties:
- reg:
- enum:
- - 5
- - 6
-
required:
- compatible
- reg
@@ -186,9 +162,21 @@ $defs:
"^(ethernet-)?ports$":
patternProperties:
"^(ethernet-)?port@[0-9]+$":
+ properties:
+ reg:
+ description:
+ Port address described must be 5 or 6 for the CPU port. User
+ ports can be 0 to 6.
+
if:
required: [ ethernet ]
then:
+ properties:
+ reg:
+ enum:
+ - 5
+ - 6
+
if:
properties:
reg:
@@ -212,9 +200,21 @@ $defs:
"^(ethernet-)?ports$":
patternProperties:
"^(ethernet-)?port@[0-9]+$":
+ properties:
+ reg:
+ description:
+ Port address described must be 5 or 6 for the CPU port. User
+ ports can be 0 to 6.
+
if:
required: [ ethernet ]
then:
+ properties:
+ reg:
+ enum:
+ - 5
+ - 6
+
if:
properties:
reg:
@@ -235,6 +235,27 @@ $defs:
- 2500base-x
- sgmii
+ mt7988-dsa-port:
+ patternProperties:
+ "^(ethernet-)?ports$":
+ patternProperties:
+ "^(ethernet-)?port@[0-9]+$":
+ properties:
+ reg:
+ description:
+ Port address described must be 6 for the CPU port. User ports
+ can be 0 to 3, and 6.
+
+ if:
+ required: [ ethernet ]
+ then:
+ properties:
+ reg:
+ const: 6
+
+ phy-mode:
+ const: internal
+
allOf:
- $ref: dsa.yaml#/$defs/ethernet-ports
- if:
@@ -285,7 +306,7 @@ allOf:
compatible:
const: mediatek,mt7988-switch
then:
- $ref: "#/$defs/mt7530-dsa-port"
+ $ref: "#/$defs/mt7988-dsa-port"
properties:
gpio-controller: false
mediatek,mcm: false
--
2.37.2
next prev parent reply other threads:[~2023-04-07 12:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-07 12:50 [PATCH v2 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name arinc9.unal
2023-04-07 12:50 ` [PATCH v2 2/7] dt-bindings: net: dsa: mediatek,mt7530: improve MCM and MT7988 information arinc9.unal
2023-04-07 12:50 ` arinc9.unal [this message]
2023-04-07 12:50 ` [PATCH v2 4/7] dt-bindings: net: dsa: mediatek,mt7530: allow delayed rgmii phy-modes arinc9.unal
2023-04-07 12:50 ` [PATCH v2 5/7] dt-bindings: net: dsa: mediatek,mt7530: disallow reset without mediatek,mcm arinc9.unal
2023-04-07 12:50 ` [PATCH v2 6/7] dt-bindings: net: dsa: mediatek,mt7530: disallow core-supply and io-supply arinc9.unal
2023-04-07 12:50 ` [PATCH v2 7/7] dt-bindings: net: dsa: mediatek,mt7530: allow mediatek,mcm on MT7531 arinc9.unal
2023-04-11 23:57 ` [PATCH v2 1/7] dt-bindings: net: dsa: mediatek,mt7530: correct brand name Vladimir Oltean
2023-04-12 6:36 ` Arınç ÜNAL
2023-04-12 11:17 ` Vladimir Oltean
2023-04-12 11:36 ` Arınç ÜNAL
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230407125008.42474-3-arinc.unal@arinc9.com \
--to=arinc9.unal@gmail.com \
--cc=Landen.Chao@mediatek.com \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=arinc.unal@arinc9.com \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dqfext@gmail.com \
--cc=edumazet@google.com \
--cc=erkin.bozoglu@xeront.com \
--cc=f.fainelli@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=sean.wang@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox