I'm trying to write a device tree overlay to recognize a SPI-based enc28j60 module to my BeagleBone Black. This module doesn't show up in /kernel-dev/Documentation/devicetree/bindings
but there does exist a driver for it in the kernel.
Does the lack of documentation indicate that the device tree binding is missing? Without being able to say something like compatible = "microchip,enc28j60"
, I'm wondering how else I can use the device tree overlay to load the enc28j60.ko driver?
After some research and grep'ing it appears that devicetree-compatible drivers have a piece of code that looks like:
static struct of_device_id enc28j60_of_match[] __devinitdata = {
{ .compatible = "microchip,enc28j60", },
{}
};
Which is then included in the platform_driver
struct. This instructs the kernel how to react if it encounters a compatible = "microchip,enc28j60"
in the devicetree overlay.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With