Received: by 10.213.65.68 with SMTP id h4csp744686imn; Fri, 23 Mar 2018 15:12:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELvxlAmthsta5/GO5u4XIpEx9ls+5z9qwXxXKgZYa5MZHhnGJv9ahwpn035InJaGZjPQjUC6 X-Received: by 2002:a17:902:144:: with SMTP id 62-v6mr31561302plb.202.1521843166146; Fri, 23 Mar 2018 15:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521843166; cv=none; d=google.com; s=arc-20160816; b=hvPFpZN6LNBhd0fQvKhc0HFIiTI5jT8buK9SZLD1YVwFj0GqU1A6r4NaNoPPWER7ow oPtuVt2KPXHLB8Szo5iCDlaFfPfVFpqAdr21honk9eLFKloTcZLULD+5sDBFL/y4rb+k ty3KrfIHwq4xBwu6yYo3iDcaBf8Q7SLMFnaFQIK3aMEuElBNvOhWLb7FYac4h7a6s6mB x6yXEXmrNMEIf837xObBrWiZmmDghJPTRJQ+DzPjsVbGlZcAsSBYsU/b5lXVl0fedh6F hMGaYpPczkQsqgnoX/hxxuEG9RQvZwfEljq6H91O3Wg2LtrGsYfNmF12PYGcFdxvBbBG 6wJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=QKjhMlZSHPNj2p90oY4KA/n09WWldWjnBhW7R3Y3ER4=; b=x+248Cjq4qzbDhcJwl4QTGluijKYBeGW5ky5FUXVOEvxTSD/Q2ZVYiGp27kqjiAqpw jdAFpqALAaehbViowRJ3nJzyR5F8Nk1l4R9CqYv5L60xVfWgzU0N5Ewugs/ThYs2bv7t hPFwULRfYWqmY+V/465jDKcjRvKQSoxXqEdTlcf+q2x+RRI8/ByLskg6Mq9XJVxiQCfg UskQyoogYzWQB9frhMiQpoGiGdgzstrRe1D0RNrw9XaJKzbC80lqYUVaQ12UoTySXOS1 Ihd8geDYop0edyrfPzB5HLxR1FRPph0clDG4u9JXY6e+rSckWBhpny9tdLsQIUOIUW5h wHhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tw5gmihO; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z19si6532268pgn.46.2018.03.23.15.12.31; Fri, 23 Mar 2018 15:12:46 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tw5gmihO; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752206AbeCWWLj (ORCPT + 99 others); Fri, 23 Mar 2018 18:11:39 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:39217 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751677AbeCWWLg (ORCPT ); Fri, 23 Mar 2018 18:11:36 -0400 Received: by mail-qk0-f195.google.com with SMTP id j73so14520267qke.6; Fri, 23 Mar 2018 15:11:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QKjhMlZSHPNj2p90oY4KA/n09WWldWjnBhW7R3Y3ER4=; b=tw5gmihOLRsZwDU7roQK6d+7Xu973RmXi0MSrHXTk1C198sGscFKcZaMwwwOjTvCs0 F9CqQz0A2zoCK9CG5gArlOf31pYfr6gdP7UnRKNrb5oaHrPk347xxgmxsNSCGunMrA2G 614It0qZFJFXL7wQ9Lr+Wp8iPzWDF7ksEL9dVehH19yfdu6v5Haz9aES1qWA1L6yz1se 154lTZ+8XPvbDmc5lw3aOq0A6/mRNYDm5Q4t7i0HUt192pnwhPeioztMMBntd/VB9hWw axgNpEzRm6UZZ/QptJLc77TuXm5NQ7q7EQTpse3KK2kPy4I2wCzZkvWBWXWliENspzno 2eLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QKjhMlZSHPNj2p90oY4KA/n09WWldWjnBhW7R3Y3ER4=; b=nWb2ucSMCiGUbJTfjkmEX3Uc3rgyMohn7OIfL/ulJHDMo4XmgG2zO6gEV5Jd3y3lH3 FCggsFKpjmrEXhYjFRLlUGs+tMpUwlqBw2HCWIlSXlpQAzAAGCqh1cKyGfawy5aG2bmt wpQURGKM+OV/5DCQhttjs13qQ5aggsn/Qv0AxXO8lH/ug5QkvJh3HR8vomFfmVTCLwUo 4ijg/uekvDvaYnG0IEEISLuavIKHfPt2u4yRhgyBlgVnri7yFYyi61eM1t2VmF3xfCf9 f6g/UZYPTWXybg+wqBGmJ8pWYadMqqB1MzGxaqd7hy0MlNTcKApa76X5OwYvHFvq2RHm rW6A== X-Gm-Message-State: AElRT7EY1kIyVP8w9bdawOzAlemrX44N76B5rLgZBtrLYsiWyahSjTZ6 nL0LzUehuBY+SS6Rk2ScVdw= X-Received: by 10.55.149.135 with SMTP id x129mr44178119qkd.279.1521843095876; Fri, 23 Mar 2018 15:11:35 -0700 (PDT) Received: from [10.69.41.93] ([192.19.223.250]) by smtp.googlemail.com with ESMTPSA id d1sm2391218qtk.47.2018.03.23.15.11.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 15:11:34 -0700 (PDT) Subject: Re: [PATCH net-next 6/8] MIPS: mscc: Add switch to ocelot To: Andrew Lunn Cc: Alexandre Belloni , "David S . Miller" , Allan Nielsen , razvan.stefanescu@nxp.com, po.liu@nxp.com, Thomas Petazzoni , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, James Hogan References: <20180323201117.8416-1-alexandre.belloni@bootlin.com> <20180323201117.8416-7-alexandre.belloni@bootlin.com> <20180323212230.GA12808@piout.net> <20180323213344.GV24361@lunn.ch> <20180323220657.GY24361@lunn.ch> From: Florian Fainelli Message-ID: <171fb3db-70f4-4818-9390-8164fab5adca@gmail.com> Date: Fri, 23 Mar 2018 15:11:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180323220657.GY24361@lunn.ch> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/23/2018 03:06 PM, Andrew Lunn wrote: >>> That is the trade off of having a standalone MDIO bus driver. Maybe >>> add a phandle to the internal MDIO bus? The switch driver could then >>> follow the phandle, and direct connect the internal PHYs? >> >> This is more or less what patch 7 does, right? > > Patch 7 does it in DT. I'm suggesting it could be done in C. It is > hard wired, so there is no need to describe it in DT. Use the phandle > to get the mdio bus, mdiobus_get_phy(, port) to get the phydev and > then use phy_connect(). That does not sound like a great idea. And to go back to your example about DSA, it is partially true, you will see some switch bindings defining the internal PHYs (e.g: qca8k), and most not doing it (b53, mv88e6xxx, etc.). In either case, this resolves to the same thing though. Being able to parse a phy-handle property is a lot more flexible, and if it does matter that the PHY truly is internal, then the 'phy-mode' property can help reflect that. -- Florian