From nobody Fri Oct 3 23:08:23 2025 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (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 26E8A18DB1F; Sun, 24 Aug 2025 00:53:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755996817; cv=none; b=OlXNJDC0LAE+HB0nyegQ9eK1TQwJaAjAgs15GMYDGqhYs2SfbXMtr4vaUDUPUzGCnvBNhqUThhsGxZSJtWfL94/k0tUmvEA3wBQKGA7C9A8HTeNJtGy5A3Eexos1dDR5trtK+UJJF/izZwvgkcy5FAvp7l9t1ErKgTa1YmUuc8Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755996817; c=relaxed/simple; bh=pDhy36uF1Mf3tZZERBq1EkwpFtYy14BGNXa26aAZtFI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Cr/TOmchWNt5gwqloYO1bKLTYr4GzZTTzRdRZGjVO/yabA8jyINbDz3gl56ebJEt1c6OqgNXLT657DKhogqpudkwA4Z1/4veYmSNgQ19XCYdnn5eeAgdRHtG63FSXx9Nd8lvBd8HKHJVtzCvHBJWLGDuTFcYA1rgJlsQ7CsDWpk= 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=VADLHejK; arc=none smtp.client-ip=209.85.214.170 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="VADLHejK" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-2468e7c7b30so5628955ad.0; Sat, 23 Aug 2025 17:53:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755996815; x=1756601615; 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=X5YnUT2+fxu2YINYTTcsPtuJGnZgxMWuZ/oDjIl3F4Y=; b=VADLHejKJHBJVv2CG9P/gl8ZtcWWI4Hu9uf3zuX4xYfD0+mY3JXLUjk/MqV+kuO8ae Y94tKZLnP7WQrlswgQ9meOu5W5CykbUZPT8jpq/6wevmug/0WOAImiVl/5KxgTPvkwgA LyWe+wcYxF7VwTEmgn15OEDAfSCdCvp4DGp7FDAzk1EJLxxSYyG76yeV1BjSUKH3hMvW Pbuao81THoqPDlDOb10Bq3J2qkDvSsqkmuIZJvBiS0XV9D7w3jbE+rVGR/9+Lm+mXONv vk674hSaYM55R4tD3PeASvfSlGSNETVLGv52/RoBrKXceJZFShuPomRSYz2xqcKRlpdV xxdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755996815; x=1756601615; 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=X5YnUT2+fxu2YINYTTcsPtuJGnZgxMWuZ/oDjIl3F4Y=; b=OwcZXapM8Ou9RG0g2LrBrrvlkvR0pxf8yrbZq82GwyzMgiycB3VPPfsIWo56h3rkrJ Rbai2G8PEieV5Z0W8746+uvMOMGgPUyFJfMup2+3uqlQUerAhKDOQKRWJvsLcGthfaOz ZxiSAxFHlT7GhiitKMjiWxsWGP89kFRdouO9nS18tQX9g3sMqmEeHhAggc1E1oc1oGyL 0IbR69rZWnp0bbrZL7sPAl2uNG4dsasRl45h+nyDV0f4VvUwVEGz82Oswf/b2Au1HQii ZA3WUde/RALVfEmS7zaf+EzknZateuJZgCi9MUCkk3gLr2NtWQcAK2CCB/k7h0NsB8gi QqEg== X-Forwarded-Encrypted: i=1; AJvYcCVA78psOVNenNEalmGhQ0j0T4ZkWTRj4V5maZ8H0KmZTCcol6AOR7fDDzdhmG8EmK/mgIElTYTrzKlDrZMk@vger.kernel.org, AJvYcCXlqKv0/0rJo0Tqwc9laK7sA1OLNwyJ6MrFxa80ZuGZQXFH9mGAjJKtgAHXU+G65SLxVVOvvNBigUEL@vger.kernel.org X-Gm-Message-State: AOJu0YwyTJXNMpYKuw2KkMJxFzf7p5AEfGXdlX9gR/OcUUrrsZWuMfDq xh8TBhwvrpkQsageb7wUh8Pd19MosWeo45kD2zNA+m0EY+1Ejkxly/CddnRkLAy5 X-Gm-Gg: ASbGncvwHTuE0vKxcOY9NJY3PDXwLf7YsfgkFlobiVKa8RyaGltWnFp2jOooME42+az UqYl+UB0ySeU+7ylGTb6awoDQHpoeXqjJJbD2q9SY89QXLmMI2zdK0zdTt9sEbpe/xB9FmMWnNa yZmr4ihY5T82enfGsgZXd5a/LazQzsA92XLLYtkdt2aPQUxJhR0yt3cxBBNnuK//iuCiAZiOi/m JndiMh9NEidJcioC6DCbytDOx8or478404qghHlvNc1ZmX4vfPzCSAHMxuuwxtKm+VzwMd6ZVbA WIB3Gbbfx08d0fPuK7CXN9oSb2kY3+9JqzCRgAMZcSz2J75Y6BYwDbqN1B7BveFDag8d9EGOubE 0PnXjCzzeuXC3ktkgZaYltlGFINoe2A== X-Google-Smtp-Source: AGHT+IEUKPOJuqe98Ob+7CdYYcQEMyRiZlhQaEW59PVH9JNdHeNoBLfvWTi2FMpD8zDPVYBsj8FliA== X-Received: by 2002:a17:902:f685:b0:246:b243:72c5 with SMTP id d9443c01a7336-246b2437608mr5232725ad.37.1755996814927; Sat, 23 Aug 2025 17:53:34 -0700 (PDT) Received: from d.home.yangfl.dn42 ([104.28.247.164]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3254af4c38asm3172485a91.17.2025.08.23.17.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Aug 2025 17:53:34 -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 , Simon Horman , Russell King , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v6 1/3] dt-bindings: net: dsa: yt921x: Add Motorcomm YT921x switch support Date: Sun, 24 Aug 2025 08:51:09 +0800 Message-ID: <20250824005116.2434998-2-mmyangfl@gmail.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250824005116.2434998-1-mmyangfl@gmail.com> References: <20250824005116.2434998-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 | 150 ++++++++++++++++++ 1 file changed, 150 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..3f625de49910 --- /dev/null +++ b/Documentation/devicetree/bindings/net/dsa/motorcomm,yt921x.yaml @@ -0,0 +1,150 @@ +# 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. PHYs 0-7 are used for P= ort + 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>; + }; + }; + + mdio-external { + #address-cells =3D <1>; + #size-cells =3D <0>; + + phy1: phy@b { + reg =3D <0xb>; + }; + }; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + /* phy-handle is optional for internal PHYs */ + port@0 { + reg =3D <0>; + label =3D "lan1"; + phy-mode =3D "internal"; + phy-handle =3D <&sw_phy0>; + }; + + port@1 { + reg =3D <1>; + label =3D "lan2"; + phy-mode =3D "internal"; + }; + + port@2 { + reg =3D <2>; + label =3D "lan3"; + phy-mode =3D "internal"; + }; + + port@3 { + reg =3D <3>; + label =3D "lan4"; + phy-mode =3D "internal"; + }; + + port@4 { + reg =3D <4>; + label =3D "lan5"; + phy-mode =3D "internal"; + }; + + /* CPU port */ + port@8 { + reg =3D <8>; + phy-mode =3D "sgmii"; + ethernet =3D <ð0>; + + fixed-link { + speed =3D <1000>; + full-duplex; + pause; + asym-pause; + }; + }; + + /* if external phy is connected to a MAC */ + port@9 { + reg =3D <9>; + label =3D "wan"; + phy-mode =3D "rgmii"; + phy-handle =3D <&phy1>; + }; + }; + }; + }; --=20 2.50.1