linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
To: Sven Van Asbroeck <thesven73@gmail.com>,
	"Enrico Weigelt, metux IT consult" <info@metux.net>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	Frank Rowand <frowand.list@gmail.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	devicetree <devicetree@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Q] devicetree overlays
Date: Wed, 12 Aug 2020 15:27:47 +0200	[thread overview]
Message-ID: <1acc987a-d844-fca7-77eb-cf1d466f35c1@metux.net> (raw)
In-Reply-To: <CAGngYiVokqYkEiQTcqAMnvif3qEWkPOb1cAk+4rvwgxBKZ5Ukw@mail.gmail.com>

On 07.08.20 16:17, Sven Van Asbroeck wrote:

Hi,

> I believe you're asking: "how do I associate device tree nodes to
> devices on a dynamically discoverable bus such as USB or PCI" right ?
> 
> I believe that already exists. You can describe the _expected_ pci or
> usb topology in the
> devicetree. If a device gets detected in a spot on the bus described
> in the tree, that
> snippet will be automatically associated with this device.
> 
> How to for usb:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/usb/usb-device.txt?h=v5.8
> 
> How to for pci:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/pci/pci.txt?h=v5.8

Thanks, that looks good.

But I've still got another problem: how can I use DT along w/ ACPI ?

The scenario goes like this:

* machine boots and probes normally w/ ACPI
* device is detected via USB, PCI, DMI, etc -> driver gets active
* driver loads (or carries) a DT snippet
* devices on the bus are instantiated via this DT snippet

(driver could also be some udev vodoo)

Example a:

* generic usb i2c dongle w/ some i2c devices attached behind it
* config (or DT snippet) somewhere in the FS

Example b:

* x86 board driver (eg. apu2/3/4), probed via DMI
* just instantiates a bunch of generic drivers and wires up
  devices (gpio, leds, keys, ...)


Do you think we can already do that ?
Otherwise, what has to be done to achieve that ?	


--mtx

-- 
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

  reply	other threads:[~2020-08-12 13:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 14:46 [Q] devicetree overlays Sven Van Asbroeck
2020-04-27 20:26 ` Frank Rowand
2020-04-28 12:20   ` Sven Van Asbroeck
2020-08-07 11:25 ` Enrico Weigelt, metux IT consult
2020-08-07 14:17   ` Sven Van Asbroeck
2020-08-12 13:27     ` Enrico Weigelt, metux IT consult [this message]
2020-08-12 14:43       ` Sven Van Asbroeck
2020-08-12 15:13       ` 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=1acc987a-d844-fca7-77eb-cf1d466f35c1@metux.net \
    --to=lkml@metux.net \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=info@metux.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=thesven73@gmail.com \
    /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).