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 Mon, Apr 10, 2023 at 04:46:35PM -0600, Brook Milligan 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.
> I am mostly trying to figure out how USB devices are attached to embedded boards.
> For example, the amd64 kernels include drivers for USB devices (e.g., disks, network adapters, wifi, etc.) and they are attached to a usbbus by the kernel probing.  Those drivers can also be compiled into armv7hf kernels.  
> However, I am not sure if such a kernel is expected to attach those drivers if a corresponding USB device is present, even though it might not be in the device tree.  Must devices be described in the device tree before the kernel will attach them, or can the kernel itself probe for connected USB devices as it does with amd64?
> Sorry if this is a simple question, but I’m finding it a challenge to decipher exactly how device attachment and kernel configuration are supposed to work for embedded NetBSD.
> Thanks for your help.

USB devices such as those are (almost?) never described in the FDT device tree.
The device tree is needed to enumerate devices without any sort of enumeration
mechanism built into the design.  PCI and USB provide enumeration
mechanisms as part of the bus.  SoC-internal devices on things like AMBA
and AHB usually have no means of informing software about their
existence, and thus need to be listed.


Home | Main Index | Thread Index | Old Index