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 42849E743C0 for ; Thu, 28 Sep 2023 20:39:43 +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=1nrCPNiJ+3mM1Zjty16Cnz8yMlqcZSqZFmI7umwNqsM=; b=T3lYGHqFddys3LOGWGD75UVnLZ CpGvSMjB9qCqBF2QJ1cj2eafVB5KcmUKm5KNPG9P8o2uYO9DIL/Y4PL9AnfvF6MaXg5WHiapjbu8H 7FylTNUlRPPBAvzCS2f/H7fOwq8wfKhQgT4gJO5JUD9qRKaCXepyhuB1dm8/e3SS0xqnfDyhfJG3a a4GmA/lleZwhMsbYHNAIrfF/59KU3VLAVI6B54BPccQKg05VzKn2z3XapYFfnyRzvqwCCISuIgI+F L7qMFOkcWdfDyN7s+AkCQZqbCszKLXgtyCx0mZ4s1Z6gW2lB6Tji+LmPWbBJMuyjPNNkYvCO3wieu c3yNLgTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlxn3-006edV-04; Thu, 28 Sep 2023 20:39:17 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlxmz-006ecL-2b for linux-arm-kernel@lists.infradead.org; Thu, 28 Sep 2023 20:39:15 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 4886FB81C1C; Thu, 28 Sep 2023 20:39:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00D00C433C8; Thu, 28 Sep 2023 20:39:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695933550; bh=xINXDKcTe6ijRIqT/PemFdRIVgJJnLG488c56JbijgA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iwGeJcBnI4vzd0lgEzuKqStNzmqnNABTX3xmghorXxnqzGNG6fOsKS0yoXIjFGHX8 hoRJRFEQau+i9BA8D5FUzu0TlSKY/OJeMI4mxDGOYphFOnFGBLTJu3z62TJkdw7M8o sBnzZaGl5t+KCMwnxVfd4WVh0oH0myH1whk9T9wT6uBC38H5H+dL5oJtYA+8HvsYIc 7f7mWXomZ4TwjnMJRUYY5JQibY7xFJlsyh5Yvw0G2JVxXnbk36zYjIO0Jl0znRPkG5 8TgGEbUNYa62BWEKEBKY6JSM1w1j7x//N1I9tPJOhBgtzgsEyqKrAEs/rWAlPwIXQ8 OERuE5KGkNnXQ== Date: Thu, 28 Sep 2023 21:39:04 +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 v3 01/12] dt-bindings: net: add STM32MP13 compatible in documentation for stm32 Message-ID: <20230928-footwork-padlock-524173c3e205@spud> References: <20230928151512.322016-1-christophe.roullier@foss.st.com> <20230928151512.322016-2-christophe.roullier@foss.st.com> MIME-Version: 1.0 In-Reply-To: <20230928151512.322016-2-christophe.roullier@foss.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230928_133914_111897_34D7D5AC X-CRM114-Status: GOOD ( 20.90 ) 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="===============8756751497464435894==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8756751497464435894== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8U54nw6WVDXbYGlQ" Content-Disposition: inline --8U54nw6WVDXbYGlQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey, On Thu, Sep 28, 2023 at 05:15:01PM +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 | 78 +++++++++++++++++-- > 1 file changed, 70 insertions(+), 8 deletions(-) >=20 > diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml b/Doc= umentation/devicetree/bindings/net/stm32-dwmac.yaml > index fc8c96b08d7dc..ca976281bfc22 100644 > --- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > @@ -22,18 +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,stm32mp1-dwmac > + - st,stm32mp13-dwmac > - const: snps,dwmac-4.20a > - items: > - enum: > @@ -74,13 +73,10 @@ properties: > =20 > st,syscon: > $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 > 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 > + encompases the glue register, the offset of the control register a= nd > + the mask to set bitfield in control register > =20 > st,eth-clk-sel: > description: > @@ -101,6 +97,38 @@ required: > =20 > unevaluatedProperties: false > =20 > +allOf: > + - $ref: snps,dwmac.yaml# > + - if: > + properties: > + compatible: > + contains: > + enum: > + - st,stm32mp1-dwmac > + - st,stm32-dwmac > + then: > + properties: > + st,syscon: > + items: > + items: > + - description: phandle to the syscon node which encompases= the glue register > + - description: offset of the control register These descriptions should, IMO, be moved back out to the st,syscon definition. If you put the 3 descriptions there, with "minItems: 2" & put "maxItems: 2" and "minItems: 3" in each of the if/then clauses. Also, it should be sufficient to simplify to if/then/else. Cheers, Conor. > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - st,stm32mp13-dwmac > + then: > + properties: > + st,syscon: > + items: > + items: > + - description: phandle to the syscon node which encompases= the glue register > + - description: offset of the control register > + - description: field to set mask in register > + > examples: > - | > #include > @@ -161,3 +189,37 @@ 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"; > + }; > --=20 > 2.25.1 >=20 --8U54nw6WVDXbYGlQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZRXkaAAKCRB4tDGHoIJi 0opWAP9JSnWhMjiIcX6Vc/XK2po8UfJBgrzDdpbxtFfTG/BmvwEA3JncB06h6fKE ThgDVUqVEGxr4yKfVfIj32yBSVdxXwU= =awMY -----END PGP SIGNATURE----- --8U54nw6WVDXbYGlQ-- --===============8756751497464435894== 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 --===============8756751497464435894==--