Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1762172pxj; Sun, 16 May 2021 03:28:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrogAisCPWkWNhg00mvRtZGOXDGkvqN1o4al6um9hZuVbuA23J+L0zriKMPo7BLh3wXu8c X-Received: by 2002:aa7:c789:: with SMTP id n9mr66810621eds.352.1621160900855; Sun, 16 May 2021 03:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621160900; cv=none; d=google.com; s=arc-20160816; b=DKO6rl4eXHGbG/2qgiBs7YJ/f1nAKf+2GkHPk+AW/3MD7K08BAbPDlBaSCqqAhUQ+k bszKyPMDnat4Cz2g6eBSaTyE0/uRaiT6aYGJGgNcsG7phOesc1bEmdUUCg2nCNCISFMR ioxZUyOu+Q8qkhIIJOlqr6HQZHqn2d6PCZr/qBlJXm5gCWtppjCKpO9tg/jDiiTA+PyP ML3YvCtTEjlUeYqIxM5f5UwbX5RJPRpRWbyyKBOvWR7p/3Gr19tuSyjnzn0Hc2HFxIZN +A8butZW42bdAuI77AxVv1VNmTjjH+F4ZLhXqC6vy9GOXkDAcfmlAJnqPCkEwXHSiKwe w8Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=rJh4Vdo5L1QIm502PoGYhFOjqJgCYsz59OFOfwGXTfM=; b=D0uO1M/BjFvfFl2XErlsQd7j5KKdVVdpMwsxEpYyeIe20CT0mc+9Lf/v8oqKKYd/R5 W8cqxgUXHlPaDtH6BINH2Mh0eXjUIOAVMB67dEbzRZZpfjInHgypqk+JmNCLoQ62UZcn 9kR0Tliu65SPpK3PPaZiuE0J6fp19/aumry3HN6ia/yTnYUvEuzk9hB284wlhVBEP3Hq k7G+0yoAAGPemrRwBcYXRmJwl3Mhj4qePHYkUgJWB69rVYY/FSWza3yQHAGTVitYcgtB hQDugtkbxfWiFiqXkKIkP4gLDHcRKP8DEkT9jhBaLdFEpfvtEgxQw/m5/cTxwbarP9nO AG/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@earth.li header.s=the header.b=IHR5xqzX; 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 d4si10650224eja.217.2021.05.16.03.27.57; Sun, 16 May 2021 03:28:20 -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; dkim=fail header.i=@earth.li header.s=the header.b=IHR5xqzX; 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 S235003AbhEPJi2 (ORCPT + 99 others); Sun, 16 May 2021 05:38:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229455AbhEPJi2 (ORCPT ); Sun, 16 May 2021 05:38:28 -0400 Received: from the.earth.li (the.earth.li [IPv6:2a00:1098:86:4d:c0ff:ee:15:900d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3ECFC061573; Sun, 16 May 2021 02:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=earth.li; s=the; 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=rJh4Vdo5L1QIm502PoGYhFOjqJgCYsz59OFOfwGXTfM=; b=IHR5xqzX8OqoIC4Z7tfna9w4sW FYzgqfxjXOi3Sj90pGKtPXq0zx0UgUa16GNH0Fqkf1xVnCgX+1PvNUmxxztG14RMiESc3PmPoxcnH /Jxy6wTxLajsJuyxas/nAZO6LP+yQ6CLc37QvaC0T91A7V2ZllQp0lnbx9WijLuLDO+z8k06xab7G 2JupSs8BWRWc0tCOLsTgUZZKBfeTyHEsR3nk52YhMe1BmMxdYyHLeRjemxL1nuJ9ICff/olgm3oxC O+YsM3HyjwiCjTi/J7zi8OVCld5ve4dElrUp1AyT6N16hwTWffMBmES3Qa59vIIG9yUDDfcnt0EHs os1CYyoA==; Received: from noodles by the.earth.li with local (Exim 4.92) (envelope-from ) id 1liDCt-0001UJ-5B; Sun, 16 May 2021 10:37:07 +0100 Date: Sun, 16 May 2021 10:37:07 +0100 From: Jonathan McDowell To: Ansuel Smith Cc: Andrew Lunn , Florian Fainelli , Heiner Kallweit , Russell King , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH net-next v4 01/28] net: mdio: ipq8064: clean whitespaces in define Message-ID: <20210516093707.GL11733@earth.li> References: <20210515170046.GA18069@earth.li> <20210515180856.GI11733@earth.li> <20210515194047.GJ11733@earth.li> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 16, 2021 at 02:23:18AM +0200, Ansuel Smith wrote: > On Sun, May 16, 2021 at 01:52:05AM +0200, Andrew Lunn wrote: > > > > They're on 2 separate sets of GPIOs if that makes a difference - switch0 > > > > is in gpio0/1 and switch1 is on gpio10/11. Is the internal MDIO logic > > > > shared between these? Also even if that's the case it seems odd that > > > > enabling the MDIO for just switch0 doesn't work? > > > > > > > > > > The dedicated internal mdio on ipq8064 is unique and present on the > > > gmac0 address so yes it's shared between them. And this seems to be the > > > problem... As you notice the fact that different gpio are used for the > > > different switch fix the problem. So think that to use the dedicated > > > mdio bus with both switch we need to introduce some type of > > > syncronization or something like that. > > > > Please could you describe the hardware in a bit more details. Or point > > me at a datasheet. It sounds like you have an MDIO mux? Linux has this > > concept, so you might need to implement a mux driver. > > > > Andrew > > Datasheet of ipq8064 are hard to find and pricey. > Will try hoping I don't write something very wrong. > Anyway on the SoC there are 4 gmac (most of the time 2 are used > and represent the 2 cpu port) and one mdio bus present on the gmac0 > address. There's a suggestion of an additional mdio bus on the gmac1 address at: https://github.com/adron-s/openwrt-rb3011/commit/dd63b3ef563fa77fd2fb7d6ca12ca9411cd18740 is that not accurate? J. -- Funny how life imitates LSD. | .''`. Debian GNU/Linux Developer | : :' : Happy to accept PGP signed | `. `' or encrypted mail - RSA | `- key on the keyservers.