Received: by 2002:a05:7412:361b:b0:f9:2edb:3e4d with SMTP id ie27csp36898rdb; Sun, 17 Dec 2023 13:10:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFHNEEkTe+rN6gaSxOkSqKDA9U6sdljZ6E7fQEJ4VR6uHiT/S7LKFuNNe9WyZsuESB07mQa X-Received: by 2002:a05:6871:b1e:b0:203:9d59:2a4d with SMTP id fq30-20020a0568710b1e00b002039d592a4dmr2776419oab.40.1702847428104; Sun, 17 Dec 2023 13:10:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702847428; cv=none; d=google.com; s=arc-20160816; b=AFTxKwWusVGpzN6X+5nqPAcQ0CFUDtFoiW7Ek/cwFy+fWTP/LX6dPRKgdwqWD2lRz5 xsZgxJcrw/mCbX4eHL9pZ5aYW6eNCFw4PzvWNKW8SB4O+XWqSAKuDK6byIxm1MhhyLDK by306UM1nl9KGj6WGPHXACdHPsS9tYbuXCC2dKSOJCewO+ooeNS/dn1pPJ45QptGnICG 1s2Hr8IoRifDf7VoPfLuXvifECCGl2ijv42/U47fQRLBs2y5USQjJ9Z8BENHjQcXn59H KOVsI93JaZiXnGhG1DNcqpNz6BNl0YotCs+Dg9uwxe1m1zr3gND8t6jxqSKI6r4zGJXQ nS2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ttRMBdywYk1O4Pw4e/ER+gQKnT+HsvRLRlC3MH7JHuo=; fh=W6YYhhNFrE0M/Y8DQ7KqI11GrM/lXTqPOySkzS+LFNw=; b=TPfp3HRD4qGy86IkDsG/Co+RESdi/0tH+0cFZ7Wkx2MHtKanzIXLr5xMzJIF4aVA+3 ng62kjtwXgZ2f/QAPon/0CXu51d7xRijLS9Xwy/lHOtg0G43L12uEjqFocJsp3UFhrny AMW/DtgfIOmoBgi0zF9GOhX0XeAvIUijVrYzbRyAXm9NyG5SoVpivnxuR1pS3K9aBn7k nT6PD3VH2Fovd/oDxOys+n73hPq7pVkOC6othawbRkAAjFjKMuEhypAxOp74OtBFh/ec LmQqxFv3nZc8nE1ZVosomAK2kvXJUVrOCKonvc0zGWtwnU9kIs1gosP9YymBdVxR+959 u74g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="FsxGX/S/"; spf=pass (google.com: domain of linux-kernel+bounces-2818-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2818-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id v34-20020a634662000000b0058afac51c12si16723838pgk.545.2023.12.17.13.10.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 13:10:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2818-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="FsxGX/S/"; spf=pass (google.com: domain of linux-kernel+bounces-2818-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2818-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B594E281F2D for ; Sun, 17 Dec 2023 21:10:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 00A3249F65; Sun, 17 Dec 2023 21:09:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FsxGX/S/" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6AF5F495E1; Sun, 17 Dec 2023 21:09:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 317F9C433C8; Sun, 17 Dec 2023 21:09:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702847388; bh=pDlIZybXRI8LmSUJwxQ9swF4niWXVQabD7yDs33HQw8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FsxGX/S/ViVVCvVazbG/67dop8rBwKNAK0dNrdbW9ku1xUK7Uy3PWJ/3prB6KR7A3 jaGh7tY7oq7+/vcSnaDXXTMuXA2Qm1tnkWSGSHx5C6c4RYOUrIiREi7tXvCgTG3Lej eSmpo0Y6z/UH6KL13F/6r8JOuERk45EhQAXHJjBn96lWKFrBXLgK4GafN+SukoCDkj ZllSmcsT95dO8YHkqIUK3VFP0Al0dgbjW4iZoSw4DLVvwOMLHv4r69rdXPz7OHuISH Bi2J87TZYPASi2rtj4daAGOhyXv7leeDj8PRokk4Ts0ne4ym7UJYLGGF45GYkYwY11 EMg0VORZNSAeg== Date: Sun, 17 Dec 2023 21:09:40 +0000 From: Conor Dooley To: Cristian Ciocaltea Cc: Samuel Holland , Jessica Clarke , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Samin Guo , Paul Walmsley , Palmer Dabbelt , Albert Ou , Hal Feng , Michael Turquette , Stephen Boyd , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Richard Cochran , Giuseppe Cavallaro , netdev@vger.kernel.org, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , linux-riscv , linux-clk@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: Re: [PATCH v3 2/9] dt-bindings: net: starfive,jh7110-dwmac: Add JH7100 SoC compatible Message-ID: <20231217-spray-livestock-a59d630b751e@spud> References: <20231215204050.2296404-1-cristian.ciocaltea@collabora.com> <20231215204050.2296404-3-cristian.ciocaltea@collabora.com> <65fd52f1-6861-42b0-9148-266766d054b1@sifive.com> <6c62e3b2-acde-4580-9b67-56683289e45e@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="npmbwANzcjocFUKY" Content-Disposition: inline In-Reply-To: <6c62e3b2-acde-4580-9b67-56683289e45e@collabora.com> --npmbwANzcjocFUKY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 15, 2023 at 11:03:24PM +0200, Cristian Ciocaltea wrote: > On 12/15/23 22:59, Samuel Holland wrote: > > On 2023-12-15 2:47 PM, Jessica Clarke wrote: > >> On 15 Dec 2023, at 20:40, Cristian Ciocaltea wrote: > >>> > >>> The Synopsys DesignWare MAC found on StarFive JH7100 SoC is mostly > >>> similar to the newer JH7110, but it requires only two interrupts and a > >>> single reset line, which is 'ahb' instead of the commonly used > >>> 'stmmaceth'. > >>> > >>> Since the common binding 'snps,dwmac' allows selecting 'ahb' only in > >>> conjunction with 'stmmaceth', extend the logic to also permit exclusi= ve > >>> usage of the 'ahb' reset name. This ensures the following use cases = are > >>> supported: > >>> > >>> JH7110: reset-names =3D "stmmaceth", "ahb"; > >>> JH7100: reset-names =3D "ahb"; > >>> other: reset-names =3D "stmmaceth"; > >>> > >>> Also note the need to use a different dwmac fallback, as v5.20 applies > >>> to JH7110 only, while JH7100 relies on v3.7x. > >>> > >>> Signed-off-by: Cristian Ciocaltea > >>> --- > >>> .../devicetree/bindings/net/snps,dwmac.yaml | 3 +- > >>> .../bindings/net/starfive,jh7110-dwmac.yaml | 74 +++++++++++++------ > >>> 2 files changed, 55 insertions(+), 22 deletions(-) > >>> > >>> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/= Documentation/devicetree/bindings/net/snps,dwmac.yaml > >>> index 5c2769dc689a..c1380ff1c054 100644 > >>> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml > >>> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > >>> @@ -95,6 +95,7 @@ properties: > >>> - snps,dwmac-5.20 > >>> - snps,dwxgmac > >>> - snps,dwxgmac-2.10 > >>> + - starfive,jh7100-dwmac > >>> - starfive,jh7110-dwmac > >>> > >>> reg: > >>> @@ -146,7 +147,7 @@ properties: > >>> reset-names: > >>> minItems: 1 > >>> items: > >>> - - const: stmmaceth > >>> + - enum: [stmmaceth, ahb] > >>> - const: ahb > >> > >> I=E2=80=99m not so well-versed in the YAML bindings, but would this no= t allow > >> reset-names =3D "ahb", "ahb"? > >=20 > > Yes, it would. You need something like: > >=20 > > reset-names: > > oneOf: > > - enum: [stmmaceth, ahb] > > - items: > > - const: stmmaceth > > - const: ahb >=20 > Oh yes, I always forget about the "oneOf" thing. Thanks! Won't this also relax the naming for all devices that allow a single reset, but expect the stmmaceth one? I'm not sure that that actually matters, I think the consumer bindings have constraints themselves. --npmbwANzcjocFUKY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZX9jlAAKCRB4tDGHoIJi 0u2kAQDwhBC97TRp152I+1W+AAVbbj170OQONz+W/j8kuDieIwD/cY+M0Ecr1wRq sRFbcJiO+jHPZHDgTTISrvusYc5QxwU= =mt/n -----END PGP SIGNATURE----- --npmbwANzcjocFUKY--