devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Frank Rowand <frowand.list@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Stephen Boyd <stephen.boyd@linaro.org>,
	Mark Brown <broonie@kernel.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	Mark Rutland <mark.rutland@arm.com>,
	Matt Porter <mporter@konsulko.com>,
	Koen Kooi <koen@dominion.thruhere.net>,
	Guenter Roeck <linux@roeck-us.net>, Marek Vasut <marex@denx.de>,
	Wolfram Sang <wsa@the-dreams.de>,
	devicetree <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-i2c@vger.kernel.org
Subject: Re: Portable Device Tree Connector -- conceptual
Date: Thu, 7 Jul 2016 14:51:35 +1000	[thread overview]
Message-ID: <20160707045135.GU14675@voom.fritz.box> (raw)
In-Reply-To: <199EAB87-47DA-4213-BE60-43C2E062AAD5@konsulko.com>

[-- Attachment #1: Type: text/plain, Size: 2790 bytes --]

On Fri, Jul 01, 2016 at 01:59:58PM +0300, Pantelis Antoniou wrote:
> Hi Frank,
> 
> Comments inline.
> 
> > On Jul 1, 2016, at 03:02 , Frank Rowand <frowand.list@gmail.com> wrote:
> > 
> > Hi All,
> > 
> > I've been trying to wrap my head around what Pantelis and Rob have written
> > on the subject of a device tree representation of a connector for a
> > daughter board to connect to (eg a cape or a shield) and the representation
> > of the daughter board.  (Or any other physically pluggable object.)
> > 
> > After trying to make sense of what had been written (or presented via slides
> > at a conference - thanks Pantelis!), I decided to go back to first principals
> > of what we are trying to accomplish.  I came up with some really simple bogus
> > examples to try to explain what my thought process is.
> > 
> > To start with, assume that the device that will eventually be on a daughter
> > board is first soldered onto the main board.  Then the device tree will
> > look like:
> > 
> > $ cat board.dts
> > /dts-v1/;
> > 
> > / {
> >        #address-cells = < 1 >;
> >        #size-cells = < 1 >;
> > 
> >        tree_1: soc@0 {
> >                reg = <0x0 0x0>;
> > 
> >                spi_1: spi1 {
> >                };
> >        };
> > 
> > };
> > 
> > &spi_1 {
> >        ethernet-switch@0 {
> >                compatible = "micrel,ks8995m";
> >        };
> > };
> > 
> > #include "spi_codec.dtsi"
> > 
> > $ cat spi_codec.dtsi
> > &spi_1 {
> > 	codec@1 {
> > 		compatible = "ti,tlv320aic26";
> > 	};
> > };
> > 
> > 
> > #----- codec chip on cape
> > 
> > Then suppose I move the codec chip to a cape.  Then I will have the same
> > exact .dts and .dtsi and everything still works.
> > 
> > 
> > @----- codec chip on cape, overlay
> > 
> > If I want to use overlays, I only have to add the version and "/plugin/",
> > then use the '-@' flag for dtc (both for the previous board.dts and
> > this spi_codec_overlay.dts):
> > 
> > $ cat spi_codec_overlay.dts
> > /dts-v1/;
> > 
> > /plugin/;
> > 
> > &spi_1 {
> > 	codec@1 {
> > 		compatible = "ti,tlv320aic26";
> > 	};
> > };
> > 
> 
> The correct form now for the /plugin/ declaration should be like
> 
> /dts-v1/ /plugin/;
> 
> The old method still works for backward compatibility.
> 
> In fact with the new patches you don’t even /plugin/ since when
> compiling an overlay we can turn on the plugin flag by looking
> at the output type (dtbo).

I'd prefer to see the dtbo option go away however, in favour of the
/plugin/ flag.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-07-07  4:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01  0:02 Portable Device Tree Connector -- conceptual Frank Rowand
2016-07-01 10:59 ` Pantelis Antoniou
     [not found]   ` <199EAB87-47DA-4213-BE60-43C2E062AAD5-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-07-01 16:31     ` Frank Rowand
     [not found]       ` <57769AF3.2040301-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-01 16:56         ` Pantelis Antoniou
2016-07-01 18:21           ` Frank Rowand
     [not found]             ` <5776B4C6.4060200-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-01 19:49               ` Pantelis Antoniou
2016-07-01 21:12                 ` Frank Rowand
2016-07-07  4:51   ` David Gibson [this message]
2016-07-01 16:44 ` Frank Rowand
2016-07-01 17:10   ` Frank Rowand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160707045135.GU14675@voom.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=koen@dominion.thruhere.net \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=marex@denx.de \
    --cc=mark.rutland@arm.com \
    --cc=mporter@konsulko.com \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=robh+dt@kernel.org \
    --cc=stephen.boyd@linaro.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).