From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754429AbbJZNyX (ORCPT ); Mon, 26 Oct 2015 09:54:23 -0400 Received: from unicorn.mansr.com ([81.2.72.234]:51246 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754028AbbJZNyT convert rfc822-to-8bit (ORCPT ); Mon, 26 Oct 2015 09:54:19 -0400 From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Marc Gonzalez Cc: DT , Kumar Gala , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , , Sebastian Frias , Thibaud Cornic , Mason Subject: Re: [PATCH 2/3] devicetree: add binding for Aurora VLSI NB8800 Ethernet controller References: <1445522558-5808-1-git-send-email-mans@mansr.com> <1445522558-5808-2-git-send-email-mans@mansr.com> <562A23B9.3090208@sigmadesigns.com> <562DF394.3030500@sigmadesigns.com> <562E2A61.2080306@sigmadesigns.com> Date: Mon, 26 Oct 2015 13:54:10 +0000 In-Reply-To: <562E2A61.2080306@sigmadesigns.com> (Marc Gonzalez's message of "Mon, 26 Oct 2015 14:28:01 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Marc Gonzalez writes: >>> So I should write something like this in my DT? >>> >>> eth0: ethernet@26000 { >>> compatible = "sigma,smp8734-ethernet", "sigma,smp8640-ethernet", "aurora,nb8800"; >>> >>> Hmmm, you mention this below, but you used "sigma,smp8759-ethernet". >>> What about earlier chips? >> >> OK, how about this scheme then: >> >> - Device trees list the exact chip, the chip family, the oldest >> compatible family, and finally the basic "aurora,nb8800". For the >> SMP8759 that would look like this: >> "sigma,smp8759-ethernet", "sigma,smp87xx-ethernet", "sigma,smp864x-ethernet", >> "aurora,nb8800" > > AFAICT, the list of tango4 chips is (in chronological order) > > 8910, 8734, 8756, 8758, 8759 > > The problem I see is that Sigma already has plans for non-tango4 > 87xx SoCs (two in fact: 8760 and 8762, as far as I've heard). > (What a mess.) > > I would think the "chip family" needs to use the code-name like > tango3 or tango4 (for lack of a better discriminant). > > Also, (purely hypothetical) suppose something changed in 8756 and up. > How would the 8758 pick up the improvement, but not the 8734? > > I'm also confused, because I thought I read somewhere not to use > wildcards in compatible strings... It was there: > http://devicetree.org/Device_Tree_Usage#Understanding_the_compatible_Property > (Sorry, some of this stuff is a bit hard for me to grok.) Right, and you just illustrated why wildcards are bad. Sorry for the confusion. I should have known better than to look at existing bindings. Let's drop that idea. Let's try something else: Device trees list the exact chip, the oldest chip with the same features, and the oldest compatible chip. From the sound of things, that means the smp8759 should use "sigma,smp8759-ethernet", "sigma,smp8910-ethernet", "sigma,smp8642-ethernet", "aurora,nb8800". > Finally, I think what you decide to do can also be done for the > interrupt controller, right? Sure, the same scheme should be used for all on-chip devices. -- Måns Rullgård mans@mansr.com