Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6955359rdb; Fri, 15 Dec 2023 13:03:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHaHqeMS2mB5WPOOjLSCnmz+gxlGTR1vDGnsQAZ/syi6hvAIvP14DWSrdU5aqhWuemZmGHw X-Received: by 2002:a17:902:9a82:b0:1d0:6ffd:6e80 with SMTP id w2-20020a1709029a8200b001d06ffd6e80mr6349452plp.120.1702674221904; Fri, 15 Dec 2023 13:03:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702674221; cv=none; d=google.com; s=arc-20160816; b=E2BfELK+190qWpKxPcQTMXbsU38HMutjOCbLfa6ikn3ni6tZ+oiHX//JCy7ogUzUuG h2XiHcqkjZNZixB9Uwbazn6g5YWz2zR1X11f1RqRIngQfGCF5znmM/VopyU1keoqwo5I 9X/nZg+Xx/VB6+NblbdkcowY4rE3nI2NtAxrauH73dBxRUyJhgI56Zq5PeTTS9MkjYLE P+zbed78QQ3WIt9S3xEDhdcuV8qIaztx6vrDQ7rNOl9T3PEEh1DwCI2bB4ETi6xZLRlk yPxKMUqabnLzvK2uo+/32Nq5wWaaVdIIFqMIeVf1p2JmztDxnIBl+2Wu4Zf4c0yDNpgB 3cGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=0dl3itsEdttCKuo48KbWyOVbN+CgIfVfDGMzQC5+Krg=; fh=A7fzavfK7b73EWwNaG53CEGfndwFYqd3fnEbLVairMg=; b=d/cjYl2eZhaF4Fl+GUsTYIhW6kFWD8RR+Q9GG/RBefzhdvIQKuYD1QE/i5A0Wc6/ib vadAEpX/AQCHju7SGp0thrLHM2mlbtpPcOECGd6YFHUgB2HekN0lajX/XLtAleiKZrJe Wlh/KMJVaASulV9Yv5jXtSeR/A3IDlE5w+cgP5cqp7AOsbPDARJy3UKWSVIkkuaDpfQg LUUnFIwy+K221OYp/ZajucRjGY/uAhtiXavdvHXYSoN0IoeqxLtAjb3yrGe9zR10M78h zF9rk5rgXmaw58b8yAyJPc97F9im6xxQdLlQBbNGLmLJhBCPSUYJThRGA45X9hWlJJ8O ndZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="Fs/HaoOn"; spf=pass (google.com: domain of linux-kernel+bounces-1650-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1650-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 19-20020a170902c21300b001cfc0272b48si13304088pll.103.2023.12.15.13.03.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 13:03:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1650-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=@collabora.com header.s=mail header.b="Fs/HaoOn"; spf=pass (google.com: domain of linux-kernel+bounces-1650-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1650-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com 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 75E8828617C for ; Fri, 15 Dec 2023 21:03:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3AFE347F57; Fri, 15 Dec 2023 21:03:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Fs/HaoOn" X-Original-To: linux-kernel@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 039FB30132; Fri, 15 Dec 2023 21:03:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702674207; bh=fWUcyTSvl9HkzhbEm2R9p6yElA555rA8toz5mjYvtR8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Fs/HaoOn6SjZTGGcdUHfgvof1ag/gLuno1cJmOXOX8v2Mr/oGxLTYh8xd4Ju11DlS 07D2Y6ZaCj9MasIAmOM5lRGp7y1k1osx5lCBzcihDN0lI0oD6WYloE6Ah132R2CDwN ExwWYzVW6REs3ogTVC7ys8oxbR+B8Wq5LhBmWRqHVdkU29ZkHwm6U1JwIkIwZEFiDB 0mHdZeUJsAv5xtXJO89pm1Xu3lRCb8332T86FidfU/XlTkDU/jcVul2g9PScZVabG8 xL3yhH+JzwcZOxVKRCi+CDz1pkSzJxElChYxhgcaPDo4hO/LLydHjz0sPzX3gEc7mk P4XKIW1PNHMlQ== Received: from [100.115.223.179] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 354E83781FD5; Fri, 15 Dec 2023 21:03:25 +0000 (UTC) Message-ID: <6c62e3b2-acde-4580-9b67-56683289e45e@collabora.com> Date: Fri, 15 Dec 2023 23:03:24 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/9] dt-bindings: net: starfive,jh7110-dwmac: Add JH7100 SoC compatible Content-Language: en-US To: Samuel Holland , Jessica Clarke Cc: "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 References: <20231215204050.2296404-1-cristian.ciocaltea@collabora.com> <20231215204050.2296404-3-cristian.ciocaltea@collabora.com> <65fd52f1-6861-42b0-9148-266766d054b1@sifive.com> From: Cristian Ciocaltea In-Reply-To: <65fd52f1-6861-42b0-9148-266766d054b1@sifive.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 exclusive >>> usage of the 'ahb' reset name. This ensures the following use cases are >>> supported: >>> >>> JH7110: reset-names = "stmmaceth", "ahb"; >>> JH7100: reset-names = "ahb"; >>> other: reset-names = "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’m not so well-versed in the YAML bindings, but would this not allow >> reset-names = "ahb", "ahb"? > > Yes, it would. You need something like: > > reset-names: > oneOf: > - enum: [stmmaceth, ahb] > - items: > - const: stmmaceth > - const: ahb Oh yes, I always forget about the "oneOf" thing. Thanks! > Regards, > Samuel >