Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Arm drivers: are device tree descriptions required for every device?



> On Apr 10, 2023, at 4:57 PM, Matthew Widup <widupmm%proton.me@localhost> wrote:
> 
> Hello Brook,
> 
> I'm pretty new to this stuff too, so I apologise in advance if I steer you wrong.  I would let someone else answer you , but I hope that engaging in conversation furthers *my* understanding.
> 
> ------- Original Message -------
> On Monday, April 10th, 2023 at 10:46 PM, Brook Milligan <brook%nmsu.edu@localhost> wrote:
> 
>> I do not fully understand how the kernel attaches drivers for embedded boards. Clearly, the device tree guides this process and the device tree loaded by the boot loader needs to include the relevant information.
>> 
>> What I don’t understand is whether every driver must be described in the device tree or if the kernel probes for other devices at any point.
> 
> Yes, every device must exist in the device tree (and of course have a relevant point of connection).

This is not a true statement.

> I don't know how amd64 works (presumably an all-inclusive generic "device tree" is assumed).  But in order for the kernel to use a device it must be in the device tree.  All devices that you anticipate using, and that NetBSD can work with should be in your kernel.

Again, this is not a true statement.  Devices that are connected to busses that have a "native" discovery protocol (USB and PCI are the canonical examples) do NOT need to be described by the device tree; in the case of PCI, they *might* have nodes in the device tree if there is a need to convey some platform-specific information about them (and such devices are almost certainly at some fixed location in the bus topology).

Yes, devices that are not on a self-describing bus need to be in some sort of device tree (whether that's Device Tree: The Breakfast Cereal or ACPI) in order to be enumerated; legacy mechanisms that have been used for decades are being ignored here since this discussion is in the context of the ARM port.

-- thorpej



Home | Main Index | Thread Index | Old Index