Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3181641rdb; Wed, 13 Sep 2023 04:55:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2Zc9c5RJu0yaIHhVm8kdlakT1a5/ETj2ijrRu5m3jwmOnU/+nOmOHsDBiG7+cOfvKmIBh X-Received: by 2002:a17:902:e742:b0:1c3:94a4:34bf with SMTP id p2-20020a170902e74200b001c394a434bfmr2512576plf.66.1694606112481; Wed, 13 Sep 2023 04:55:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694606112; cv=none; d=google.com; s=arc-20160816; b=0rBZeMJJBN6NXW+6/O6AI+LiMB1pM34gx4+Bl13V3wHgMYoHVWhJB0zpH28nTD0Dpq WK+48BqHSrbnEVYaiu7BOHXhN/bCvnxOPnEfhr8agva84ovDf7kfzYUl48oYX2My/H82 UNUhaIldPNKpoXUx0UK08fAMuGHaEBCI//PAfRO8U0OnV0xVVCyUWku+ZX6aN94DfE6W IkHkX/yUQKVjhFRXae8orZTIG44C2vlfU6Q+RDplyNnZJYo5YMG2G4LXKz0dYNnnpS/6 xBkz+8Lrxoet+fR4d1Zf55TKfZOh29Nz4u8biWyxdLoAIcb7DWtKc7K4Nj718sCeS02V /nrg== 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=IcDrbEiun23FmVTKvz1/iXIyZVCi6wgj7E5zzmHbx8Q=; fh=WoDrkf2rzq4PXxfDyFqPOHYNFsUVDJdpNfFdcbK+Ju0=; b=hvTilAJ8yy/gaDkuUq/YIcpi4Z2QAl+O9MfHWEIujwEUnF07SNBmDbt6cNvZvSTcf5 nzAlkeB6ELv6zEkOJLb3nx229C/E0LkjnB83RUGNzZhyOHyjRhDX+c5Ilks5vsjInrES HmLuerRlPcp+tYswcu9t8yo4PUuMYN7eXg6oqlIIHtCrGfB0RGe/4ML9l3xOVq6fG4Mf X3d59mlYAILK7Ryjd2KEeXyb7ffvSaY7lG4qCIr2ZXqfZ5WVwY++dryRJ+dsM0DYq+9C jE+WPywBwJsf5Mvl06hs3wARzH7QZFdvbXjTvXj2S4EB8NGMlVWZHltpMuLPi6XrRCXE cVOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=oJC8AIzh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id lg7-20020a170902fb8700b001bba7713547si9660179plb.151.2023.09.13.04.55.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 04:55:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=oJC8AIzh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 224278024610; Tue, 12 Sep 2023 22:53:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236335AbjIMFxH (ORCPT + 99 others); Wed, 13 Sep 2023 01:53:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231809AbjIMFxG (ORCPT ); Wed, 13 Sep 2023 01:53:06 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4024172D; Tue, 12 Sep 2023 22:53:01 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 341061C0005; Wed, 13 Sep 2023 05:52:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1694584379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IcDrbEiun23FmVTKvz1/iXIyZVCi6wgj7E5zzmHbx8Q=; b=oJC8AIzhsGWqr5FQ7UGsC69a5dtNg+kdOYIJ/8pFW193rfzUoQNBaeLcBbQAaF8pciVkeS IfWkbbgNW+SlBJ7OSNd+g7u7komltvjIm4HYGhvhX+V18fQJi6ARO9pbFGBcBKN1CkWh3C WkTR2oRVYzZE+Kzm4IscN3Tp5N1JXUmwfRavXFr9O1qf3ioj/w9dS5YIkW0AEBIOk5fnZK +1cGjlew+y+OS0bdyDf1pu4X7RNnF4ogTUg04nYlFr3A7005Pp190vRzaf8ZdO7kTDiTzG Jo+c5RRohaMmWb/6VF9qU2Y8NS9c2wWRcqegWNVfX2VLMIj6k++JkNyrUPjFWw== Message-ID: <6cec079e-991e-4222-a76d-d6156de0daca@arinc9.com> Date: Wed, 13 Sep 2023 08:52:37 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] dt-bindings: net: dsa: document internal MDIO bus To: Vladimir Oltean Cc: Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Woojung Huh , UNGLinuxDriver@microchip.com, Linus Walleij , =?UTF-8?Q?Alvin_=C5=A0ipraga?= , Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <8a8e14f1-0493-4298-a2cc-6e7ae7929334@arinc9.com> <20230813190157.4y3zoro53qsz43pe@skbuf> <20230814143601.mnpxtcm2zybnbvoh@skbuf> <0cee0928-74c9-4048-8cd8-70bfbfafd9b2@arinc9.com> <20230827121235.zog4c3ehu2cyd3jy@skbuf> <676d1a2b-6ffa-4aff-8bed-a749c373f5b3@arinc9.com> <87325ce9-595a-4dda-a6a1-b5927d25719b@arinc9.com> <20230911225126.rk23g3u3bzo3agby@skbuf> <036c0763-f1b2-49ff-bc82-1ff16eec27ab@arinc9.com> <20230912193450.h5s6miubag46z623@skbuf> Content-Language: en-US From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <20230912193450.h5s6miubag46z623@skbuf> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: arinc.unal@arinc9.com 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 (howler.vger.email [0.0.0.0]); Tue, 12 Sep 2023 22:53:08 -0700 (PDT) On 12.09.2023 22:34, Vladimir Oltean wrote: > On Tue, Sep 12, 2023 at 10:23:51PM +0300, Arınç ÜNAL wrote: >> The phylink bindings for user ports I ended up making by looking up the >> existing devicetrees are different than the phylink bindings for the shared >> (CPU and DSA) ports currently enforced on all switches. >> >> My phylink bindings for user ports: >> >> allOf: >> - anyOf: >> - required: [ fixed-link ] >> - required: [ phy-handle ] >> - required: [ managed ] >> >> - if: >> required: [ fixed-link ] >> then: >> not: >> required: [ managed ] > > Right, it should have been anyOf and not oneOf.. my mistake. It is a bug > which should be fixed. It's the same phylink that gets used in both cases, > user ports and shared ports :) One more thing, I don't recall phy-mode being required to be defined for user ports as it will default to GMII. I don't believe this is the same case for shared ports so phy-mode is required only for them? > >> >> The phylink bindings for shared ports enforced on all switches on >> dsa-port.yaml: >> >> allOf: >> - required: >> - phy-mode >> - oneOf: >> - required: >> - fixed-link >> - required: >> - phy-handle >> - required: >> - managed >> >> Here's what I understand: >> >> - For switches in dsa_switches_apply_workarounds[] >> - Enforce the latter for shared ports. >> - Enforce the former for user ports. >> >> - For switches not in dsa_switches_apply_workarounds[] >> - Enforce the former for all ports. > > No, no. We enforce the dt-schema regardless of switch presence in > dsa_switches_apply_workarounds[], to encourage users to fix device trees > (those who run schema validation). The kernel workaround consists in > doing something (skipping phylink) for the device trees where the schema > warns on shared ports. But there should be a single sub-schema for > validating phylink bindings, whatever port kind it is. Hmm, like writing phylink.yaml and then referring to it under the port pattern node? This could prevent a lot of repetition. Arınç