From nobody Thu Oct 2 06:32:27 2025 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15E5930E82C for ; Mon, 22 Sep 2025 13:13:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758546788; cv=none; b=XhtJF3fc0wT0vxMWdRZuIRz56FNev8Uo81g+0g45URVE4/ueEqfQSVTw8/YmkCN18apbuL7vBbSLvqQA5lIxs8YcdCPZfn+AGsSb4aRb9feZu+vlmzpLs/1vlgrUpEP2reWMcwCdkou4IX6YVdv81oUMpZTlLIt160/jW6GYRjA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758546788; c=relaxed/simple; bh=60sKW7i1vbbtY0FuzPNlPEuK/DTNRLiRrb1M3U5kNUc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Uitin39wHqx5OWyjKTUNtcCjsSNLaDomimoD7GMms2oV6oP1D5eJk40haRhs4w/+bfwYX6rDS4GO4vITJE3dRVAQhEMSpofwZ3uJo6tK+6dM+h0pUOIhYMSsv8mmCaNbzrFPfd85hXPMm8Zc1/8PMkLEVEbiHWJL6qJ63/vj6RE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gNFItJxS; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gNFItJxS" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2698384978dso36694195ad.0 for ; Mon, 22 Sep 2025 06:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758546786; x=1759151586; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hcC9XUY8FVCgBMwswacD7pUTLZ7aCAKIG4tpodOwdGI=; b=gNFItJxSCyvH0CpUxO9BR9dJ1CP8WL8cPSehUt2rsMkqUUXjZDB4+WqsAosmUVBw0H ra0QdJcEUEG/l6tazFgeHJDpuNg4bA+YVIKYQJ5RxCgL5MLuV55QZ/mWLPT6lpNhAnmA ZdqjBCINixkZZCm2QrRpGjwVcYfrU834dS2WE2jHw2WcDNUTATeH7Jy1ZEobrqBc0/DZ ibyfSZFX7r8CLj6bNmZ8Jx4ycueKTseIukcgGqEHf0myaWJQ1bh8kaRQjPfxKaZvzoKK 56b1oJf351MRDZbtIRmG7uGyl7yeaqDTz45200PqI5i4zcpD/waopdZRdmY88S2JhJ3f hsTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758546786; x=1759151586; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hcC9XUY8FVCgBMwswacD7pUTLZ7aCAKIG4tpodOwdGI=; b=qszoRkSM5GqJ5L/3SHYppnqKf+1Pk6CabDPB7fMInWvtPECyPYuP5Q24sbkEq6IMyQ /bvb3j1QtPTLl14A1RGj3GBq8Z479usmm+Xx1kMbHWjiZfj0W61/nyAjmdM1HPq9P72X HxUwIsLsX0DOO42QaX5wdISHJqkKxo/+9yJYU20c4/YALKkU9TVZ212+LVk9wpHqR/Y2 Gcg8F7UNMAovLJucKiZnO0o/0pSI2usvByn8Vmz23bNZrci1aHWINMsULAE/p/LAsn5P wvGr0o6cXWeIYrltJWgOi6+kfK1Bv6/DR8pBOjKqWRWooD2GRy9LiTyszYr8k7wa5Rne impQ== X-Forwarded-Encrypted: i=1; AJvYcCWRD+Ns1WCXaCg2mPmYGaacZ596GF0cRxGJDWyoFd9WvrEPJyh6tw6VVcD1TmviBMSLI/+KE8RZAGOMIrI=@vger.kernel.org X-Gm-Message-State: AOJu0YywOoJqVnZ3ygl4UjoVRrantSP4XYTWW4lPtv9UfSUPkPu5pQrS +EdZERNcl3G03njYW4NgavXiQDOiEiHQBUyrA8vWaqMpkEcOo53naF/5 X-Gm-Gg: ASbGncsb+58uszAzYkBaahcWCzN5dkwZRcwa7qc/ahwqIlnhwtViOBBWDAZSIBNYvVb GIISAQ11cSJGVze0WNuLH1XZufL1Da1pSRHqYwfW7l7Qx/ehAcyyeigqLUW4doMh/j1ngJEs3Ry h6rXzdOWoQMLRULZTrEfP+01waXGnKxY6ay8p82Iccyo1pUam+b12TruCKHhoHRMmXerVWLcSFD d86qD3ZxMqxI4RMS15W2EhBqP6JkCQP3hhJOI1PRe8ZJLDIQYHTX7gP7Fk173xMkJsjYCV7Ym3t 38xgiscR8AqGbmrA+L3wslgQ9LEYGGrHCDGY2CpTUMkVjmp/VgYlKXyE6YSBSOqY9nop2SdmoaS 8S1zmqtXI84e6KpSQ50dpnPXGkO04eQ== X-Google-Smtp-Source: AGHT+IGFTJtSRX8IY/TBdGJa+aIaflKvJYjPnVoFytK6InI2+78W4kFt4SIKFk6Fxg0L8uAVRulAFA== X-Received: by 2002:a17:903:1b10:b0:24d:64bc:1495 with SMTP id d9443c01a7336-269ba528961mr145240865ad.41.1758546786207; Mon, 22 Sep 2025 06:13:06 -0700 (PDT) Received: from d.home.yangfl.dn42 ([45.32.227.231]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2698016bff2sm130200055ad.35.2025.09.22.06.13.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Sep 2025 06:13:05 -0700 (PDT) From: David Yang To: netdev@vger.kernel.org Cc: David Yang , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiner Kallweit , Russell King , Simon Horman , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH net-next v11 3/5] dt-bindings: net: dsa: yt921x: Add Motorcomm YT921x switch support Date: Mon, 22 Sep 2025 21:11:41 +0800 Message-ID: <20250922131148.1917856-4-mmyangfl@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250922131148.1917856-1-mmyangfl@gmail.com> References: <20250922131148.1917856-1-mmyangfl@gmail.com> 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" The Motorcomm YT921x series is a family of Ethernet switches with up to 8 internal GbE PHYs and up to 2 GMACs. Signed-off-by: David Yang Reviewed-by: Krzysztof Kozlowski --- .../bindings/net/dsa/motorcomm,yt921x.yaml | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/dsa/motorcomm,yt9= 21x.yaml diff --git a/Documentation/devicetree/bindings/net/dsa/motorcomm,yt921x.yam= l b/Documentation/devicetree/bindings/net/dsa/motorcomm,yt921x.yaml new file mode 100644 index 000000000000..ff03bff0be4f --- /dev/null +++ b/Documentation/devicetree/bindings/net/dsa/motorcomm,yt921x.yaml @@ -0,0 +1,169 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/dsa/motorcomm,yt921x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Motorcomm YT921x Ethernet switch family + +maintainers: + - David Yang + +description: | + The Motorcomm YT921x series is a family of Ethernet switches with up to 8 + internal GbE PHYs and up to 2 GMACs, including: + + - YT9215S / YT9215RB / YT9215SC: 5 GbE PHYs (Port 0-4) + 2 GMACs (Port= 8-9) + - YT9213NB: 2 GbE PHYs (Port 1/3) + 1 GMAC (Port 9) + - YT9214NB: 2 GbE PHYs (Port 1/3) + 2 GMACs (Port 8-9) + - YT9218N: 8 GbE PHYs (Port 0-7) + - YT9218MB: 8 GbE PHYs (Port 0-7) + 2 GMACs (Port 8-9) + + Any port can be used as the CPU port. + +properties: + compatible: + const: motorcomm,yt9215 + + reg: + enum: [0x0, 0x1d] + + reset-gpios: + maxItems: 1 + + mdio: + $ref: /schemas/net/mdio.yaml# + unevaluatedProperties: false + description: + Internal MDIO bus for the internal GbE PHYs. PHY 0-7 are used for Po= rt + 0-7 respectively. + + mdio-external: + $ref: /schemas/net/mdio.yaml# + unevaluatedProperties: false + description: + External MDIO bus to access external components. External PHYs for G= MACs + (Port 8-9) are expected to be connected to the external MDIO bus in + vendor's reference design, but that is not a hard limitation from the + chip. + +required: + - compatible + - reg + +allOf: + - $ref: dsa.yaml#/$defs/ethernet-ports + +unevaluatedProperties: false + +examples: + - | + #include + + mdio { + #address-cells =3D <1>; + #size-cells =3D <0>; + + switch@1d { + compatible =3D "motorcomm,yt9215"; + /* default 0x1d, alternate 0x0 */ + reg =3D <0x1d>; + reset-gpios =3D <&tlmm 39 GPIO_ACTIVE_LOW>; + + mdio { + #address-cells =3D <1>; + #size-cells =3D <0>; + + sw_phy0: phy@0 { + reg =3D <0x0>; + }; + + sw_phy1: phy@1 { + reg =3D <0x1>; + }; + + sw_phy2: phy@2 { + reg =3D <0x2>; + }; + + sw_phy3: phy@3 { + reg =3D <0x3>; + }; + + sw_phy4: phy@4 { + reg =3D <0x4>; + }; + }; + + mdio-external { + #address-cells =3D <1>; + #size-cells =3D <0>; + + phy1: phy@b { + reg =3D <0xb>; + }; + }; + + ethernet-ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + ethernet-port@0 { + reg =3D <0>; + label =3D "lan1"; + phy-mode =3D "internal"; + phy-handle =3D <&sw_phy0>; + }; + + ethernet-port@1 { + reg =3D <1>; + label =3D "lan2"; + phy-mode =3D "internal"; + phy-handle =3D <&sw_phy1>; + }; + + ethernet-port@2 { + reg =3D <2>; + label =3D "lan3"; + phy-mode =3D "internal"; + phy-handle =3D <&sw_phy2>; + }; + + ethernet-port@3 { + reg =3D <3>; + label =3D "lan4"; + phy-mode =3D "internal"; + phy-handle =3D <&sw_phy3>; + }; + + ethernet-port@4 { + reg =3D <4>; + label =3D "lan5"; + phy-mode =3D "internal"; + phy-handle =3D <&sw_phy4>; + }; + + /* CPU port */ + ethernet-port@8 { + reg =3D <8>; + phy-mode =3D "rev-sgmii"; + ethernet =3D <ð0>; + + fixed-link { + speed =3D <1000>; + full-duplex; + pause; + asym-pause; + }; + }; + + /* if external phy is connected to a MAC */ + ethernet-port@9 { + reg =3D <9>; + label =3D "wan"; + phy-mode =3D "rgmii-id"; + phy-handle =3D <&phy1>; + }; + }; + }; + }; --=20 2.51.0