From nobody Sun Feb 8 18:10:54 2026 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 C23A9304BC1; Fri, 24 Oct 2025 17:04:25 +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=1761325468; cv=none; b=jYH+Wi7qtkFxJbP68X8hRUNBW7zZ30bhL4op3cnd6L0Mm0FMUNBBmFrlIrRoPWv0r7rs7JNONR3LSXE1hyWlqeHU+QDpOk769538sRfxYMgw73yUArO1FlPcQJeCMxkPfEZw/MymNkKI7vz9lPE7S+JVdK2Yo7ZPSjcX6uBukMY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761325468; c=relaxed/simple; bh=hwtuS8EHMMCezU0RqT4tjmCN4AL9AkfR+9fNLQvqXxw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PepLrGbf9AHQJVX/6viliEtAulWIre0Sx+nYW/QBDmLSfiqseX5YFr6BAGMLFMHIGUCa3ZxXgwwpHj5NzURuu4zqU1KUjbwkdp97ZVlVw0G1KGSndpqqIi4JNqbNs5BlbtTVjvrs5fL1oeMe9Asly7O9RdP6mG5EpfMTk4EDsBQ= 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 1vCLDA-000000006A0-2p9t; Fri, 24 Oct 2025 17:04:20 +0000 Date: Fri, 24 Oct 2025 18:04:09 +0100 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 10/13] 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 --- .../bindings/net/dsa/lantiq,gswip.yaml | 263 +++++++++++++----- 1 file changed, 190 insertions(+), 73 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml b/= Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml index 48641c27da10..eb6a4c30a8be 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 allOf: - $ref: dsa.yaml#/$defs/ethernet-ports @@ -33,6 +38,98 @@ allOf: description: Configure the RMII reference clock to be a clock output rather than an input. Only applicable for RMII mode. + - if: + properties: + compatible: + contains: + enum: + - lantiq,xrx200-gswip + - lantiq,xrx300-gswip + - lantiq,xrx330-gswip + then: + properties: + reg: + minItems: 3 + maxItems: 3 + description: Memory-mapped register regions (switch, mdio, mii) + reg-names: + items: + - const: switch + - const: mdio + - const: mii + mdio: + $ref: /schemas/net/mdio.yaml# + unevaluatedProperties: false + + properties: + compatible: + const: lantiq,xrx200-mdio + + required: + - compatible + gphy-fw: + type: object + properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + compatible: + items: + - enum: + - lantiq,xrx200-gphy-fw + - lantiq,xrx300-gphy-fw + - lantiq,xrx330-gphy-fw + - const: lantiq,gphy-fw + + lantiq,rcu: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to the RCU syscon + + patternProperties: + "^gphy@[0-9a-f]{1,2}$": + type: object + + additionalProperties: false + + properties: + reg: + minimum: 0 + maximum: 255 + description: + Offset of the GPHY firmware register in the RCU regist= er range + + resets: + items: + - description: GPHY reset line + + reset-names: + items: + - const: gphy + + required: + - reg + + required: + - compatible + - lantiq,rcu + + additionalProperties: false + required: + - reg-names + else: + properties: + reg: + maxItems: 1 + description: MDIO bus address + reg-names: false + gphy-fw: false + mdio: + $ref: /schemas/net/mdio.yaml# + unevaluatedProperties: false +>>>>>>> f34c3d144cf3 (dt-bindings: net: dsa: lantiq,gswip: add support for= MaxLinear GSW1xx switches) =20 maintainers: - Hauke Mehrtens @@ -43,78 +140,11 @@ properties: - lantiq,xrx200-gswip - lantiq,xrx300-gswip - lantiq,xrx330-gswip - - reg: - minItems: 3 - maxItems: 3 - - reg-names: - items: - - const: switch - - const: mdio - - const: mii - - mdio: - $ref: /schemas/net/mdio.yaml# - unevaluatedProperties: false - - properties: - compatible: - const: lantiq,xrx200-mdio - - required: - - compatible - - gphy-fw: - type: object - properties: - '#address-cells': - const: 1 - - '#size-cells': - const: 0 - - compatible: - items: - - enum: - - lantiq,xrx200-gphy-fw - - lantiq,xrx300-gphy-fw - - lantiq,xrx330-gphy-fw - - const: lantiq,gphy-fw - - lantiq,rcu: - $ref: /schemas/types.yaml#/definitions/phandle - description: phandle to the RCU syscon - - patternProperties: - "^gphy@[0-9a-f]{1,2}$": - type: object - - additionalProperties: false - - properties: - reg: - minimum: 0 - maximum: 255 - description: - Offset of the GPHY firmware register in the RCU register ran= ge - - resets: - items: - - description: GPHY reset line - - reset-names: - items: - - const: gphy - - required: - - reg - - required: - - compatible - - lantiq,rcu - - additionalProperties: false + - maxlinear,gsw120 + - maxlinear,gsw125 + - maxlinear,gsw140 + - maxlinear,gsw141 + - maxlinear,gsw145 =20 required: - compatible @@ -129,6 +159,7 @@ examples: reg =3D <0xe108000 0x3100>, /* switch */ <0xe10b100 0xd8>, /* mdio */ <0xe10b1d8 0x130>; /* mii */ + reg-names =3D "switch", "mdio", "mii"; dsa,member =3D <0 0>; =20 ports { @@ -227,3 +258,89 @@ 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 "sgmii"; + }; + + 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_FUNCT= ION_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_FUNCT= ION_LAN; + }; + }; + }; + }; + }; + }; --=20 2.51.0