Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp782872pxb; Thu, 19 Aug 2021 11:04:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytr5pcRmmscFsLwlcUZLds7TTgBPzIDPfNP3PHMBHypqETkjoH7UsfabgATCcbQNCJ4X6e X-Received: by 2002:aa7:db47:: with SMTP id n7mr17763795edt.15.1629396283359; Thu, 19 Aug 2021 11:04:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629396283; cv=none; d=google.com; s=arc-20160816; b=SwgMHGyTiPPkBM3NCs4xOrrifdVpzkNMcutGmIlDJOBfPt4dWsaftJcV7pf/t/dCK5 ysdERZiZxrEVbbp5u6kIBT49EOzfVDoUIDlfOcWktUIvF+s1G7gpXZ6WkY3+v6vOF36k U1CJ4F5voaLdLqq14lubO4sa9krd30gXf3hNDbjs+rk0UfaXXqmGwyu50y9I3XYTqIFl 7xBMo42Olw21HMAkeiJ+DndT717fVY53Jzj4UptCLQ2vG4sSuLUKc6LdUia47SQstjNM nnnlFUvv/0S7PerjBhGiJBMpeJWxEVDcdhirv0k4TUGGTMXV6vegubPUmNH6MLuNkXs1 jE+g== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=gwoUakKwXQcxLHqLZ5a7hamrCzi9wg3JLFR53S3uuoU=; b=KnkBkPR1xRXqpXen1z8nfoiYyINP7Hl/scMpG/UUyF18OdGFZGx3SY0LFwkQqyDTic arh4WPhP3F24sEyYpQHLuIBMERNL4HG895/83GujQbjQY+2l7NPs1x8eCW0w7oTbOFRY HSD3UDR+guCv7dgTdQ8gPg7GvxOTe61XV/mA1dG6zR1Y633XyEdF/aDKy0Jbh13bouAv aaABdJ0Cx4rjSwB/vB5f2iP53JBm6dX9tqF+igRF2j8TTb+8LFYbQyuetFPB0hjLseCh ZuRn3DdgoZfcXj2BNdcQ+E4+rVTR4XnDRmkCdb/Zd17LQEJ0lOA31XD2HOgUoF4Kh1cm jZ1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ck9si3974648edb.208.2021.08.19.11.04.07; Thu, 19 Aug 2021 11:04:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234106AbhHSR7a (ORCPT + 99 others); Thu, 19 Aug 2021 13:59:30 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:48087 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233971AbhHSR70 (ORCPT ); Thu, 19 Aug 2021 13:59:26 -0400 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 7CC8FE0005; Thu, 19 Aug 2021 17:58:47 +0000 (UTC) Date: Thu, 19 Aug 2021 19:58:47 +0200 From: Alexandre Belloni To: Vladimir Oltean Cc: "devicetree@vger.kernel.org" , "UNGLinuxDriver@microchip.com" , Horatiu Vultur , Rob Herring , Thomas Bogendoerfer , "linux-mips@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH devicetree 2/2] MIPS: mscc: ocelot: mark the phy-mode for internal PHY ports Message-ID: References: <20210819170416.2252210-1-vladimir.oltean@nxp.com> <20210819170416.2252210-2-vladimir.oltean@nxp.com> <20210819171704.z3avr2b5jur6dohl@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210819171704.z3avr2b5jur6dohl@skbuf> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/08/2021 17:17:05+0000, Vladimir Oltean wrote: > On Thu, Aug 19, 2021 at 08:04:16PM +0300, Vladimir Oltean wrote: > > The ocelot driver was converted to phylink, and that expects a valid > > phy_interface_t. Without a phy-mode, of_get_phy_mode returns > > PHY_INTERFACE_MODE_NA, which is not ideal because phylink rejects that. > > > > The ocelot driver was patched to treat PHY_INTERFACE_MODE_NA as > > PHY_INTERFACE_MODE_INTERNAL to work with the broken DT blobs, but we > > should fix the device trees and specify the phy-mode too. > > > > Signed-off-by: Vladimir Oltean > > --- > > Please note that the pre-phylink driver has this check: > > switch (ocelot_port->phy_mode) { > case PHY_INTERFACE_MODE_NA: > (...) > case PHY_INTERFACE_MODE_SGMII: > (...) > case PHY_INTERFACE_MODE_QSGMII: > (...) > default: > dev_err(ocelot->dev, > "invalid phy mode for port%d, (Q)SGMII only\n", > port); > of_node_put(portnp); > err = -EINVAL; > goto out_teardown; > } > > So it does not actually expect PHY_INTERFACE_MODE_INTERNAL and will > error out. > > Are we okay with the new device tree blobs breaking the old kernel? From my point of view, newer device trees are not required to work on older kernel, this would impose an unreasonable limitation and the use case is very limited. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com