From nobody Thu Dec 18 18:51:53 2025 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (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 62F1430F523; Mon, 3 Nov 2025 12:20:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762172422; cv=none; b=KnyUR6X36ZXfu69hKQToB0gqdg8x6LzdRAuKyBjTjo/s3PjHk4kqygava17n7S11zEmMEDRvT0DWwr04K6ByyEMwMcvedvqsq+MtjUCZlY6nErwS8cQ3fZ0gE7VGs5kLFIZ2glQC+h7ve8xskjn68zgxoAx3K7Ovelxf7stgyqo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762172422; c=relaxed/simple; bh=YUNW5+++ZBrA5vRoYxg0c6f5k4xNmL/y6B5rl6Z4FSY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AvLVAJH7zoXCiAj3qGsg5DYZeNfIndCJMqL0elO6oVfw+9ZoBsCMhnC4YBji/raExkwQQp56v6NdODcDWgnZ6W9b85A3vzvvzTQUP6KWXh1YSubN74Pm7sM5DrcaQexzIb9pXQvQ9mA+ZakH++GjPGjJ4UsQwtBW9TMcQh8XYEQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.98.2) (envelope-from ) id 1vFtXk-000000000rJ-0JeP; Mon, 03 Nov 2025 12:20:16 +0000 Date: Mon, 3 Nov 2025 12:20:12 +0000 From: Daniel Golle To: Hauke Mehrtens , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simon Horman , Russell King , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andreas Schirm , Lukas Stockmann , Alexander Sverdlin , Peter Christen , Avinash Jayaraman , Bing tao Xu , Liang Xu , Juraj Povazanec , "Fanni (Fang-Yi) Chan" , "Benny (Ying-Tsan) Weng" , "Livia M. Rosu" , John Crispin Subject: [PATCH net-next v7 10/12] dt-bindings: net: dsa: lantiq,gswip: add support for MaxLinear GSW1xx switches Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Extend the Lantiq GSWIP device tree binding to also cover MaxLinear GSW1xx switches which are based on the same hardware IP but connected via MDIO instead of being memory-mapped. Add compatible strings for MaxLinear GSW120, GSW125, GSW140, GSW141, and GSW145 switches and adjust the schema to handle the different connection methods with conditional properties. Add MaxLinear GSW125 example showing MDIO-connected configuration. Signed-off-by: Daniel Golle Reviewed-by: Krzysztof Kozlowski --- v7: * drop the addition of 'reg-names' to the list of required properties and also don't add it to the existing example v6: * keep properties on top level and use allOf for conditional constraints v5: * drop maxlinear,rx-inverted from example v4: * drop maxlinear,rx-inverted and maxlinear,tx-inverted properties for now in favor of upcoming generic properties v3: * add maxlinear,rx-inverted and maxlinear,tx-inverted properties v2: * remove git conflict left-overs which somehow creeped in * indent example with 4 spaces instead of tabs since RFC: no changes .../bindings/net/dsa/lantiq,gswip.yaml | 128 +++++++++++++++++- 1 file changed, 123 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml b/= Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml index 929f6f8e4534..205b683849a5 100644 --- a/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml +++ b/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml @@ -4,7 +4,12 @@ $id: http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# =20 -title: Lantiq GSWIP Ethernet switches +title: Lantiq GSWIP and MaxLinear GSW1xx Ethernet switches + +description: + Lantiq GSWIP and MaxLinear GSW1xx switches share the same hardware IP. + Lantiq switches are embedded in SoCs and accessed via memory-mapped I/O, + while MaxLinear switches are standalone ICs connected via MDIO. =20 $ref: dsa.yaml# =20 @@ -17,9 +22,14 @@ properties: - lantiq,xrx200-gswip - lantiq,xrx300-gswip - lantiq,xrx330-gswip + - maxlinear,gsw120 + - maxlinear,gsw125 + - maxlinear,gsw140 + - maxlinear,gsw141 + - maxlinear,gsw145 =20 reg: - minItems: 3 + minItems: 1 maxItems: 3 =20 reg-names: @@ -36,9 +46,6 @@ properties: compatible: const: lantiq,xrx200-mdio =20 - required: - - compatible - gphy-fw: type: object properties: @@ -123,6 +130,30 @@ required: - compatible - reg =20 +allOf: + - if: + properties: + compatible: + contains: + enum: + - lantiq,xrx200-gswip + - lantiq,xrx300-gswip + - lantiq,xrx330-gswip + then: + properties: + reg: + minItems: 3 + maxItems: 3 + mdio: + required: + - compatible + else: + properties: + reg: + maxItems: 1 + reg-names: false + gphy-fw: false + unevaluatedProperties: false =20 examples: @@ -230,3 +261,90 @@ examples: }; }; }; + + - | + #include + + mdio { + #address-cells =3D <1>; + #size-cells =3D <0>; + + switch@1f { + compatible =3D "maxlinear,gsw125"; + reg =3D <0x1f>; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + label =3D "lan0"; + phy-handle =3D <&switchphy0>; + phy-mode =3D "internal"; + }; + + port@1 { + reg =3D <1>; + label =3D "lan1"; + phy-handle =3D <&switchphy1>; + phy-mode =3D "internal"; + }; + + port@4 { + reg =3D <4>; + label =3D "wan"; + phy-mode =3D "1000base-x"; + managed =3D "in-band-status"; + }; + + port@5 { + reg =3D <5>; + phy-mode =3D "rgmii-id"; + tx-internal-delay-ps =3D <2000>; + rx-internal-delay-ps =3D <2000>; + ethernet =3D <ð0>; + + fixed-link { + speed =3D <1000>; + full-duplex; + }; + }; + }; + + mdio { + #address-cells =3D <1>; + #size-cells =3D <0>; + + switchphy0: switchphy@0 { + reg =3D <0>; + + leds { + #address-cells =3D <1>; + #size-cells =3D <0>; + + led@0 { + reg =3D <0>; + color =3D ; + function =3D LED_FUNCTION_LAN; + }; + }; + }; + + switchphy1: switchphy@1 { + reg =3D <1>; + + leds { + #address-cells =3D <1>; + #size-cells =3D <0>; + + led@0 { + reg =3D <0>; + color =3D ; + function =3D LED_FUNCTION_LAN; + }; + }; + }; + }; + }; + }; --=20 2.51.2