From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 837C7C433DF for ; Wed, 17 Jun 2020 21:18:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 68F752184D for ; Wed, 17 Jun 2020 21:18:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726991AbgFQVS4 (ORCPT ); Wed, 17 Jun 2020 17:18:56 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:44948 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726848AbgFQVS4 (ORCPT ); Wed, 17 Jun 2020 17:18:56 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1jlfSN-0011ed-3S; Wed, 17 Jun 2020 23:18:51 +0200 Date: Wed, 17 Jun 2020 23:18:51 +0200 From: Andrew Lunn To: Helmut Grohne Cc: Woojung Huh , Microchip Linux Driver Support , Vivien Didelot , Florian Fainelli , netdev@vger.kernel.org Subject: Re: net/dsa/microchip: correct placement of dt property phy-mode? Message-ID: <20200617211851.GD240559@lunn.ch> References: <20200617082235.GA1523@laureti-dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200617082235.GA1523@laureti-dev> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > If nothing else, it makes the device tree unintuitive to use. > > Is this placement of the phy-mode on the switch intentional? That i cannot answer. > > If yes: I think this should be prominently documented in > Documentation/devicetree/bindings/net/dsa/ksz.txt. Yes, it needs to be documented. > If no: The microchip driver should follow the documented dsa convention > and place the phy-mode on the relevant port nodes. > > If no: Do we have to support old device trees that have the phy-mode > property on the switch? We should not break existing DT blobs. So the driver should be extended to first look in the port node. If it does not find it there, look in the switch node. And maybe give a warning if it is found in the switch node, saying the DT should be updated. Andrew