Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2309369rwl; Fri, 6 Jan 2023 04:54:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXuYP1cHjvnnZ/0GMT0E0A/ohLuG+bCC2lBbWaYvr1xIHXN0vWEvJwRYfg6I3vfR0+7QGKXU X-Received: by 2002:a05:6a21:339b:b0:ad:c97f:1c1b with SMTP id yy27-20020a056a21339b00b000adc97f1c1bmr84648556pzb.0.1673009642047; Fri, 06 Jan 2023 04:54:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673009642; cv=none; d=google.com; s=arc-20160816; b=VJSOmXx9S7GPHpnxATdl6tUHfhG+7DYRx8K9kpfJRRc5OOUcfC7Pg8egVwFuL3x0+W m9vlZt2eNgTJzEyYm/EeP/qOrvvWpTtaOR7H51UgczjxM3ME76eD0FS4xM5/WlDnpBgH aIM9FiX0dr0a9sHpHRX0f65+O7jA/umr4cX3kX+b/PmWxiQRNbz8En0eqh1b9mXbzNpm V245Gky+0NgBLRTDfqQBRsNWSZIcMzcuPBU7RHOhoT40MkGxTs+ySg4VYxeF+zuEQevk 0YDuQFXo/HyqUayi460jA06hBP2rxRC7fmVCQ8tNiN3r9zB4ORxKhil9J9IOvM2TG8+U bXwA== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=4CcYfNDCdkNRPfZfJSmi+1aQkd/P/7ArECeWhjMr1V0=; b=FH1kK1++TQLMKIRnI+f20yEGCpWhnCm//iBQfn0288vGS+jLGNrX7SJhcFxPmks9E5 WCTFcCO+BxQFiVKQRehLfSvv+pv1+XiPEQxOHPDjj9vLkAKav5mmTn+Y6gL9vpDZz/vj jEMnZBB/K1MEbwiusANREyh92zysroLVCNS7rvHK5GftJQVTUP9Gas/7g++NGyYA2J9F CXLT4PY7WVoRISRQSNvuPCWDVM/z508THA6kH8hum35RX8Y/bEPcAiya/bFf/wJgtK0F h4ZRAdgmccMV/0rFWk4OXn1wZj9yqKhkOdfpWPveifuagEMso+h1Y2hNmBoX/JQxx5uC Ed3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b83V4olB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 206-20020a6302d7000000b004a92e6dba98si1358727pgc.624.2023.01.06.04.53.54; Fri, 06 Jan 2023 04:54:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b83V4olB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232992AbjAFMpD (ORCPT + 56 others); Fri, 6 Jan 2023 07:45:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232803AbjAFMpB (ORCPT ); Fri, 6 Jan 2023 07:45:01 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1074D736F2 for ; Fri, 6 Jan 2023 04:45:00 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id p1-20020a05600c1d8100b003d8c9b191e0so981209wms.4 for ; Fri, 06 Jan 2023 04:44:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=4CcYfNDCdkNRPfZfJSmi+1aQkd/P/7ArECeWhjMr1V0=; b=b83V4olBWBynd3RZWkoGlDOyYAfO7STAnj82h8oM+CH/sf8n6Qqhvt9lN52tTGBwhz JjyltO2oIr2R+bKARi0UXQ0gY2t3nwimCCgFYN1RRrpmMJoUQV6Alcy7itwkiSNcAEvG TUQgZZQtSO3GsT2OasGzqdpL335+F9nuQ28HLRufut2k1Wu9FeuaT1JQwSMWnVjlk/4H 0JP8sOxf/JQZPJfCHbwVGVz8JdiSrfcFvH7uE73KyWnHx9UU/GasmoFSCDSh0j2ug5Ox SZMnlaYOVsdBi8lNDdx+JcOiT0CHoVUZ6KytZ6JhJuhAmnDK8OwXqsCyB81Um6sDskWG mG8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4CcYfNDCdkNRPfZfJSmi+1aQkd/P/7ArECeWhjMr1V0=; b=6vsu2pPWR9kJb5OyeJg+XOWsWTaCD7W4nxY0qZXH+e3BYWm6ukf8w+fqpFSP5Y+jY4 Q6JYFEEzBu8+wsGX3rFmqaRy4bv6ioNuYu+RbJ2HbRZJ8vtCXesFWHxw0QDpRXwxE8bX 9xVeFvMeVFudOhbF6z9F37+9QZdKQ6QshlvFE1MnqXAmm5mbkOX/fQtPWNfdLbZETeGq dt2OPOopMCPgDmPXaEoOg1r58ebymdiCt1rGaeImqpJBSE7Nsi9hFGh2rV2mnxkeil2m J7mQZcvHA6zT9ajI9hyrfsJlbPJl1xpoOgAqjwfU5A4Vi0tRgznTUvBfqTa9vg25vlwU b/Ng== X-Gm-Message-State: AFqh2koTM1Hv1lqTPbMG8/oPlGK848tBa4jAFQqZ98tJy77jk2zlme4E M4ym1BSpTcvJbI5WHQ0z4DQNCA== X-Received: by 2002:a1c:2b04:0:b0:3d3:4f28:40c6 with SMTP id r4-20020a1c2b04000000b003d34f2840c6mr38207151wmr.1.1673009098662; Fri, 06 Jan 2023 04:44:58 -0800 (PST) Received: from [192.168.1.102] ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id z14-20020a05600c220e00b003d99fad7511sm1549137wml.22.2023.01.06.04.44.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Jan 2023 04:44:58 -0800 (PST) Message-ID: <2328562d-59a2-f60e-b17b-6cf16392e01f@linaro.org> Date: Fri, 6 Jan 2023 13:44:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v3 2/7] dt-bindings: net: snps,dwmac: Update the maxitems number of resets and reset-names Content-Language: en-US To: Yanhong Wang , linux-riscv@lists.infradead.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Emil Renner Berthing , Richard Cochran , Andrew Lunn , Heiner Kallweit , Peter Geis References: <20230106030001.1952-1-yanhong.wang@starfivetech.com> <20230106030001.1952-3-yanhong.wang@starfivetech.com> From: Krzysztof Kozlowski In-Reply-To: <20230106030001.1952-3-yanhong.wang@starfivetech.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/01/2023 03:59, Yanhong Wang wrote: > Some boards(such as StarFive VisionFive v2) require more than one value > which defined by resets property, so the original definition can not > meet the requirements. In order to adapt to different requirements, > adjust the maxitems number definition. > > Signed-off-by: Yanhong Wang > --- > .../devicetree/bindings/net/snps,dwmac.yaml | 36 ++++++++++++++----- > 1 file changed, 28 insertions(+), 8 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > index e26c3e76ebb7..f7693e8c8d6d 100644 > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > @@ -132,14 +132,6 @@ properties: > - pclk > - ptp_ref > > - resets: > - maxItems: 1 > - description: > - MAC Reset signal. > - > - reset-names: > - const: stmmaceth > - > power-domains: > maxItems: 1 > > @@ -463,6 +455,34 @@ allOf: > Enables the TSO feature otherwise it will be managed by > MAC HW capability register. > > + - if: > + properties: > + compatible: > + contains: > + const: starfive,jh7110-dwmac > + Looking at your next binding patch, this seems a bit clearer. First of all, this patch on itself has little sense. It's not usable on its own, because you need the next one. Probably the snps,dwmac should be just split into common parts used by devices. It makes code much less readable and unnecessary complicated to support in one schema both devices and re-usability. Otherwise I propose to make the resets/reset-names just like clocks are made: define here wide constraints and update all other users of this binding to explicitly restrict resets. Best regards, Krzysztof