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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 32809C433ED for ; Sun, 9 May 2021 01:28:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 02224613FA for ; Sun, 9 May 2021 01:28:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229758AbhEIB3G (ORCPT ); Sat, 8 May 2021 21:29:06 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:59770 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbhEIB3F (ORCPT ); Sat, 8 May 2021 21:29:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1b24zNaVFFBYFVzwJpUgjrHNNdNi+opTsx8fHsrr8zc=; b=5ZarRVBNm1xcD4+YleoljQ5nme B63CdlsC0EgYVHvgIlzIKQdxiBA6Al5zesq0vw2jIbyH3g67jnXGVokOvk62UjF+JqwW29/bQ3veV lQT6ptC7ThoDZ4vwSC9+WhpoVqX/bhldcirSrJRIwtn+bZBuy9wjiRnUxLW3Fx11GirM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1lfYEg-003Ka3-EL; Sun, 09 May 2021 03:27:58 +0200 Date: Sun, 9 May 2021 03:27:58 +0200 From: Andrew Lunn To: Ansuel Smith Cc: Florian Fainelli , Vivien Didelot , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH net-next v4 19/28] net: dsa: qca8k: make rgmii delay configurable Message-ID: References: <20210508002920.19945-1-ansuelsmth@gmail.com> <20210508002920.19945-19-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > And that is the intention of the port. I didn't want the binding to be > set on the switch node but on the rgmii node. Correct me if I'm wrong > but isn't what this patch already do? > > In of_rgmii_delay I get the ports node of the current switch, iterate > every port, find the one with the phy-mode set to "rgmii-id" You know this hardware only has one RGMII port, and you know which one it is. So search the list of ports to find that one particular port, and see if 'rgmii' is set as phy-mode and if so, what the delays are. This is a port property, so you need to look at that specific port, not any random port that might have rgmii set. Andrew