Received: by 2002:a05:7412:85a1:b0:e2:908c:2ebd with SMTP id n33csp38094rdh; Mon, 30 Oct 2023 13:02:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHSvag7xx0wk3BM2CRWBNemKBlwUojbdmhqzH18LTpxo10R51jvM5AxZo0g+99WKCVM6yZz X-Received: by 2002:a05:6a20:9387:b0:159:dccb:8bb4 with SMTP id x7-20020a056a20938700b00159dccb8bb4mr10777609pzh.23.1698696178486; Mon, 30 Oct 2023 13:02:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698696178; cv=none; d=google.com; s=arc-20160816; b=o2Iy2Bjd90nb3OHiONIxfW3kzt3ocTTJM8LKxJvX5sDdSr4sc88bAKVtjHCgScFqsk 3fr/0vugPDilmZp1bM2G0S7bmYYS3E72l0/T3yO0vLip/nxg2Q80fSRDuFUmwMrhWo9f 9//YJsNiPkFVyQ2xbIy93MdYGWhP4Ow9q/9KUMHu8Yvus5OVhlDY/QH+hc5rvPV6LzMv 4VC+2yYwXpIel0zzSm2YMfyJbH+pScLmsRk76/X/dT66hwCR9IXBNptv47szeIzLKuaC 3SQErc9X3gCXlBoC/z7WmJbZAXTGyb7rn4ki2tXUhd+xeAfNw7aamAJOUMsAOLZ+B/+f bnSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tCFhF8ww0yneW7wV+EMvNptHOEWglAk8FWieKS6WTts=; fh=FMUYpNAGkZddWuF73PI9qAnT8lsYYUgktcJh4BSG6Ys=; b=B4exvmvdvKbIlAPuXHOwrcyJNF4ZGRFB/Us9m/xV0Am8oWCx4niDBgCf3fkH09Y4kD VnVI+ApseXZT5/UVnNkTpFBsxhyRd3zOfUnfrp792xgTizc7z3OfXrEl933tGQOjXAti J2NEbHSeNdHOshNC3gT/02mXgjK4bgiKksWwrWwBa1dMQpZTomcj3lIJQMWoUh4HsvF6 hrifbbTT3bJNgK40QkDEIMtYQ0vrFwfy2AuQ/5Es1iTCbofPXoUGWKuV0536ZBPhPEpD vrQSf1M1YiLr3UQU5rT2PJxuKwtid03xa75zWDQUJ/y+pcLDv+1RXV3psERIBAsNJHxd ddPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KMC8RmIq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id e64-20020a636943000000b005b96a77e706si3445914pgc.564.2023.10.30.13.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 13:02:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KMC8RmIq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id D3ABF80B1E62; Mon, 30 Oct 2023 13:02:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229456AbjJ3UCs (ORCPT + 99 others); Mon, 30 Oct 2023 16:02:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjJ3UCr (ORCPT ); Mon, 30 Oct 2023 16:02:47 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8DAFF9; Mon, 30 Oct 2023 13:02:44 -0700 (PDT) Received: from [192.168.1.90] (unknown [188.24.143.101]) (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 madras.collabora.co.uk (Postfix) with ESMTPSA id 4E56A6607393; Mon, 30 Oct 2023 20:02:42 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1698696163; bh=uO9kOx6FyYOhUQqCre9IC5JYGMe00wfHPt3Z51gKaCw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=KMC8RmIq7yyYms1wPJND7cKAylDHwfxmvbG0kAnRHCIBhAdNzjbC5YNsAosIOBVaW KDt+6NUawFqs/TozlkoipWSu3hQKjL0n0JIXE4zlPqW/fJt55X9wkC+NsTqKaEzhB4 iQzUqHzI1A/+cGNCBugC3nhz3o13Ms8geoOpXkPmSUkGku2RaxmqirWtYnabCAtCE2 BuI6e8+d3jTVlv22YZjXNxLOU9GAIog9TmkcHhrKVuYI4NCXf3n6X+X7dppOUxvN5l vMS5suy4PyZPRVoYFtH6/Nm1S3PxuhpIEmE1F9JrU26ELv+qtx28N9igxBTlmMRpOq yZQgG+niCuAaA== Message-ID: Date: Mon, 30 Oct 2023 22:02:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 04/12] dt-bindings: net: starfive,jh7110-dwmac: Add JH7100 SoC compatible To: Krzysztof Kozlowski , "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 , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Richard Cochran , Giuseppe Cavallaro Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@collabora.com References: <20231029042712.520010-1-cristian.ciocaltea@collabora.com> <20231029042712.520010-5-cristian.ciocaltea@collabora.com> <35556392-3b9a-4997-b482-082dc2f9121f@linaro.org> Content-Language: en-US From: Cristian Ciocaltea In-Reply-To: <35556392-3b9a-4997-b482-082dc2f9121f@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 30 Oct 2023 13:02:56 -0700 (PDT) On 10/30/23 09:30, Krzysztof Kozlowski wrote: > On 29/10/2023 23:15, Cristian Ciocaltea wrote: >> On 10/29/23 13:24, Krzysztof Kozlowski wrote: >>> On 29/10/2023 05:27, Cristian Ciocaltea wrote: >>>> The Synopsys DesignWare MAC found on StarFive JH7100 SoC is quite >>>> similar to the newer JH7110, but it requires only two interrupts and a >>>> single reset line. >>>> >>>> Signed-off-by: Cristian Ciocaltea >>>> --- >>>> .../devicetree/bindings/net/snps,dwmac.yaml | 1 + >>>> .../bindings/net/starfive,jh7110-dwmac.yaml | 74 +++++++++++++------ >>>> 2 files changed, 54 insertions(+), 21 deletions(-) >>>> >>>> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml >>>> index a4d7172ea701..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: >>>> diff --git a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml >>>> index 44e58755a5a2..70e35a3401f4 100644 >>>> --- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml >>>> +++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml >>>> @@ -13,10 +13,14 @@ maintainers: >>>> >>>> properties: >>>> compatible: >>>> - items: >>>> - - enum: >>>> - - starfive,jh7110-dwmac >>>> - - const: snps,dwmac-5.20 >>>> + oneOf: >>>> + - items: >>>> + - const: starfive,jh7100-dwmac >>>> + - const: snps,dwmac >>>> + - items: >>>> + - enum: >>>> + - starfive,jh7110-dwmac >>>> + - const: snps,dwmac-5.20 >>> >>> Why do you use different fallback? >> >> AFAIK, dwmac-5.20 is currently only used by JH7110. > > What is used by JH7000? Driver reports "Synopsys ID: 0x37", so it could be 3.70a or 3.710, as those are the only compatibles available for 3.7x. It's worth noting the driver does not rely on the compatibles for implementing version specific logic, as it gets the IDs directly from chip registers. The usage of generic snps,dwmac fallback was borrowed from downstream code. Regards, Cristian