Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2916485rdb; Tue, 12 Sep 2023 17:00:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEEcvvzMGgdNmRrRBL2eOLorX7gspj9lGhJdI63eAvu67Cp4DxgrQ+o1lJFwlKraX1LpzRr X-Received: by 2002:a17:902:9896:b0:1bc:6c8:cded with SMTP id s22-20020a170902989600b001bc06c8cdedmr1096026plp.67.1694563257332; Tue, 12 Sep 2023 17:00:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694563257; cv=none; d=google.com; s=arc-20160816; b=Pq4frOtY6lTqnotqB/vlAMPgwZBy1gI6/SuMKNYocHgYhltsV5H8ZwnpbjDrypD/Ds sXN9NyEyfq0DIL9YvcpW2OvwYEGHUJhRx7w5p4OjC/Vy1g2aFx/8p+eoqJz/7RMxsq5F JOK5szoWZgBg+aprz2Ba6hUyRrnzbq3xLch2ZPw1onXWLfwgU3bbk8QVbzhfpiOEX/je TEwJIVeABFsJov6dEIZ2fJ5yGTZXI4je9NPQOtTBfw/I/XjT8qGef0iF8x4ao30DGE+w MFXeh3beYqI3UIFdxXCPf+NBS89p4DlL/k4cGwuML2tixzsSfX8X76mHKdbhDn+NZqMl DPBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Z8gdWrWuVeFlnSIKZ2NOJm7Y8BUbwd2ZNwalxRE+BW0=; fh=bg7h1zPfKgSaYZT9Q/Kp2lyTlTX0JalUHwkQpmUvH6U=; b=LCrjvQY6/6NI7hK4XbQXnkz87ASSQQm6+7bT1NlFdtT0AEaiVyxV3iCkG7wZEoci6S c2I+EDqvmGO9KP9tJwEtMN0JTyr1xSVGoTsrBQ7eDst9JxfnKu1qNJ6tSEi7Kucv02RF cJXcz/uexm24a93+r53ja1bQBuitM2zDt9RK9GKWGR/Z2TpkmXLsMdG4l+hlU6pzvBBs JpILpy8f+WaObEtzixusNaVi8EqR/EjZpfFuB3LpWI/G8flv+0c2tgcG6yFTPgqz4uu4 5/bsiuvxQRUzLiiK1+vapjp3tdp3xcuaQSWMLK6HD6NGz6i2JWHk0pfR/YlxyPdB04Vq YxcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=pIVTZev2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id t4-20020a1709027fc400b001b9ffda162csi8558777plb.441.2023.09.12.17.00.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 17:00:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=pIVTZev2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 53E7C815CD81; Tue, 12 Sep 2023 12:35:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237670AbjILTfA (ORCPT + 99 others); Tue, 12 Sep 2023 15:35:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232810AbjILTe7 (ORCPT ); Tue, 12 Sep 2023 15:34:59 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 601B8199; Tue, 12 Sep 2023 12:34:55 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-99bcc0adab4so762134266b.2; Tue, 12 Sep 2023 12:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694547294; x=1695152094; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=Z8gdWrWuVeFlnSIKZ2NOJm7Y8BUbwd2ZNwalxRE+BW0=; b=pIVTZev24UgmHyJqvdKLjXnZlirXrMgzcYKdE+ba8GHyxDJyocbHVfjhB1/Aehsqmc t19iAbnupAbkjfV8hb8emBExePQN0eV7jsxAYLag3x6HZyn+/m1gTeQed0jhJhIwECC/ h9P1vz+T29vR/8RxlxysH1ev5xPDX9zEsDP4CwOklL5l45TZF+sLFU6T2DAzV45TjNJK Cf8xz4AKh1tqYk5PXAqu7TUYS20M4cjc1SiqTJhK0SBgOKSjx0KbvxaWylxbSb9q5Y0d fs75BKeN8FYNjUFwNdQ53R8bCJvYUMLzP91wEG9xKhMdr0HoWmAh4e2/2d2NRPSRUIYq g9AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694547294; x=1695152094; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Z8gdWrWuVeFlnSIKZ2NOJm7Y8BUbwd2ZNwalxRE+BW0=; b=VKWlHjsz/UxJUZ/FM7GzHZNq/zjoOkGev8QJn1jagdNVQlQJrxy/+9B6awRU6WsBJl 5aKPtrBVWhxdp29LpzzIxynDRCzO/AjtuLdpYVbHD27XdIr7s/ATWh2s1PoP5cSLmKMO GQ/60QqinWF4hBQEt8tb/he7OVAuXtBafk8MxcYMya+Eq7PjCXh7WikPP57H9Fmj9Rqf vjo/4omvGc8FUz1xmVJUapxCrlaS5lC7IISMw/eYS++PxwzOjFEe4xlDeOBz+OO9IV3j WaQyu24lhZDZOvdAn7iad3/9kbSDgycew0eiRBJrokueCaHJrGpCcWKDK5avU1uhXh0g xNtw== X-Gm-Message-State: AOJu0Yx9H5Ce/v/9mIxkm2GbjD+M7thhghaKLrylnxcOn79eznSoZRoH GtuyGUduw7KDRKlOlRWyTVQ= X-Received: by 2002:a17:906:3149:b0:9a5:cade:8044 with SMTP id e9-20020a170906314900b009a5cade8044mr186839eje.21.1694547293556; Tue, 12 Sep 2023 12:34:53 -0700 (PDT) Received: from skbuf ([188.25.254.186]) by smtp.gmail.com with ESMTPSA id i18-20020a17090671d200b0099cf840527csm7290131ejk.153.2023.09.12.12.34.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 12:34:53 -0700 (PDT) Date: Tue, 12 Sep 2023 22:34:50 +0300 From: Vladimir Oltean To: =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= 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 , Alvin =?utf-8?Q?=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 Subject: Re: [PATCH 2/4] dt-bindings: net: dsa: document internal MDIO bus Message-ID: <20230912193450.h5s6miubag46z623@skbuf> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <036c0763-f1b2-49ff-bc82-1ff16eec27ab@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 (lipwig.vger.email [0.0.0.0]); Tue, 12 Sep 2023 12:35:05 -0700 (PDT) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 lipwig.vger.email On Tue, Sep 12, 2023 at 10:23:51PM +0300, Arınç ÜNAL wrote: > On 12.09.2023 01:51, Vladimir Oltean wrote: > > On Sat, Sep 09, 2023 at 11:53:50AM +0300, Arınç ÜNAL wrote: > > > What to do: > > > - For mscc,vsc7514-switch, enforce phylink bindings for ports. > > > - For mscc,vsc7512-switch, enforce phylink bindings for user ports. > > > > you can also look at dsa_switches_apply_workarounds[], and if the switch > > isn't there, then you can replace "user ports" with "ports" here and > > everywhere. > > 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 :) > > 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.