Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5223694imm; Tue, 9 Oct 2018 11:33:15 -0700 (PDT) X-Google-Smtp-Source: ACcGV63gWGZH1+S0FIjitsvOqNYDzQ44sNjEGCR9tbSFLCIcWjP4DK58aq4qaM2VJ24QPsJg8E2W X-Received: by 2002:a63:6342:: with SMTP id x63-v6mr25204989pgb.83.1539109995582; Tue, 09 Oct 2018 11:33:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539109995; cv=none; d=google.com; s=arc-20160816; b=LLRhuFOmcGG5oAYpRIebUJExxOGKMRCBZZbbdbNiyClzkizvA4Kg2xyLiZ55U1sv/1 YjOsFk11s1LP80n2Wr/HO+2xLOl1B/O9xe/peOQ3d71PqTplCZqpNZG0DVSaQHruZZxe ac+n13+w+vNO4yrhnZCzio2NKbD2QNuBOhKUO1BcdcYam+ERAWm7q2mJpSuPFbLbdfaY tNZIReQbNvs//4xrpPWN6duZKFgt9FhhBeWrYPCHAHtgGF1D90WXrO5GWuC2Cdi2dfIV 5MndvKMAY+AkTxPpmOvxoCtOCf2fZ2HMXz7UFHZnAZEhNVznmUY7aIYOBftFtWocYHKU y1FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=902PhF52M/Cz6Tu0Ri21LRUdH6aCiX/xSuwLUBdR8ts=; b=cKSJ1Hwk8/vVvjzUjslkHY75IR42MVfIGwyLElkrXv9CfSqQU8Vde4UJBfeYVIWAoL I3pdb3u2kaLbu9Nu+auiS3wjSryAUlzijmUFamL8lQztJaOyfar6TVcD0SpM90cN/gF8 jj7OytdVZTy2SzNh1QwyQwl5t2tqxZLv1bz70ohEMu7hz2c87jOlVWof7A9IFd9bnFOw 60A918Ki/oZyApm6F6XDSIGRG+DMYqtQEfS+IvZA/Ey/i6Cn0qJqt/IkvUAVhkYXOLo2 vjzmXFFk/8U9VsqHB4bpC7Qq6OFKTrQkawWSFoDwkIRIIebfnteZjiEcU6/dLIoqymQC AYhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QLN55wqy; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d16-v6si21840407pfj.251.2018.10.09.11.33.00; Tue, 09 Oct 2018 11:33:15 -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=@chromium.org header.s=google header.b=QLN55wqy; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726986AbeJJBuD (ORCPT + 99 others); Tue, 9 Oct 2018 21:50:03 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:32932 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726757AbeJJBuD (ORCPT ); Tue, 9 Oct 2018 21:50:03 -0400 Received: by mail-pg1-f194.google.com with SMTP id y18-v6so1243666pge.0 for ; Tue, 09 Oct 2018 11:31:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=902PhF52M/Cz6Tu0Ri21LRUdH6aCiX/xSuwLUBdR8ts=; b=QLN55wqy95vfQfu3ELTE4AOFrRezhhBK59GpCWSwIOsxFbNAwjmYqdA85qD9jVibFn A7I/V4JIPKkLuv5Sz5TWsB/VYDKIBi/U+wQANi3MqtHdJDT9W9CEpqfWw/K1vi4G1jyL p8RxgjVI6jM3N+vJ7d9hkwn1nUnFK3hx31WLI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=902PhF52M/Cz6Tu0Ri21LRUdH6aCiX/xSuwLUBdR8ts=; b=Gomzg0BXyNO6qnWQlUU8m6IVX1yjVFcOJAvM1ei1sICT7CzvLju8G5GgmkGiABvxA1 u9wORWAEzXOWj0XFmvnzZKEg72/VsDiPitDPOvuFUDaSH/zvF+qlOj5hq7K/P4m2v25/ DgG3l6YQOb2yABaL2C7ORe+XOG/N8M9Gj1yEw5kG57p5/tyC/ly0R0KYtv6AxaTOIC6M txXT7OZ4cts/pwlRp5/ix2ma/G2u0oU6NhInmyQQ9p5eKrqzgZkgzp94VugJmh/U+9+O Rt8J601OCVGpk1ivl2hpJRTUdxLhkKYyglRvOpcwqvB0nVxwZGlq+Vh1GbhiFkuN8Mgc g8pQ== X-Gm-Message-State: ABuFfogtPcep33nP1FKxEdexlDwElLv7UCyV8faLlrj4OpdnrVPoph/7 QOnLxZT26Issw+nJszqzaymURA== X-Received: by 2002:a62:798e:: with SMTP id u136-v6mr30611363pfc.95.1539109905997; Tue, 09 Oct 2018 11:31:45 -0700 (PDT) Received: from ban.mtv.corp.google.com ([2620:15c:202:1:299d:6b87:5478:d28a]) by smtp.gmail.com with ESMTPSA id l10-v6sm39061838pgs.45.2018.10.09.11.31.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Oct 2018 11:31:44 -0700 (PDT) Date: Tue, 9 Oct 2018 11:31:42 -0700 From: Brian Norris To: Geert Uytterhoeven Cc: Matthias Kaehlcke , Rob Herring , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , linux-wireless , linux-spi , netdev , swboyd@chromium.org, Florian Fainelli Subject: Re: [PATCH] dt-bindings: Add bindings for aliases node Message-ID: <20181009183141.GA126050@ban.mtv.corp.google.com> References: <20180925210255.172734-1-mka@chromium.org> <20181009010711.GA1577@ban.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1+48 (1f3a9df87d11) (2018-07-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 09, 2018 at 09:22:07AM +0200, Geert Uytterhoeven wrote: > Please note these aliases become cumbersome once you start considering > (dynamic) DT overlays. That's why I made them optional in the sh-sci > serial driver, cfr. commit 7678f4c20fa7670f ("serial: sh-sci: Add support > for dynamic instances"). Note that as I understand it, the entire point of documenting this sort of thing is to help solidify the interface between a DT aware boot program (e.g., bootloader) and a device tree which is provided separately, to avoid memorizing node/path hierarchy. It doesn't need to (and doesn't, as I read it) enforce an OS's device naming policy. > Relevant parts of the commit description are: > > On DT platforms, the sh-sci driver requires the presence of "serialN" > aliases in DT, from which instance IDs are derived. If a DT alias is > missing, the drivers fails to probe the corresponding serial port. > > This becomes cumbersome when considering DT overlays, as currently > there is no upstream support for dynamically updating the /aliases node > in DT. That part is not a DT spec problem :) > Furthermore, even in the presence of such support, hardcoded > instance IDs in independent overlays are prone to conflicts. > > Hence add support for dynamic instance IDs, to be used in the absence of > a DT alias. This makes serial ports behave similar to I2C and SPI > buses, which already support dynamic instances. This seems to be a much different sort of problem. People always love having predictable IDs given by the OS (myself included), but that's just plain hard to do and impossible in some cases. I don't think that's what this document is about though. IOW, this document seems pretty consistent with the above: it doesn't require the usage of aliases (and it seems silly to have a driver *require* an alias) -- it just documents how one should name such an alias if you expect multiple independent software components to understand it. > To clarify my point: R-Car M2-W has 4 different types of serial ports, for a > total of 18 ports, and the two ports on a board labeled 0 and 1 may not > correspond to the physical first two ports (what's "first" in a collection of > 4 different types?). > > Aliases may be fine for referring to the main serial console (labeled > port 0 on the device, too), and the primary Ethernet interface (so U-Boot > knows where to add the "local-mac-address" property), but beyond that, > I think they should be avoided. That's fair enough. Just because the solution isn't an all-purpose tool doesn't mean it shouldn't be documented. The general concept is already in ePAPR, but it's just not very specific about property names. > Just my two^H^H^Hfive €c. Thanks, Brian > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds