Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp742425iog; Mon, 13 Jun 2022 11:55:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ulZ0Qm3UNhSavYFoGlHD5laOUINmAWago0IToR9kD8yS9kaLMbgQz7e16/1vBhY2TvlBo7 X-Received: by 2002:a05:6402:1cc2:b0:434:f631:d7f3 with SMTP id ds2-20020a0564021cc200b00434f631d7f3mr1317584edb.171.1655146524030; Mon, 13 Jun 2022 11:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655146524; cv=none; d=google.com; s=arc-20160816; b=hKi5AHgrSuIGvg2MIxTZLn7PRM1wowUQbpqQlYUlaG9CTTUnfwDxzlUVIh4sOnv2PF pGEU5xK78LfNHZFVoX5QJRxIAb0qcVzKm3isQncbBKd4OmqiAxA/HDjqWzvZlOrPMKzN h/oKEU5b8F1ry97gmD6BnGkJ5Zz8ZXuIBjUNR0xMJZfgYPRnThP8LcDf/xufNsWMAzn1 SRu21amOijrY+XrCtDt0eLKi7k8JpqalysHlFFL9W5mEHoGeUtU+6JpdtbS6O3YsBBjV iZJPTCusG24ZWu6T90+Wpyn03E9hc3IXkfbpO7SN1CS2iN8EtO5MoALfzs+KLotaJeLz br6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=aynUVNbocW80Zlc//1zl00hKBMSlDxIlbYmlKlKWO8s=; b=UW7AAQEyGcPQppPVlxkcDdxZ2DLaB77AeoYehtbuCC43VSxm9BMHGOnX7451A2Ny/9 zndinaubvaQSdvRQO2EUW7+tHKPTJw7CnrzYQPXQC55CuwqDLMzbu3wWbLG+I+VErde4 e5tPIR0KW55oMtXj+xaEUGxhmkZHCQ1j1mIcygcbc2xVVpj+KV9gs5IsEc56hi4ffBSw 22VizNkkD4xYiLJu1ijbd8T4B+jfPkk3jiZDPAqlWbCebHKa/7Z3W330c1FoWJaJElZt SJsFfk8haqWKhjPMHO3OpKvArQ6hKioS+TjJCXw9+s3Wn2VcuXyRqPMDm1SXC5o9NZBi NxgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W+9bwBPV; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p18-20020a056402045200b0042dd723a671si7367472edw.272.2022.06.13.11.54.59; Mon, 13 Jun 2022 11:55:24 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=W+9bwBPV; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343745AbiFMSkl (ORCPT + 99 others); Mon, 13 Jun 2022 14:40:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343707AbiFMSkU (ORCPT ); Mon, 13 Jun 2022 14:40:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA18E50070; Mon, 13 Jun 2022 08:28:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6E915B81022; Mon, 13 Jun 2022 15:28:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32C6CC34114; Mon, 13 Jun 2022 15:28:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655134119; bh=Dya8+t1QAtJ3oxTE/w7JBXY3Zy4dSxKdD4rHdX/ukpU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=W+9bwBPVa6gi1WBdJnbOZQ9otuTgRa+uQlfgJjus5ISO4CQoKszfbzn/2ujRSDS9w YU5R9bYYkgqU5tFuUOWjLWOVA5BmosI9eYXKhxos+SrBcSuHyxQ0CFNGAcSW5YkEKZ CKnrAWrLDnLKjoEPb6e+1TWmduzAzsSgmyUHhBjr9+hps+tSaZQXWk8EVyZ06PCU2z kdb1Ht0264pqgRRMsIQi/OGqeG+CdxpiKjLHUrwNXX0HGDqzsyf588udukbhcTCNwX QlQJPHq3iyBQMnESw/1crRKvxxikenY0sgNBGrHHXH003Fsbx+4bV88jEQ5qcTpUHK Sp1Xoinc1NUUA== Received: by mail-vs1-f54.google.com with SMTP id x187so6274652vsb.0; Mon, 13 Jun 2022 08:28:39 -0700 (PDT) X-Gm-Message-State: AJIora8AiJUlxK+NHA6QtueF+s4KwJGW8g+J9i53p2uTiMAYjwVmA87Z H49E5TNT+64q8bkwAZY03+7PSkv5l0yKOvQqtg== X-Received: by 2002:a67:d38c:0:b0:349:d028:c8ea with SMTP id b12-20020a67d38c000000b00349d028c8eamr133392vsj.6.1655134118163; Mon, 13 Jun 2022 08:28:38 -0700 (PDT) MIME-Version: 1.0 References: <20220610165940.2326777-1-jiaqing.zhao@linux.intel.com> <20220610165940.2326777-6-jiaqing.zhao@linux.intel.com> <1654903146.313095.2450355.nullmailer@robh.at.kernel.org> <21c9ba6b-e84e-4545-44d2-5ffe5fea9581@linux.intel.com> In-Reply-To: <21c9ba6b-e84e-4545-44d2-5ffe5fea9581@linux.intel.com> From: Rob Herring Date: Mon, 13 Jun 2022 09:28:26 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 5/6] dt-bindings: net: Add NCSI bindings To: Jiaqing Zhao Cc: OpenBMC Maillist , netdev , devicetree@vger.kernel.org, "David S . Miller" , Samuel Mendoza-Jonas , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Fri, Jun 10, 2022 at 9:09 PM Jiaqing Zhao wrote: > > On 2022-06-11 07:19, Rob Herring wrote: > > On Sat, 11 Jun 2022 00:59:39 +0800, Jiaqing Zhao wrote: > >> Add devicetree bindings for NCSI VLAN modes. This allows VLAN mode to > >> be configured in devicetree. > >> > >> Signed-off-by: Jiaqing Zhao > >> --- > >> .../devicetree/bindings/net/ncsi.yaml | 34 ++++++++++++++++++= + > >> MAINTAINERS | 2 ++ > >> include/dt-bindings/net/ncsi.h | 15 ++++++++ > >> 3 files changed, 51 insertions(+) > >> create mode 100644 Documentation/devicetree/bindings/net/ncsi.yaml > >> create mode 100644 include/dt-bindings/net/ncsi.h > >> > > > > My bot found errors running 'make DT_CHECKER_FLAGS=3D-m dt_binding_chec= k' > > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > > > yamllint warnings/errors: > > > > dtschema/dtc warnings/errors: > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/ne= t/ncsi.yaml: 'oneOf' conditional failed, one must be fixed: > > 'unevaluatedProperties' is a required property > > 'additionalProperties' is a required property > > hint: Either unevaluatedProperties or additionalProperties must b= e present > > from schema $id: http://devicetree.org/meta-schemas/core.yaml# > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/ne= t/ncsi.yaml: ignoring, error in schema: > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/ne= t/ncsi.example.dtb: ethernet@1e660000: 'ncsi,vlan-mode' does not match any = of the regexes > > From schema: /builds/robherring/linux-dt-review/Documentation/dev= icetree/bindings/vendor-prefixes.yaml > > I saw vendor-prefix.yaml says do not add non-vendor prefixes to the list.= Since "ncsi" is not a vendor, may I ask what is the suggested replacement = for 'ncsi,vlan-mode'? Will 'ncsi-vlan-mode' be fine? I don't know. What is NCSI? Is it specific to certain MACs? Why do you need to set this up in DT? Network configuration is typically done in userspace, so putting VLAN config in DT doesn't seem right. All questions your commit message should answer. > > > Documentation/devicetree/bindings/net/ncsi.example.dtb:0:0: /example-0/= ethernet@1e660000: failed to match any schema with compatible: ['aspeed,ast= 2600-mac', 'faraday,ftgmac100'] > > Documentation/devicetree/bindings/net/ncsi.example.dtb:0:0: /example-0/= ethernet@1e660000: failed to match any schema with compatible: ['aspeed,ast= 2600-mac', 'faraday,ftgmac100'] > > The ftgmac100 it depends on uses a txt document instead of an yaml schema= . And I see there is other schemas having the same error, can this be ignor= ed? No. Don't add to the list. Once all the existing warnings (~40) are fixed, then this will be turned on by default. > > And I've got one more question. The ncsi driver does not has its own comp= atible field, instead, it is enabled by setting the "use-ncsi" property of = some specific mac drivers. Though currently only ftgmac100 supports ncsi in= upstream kernel, it may be used by other mac drivers in the future. What d= o you think is a proper way for defining the ncsi schema? Having it in a se= parate yaml like this patch or add the properties to all the mac yamls that= supports yaml? If the former way is preferred, how should the schema be de= fined without "compatible"? If it is a function of driver support or not, then it doesn't belong in DT. Rob