From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 29C89CD4F5B for ; Fri, 22 Sep 2023 11:43:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5aUcmp4sACeMg0pR0g+KQyjLnyfIFdhc018Ueem1PLg=; b=lml7+t5qrI92RmXgq34gGB+K+3 hVlHPh729ElMmyFzoRoBSITjb4mIGLT12KuAt3JiKCDQciYT38oi1VOffMxqBFDP9nJxSkCBVQr+x vVhqA14aqaB4YybJhQs1NPeK7pNco5jH5XuErZxoCfBCJhM+d7yx4c7cjk0XbTwnxfsjbijDrx1eo /PIjGhaOCGCxU4SgWI36l7Fe0lw3GMXVyK4tt0+WfE6xjuherZiDFVY77X8lVWgZr3Mk0Y6q2sErD mgWrq/ynOLyPIaBN0/UyfBfTi/TNx9jRRung4hImu195ixYG6H/cUqs1JLhiuTYXy1udumvKx88RS 5Pzj3RNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qjeZ5-008z0M-2t; Fri, 22 Sep 2023 11:43:19 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qjeZ2-008yyW-17 for linux-arm-kernel@lists.infradead.org; Fri, 22 Sep 2023 11:43:18 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 76187CE245D; Fri, 22 Sep 2023 11:43:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D9C7C433C8; Fri, 22 Sep 2023 11:43:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695382992; bh=UL8TH12yxhaIMYvyUi/thvzlbWtFsgDinsXcxmzB5uA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z5j69VsppTky9oLNhaaNt7S9yZ8FTOTxkyDyKDzfbrKb1yeXrzLzHjw8r4jZWPAmq dYVRdIMzUWVC1o3rmhaRK0EA/BAPl1F3QFP+S9wB0MB3kzjXvgGF4o8bo1OwA6G2Z/ XSXjsseo7vWGeZtHEsaP2Tz7+/sFlQtAPUcQUeUP750ScNPcjB0qFk+PjPuTYU9/ze 37p7LaL35yaXqVglDgrwxxRw/pL+S3UuJCCeH5lvZJtnp8oEn/mJRtyVQpOmB1n0zK y4BNOl6kjKD7UiIKjF5VFgV4zmZT3/JHPENsh+kdi5SAHJvcGtl+E/QfJ0xHGClrnT CL5dEyCIS9DSQ== Date: Fri, 22 Sep 2023 12:43:06 +0100 From: Conor Dooley To: Christophe Roullier Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Richard Cochran , Jose Abreu , Liam Girdwood , Mark Brown , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/7] dt-bindings: net: add STM32MP13 compatible in documentation for stm32 Message-ID: <20230922-surface-graduate-a269a700e5c5@spud> References: <20230921150622.599232-1-christophe.roullier@foss.st.com> <20230921150622.599232-2-christophe.roullier@foss.st.com> MIME-Version: 1.0 In-Reply-To: <20230921150622.599232-2-christophe.roullier@foss.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230922_044316_724450_885E2EA0 X-CRM114-Status: GOOD ( 27.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0972058362766409092==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============0972058362766409092== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="y7/hylnc6AQ95TsF" Content-Disposition: inline --y7/hylnc6AQ95TsF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Yo, On Thu, Sep 21, 2023 at 05:06:16PM +0200, Christophe Roullier wrote: > New STM32 SOC have 2 GMACs instances. > GMAC IP version is SNPS 4.20. >=20 > Signed-off-by: Christophe Roullier > --- > .../devicetree/bindings/net/stm32-dwmac.yaml | 140 +++++++++++++++--- > 1 file changed, 118 insertions(+), 22 deletions(-) >=20 > diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml b/Doc= umentation/devicetree/bindings/net/stm32-dwmac.yaml > index fc8c96b08d7d..75836916c38c 100644 > --- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > @@ -22,15 +22,17 @@ select: > enum: > - st,stm32-dwmac > - st,stm32mp1-dwmac > + - st,stm32mp13-dwmac > required: > - compatible > =20 > -allOf: > - - $ref: snps,dwmac.yaml# > - > properties: > compatible: > oneOf: > + - items: > + - enum: > + - st,stm32mp13-dwmac > + - const: snps,dwmac-4.20a The enum just below this is also for the 4.20a, no? Why not just put this mp13 compatible into that enum? > - items: > - enum: > - st,stm32mp1-dwmac > @@ -72,27 +74,69 @@ properties: > - eth-ck > - ptp_ref > =20 > - st,syscon: Please try to avoid defining properties inside if/then/else sections and only move the variable bits if possible. > - $ref: /schemas/types.yaml#/definitions/phandle-array > - items: > - - items: > - - description: phandle to the syscon node which encompases the= glue register > - - description: offset of the control register > + phy-supply: > + description: PHY regulator > + > + st,ext-phyclk: > description: > - Should be phandle/offset pair. The phandle to the syscon node which > - encompases the glue register, and the offset of the control regist= er > + set this property in RMII mode when you have PHY without crystal 5= 0MHz and want to > + select RCC clock instead of ETH_REF_CLK. or in RGMII mode when you= want to select > + RCC clock instead of ETH_CLK125. > + type: boolean > =20 > st,eth-clk-sel: > + deprecated: true Why have these been marked as deprecated? That doesn't appear to be mention in the commit message & sounds like it should be a different commit. > description: > set this property in RGMII PHY when you want to select RCC clock i= nstead of ETH_CLK125. > type: boolean > =20 > st,eth-ref-clk-sel: > + deprecated: true Ditto. > description: > set this property in RMII mode when you have PHY without crystal 5= 0MHz and want to > select RCC clock instead of ETH_REF_CLK. > type: boolean > =20 > +allOf: > + - $ref: snps,dwmac.yaml# > + - if: > + properties: > + compatible: > + contains: > + enum: > + - st,stm32mp1-dwmac > + - st,stm32-dwmac > + then: > + properties: > + st,syscon: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + items: > + - items: > + - description: phandle to the syscon node which encompas= es the glue register > + - description: offset of the control register > + description: > + Should be phandle/offset pair. The phandle to the syscon nod= e which > + encompases the glue register, and the offset of the control = register > + - if: > + properties: > + compatible: > + contains: > + enum: > + - st,stm32mp13-dwmac You've got 2 if/then sections containing tests for 3 compatibles. There are only 2 compatibles total right now & 3 with the patch, so it looks like you'd get away with if/then/else instead. > + then: > + properties: > + st,syscon: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + items: > + - items: > + - description: phandle to the syscon node which encompas= es the glue register > + - description: offset of the control register > + - description: field to set mask in register > + description: > + Should be phandle/offset pair. The phandle to the syscon nod= e which > + encompases the glue register, the offset of the control regi= ster and > + the mask to set bitfield in control register > + > required: > - compatible > - clocks > @@ -112,24 +156,36 @@ examples: > compatible =3D "st,stm32mp1-dwmac", "snps,dwmac-4.20a"; I don't understand why this existing example is changing. Thanks, Conor. > reg =3D <0x5800a000 0x2000>; > reg-names =3D "stmmaceth"; > - interrupts =3D ; > - interrupt-names =3D "macirq"; > + interrupts-extended =3D <&intc GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH= >, > + <&exti 70 IRQ_TYPE_LEVEL_HIGH>; > + interrupt-names =3D "macirq", > + "eth_wake_irq"; > clock-names =3D "stmmaceth", > - "mac-clk-tx", > - "mac-clk-rx", > - "ethstp", > - "eth-ck"; > + "mac-clk-tx", > + "mac-clk-rx", > + "eth-ck", > + "ptp_ref", > + "ethstp"; > clocks =3D <&rcc ETHMAC>, > - <&rcc ETHTX>, > - <&rcc ETHRX>, > - <&rcc ETHSTP>, > - <&rcc ETHCK_K>; > + <&rcc ETHTX>, > + <&rcc ETHRX>, > + <&rcc ETHCK_K>, > + <&rcc ETHPTP_K>, > + <&rcc ETHSTP>; > st,syscon =3D <&syscfg 0x4>; > + snps,mixed-burst; > snps,pbl =3D <2>; > + snps,en-tx-lpi-clockgating; > snps,axi-config =3D <&stmmac_axi_config_0>; > snps,tso; > phy-mode =3D "rgmii"; > - }; > + > + stmmac_axi_config_0: stmmac-axi-config { > + snps,wr_osr_lmt =3D <0x7>; > + snps,rd_osr_lmt =3D <0x7>; > + snps,blen =3D <0 0 0 0 16 8 4>; > + }; > + }; > =20 > - | > //Example 2 (MCU example) > @@ -161,3 +217,43 @@ examples: > snps,pbl =3D <8>; > phy-mode =3D "mii"; > }; > + > + - | > + #include > + #include > + #include > + #include > + //Example 4 > + ethernet3: ethernet@5800a000 { > + compatible =3D "st,stm32mp13-dwmac", "snps,dwmac-4.20a"; > + reg =3D <0x5800a000 0x2000>; > + reg-names =3D "stmmaceth"; > + interrupts-extended =3D <&intc GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH= >, > + <&exti 68 IRQ_TYPE_LEVEL_HIGH>; > + interrupt-names =3D "macirq", > + "eth_wake_irq"; > + clock-names =3D "stmmaceth", > + "mac-clk-tx", > + "mac-clk-rx", > + "eth-ck", > + "ptp_ref", > + "ethstp"; > + clocks =3D <&rcc ETHMAC>, > + <&rcc ETHTX>, > + <&rcc ETHRX>, > + <&rcc ETHCK_K>, > + <&rcc ETHPTP_K>, > + <&rcc ETHSTP>; > + st,syscon =3D <&syscfg 0x4 0xff0000>; > + snps,mixed-burst; > + snps,pbl =3D <2>; > + snps,axi-config =3D <&stmmac_axi_config_1>; > + snps,tso; > + phy-mode =3D "rmii"; > + > + stmmac_axi_config_1: stmmac-axi-config { > + snps,wr_osr_lmt =3D <0x7>; > + snps,rd_osr_lmt =3D <0x7>; > + snps,blen =3D <0 0 0 0 16 8 4>; > + }; > + }; > --=20 > 2.25.1 >=20 --y7/hylnc6AQ95TsF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZQ19ygAKCRB4tDGHoIJi 0uJ2AQDYMHSxhPUAaxKOHWJ6DyhZftPWpUilt+MV/PUTA3814gEAqkENVdWxZsMn IiIRijrOe3RpmdB14TsJ6QPhUyr+mgg= =e7lu -----END PGP SIGNATURE----- --y7/hylnc6AQ95TsF-- --===============0972058362766409092== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============0972058362766409092==--