From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933064AbcGENfA (ORCPT ); Tue, 5 Jul 2016 09:35:00 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:49169 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932596AbcGENe5 (ORCPT ); Tue, 5 Jul 2016 09:34:57 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Ray Jui , Jon Mason , Mark Rutland , devicetree@vger.kernel.org, Florian Fainelli , Scott Branden , Pawel Moll , Ian Campbell , Hauke Mehrtens , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , linux-kernel@vger.kernel.org, Ray Jui , Rob Herring , BCM Kernel Feedback , Kumar Gala , netdev@vger.kernel.org, davem@davemloft.net Subject: Re: [PATCH 6/7] dt-bindings: net: bgmac: add bindings documentation for bgmac Date: Tue, 05 Jul 2016 15:37:20 +0200 Message-ID: <3327458.KVBg7y9SeP@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-22-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <1467327554-22074-1-git-send-email-jon.mason@broadcom.com> <6488341.IDGze89kcW@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:J4fA+vxpYRb+qrwJrJOaYbJb8fq9yL+sQWgGhQIu/7nvgOxa4oo GZu9mgldRwenLl3mty30tBchFvTTU5r8A4NiQEY7jyWgVzCLKHYLWDt4w1RQe5Eq9Pf+sk0 xfc2CXnJg/VvN1m3FMXfWRKMjNJgje00LcKoxbg5+UaTxk3Q+7uQRnxaRx0+cPXIFFOk8D9 A9PBRC2LHRixsx2urvhIw== X-UI-Out-Filterresults: notjunk:1;V01:K0:Ms4ad0aUuZE=:m1jyeWNz/6Mp5D+m/s+JTb epqLfrAz685wPVTWLmJC1gCkwUsKGeOe6O6ZElIjxsrnrQ82skOtDeUfIYtIWzf46zmn15bxP 9bGmWmqLeM6U1C7sWN+m8O/Lo49PKPEZT1r2L+DpkHz+jl6nzOL9N21soyRgxLLcN+NmfWBzl BNPsRMiL6e0Lpx5aRRprQKLlhogDCYivHQMhtpNqalgHkRxFDwIvTLucuUZyiuX1Pcid0qCyC xD8nvyuo5DEAWWp6fsGW7e/aGuHAWD1c/8NCj7Qu1iztx7JR7c4CnAv91SxAP2t5gnWV10QlG lO5xFejYZAJ5JxCEkqIkmmOaHWyFSGd5XP9hPWMJmgq10pHYl40i1+mAt1ydYbG27TqZMB5xQ 1ymOqYmaEpkD/68IiDPo2RmTjx+ZH2XNibhWJLM5CNc22U816XfEDEgxQ+q+gCDIekp8cQ+Go 1fWeuQFbNFFwu3WRPObLSgqyBe3/2yfiVNhB5LxT8Wp2nHekFV38bSbH8LAC37AHhCWDsh9yu VVnv3aAA+S2LtsaPgCkj7z9DyU1VM1WBB3yKwXKx8fPnxrcnzSOSeKlDqbPSe1kK80FOQePmd GRTWw0g/l/ZWb5Vs3xiHwqAAlo8eZHCXtA5KtiaxODIqIR6ltJc5uqBnzayOaTteNk82fSpvS k2gVJiKPJsaZ0Q8TH06zbHlhjb5ZJUb9XzwbOLPEy7/0nFBZA6Ah+ZpoqGBd27DI8lQGN/chC Cutz27HvxaOjzB5d Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, July 4, 2016 9:34:35 AM CEST Ray Jui wrote: > On 7/1/2016 8:42 AM, Arnd Bergmann wrote: > > On Friday, July 1, 2016 11:17:25 AM CEST Jon Mason wrote: > >> On Fri, Jul 1, 2016 at 5:46 AM, Arnd Bergmann wrote: > >>> On Thursday, June 30, 2016 6:59:13 PM CEST Jon Mason wrote: > >>>> + > >>>> +Required properties: > >>>> + - compatible: "brcm,bgmac-nsp" > >>>> + - reg: Address and length of the GMAC registers, > >>>> + Address and length of the GMAC IDM registers > >>>> + - reg-names: Names of the registers. Must have both "gmac_base" and > >>>> + "idm_base" > >>>> + - interrupts: Interrupt number > >>>> + > >>> > >>> > >>> "brcm,bgmac-nsp" sounds a bit too general. As I understand, this is a family > >>> of SoCs that might not all have the exact same implementation of this > >>> ethernet device, as we can see from the long lookup table in bgmac_probe(). > >> > >> The Broadcom iProc family of SoCs contains: > >> Northstar > >> Northstar Plus > >> Cygnus > >> Northstar 2 > >> a few SoCs that are under development > >> and a number of ethernet switches (which might never be officially supported) > >> > >> Each one of these SoCs could have a different revision of the gmac IP > >> block, but they should be uniform within each SoC (though there might > >> be a A0/B0 change necessary). The Northstar Plus product family has a > >> number of different implementations, but the SoC is unchanged. So, I > >> think this might be too specific, when we really need a general compat > >> string. > > > > Ok, thanks for the clarification, that sounds good enough. > > > >> Broadcom has a history of sharing IP blocks amongst the different > >> divisions. So, this driver might be used on other SoC families (as it > >> apparently has been done in the past, based on the code you > >> reference). I do not know of any way to know what legacy, non-iProc > >> chips have used this IP block. I can make this "brcm,iproc-bgmac", > >> and add "brcm,iproc-nsp-bgmac" as an alternative compatible string in > >> this file (which I believe you are suggesting), but there might be > >> non-iProc SoCs that use this driver. Is this acceptable? > > > > If it is also used outside of iProc, then I see no need for the > > extra compatible string, although it would not do any harm either. > > > > Ideally we should name it whatever the name for this IP block is > > inside of the company, with "nsp" as the designation for the variant > > in Northstar Plus. A lot of Broadcom IP blocks themselves seem to have > > some four-digit or five-digit number, maybe this one does too? > > > > Arnd > > > > Note this IP block has an official IP controller name of "amac" from the > ASIC team. Ok, then I'd suggest making the compatible string here compatible = "brcm,nsp-amac", "brcm,amac"; or even better if you have a version number associated with it, make that compatible = "brcm,nsp-amac", "brcm,amac-1.234", "brcm,amac"; replacing 1.234 with the actual version of course. Arnd