From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 29 Nov 2017 03:02:33 +0100 (CET) Received: from vps0.lunn.ch ([185.16.172.187]:44493 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23990490AbdK2CCX6A4Iy (ORCPT ); Wed, 29 Nov 2017 03:02:23 +0100 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; bh=lGLuMyvvuOokLASABXBaJGqNW3r2aORFfiPLFvIoNG0=; b=D1bTZZdPrLCNV8DIVguWFPynt5Jo056LQ1lUjHY+2uDwikXQvDxjXcDw5518m8d3ll0PW7VcccfQjBrEVqeBiBD09Ff/0fNwAt5I5HMR2zAO8Sf981Jwa90j89xUJOxmZDYF7QPkrVPsTfk5t+0/NfA0pju4bCB6zeJGgHu3MRs=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1eJrhB-00037F-DZ; Wed, 29 Nov 2017 03:01:53 +0100 Date: Wed, 29 Nov 2017 03:01:53 +0100 From: Andrew Lunn To: David Daney Cc: linux-mips@linux-mips.org, ralf@linux-mips.org, James Hogan , netdev@vger.kernel.org, "David S. Miller" , Rob Herring , Mark Rutland , devel@driverdev.osuosl.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, "Steven J. Hill" , devicetree@vger.kernel.org, Florian Fainelli , Carlos Munoz Subject: Re: [PATCH v4 1/8] dt-bindings: Add Cavium Octeon Common Ethernet Interface. Message-ID: <20171129020153.GN14512@lunn.ch> References: <20171129005540.28829-1-david.daney@cavium.com> <20171129005540.28829-2-david.daney@cavium.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171129005540.28829-2-david.daney@cavium.com> User-Agent: Mutt/1.5.23 (2014-03-12) Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 61179 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: andrew@lunn.ch Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On Tue, Nov 28, 2017 at 04:55:33PM -0800, David Daney wrote: > From: Carlos Munoz > > Add bindings for Common Ethernet Interface (BGX) block. > > Acked-by: Rob Herring > Signed-off-by: Carlos Munoz > Signed-off-by: Steven J. Hill > Signed-off-by: David Daney > --- > .../devicetree/bindings/net/cavium-bgx.txt | 61 ++++++++++++++++++++++ > 1 file changed, 61 insertions(+) > create mode 100644 Documentation/devicetree/bindings/net/cavium-bgx.txt > > diff --git a/Documentation/devicetree/bindings/net/cavium-bgx.txt b/Documentation/devicetree/bindings/net/cavium-bgx.txt > new file mode 100644 > index 000000000000..830c5f08dddd > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/cavium-bgx.txt > @@ -0,0 +1,61 @@ > +* Common Ethernet Interface (BGX) block > + > +Properties: > + > +- compatible: "cavium,octeon-7890-bgx": Compatibility with all cn7xxx SOCs. > + > +- reg: The base address of the BGX block. > + > +- #address-cells: Must be <1>. > + > +- #size-cells: Must be <0>. BGX addresses have no size component. > + > +A BGX block has several children, each representing an Ethernet > +interface. > + > + > +* Ethernet Interface (BGX port) connects to PKI/PKO > + > +Properties: > + > +- compatible: "cavium,octeon-7890-bgx-port": Compatibility with all > + cn7xxx SOCs. > + > + "cavium,octeon-7360-xcv": Compatibility with cn73xx SOCs > + for RGMII. > + > +- reg: The index of the interface within the BGX block. > + > +Optional properties: > + > +- local-mac-address: Mac address for the interface. > + > +- phy-handle: phandle to the phy node connected to the interface. > + > +- phy-mode: described in ethernet.txt. > + > +- fixed-link: described in fixed-link.txt. > + > +Example: > + > + ethernet-mac-nexus@11800e0000000 { > + compatible = "cavium,octeon-7890-bgx"; > + reg = <0x00011800 0xe0000000 0x00000000 0x01000000>; Hi David In the probe function we have: + reg = of_get_property(pdev->dev.of_node, "reg", NULL); + addr = of_translate_address(pdev->dev.of_node, reg); + interface = (addr >> 24) & 0xf; + numa_node = (addr >> 36) & 0x7; Is this documented somewhere? The numa_node is particularly interesting. MMIO changes depends on what node this is in the cluster? Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH v4 1/8] dt-bindings: Add Cavium Octeon Common Ethernet Interface. Date: Wed, 29 Nov 2017 03:01:53 +0100 Message-ID: <20171129020153.GN14512@lunn.ch> References: <20171129005540.28829-1-david.daney@cavium.com> <20171129005540.28829-2-david.daney@cavium.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20171129005540.28829-2-david.daney-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: David Daney Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org, ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org, James Hogan , netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "David S. Miller" , Rob Herring , Mark Rutland , devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org, Greg Kroah-Hartman , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "Steven J. Hill" , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Florian Fainelli , Carlos Munoz List-Id: devicetree@vger.kernel.org On Tue, Nov 28, 2017 at 04:55:33PM -0800, David Daney wrote: > From: Carlos Munoz > > Add bindings for Common Ethernet Interface (BGX) block. > > Acked-by: Rob Herring > Signed-off-by: Carlos Munoz > Signed-off-by: Steven J. Hill > Signed-off-by: David Daney > --- > .../devicetree/bindings/net/cavium-bgx.txt | 61 ++++++++++++++++++++++ > 1 file changed, 61 insertions(+) > create mode 100644 Documentation/devicetree/bindings/net/cavium-bgx.txt > > diff --git a/Documentation/devicetree/bindings/net/cavium-bgx.txt b/Documentation/devicetree/bindings/net/cavium-bgx.txt > new file mode 100644 > index 000000000000..830c5f08dddd > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/cavium-bgx.txt > @@ -0,0 +1,61 @@ > +* Common Ethernet Interface (BGX) block > + > +Properties: > + > +- compatible: "cavium,octeon-7890-bgx": Compatibility with all cn7xxx SOCs. > + > +- reg: The base address of the BGX block. > + > +- #address-cells: Must be <1>. > + > +- #size-cells: Must be <0>. BGX addresses have no size component. > + > +A BGX block has several children, each representing an Ethernet > +interface. > + > + > +* Ethernet Interface (BGX port) connects to PKI/PKO > + > +Properties: > + > +- compatible: "cavium,octeon-7890-bgx-port": Compatibility with all > + cn7xxx SOCs. > + > + "cavium,octeon-7360-xcv": Compatibility with cn73xx SOCs > + for RGMII. > + > +- reg: The index of the interface within the BGX block. > + > +Optional properties: > + > +- local-mac-address: Mac address for the interface. > + > +- phy-handle: phandle to the phy node connected to the interface. > + > +- phy-mode: described in ethernet.txt. > + > +- fixed-link: described in fixed-link.txt. > + > +Example: > + > + ethernet-mac-nexus@11800e0000000 { > + compatible = "cavium,octeon-7890-bgx"; > + reg = <0x00011800 0xe0000000 0x00000000 0x01000000>; Hi David In the probe function we have: + reg = of_get_property(pdev->dev.of_node, "reg", NULL); + addr = of_translate_address(pdev->dev.of_node, reg); + interface = (addr >> 24) & 0xf; + numa_node = (addr >> 36) & 0x7; Is this documented somewhere? The numa_node is particularly interesting. MMIO changes depends on what node this is in the cluster? Andrew -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html