Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1228964ybb; Fri, 20 Mar 2020 16:05:45 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvYFT3dmq5JLzsWlEW544dCuNCZqcE9fFo6gLIgBDzMijKxIqm0tuPuhKsFiTRTuoaAhqeP X-Received: by 2002:a05:6830:4008:: with SMTP id h8mr9104448ots.295.1584745544891; Fri, 20 Mar 2020 16:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584745544; cv=none; d=google.com; s=arc-20160816; b=P6C+3oqLDsFP1N0gLab1fLhWDpu76RmvVNByKI9AW9mHQWT5/+4K1CQ3xgbRtzCd7c j0tHHY2ThYCqaGZS1l5s3um7vhnJaG84pBar91bVA0pCdlHGO7AMAwl5hUmQzY5bgVA6 QK1Hqf5VlWYgzEkrTUURLdHeD6Y92/hCnGKpDAChXYGDPoTqUfc8Pzd8A0VpuxtxY6XT NMtxR0+d8rBzMh5Au2QdOt4WVWylJT3caGaRNrB/2w7+9cUrsN4PZV/itUCBKDawaq4w jZDG9pFSqPP2MABFQyLiXNeleuK6dmylqChw0+jQ28THXeVR5gQ43nn7fR9ux3whluJf TilA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nIWOiKMDqsOkzdHOwt1Pgu15FcIP6eSPSTCofdmQ7P0=; b=Jswr5n50G6Tbg4iFUL6s47NY2xC+UKA3rCQwyvZFGUe5mcToeWgxMUf7PZQSiRJtg1 2DGZWZe6NiC5AJpvpU723t6PiwJxqcPmwcwJQtWloVyoKDtMNerCRx6VRabaVsHJ8h5r gzbm90RCj+fAQKLhCjyC8AI2g/2gc+s+Xw29UKlp/WJdymlasrZzI3r8pEK7b5eVUg4C 7czTrikBG/rhUADdQBLKDGYvBUMmBvK7WrJ48+k0AUeiSi64f87Nc342wqUUod7k+6aa UTZ9UZ9jNMHMBvGFXKFOf5SMb6cYwurxw71/oH1mWe95UEM+rBMluqr1dx3lmB85yis8 /Axg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c21si4185590otp.0.2020.03.20.16.05.31; Fri, 20 Mar 2020 16:05:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727629AbgCTXFJ (ORCPT + 99 others); Fri, 20 Mar 2020 19:05:09 -0400 Received: from mail-il1-f195.google.com ([209.85.166.195]:37368 "EHLO mail-il1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726880AbgCTXFJ (ORCPT ); Fri, 20 Mar 2020 19:05:09 -0400 Received: by mail-il1-f195.google.com with SMTP id a6so7223459ilc.4; Fri, 20 Mar 2020 16:05:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=nIWOiKMDqsOkzdHOwt1Pgu15FcIP6eSPSTCofdmQ7P0=; b=kMewjn0+3bUcgUnmbrFD6uXeVmdudLGUjZyy9KX81kJsDR6Rq/3HY+mxR2T4XdXK2s PQ2qJ0KbbJf6kWhOIQ/Nm1YCS4X64LSZ90/sMn9TPDWBwaMAmsVDTVuL/OeZTrVeHXZi DVZTtE8FQtCtcr4sMzZhYrW6YBWLXZgV8dtB+HdqNHbKDG5zQDJ8TCBv53P8n9DKYjE8 QcJKi6bhINJqcdWUMnUBDBGJ2LCuLLR5S08OZhYkwtokISkF9AcIZfAcUuQH4h4fTwZX cHTF4NGYcFUgkXnZyx3Y7SbIBwchVxclbDtvJo3RCYeHrEbWvKRNNhu2DtEOMmk27oG3 uhhQ== X-Gm-Message-State: ANhLgQ146HGi+gEQ9BWnVTTnjlexHkR3A38OwsuWLUBwunDv52hV1kMP 88Rjtx6rVooSJp4HDE9BEw== X-Received: by 2002:a92:5fc1:: with SMTP id i62mr9839602ill.15.1584745508424; Fri, 20 Mar 2020 16:05:08 -0700 (PDT) Received: from rob-hp-laptop ([64.188.179.250]) by smtp.gmail.com with ESMTPSA id j1sm1965120iop.32.2020.03.20.16.05.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Mar 2020 16:05:06 -0700 (PDT) Received: (nullmailer pid 7286 invoked by uid 1000); Fri, 20 Mar 2020 23:05:04 -0000 Date: Fri, 20 Mar 2020 17:05:04 -0600 From: Rob Herring To: Florian Fainelli Cc: Oleksij Rempel , Mark Rutland , devicetree@vger.kernel.org, Andrew Lunn , Marek Vasut , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Pengutronix Kernel Team , David Jander , "David S. Miller" , Heiner Kallweit Subject: Re: [PATCH v4 1/4] dt-bindings: net: phy: Add support for NXP TJA11xx Message-ID: <20200320230504.GA30209@bogus> References: <20200313052252.25389-1-o.rempel@pengutronix.de> <20200313052252.25389-2-o.rempel@pengutronix.de> <545d5e46-644a-51fb-0d67-881dfe23e9d8@gmail.com> <20200313181056.GA29732@lunn.ch> <20200313181601.sbxdrqdjqfj3xn3e@pengutronix.de> <15dafdcd-1979-bf35-3968-c80ffc113001@gmail.com> <20200313185327.nawcp2imfldyhpqa@pengutronix.de> <20200317115626.4ncavxdcw4wu5zgc@pengutronix.de> <137a6dd3-c5ba-25b1-67ff-f0112afd7f34@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <137a6dd3-c5ba-25b1-67ff-f0112afd7f34@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 17, 2020 at 12:48:47PM -0700, Florian Fainelli wrote: > > > On 3/17/2020 4:56 AM, Oleksij Rempel wrote: > > On Fri, Mar 13, 2020 at 07:53:27PM +0100, Oleksij Rempel wrote: > >> On Fri, Mar 13, 2020 at 11:20:35AM -0700, Florian Fainelli wrote: > >>> > >>> > >>> On 3/13/2020 11:16 AM, Oleksij Rempel wrote: > >>>> On Fri, Mar 13, 2020 at 07:10:56PM +0100, Andrew Lunn wrote: > >>>>>>> diff --git a/Documentation/devicetree/bindings/net/nxp,tja11xx.yaml b/Documentation/devicetree/bindings/net/nxp,tja11xx.yaml > >>>>>>> new file mode 100644 > >>>>>>> index 000000000000..42be0255512b > >>>>>>> --- /dev/null > >>>>>>> +++ b/Documentation/devicetree/bindings/net/nxp,tja11xx.yaml > >>>>>>> @@ -0,0 +1,61 @@ > >>>>>>> +# SPDX-License-Identifier: GPL-2.0+ > >>>>>>> +%YAML 1.2 > >>>>>>> +--- > >>>>>>> +$id: http://devicetree.org/schemas/net/nxp,tja11xx.yaml# > >>>>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# > >>>>>>> + > >>>>>>> +title: NXP TJA11xx PHY > >>>>>>> + > >>>>>>> +maintainers: > >>>>>>> + - Andrew Lunn > >>>>>>> + - Florian Fainelli > >>>>>>> + - Heiner Kallweit > >>>>>>> + > >>>>>>> +description: > >>>>>>> + Bindings for NXP TJA11xx automotive PHYs > >>>>>>> + > >>>>>>> +allOf: > >>>>>>> + - $ref: ethernet-phy.yaml# > >>>>>>> + > >>>>>>> +patternProperties: > >>>>>>> + "^ethernet-phy@[0-9a-f]+$": > >>>>>>> + type: object > >>>>>>> + description: | > >>>>>>> + Some packages have multiple PHYs. Secondary PHY should be defines as > >>>>>>> + subnode of the first (parent) PHY. > >>>>>> > >>>>>> > >>>>>> There are QSGMII PHYs which have 4 PHYs embedded and AFAICT they are > >>>>>> defined as 4 separate Ethernet PHY nodes and this would not be quite a > >>>>>> big stretch to represent them that way compared to how they are. > >>>>>> > >>>>>> I would recommend doing the same thing and not bend the MDIO framework > >>>>>> to support the registration of "nested" Ethernet PHY nodes. > >>>>> > >>>>> Hi Florian > >>>>> > >>>>> The issue here is the missing PHY ID in the secondary PHY. Because of > >>>>> that, the secondary does not probe in the normal way. We need the > >>>>> primary to be involved to some degree. It needs to register it. What > >>>>> i'm not so clear on is if it just needs to register it, or if these > >>>>> sub nodes are actually needed, given the current code. > >>>> > >>>> There are a bit more dependencies: > >>>> - PHY0 is responsible for health monitoring. If some thing wrong, it may > >>>> shut down complete chip. > >>>> - We have shared reset. It make no sense to probe PHY1 before PHY0 with > >>>> more controlling options will be probed > >>>> - It is possible bat dangerous to use PHY1 without PHY0. > >>> > >>> probing is a software problem though. If we want to describe the PHY > >>> package more correctly, we should be using a container node, something > >>> like this maybe: > >>> > >>> phy-package { > >>> compatible = "nxp,tja1102"; > >>> > >>> ethernet-phy@4 { > >>> reg = <4>; > >>> }; > >>> > >>> ethernet-phy@5 { > >>> reg = <5>; > >>> }; > >>> }; > >> > >> Yes, this is almost the same as it is currently done: > >> > >> phy-package { > >> reg = <4>; > >> > >> ethernet-phy@5 { > >> reg = <5>; > >> }; > >> }; > >> > >> Because the primary PHY0 can be autodetected by the bus scan. > >> But I have nothing against your suggestions. Please, some one should say the > >> last word here, how exactly it should be implemented? > > It's not for me to decide, I was hoping the Device Tree maintainers > could chime in, your current approach would certainly work although it > feels visually awkward. Something like this is what I'd do: ethernet-phy@4 { compatible = "nxp,tja1102"; reg = <4 5>; }; Rob